summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-12-09 17:29:25 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-02 15:08:19 +0100
commita23a5487eb60c0f8b3c99d32a5e8e3cf636e4911 (patch)
tree4b2a13a7a1906ff39a5a7c7b9d422803db0affa6 /src/widgets
parent16696ce49373d3ea2b4d12e28b85ca3275f73b82 (diff)
Send ApplicationActivate and ApplicationDeactivate from QtGui.
Instead of only from QApplication in QtWidgets, as we need these events for example in QDeclarativeApplication. Task-number: QTBUG-21573 Task-number: QTBUG-23331 Change-Id: I0c960bd1c7911d306d274a6e9a1838f158235ed0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/kernel/qapplication.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index 10a6ed7c59..414a520a53 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -2326,13 +2326,6 @@ void QApplication::setActiveWindow(QWidget* act)
QEvent windowActivate(QEvent::WindowActivate);
QEvent windowDeactivate(QEvent::WindowDeactivate);
-#if !defined(Q_WS_MAC)
- if (!previousActiveWindow) {
- QEvent appActivate(QEvent::ApplicationActivate);
- sendSpontaneousEvent(qApp, &appActivate);
- }
-#endif
-
for (int i = 0; i < toBeActivated.size(); ++i) {
QWidget *w = toBeActivated.at(i);
sendSpontaneousEvent(w, &windowActivate);
@@ -2352,13 +2345,6 @@ void QApplication::setActiveWindow(QWidget* act)
sendSpontaneousEvent(w, &activationChange);
}
-#if !defined(Q_WS_MAC)
- if (!QApplicationPrivate::active_window) {
- QEvent appDeactivate(QEvent::ApplicationDeactivate);
- sendSpontaneousEvent(qApp, &appDeactivate);
- }
-#endif
-
if (QApplicationPrivate::popupWidgets == 0) { // !inPopupMode()
// then focus events
if (!QApplicationPrivate::active_window && QApplicationPrivate::focus_widget) {