diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2010-09-28 07:43:35 (GMT) |
---|---|---|
committer | Kai Koehne <kai.koehne@nokia.com> | 2010-09-28 07:59:26 (GMT) |
commit | a42989e696eac94221ddb781a133afaec5b48b12 (patch) | |
tree | 8ecaa384f050440207e04c44ae1355e29b4bf4ad /tools | |
parent | 31dcf2b4028b1f76301fc69fccff0a9474a0a135 (diff) | |
download | Qt-a42989e696eac94221ddb781a133afaec5b48b12.zip Qt-a42989e696eac94221ddb781a133afaec5b48b12.tar.gz Qt-a42989e696eac94221ddb781a133afaec5b48b12.tar.bz2 |
QmlViewer: Fix assert on exit (Windows)
The QApplication object in main() is already destroyed when showWarnings()
is called. Create another instance in this case.
(Note that the assert will only be triggered for debug builds, while qmlviewer
is built in release mode by default).
Task-number: QTBUG-14009
Reviewed-by: Thomas Hartmann
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qml/main.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index 78cd64d..bf183e5 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -89,6 +89,9 @@ QString warnings; void showWarnings() { if (!warnings.isEmpty()) { + int argc = 0; char **argv = 0; + QApplication application(argc, argv); // QApplication() in main has been destroyed already. + Q_UNUSED(application) QMessageBox::warning(0, QApplication::tr("Qt QML Viewer"), warnings); } } |