summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2014-05-19 18:26:28 +0300
committerOrgad Shaneh <orgads@gmail.com>2014-05-20 07:35:31 +0200
commit66d561a628fa388eba647c4c1936083bbcdb8e44 (patch)
tree2fcf731352a00d27e9d1f86829455d92198ca7ec
parentce55d23e2ad34751630690f6e2a9ba5cbb644c20 (diff)
downloadqt-creator-66d561a628fa388eba647c4c1936083bbcdb8e44.tar.gz
Utils: Pass const values by reference
Change-Id: Iafd0f372f02f0f3759419a632e81325484861ba1 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
-rw-r--r--src/libs/utils/newclasswidget.cpp2
-rw-r--r--src/libs/utils/stylehelper.cpp2
-rw-r--r--src/libs/utils/stylehelper.h2
-rw-r--r--src/libs/utils/treeviewcombobox.cpp2
-rw-r--r--src/libs/utils/treeviewcombobox.h2
5 files changed, 5 insertions, 5 deletions
diff --git a/src/libs/utils/newclasswidget.cpp b/src/libs/utils/newclasswidget.cpp
index 0574091aed..61288794b0 100644
--- a/src/libs/utils/newclasswidget.cpp
+++ b/src/libs/utils/newclasswidget.cpp
@@ -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();
diff --git a/src/libs/utils/stylehelper.cpp b/src/libs/utils/stylehelper.cpp
index 141887614f..4d9d98eaef 100644
--- a/src/libs/utils/stylehelper.cpp
+++ b/src/libs/utils/stylehelper.cpp
@@ -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();
diff --git a/src/libs/utils/stylehelper.h b/src/libs/utils/stylehelper.h
index 00a17a16c9..72ffb9b3c1 100644
--- a/src/libs/utils/stylehelper.h
+++ b/src/libs/utils/stylehelper.h
@@ -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);
diff --git a/src/libs/utils/treeviewcombobox.cpp b/src/libs/utils/treeviewcombobox.cpp
index dc6e5c5fbd..5529f32877 100644
--- a/src/libs/utils/treeviewcombobox.cpp
+++ b/src/libs/utils/treeviewcombobox.cpp
@@ -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;
diff --git a/src/libs/utils/treeviewcombobox.h b/src/libs/utils/treeviewcombobox.h
index 543a237d92..dd5f850c7b 100644
--- a/src/libs/utils/treeviewcombobox.h
+++ b/src/libs/utils/treeviewcombobox.h
@@ -63,7 +63,7 @@ public:
private:
QModelIndex indexBelow(QModelIndex index);
QModelIndex indexAbove(QModelIndex index);
- QModelIndex lastIndex(const QModelIndex index);
+ QModelIndex lastIndex(const QModelIndex &index);
TreeViewComboBoxView *m_view;
bool m_skipNextHide;