summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qevent.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index be8ce1a011..50d9bbb2cc 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -3761,14 +3761,25 @@ static inline void formatInputMethodEvent(QDebug d, const QInputMethodEvent *e)
static inline void formatInputMethodQueryEvent(QDebug d, const QInputMethodQueryEvent *e)
{
+ QDebugStateSaver saver(d);
+ d.noquote();
const Qt::InputMethodQueries queries = e->queries();
d << "QInputMethodQueryEvent(queries=" << showbase << hex << int(queries)
<< noshowbase << dec << ", {";
- for (unsigned mask = 1; mask <= Qt::ImTextAfterCursor; mask<<=1) {
+ for (unsigned mask = 1; mask <= Qt::ImInputItemClipRectangle; mask<<=1) {
if (queries & mask) {
- const QVariant value = e->value(static_cast<Qt::InputMethodQuery>(mask));
- if (value.isValid())
- d << '[' << showbase << hex << mask << noshowbase << dec << '=' << value << "],";
+ const Qt::InputMethodQuery query = static_cast<Qt::InputMethodQuery>(mask);
+ const QVariant value = e->value(query);
+ if (value.isValid()) {
+ d << '[';
+ QtDebugUtils::formatQEnum(d, query);
+ d << '=';
+ if (query == Qt::ImHints)
+ QtDebugUtils::formatQFlags(d, Qt::InputMethodHints(value.toInt()));
+ else
+ d << value.toString();
+ d << "],";
+ }
}
}
d << "})";