summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@nokia.com>2010-05-20 11:51:08 (GMT)
committerMartin Smith <martin.smith@nokia.com>2010-05-20 11:51:08 (GMT)
commit107e3a1c1b12057de67ebc20dd435996db9ea4e2 (patch)
treea486069a1ccf472d15103c5517980054caf35bea /src/gui/kernel
parent1dc2235ac930c5444aa83a25432d1bf8b78b18db (diff)
parentd88905544477283a17580b210e46c93635cf9920 (diff)
downloadQt-107e3a1c1b12057de67ebc20dd435996db9ea4e2.zip
Qt-107e3a1c1b12057de67ebc20dd435996db9ea4e2.tar.gz
Qt-107e3a1c1b12057de67ebc20dd435996db9ea4e2.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qapplication.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 7b62de1..b805a72 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -2218,15 +2218,17 @@ void QApplication::closeAllWindows()
{
bool did_close = true;
QWidget *w;
- while((w = activeModalWidget()) && did_close) {
- if(!w->isVisible())
+ while ((w = activeModalWidget()) && did_close) {
+ if (!w->isVisible() || w->data->is_closing)
break;
did_close = w->close();
}
QWidgetList list = QApplication::topLevelWidgets();
for (int i = 0; did_close && i < list.size(); ++i) {
w = list.at(i);
- if (w->isVisible() && w->windowType() != Qt::Desktop) {
+ if (w->isVisible()
+ && w->windowType() != Qt::Desktop
+ && !w->data->is_closing) {
did_close = w->close();
list = QApplication::topLevelWidgets();
i = -1;