diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-07-19 11:17:34 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-02-20 13:35:55 +0000 |
commit | 20af1ad7ef48e8f669e464fcea3151c7694fa90e (patch) | |
tree | 460cc628261597fc5d2c9797f1c5c07fadcd612b /src/gui/kernel/qevent.h | |
parent | d87242968fc56ba09243f642ce70a85084619de0 (diff) |
QInputMethodEvent::Attribute: add ctor that doesn't take a QVariant
Many callers passed QVariant() as the last ctor argument.
Micro-optimize by providing an overload that default-
constructs the variant in-place.
Change-Id: I9aab40c6e5a025c9a502c706e4cc7b10879ac418
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Takao Fujiwara <takao.fujiwara1@gmail.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/gui/kernel/qevent.h')
-rw-r--r-- | src/gui/kernel/qevent.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index c03714b22a..979e679c1e 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -528,8 +528,9 @@ public: class Attribute { public: Attribute(AttributeType t, int s, int l, QVariant val) : type(t), start(s), length(l), value(qMove(val)) {} - AttributeType type; + Attribute(AttributeType t, int s, int l) : type(t), start(s), length(l), value() {} + AttributeType type; int start; int length; QVariant value; |