From 64d49f097f25dd019345a7e913e1c4cf8188e168 Mon Sep 17 00:00:00 2001 From: kh Date: Mon, 24 Nov 2014 17:39:06 +0100 Subject: Implement a way to start the server in debug mode and API cleanup. 1; Passing debug as first argument to the starting server does not start the server side so the server keeps running in an endless loop. This makes it far easier to attach a debugger. 2; API cleanup and unify init function to take port, key, and mode. The address was never able to be changed anyway, so stop passing them around. Change-Id: I2a847f009ed1557a5e136e2b0006de5c62426da2 Reviewed-by: Kai Koehne --- src/sdk/commandlineparser.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/sdk/commandlineparser.cpp') diff --git a/src/sdk/commandlineparser.cpp b/src/sdk/commandlineparser.cpp index 23d903bd3..9c4200b3e 100644 --- a/src/sdk/commandlineparser.cpp +++ b/src/sdk/commandlineparser.cpp @@ -94,7 +94,14 @@ CommandLineParser::CommandLineParser() "https://, http:// or ftp://."), QLatin1String("URI,..."))); m_parser.addOption(QCommandLineOption(QLatin1String(CommandLineOptions::StartServer), - QLatin1String("Starts the application as headless process waiting for commands to execute."), + QLatin1String("Starts the application as headless process waiting for commands to execute." + " Mode can be DEBUG or PRODUCTION. In DEBUG mode, the option values can be omitted." + "Note: The server will not shutdown on his own, you need to quit the process by hand."), + QLatin1String("mode,port,key"))); + m_parser.addOption(QCommandLineOption(QLatin1String(CommandLineOptions::StartClient), + QString::fromLatin1("Starts the application to debug the client-server communication. If " + "a value is omitted, the client will use a default instead. Note: The server process is " + "not started by the client application in that case, you need to start it on your own."), QLatin1String("port,key"))); m_parser.addPositionalArgument(QLatin1String(CommandLineOptions::KeyValue), -- cgit v1.2.3