summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2015-04-15 12:53:40 +0200
committerMichal Kubecek <mkubecek@suse.cz>2015-04-15 12:53:40 +0200
commit5fc295c7b7476f877744eeb00c4ee8de736a7b32 (patch)
treef93e60d58551dc526fbcc013547240739ca01da8 /src/gui
parent2442c3483476335e5f4c8fdf8c3ed4d7a47232b9 (diff)
downloadtwinkle-5fc295c7b7476f877744eeb00c4ee8de736a7b32.tar
twinkle-5fc295c7b7476f877744eeb00c4ee8de736a7b32.tar.gz
twinkle-5fc295c7b7476f877744eeb00c4ee8de736a7b32.tar.lz
twinkle-5fc295c7b7476f877744eeb00c4ee8de736a7b32.tar.xz
twinkle-5fc295c7b7476f877744eeb00c4ee8de736a7b32.zip
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().
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/main.cpp2
1 files changed, 1 insertions, 1 deletions
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