summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qevent.h
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/kernel/qevent.h
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/kernel/qevent.h')
-rw-r--r--src/gui/kernel/qevent.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h
index 26113357df..b90fce97e0 100644
--- a/src/gui/kernel/qevent.h
+++ b/src/gui/kernel/qevent.h
@@ -522,7 +522,7 @@ public:
};
class Attribute {
public:
- Attribute(AttributeType t, int s, int l, QVariant val) : type(t), start(s), length(l), value(val) {}
+ Attribute(AttributeType t, int s, int l, QVariant val) : type(t), start(s), length(l), value(qMove(val)) {}
AttributeType type;
int start;