Force requirement for filename option in cmd line
PATCH 1/1 Force requirement for filename option in cmd line
--- src/main.cpp | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
src/main.cpp +6 -1
@@ -35,7 +35,7 @@ static void usage() int main(int argc, char **argv) { QApplication app(argc, argv); - QString filename; + QString filename = NULL; int port = 12345; int index; bool with_gui = false;
@@ -71,6 +71,11 @@ int main(int argc, char **argv) } + if (filename == NULL) { + qWarning() << "ERROR: filename must be the last argument"; + usage(); + } + PhoneSimServer *pss = new PhoneSimServer(filename, port, 0); if (with_gui)
Signature · 1 line
1.7.3.1
Hi Gustavo,
Quoted 4 lines · Gustavo F. Padovan
--- src/main.cpp | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
This patch has been applied, thanks.
Regards,
-Denis