Commit 8ad7ae95 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

const'ify/use reference. Remove unused variable

parent fc1415ba
......@@ -261,7 +261,7 @@ GenTime AbstractClipItem::maxDuration() const
return m_maxDuration;
}
void AbstractClipItem::drawKeyFrames(QPainter *painter, const QTransform transformation, bool limitedKeyFrames)
void AbstractClipItem::drawKeyFrames(QPainter *painter, const QTransform &transformation, bool limitedKeyFrames)
{
if (m_keyframes.count() < 1)
return;
......
......@@ -127,7 +127,7 @@ protected:
* "simplekeyframe" type, the effect always starts on clip start and ends on clip end. With the
* "keyframe" type, the effect starts on the first keyframe and ends on the last keyframe
*/
void drawKeyFrames(QPainter *painter, const QTransform transformation, bool limitedKeyFrames);
void drawKeyFrames(QPainter *painter, const QTransform &transformation, bool limitedKeyFrames);
int mouseOverKeyFrames(QPointF pos, double maxOffset);
virtual void mousePressEvent(QGraphicsSceneMouseEvent * event);
......
......@@ -325,7 +325,7 @@ bool ArchiveWidget::closeAccepted()
}
void ArchiveWidget::generateItems(QTreeWidgetItem *parentItem, QStringList items)
void ArchiveWidget::generateItems(QTreeWidgetItem *parentItem, const QStringList& items)
{
QStringList filesList;
QString fileName;
......@@ -343,7 +343,6 @@ void ArchiveWidget::generateItems(QTreeWidgetItem *parentItem, QStringList items
if (slideUrl.fileName().startsWith(".all.")) {
// mimetype slideshow (for example *.png)
QStringList filters;
QString extension;
// TODO: improve jpeg image detection with extension like jpeg, requires change in MLT image producers
filters << "*." + slideUrl.fileName().section('.', -1);
dir.setNameFilters(filters);
......
......@@ -107,7 +107,7 @@ private:
#endif
/** @brief Generate tree widget subitems from a string list of urls. */
void generateItems(QTreeWidgetItem *parentItem, QStringList items);
void generateItems(QTreeWidgetItem *parentItem, const QStringList &items);
/** @brief Generate tree widget subitems from a map of clip ids / urls. */
void generateItems(QTreeWidgetItem *parentItem, const QMap<QString, QString> &items);
/** @brief Replace urls in project file. */
......
......@@ -73,7 +73,7 @@ void UnicodeDialog::showLastUnicode()
slotTextChanged(m_lastUnicodeNumber);
}
bool UnicodeDialog::controlCharacter(QString text)
bool UnicodeDialog::controlCharacter(const QString &text)
{
bool isControlCharacter = false;
QString t = text.toLower();
......
......@@ -48,7 +48,7 @@ private:
/** \brief Removes all leading zeros */
QString trimmedUnicodeNumber(QString text);
/** \brief Checks whether the given string is a control character */
bool controlCharacter(QString text);
bool controlCharacter(const QString& text);
/** \brief Checks whether the given uint is a control character */
bool controlCharacter(uint value);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment