summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorHarald Fernengel <harald.fernengel@nokia.com>2010-06-16 15:16:16 +0200
committerHarald Fernengel <harald.fernengel@nokia.com>2010-06-16 15:16:16 +0200
commit6d4e14ef0437ce8f73bddbcb267cf5ef708fbdec (patch)
tree22697bc553d59ab3e660823633143f01dc3205e7 /tools
parent39d357505c7de6430f73cd5a491c2a7ddccd55ea (diff)
Micro cleanup
Use Qt::WA_DeleteOnClose to clean up the top-level window Reviewed-by: Alan Alpert
Diffstat (limited to 'tools')
-rw-r--r--tools/qml/main.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 0cce1ccc6b..a75023bdea 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -347,8 +347,9 @@ int main(int argc, char ** argv)
wflags |= Qt::WindowStaysOnTopHint;
QDeclarativeViewer *viewer = new QDeclarativeViewer(0, wflags);
+ viewer->setAttribute(Qt::WA_DeleteOnClose, true);
if (!scriptopts.isEmpty()) {
- QStringList options =
+ QStringList options =
scriptopts.split(QLatin1Char(','), QString::SkipEmptyParts);
QDeclarativeViewer::ScriptOptions scriptOptions = 0;
@@ -451,7 +452,5 @@ int main(int argc, char ** argv)
viewer->setUseGL(useGL);
viewer->raise();
- int rv = app.exec();
- delete viewer;
- exit(rv);
+ return app.exec();
}