diff options
Diffstat (limited to 'client/main.cc')
-rw-r--r-- | client/main.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/client/main.cc b/client/main.cc index 0bd94d7..af3dbf5 100644 --- a/client/main.cc +++ b/client/main.cc @@ -30,6 +30,9 @@ #include <QEvent> #include "macro.h" +QString cpr; +QString user; + int main(int argc, char *argv[]) { QApplication app(argc, argv); @@ -38,8 +41,8 @@ int main(int argc, char *argv[]) app.installEventFilter( eventhandler ); char macro[100] = "example"; - char cpr[11] = "0000000000"; - char user[20] = "testuser"; + char _cpr[11] = "0000000000"; + char _user[20] = "testuser"; char config[30] = "pracro.ini"; int a; @@ -73,7 +76,7 @@ int main(int argc, char *argv[]) printf("Missing argument for cpr, exiting...\n"); exit(1); } - strcpy(cpr, argv[a+1]); + strcpy(_cpr, argv[a+1]); a++; continue; } @@ -82,7 +85,7 @@ int main(int argc, char *argv[]) printf("Missing argument for user, exiting...\n"); exit(1); } - strcpy(user, argv[a+1]); + strcpy(_user, argv[a+1]); a++; continue; } @@ -97,7 +100,10 @@ int main(int argc, char *argv[]) } } - new_macro(macro, cpr, user); + cpr = _cpr; + user = _user; + new_macro("start"); + //app.setQuitOnLastWindowClosed(false); return app.exec(); } |