summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorJan Kundrát <jkt@flaska.net>2013-04-23 16:03:36 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-24 16:24:40 +0200
commit78fc0d4872bc4908d4615c3975d566fa2e1839eb (patch)
tree3202b496142f4ccac505160e6c31f87748aecf66 /src/widgets
parent4afb128d312a7f2a1d94e2becc5aaaec47326869 (diff)
Respond to the _NET_WM_CONTEXT_HELP WM_PROTOCOLS message
This change restores a proper function of the "(?)" button in the window decorations which is used as a clue for the user to check what a particular widget is supposed to do. The change is only implemented for QtWidgets because the underlying QWhatsThis is inherently widget-specific -- which is why it sends an event to QGuiApplication, but only processes it in the QtWidget-specific QApplication. Thanks to Alberto Mardegan and Gunnar Sletta for their feedback on this patch. Change-Id: Ibb912e3960f1e9aec54c5ed77ade1c6744d6ca23 Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/kernel/qapplication.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index d036f6bada..b8d3117a41 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -72,6 +72,9 @@
#include <QtGui/qstylehints.h>
#include <QtGui/qinputmethod.h>
#include <qpa/qplatformtheme.h>
+#ifndef QT_NO_WHATSTHIS
+#include <QtWidgets/QWhatsThis>
+#endif
#include "private/qkeymapper_p.h"
@@ -1856,6 +1859,11 @@ bool QApplication::event(QEvent *e)
} else if (te->timerId() == d->toolTipFallAsleep.timerId()) {
d->toolTipFallAsleep.stop();
}
+#ifndef QT_NO_WHATSTHIS
+ } else if (e->type() == QEvent::EnterWhatsThisMode) {
+ QWhatsThis::enterWhatsThisMode();
+ return true;
+#endif
}
if(e->type() == QEvent::LanguageChange) {