summaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorAnne Jan Brouwer <brouwer@annejan.com>2014-08-17 14:17:43 +0200
committerAnne Jan Brouwer <ajbrouwer@totalactivemedia.nl>2014-08-17 14:17:43 +0200
commit22418509f799be01ad9a8609d1fbaded3bccf919 (patch)
tree62561f3c465db8a0593451b7cdd399d8b6e8da36 /main.cpp
parentb280b463e60da571cf48b046e1b89f241a40de50 (diff)
send full commandline options
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/main.cpp b/main.cpp
index 5f24df4d..bff217b6 100644
--- a/main.cpp
+++ b/main.cpp
@@ -8,8 +8,15 @@ int main(int argc, char *argv[])
if (app.isRunning()) {
if (argc == 1 ) {
app.sendMessage("show");
- } else if (argc == 2) {
- app.sendMessage(argv[1]);
+ } else if (argc >= 2) {
+ QString text = "";
+ for (int i = 1; i < argc; ++i) {
+ text += argv[i];
+ if (argc >= (i -1)) {
+ text += " ";
+ }
+ app.sendMessage(text);
+ }
}
return 0;
}