summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-11-03 09:34:55 (GMT)
committerMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-11-03 09:34:55 (GMT)
commitb410e7f08ced8741ca8c83bb45083e944b9fb278 (patch)
tree0d1e22c401287710ba4bb1e091973d0d27454b22
parenta9b0878b56ccea354bb97218272a6f55d85d026a (diff)
Silence warning from QCommandLineParser
-rw-r--r--src/Application.cpp6
-rw-r--r--src/Application.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/Application.cpp b/src/Application.cpp
index 241dace..5b352ec 100644
--- a/src/Application.cpp
+++ b/src/Application.cpp
@@ -544,8 +544,12 @@ void Application::toggleBackgroundInstance()
}
}
-void Application::slotActivateRequested (const QStringList &args, const QString & /*workingDir*/)
+void Application::slotActivateRequested (QStringList args, const QString & /*workingDir*/)
{
+ // QCommandLineParser expects the first argument to be the executable name
+ // In the current version it just strips it away
+ args.prepend(qApp->applicationFilePath());
+
// We can't re-use QCommandLineParser instances, it preserves earlier parsed values
QCommandLineParser *parser = new QCommandLineParser;
populateCommandLineParser(parser);
diff --git a/src/Application.h b/src/Application.h
index 58479f8..8987d78 100644
--- a/src/Application.h
+++ b/src/Application.h
@@ -73,7 +73,7 @@ private slots:
void toggleBackgroundInstance();
public slots:
- void slotActivateRequested (const QStringList &args, const QString &workingDir);
+ void slotActivateRequested (QStringList args, const QString &workingDir);
private:
void listAvailableProfiles();