[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kcalc/frameworks] /: Add dummy QCommandLineParser so that --version works
From:       Christoph Feck <christoph () maxiom ! de>
Date:       2014-09-30 22:05:38
Message-ID: E1XZ5YA-0003kV-5r () scm ! kde ! org
[Download RAW message or body]

Git commit dbaf705443e6e769fbc3c950a8db4f9e301ad9d7 by Christoph Feck.
Committed on 29/09/2014 at 21:45.
Pushed by cfeck into branch 'frameworks'.

Add dummy QCommandLineParser so that --version works

M  +6    -0    kcalc.cpp

http://commits.kde.org/kcalc/dbaf705443e6e769fbc3c950a8db4f9e301ad9d7

diff --git a/kcalc.cpp b/kcalc.cpp
index 2473020..95ad96d 100644
--- a/kcalc.cpp
+++ b/kcalc.cpp
@@ -27,6 +27,7 @@ along with this program.  If not, see <http://www.gnu.org=
/licenses/>.
 #include <clocale>
 =

 #include <QApplication>
+#include <QCommandLineParser>
 #include <QCursor>
 #include <QKeyEvent>
 #include <QMenuBar>
@@ -2293,6 +2294,11 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char =
*argv[]) {
 	KAboutData::setApplicationData(aboutData);
 	app.setWindowIcon(QIcon::fromTheme(QLatin1String("accessories-calculator"=
)));
 =

+	QCommandLineParser parser;
+	parser.addHelpOption();
+	parser.addVersionOption();
+	parser.process(app);
+
 	// force system locale to "C" internally [bug 159168]
 	setlocale(LC_NUMERIC, "C");
 =


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic