diff options
author | kh <karsten.heimrich@theqtcompany.com> | 2014-11-24 17:39:06 +0100 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@theqtcompany.com> | 2014-11-26 14:49:23 +0100 |
commit | 64d49f097f25dd019345a7e913e1c4cf8188e168 (patch) | |
tree | da6670298b59bd04db7d1f5dc62a9ceb79082b7b /src/sdk/commandlineparser.cpp | |
parent | d18b9696e573aa7b3f38784f6c5764b9fe6fd81b (diff) |
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 <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/sdk/commandlineparser.cpp')
-rw-r--r-- | src/sdk/commandlineparser.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
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), |