File Silence-warning-from-QCommandLineParser.patch of Package konsole

From b410e7f08ced8741ca8c83bb45083e944b9fb278 Mon Sep 17 00:00:00 2001
From: "Martin T. H. Sandsmark" <martin.sandsmark@kde.org>
Date: Thu, 3 Nov 2016 10:34:55 +0100
Subject: Silence warning from QCommandLineParser

---
 src/Application.cpp | 6 +++++-
 src/Application.h   | 2 +-
 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();
-- 
cgit v0.11.2

openSUSE Build Service is sponsored by