diff options
author | Michal Kubecek <mkubecek@suse.cz> | 2015-04-15 12:53:40 +0200 |
---|---|---|
committer | Michal Kubecek <mkubecek@suse.cz> | 2015-04-15 12:53:40 +0200 |
commit | 5fc295c7b7476f877744eeb00c4ee8de736a7b32 (patch) | |
tree | f93e60d58551dc526fbcc013547240739ca01da8 /src/gui/main.cpp | |
parent | 2442c3483476335e5f4c8fdf8c3ed4d7a47232b9 (diff) | |
download | twinkle-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/main.cpp')
-rw-r--r-- | src/gui/main.cpp | 2 |
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 |