summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qevent.cpp10
-rw-r--r--src/gui/kernel/qevent.h3
2 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index ce9d1cbe45..223d54af96 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -1996,6 +1996,16 @@ QContextMenuEvent::QContextMenuEvent(Reason reason, const QPoint &pos)
*/
/*!
+ \fn QInputMethodEvent::Attribute::Attribute(AttributeType type, int start, int length)
+ \overload
+ \since 5.7
+
+ Constructs an input method attribute with no value. \a type
+ specifies the type of attribute, and \a start and \a length
+ the position of the attribute.
+*/
+
+/*!
Constructs an event of type QEvent::InputMethod. The
attributes(), preeditString(), commitString(), replacementStart(),
and replacementLength() are initialized to default values.
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;