From 5fc295c7b7476f877744eeb00c4ee8de736a7b32 Mon Sep 17 00:00:00 2001 From: Michal Kubecek Date: Wed, 15 Apr 2015 12:53:40 +0200 Subject: make passed argc reference persistent Qt documentation states that argc passed to QApplication constructor (by reference) must exist for the whole lifetime of the QApplication object. This was not the case in create_user_interface(). --- src/gui/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/main.cpp') diff --git a/src/gui/main.cpp b/src/gui/main.cpp index 81ba28f..f93d352 100644 --- a/src/gui/main.cpp +++ b/src/gui/main.cpp @@ -503,7 +503,7 @@ QApplication *create_user_interface(bool cli_mode, int argc, char **argv, QTrans // Add the KDE factory Q3MimeSourceFactory::addFactory(factory_kde); #else - int tmp = argc; + static int tmp = argc; qa = new t_twinkle_application(tmp, argv); MEMMAN_NEW(qa); #endif -- cgit v1.2.3