change command line KeepAlive implementation

This commit is contained in:
Syping 2024-05-07 17:39:45 +02:00
parent 1ddc4ff755
commit 9e2518fa9b

View file

@ -293,10 +293,10 @@ int main(int argc, char *argv[])
#endif
commandLineParser.addOption(subprocessRemoteSocket);
QCommandLineOption processAutoStart("autostart", "SMSub autostart mode setting.", "autostart");
QCommandLineOption processAutoStart("autostart", "SMSub autostart mode.", "autostart");
commandLineParser.addOption(processAutoStart);
QCommandLineOption processKeepAlive("keepalive", "SMSub keepalive mode setting.", "keepalive");
QCommandLineOption processKeepAlive("keepalive", "SMSub keepalive mode.", "keepalive");
commandLineParser.addOption(processKeepAlive);
QCommandLineOption processTimeout("timeout", "SMSub termination timeout.", "timeout");
@ -384,7 +384,7 @@ int main(int argc, char *argv[])
if (commandLineParser.isSet(processKeepAlive)) {
const QString claKeepAlive = commandLineParser.value(processKeepAlive);
if (claKeepAlive != "0" || claKeepAlive.toLower() != "false" || claKeepAlive.toLower() != "no") {
if (claKeepAlive == "1" || claKeepAlive.toLower() == "true" || claKeepAlive.toLower() == "yes") {
keepAlive = true;
}
}