Commit 66d561a6 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Utils: Pass const values by reference

Change-Id: Iafd0f372f02f0f3759419a632e81325484861ba1
Reviewed-by: default avatarEike Ziller <>
parent ce55d23e
......@@ -572,7 +572,7 @@ static QString ensureSuffix(QString f, const QString &extension)
// If a non-empty name was passed, expand to directory and suffix
static QString expandFileName(const QDir &dir, const QString name, const QString &extension)
static QString expandFileName(const QDir &dir, const QString &name, const QString &extension)
if (name.isEmpty())
return QString();
......@@ -455,7 +455,7 @@ void StyleHelper::drawIconWithShadow(const QIcon &icon, const QRect &rect,
// Draws a CSS-like border image where the defined borders are not stretched
void StyleHelper::drawCornerImage(const QImage &img, QPainter *painter, QRect rect,
void StyleHelper::drawCornerImage(const QImage &img, QPainter *painter, const QRect &rect,
int left, int top, int right, int bottom)
QSize size = img.size();
......@@ -85,7 +85,7 @@ public:
static void drawIconWithShadow(const QIcon &icon, const QRect &rect, QPainter *p, QIcon::Mode iconMode,
int dipRadius = 3, const QColor &color = QColor(0, 0, 0, 130),
const QPoint &dipOffset = QPoint(1, -2));
static void drawCornerImage(const QImage &img, QPainter *painter, QRect rect,
static void drawCornerImage(const QImage &img, QPainter *painter, const QRect &rect,
int left = 0, int top = 0, int right = 0, int bottom = 0);
static void tintImage(QImage &img, const QColor &tintColor);
......@@ -73,7 +73,7 @@ QModelIndex TreeViewComboBox::indexBelow(QModelIndex index)
return index;
QModelIndex TreeViewComboBox::lastIndex(const QModelIndex index)
QModelIndex TreeViewComboBox::lastIndex(const QModelIndex &index)
if (index.isValid() && !m_view->isExpanded(index))
return index;
......@@ -63,7 +63,7 @@ public:
QModelIndex indexBelow(QModelIndex index);
QModelIndex indexAbove(QModelIndex index);
QModelIndex lastIndex(const QModelIndex index);
QModelIndex lastIndex(const QModelIndex &index);
TreeViewComboBoxView *m_view;
bool m_skipNextHide;
Supports Markdown
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