diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2011-10-18 15:53:50 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2011-10-18 15:53:50 +0000 |
| commit | 7fd0e6ba2b2969c210d39dafe4eea2938223628e (patch) | |
| tree | dd1634898c94fc287a266018c1b9a051071a23b9 /src/qmmpui | |
| parent | aa12e69d307394b1d1afc1f61537b43cf81e47d5 (diff) | |
| download | qmmp-7fd0e6ba2b2969c210d39dafe4eea2938223628e.tar.gz qmmp-7fd0e6ba2b2969c210d39dafe4eea2938223628e.tar.bz2 qmmp-7fd0e6ba2b2969c210d39dafe4eea2938223628e.zip | |
added workaround for QTBUG-7635 (issue 495)
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@2407 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui')
| -rw-r--r-- | src/qmmpui/uihelper.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/qmmpui/uihelper.cpp b/src/qmmpui/uihelper.cpp index 8a39e19a6..e0e3c05db 100644 --- a/src/qmmpui/uihelper.cpp +++ b/src/qmmpui/uihelper.cpp @@ -224,7 +224,34 @@ void UiHelper::toggleVisibility() void UiHelper::exit() { +#if QT_VERSION < 0x040700 + bool closed = true; + QWidget *w; + + while ((w = qApp->activeModalWidget()) && closed) + { + if (!w->isVisible()) + break; + + closed = w->close(); + } + + QWidgetList list = qApp->topLevelWidgets(); + + while (closed && !list.isEmpty()) + { + w = list.takeLast(); + + if (w->isVisible() && w->windowType() != Qt::Desktop) + { + closed = w->close(); + list = qApp->topLevelWidgets(); + list.removeOne(w); + } + } +#else qApp->closeAllWindows(); +#endif qApp->quit(); } |
