diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2014-08-17 14:17:43 +0200 |
---|---|---|
committer | Anne Jan Brouwer <ajbrouwer@totalactivemedia.nl> | 2014-08-17 14:17:43 +0200 |
commit | 22418509f799be01ad9a8609d1fbaded3bccf919 (patch) | |
tree | 62561f3c465db8a0593451b7cdd399d8b6e8da36 /main.cpp | |
parent | b280b463e60da571cf48b046e1b89f241a40de50 (diff) |
send full commandline options
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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; } |