summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtSwift.cpp13
-rw-r--r--Swift/QtUI/main.cpp11
2 files changed, 17 insertions, 7 deletions
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp
index d4c306f..7830150 100644
--- a/Swift/QtUI/QtSwift.cpp
+++ b/Swift/QtUI/QtSwift.cpp
@@ -59,12 +59,13 @@ po::options_description QtSwift::getOptionsDescription() {
po::options_description result("Options");
result.add_options()
("debug", "Turn on debug logging")
- ("help", "produce help message")
- ("netbook-mode", "use netbook mode display (unsupported)")
- ("no-tabs", "don't manage chat windows in tabs (unsupported)")
- ("latency-debug", "use latency debugging (unsupported)")
- ("multi-account", po::value<int>()->default_value(1), "number of accounts to open windows for (unsupported)")
- ("start-minimized", "don't show the login/roster window at startup")
+ ("help", "Show this help message")
+ ("version", "Show version information")
+ ("netbook-mode", "Use netbook mode display (unsupported)")
+ ("no-tabs", "Don't manage chat windows in tabs (unsupported)")
+ ("latency-debug", "Use latency debugging (unsupported)")
+ ("multi-account", po::value<int>()->default_value(1), "Number of accounts to open windows for (unsupported)")
+ ("start-minimized", "Don't show the login/roster window at startup")
;
return result;
}
diff --git a/Swift/QtUI/main.cpp b/Swift/QtUI/main.cpp
index de9d122..0146769 100644
--- a/Swift/QtUI/main.cpp
+++ b/Swift/QtUI/main.cpp
@@ -16,6 +16,7 @@
#include <Swift/Controllers/Translator.h>
#include <Swift/Controllers/ApplicationInfo.h>
+#include <Swift/Controllers/BuildVersion.h>
#include <SwifTools/Application/PlatformApplicationPathProvider.h>
#include "QtSwift.h"
@@ -52,9 +53,17 @@ int main(int argc, char* argv[]) {
}
boost::program_options::notify(vm);
if (vm.count("help") > 0) {
- std::cout << desc << "\n";
+ std::cout << SWIFT_APPLICATION_NAME << " is an instant messaging client for the XMPP network." << std::endl;
+ std::cout << std::endl;
+ std::cout << "Usage: " << argv[0] << " [OPTIONS]..." << std::endl;
+ std::cout << std::endl;
+ std::cout << desc << std::endl;
return 1;
}
+ if (vm.count("version") > 0) {
+ std::cout << SWIFT_APPLICATION_NAME << " " << buildVersion << std::endl;
+ return 0;
+ }
Swift::QtSwift swift(vm);
int result = app.exec();