summaryrefslogtreecommitdiffstats
path: root/src/gui/itemmodels
diff options
context:
space:
mode:
authorSérgio Martins <sergio.martins@kdab.com>2015-07-16 22:17:47 +0100
committerSérgio Martins <sergio.martins@kdab.com>2015-07-19 10:46:53 +0000
commit1236b1827c2d292c665ee7ef121dccae70f0429b (patch)
tree08799da31893f5480fb383ba9599fdcd1e6e8130 /src/gui/itemmodels
parentaa2efdfa97dd6f67d2a8b28debd7000097f10a73 (diff)
QtGui: Pass types with copy-ctor or dtor by const-ref
... except if the function is a ctor, callers pass rvalues, and the type has a fast move ctor. In that case, keep passing by-value and qMove() into place. Change-Id: I2c0be7d4436327834ddee0531c51c5af352ac74c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/gui/itemmodels')
-rw-r--r--src/gui/itemmodels/qstandarditemmodel_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/itemmodels/qstandarditemmodel_p.h b/src/gui/itemmodels/qstandarditemmodel_p.h
index 491a49f9c2..b49045d283 100644
--- a/src/gui/itemmodels/qstandarditemmodel_p.h
+++ b/src/gui/itemmodels/qstandarditemmodel_p.h
@@ -61,7 +61,7 @@ class QStandardItemData
{
public:
inline QStandardItemData() : role(-1) {}
- inline QStandardItemData(int r, QVariant v) : role(r), value(v) {}
+ inline QStandardItemData(int r, const QVariant &v) : role(r), value(v) {}
int role;
QVariant value;
inline bool operator==(const QStandardItemData &other) const { return role == other.role && value == other.value; }