diff options
author | Jocelyn Turcotte <jturcotte@woboq.com> | 2015-02-19 18:54:34 +0300 |
---|---|---|
committer | Jocelyn Turcotte <jturcotte@woboq.com> | 2015-02-19 18:57:16 +0300 |
commit | 03e23da6a319f0608747d7fb3ce287d47704b550 (patch) | |
tree | 2042fc781c30d630a5830d258a80da5cb619e192 /src/gui/main.cpp | |
parent | 2ddaf5a06ac53e061ac8d9d989b2597c62c6066a (diff) |
Show the settings also when no arguments are passed
sendMessage would only be called if there were options to
be sent to the running application.
Fix the issue by having explicitly named messages and always
send the show settings message.
Issue #2374
Diffstat (limited to 'src/gui/main.cpp')
-rw-r--r-- | src/gui/main.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/main.cpp b/src/gui/main.cpp index 6cb1b50a6..6975a79e0 100644 --- a/src/gui/main.cpp +++ b/src/gui/main.cpp @@ -96,14 +96,16 @@ int main(int argc, char **argv) } // if the application is already running, notify it. - if( app.isRunning() ) { + if(app.isRunning()) { qDebug() << Q_FUNC_INFO << "Already running, exiting..."; QStringList args = app.arguments(); - if ( args.size() > 1 && ! app.giveHelp() ) { - QString msg = args.join( QLatin1String("|") ); - if( ! app.sendMessage( msg ) ) + if (args.size() > 1) { + QString msg = args.join(QLatin1String("|")); + if(!app.sendMessage(QLatin1String("MSG_PARSEOPTIONS:") + msg)) return -1; } + if(!app.sendMessage(QLatin1String("MSG_SHOWSETTINGS"))) + return -1; return 0; } else { if (!QSystemTrayIcon::isSystemTrayAvailable()) { |