summaryrefslogtreecommitdiffstats
path: root/tools/qml
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qml')
-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 0cce1cc..a75023b 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();
}