[Kst] branches/work/kst/portto4/kst/src/libkstapp

Peter Kümmel syntheticpp at gmx.net
Thu Mar 3 22:33:10 CET 2011


SVN commit 1223588 by kuemmel:

--version 
BUG: 267432


 M  +6 -2      commandlineparser.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/commandlineparser.cpp #1223587:1223588
@@ -14,6 +14,8 @@
 #include "datasource.h"
 #include "objectstore.h"
 #include "colorsequence.h"
+#include "svnrevision.h"
+#include "config.h"
 
 #include <iostream>
 #include <QCoreApplication>
@@ -111,12 +113,14 @@
 "Plot column 2 and column 3 in plot P1 and column 4 in plot P2\n"
 "       kst data.dat -P P1 -y 2 -y 3 -P P2 -y 4\n";
 
-static void printText(const QString& text, const QString& detailText, const QString& t = QString())
+static void printText(const QString& text, const QString& detailText = QString(), const QString& t = QString())
 {
 #ifdef Q_OS_WIN
   // No console on Windows.
   QMessageBox box(QMessageBox::Information, "Kst", text + t);
+  if (!detailText.isEmpty()) {
   box.setDetailedText(detailText);
+  }
   box.exec();
 #else
   QString displayText = QString(text) + QString(detailText) + t;
@@ -364,7 +368,7 @@
       printUsage(QString());
       *ok = false;
     } else if (arg == "--version" || arg == "-version") {
-      printUsage(QString());
+      printText(QString("Kst ") + KSTVERSION + " Revision " + SVN_REVISION);
       *ok = false;
     } else if (arg == "-f") {
       *ok = _setIntArg(&_startFrame, i18n("Usage: -f <startframe>\n"), true);


More information about the Kst mailing list