mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Avoid Qt warning of unused cmd.line argument (QCommandLineParser: option not defined)
Log msg: QCommandLineParser: option not defined: "clientIdAndKey"
This commit is contained in:
@@ -581,6 +581,8 @@ namespace BlackCore
|
|||||||
int id = 0;
|
int id = 0;
|
||||||
QString key;
|
QString key;
|
||||||
if (!CNetworkVatlib::getCmdLineClientIdAndKey(id, key)) { return args; }
|
if (!CNetworkVatlib::getCmdLineClientIdAndKey(id, key)) { return args; }
|
||||||
|
|
||||||
|
// from cmd. line
|
||||||
args << "--idAndKey";
|
args << "--idAndKey";
|
||||||
args << sApp->getParserValue("clientIdAndKey"); // as typed in
|
args << sApp->getParserValue("clientIdAndKey"); // as typed in
|
||||||
return args;
|
return args;
|
||||||
@@ -762,6 +764,7 @@ namespace BlackCore
|
|||||||
key = "";
|
key = "";
|
||||||
|
|
||||||
// split parser values
|
// split parser values
|
||||||
|
if (CNetworkVatlib::getCmdLineOptions().isEmpty()) { return false; } // no such option, avoid warnings
|
||||||
const QString clientIdAndKey = sApp->getParserValue("clientIdAndKey").toLower();
|
const QString clientIdAndKey = sApp->getParserValue("clientIdAndKey").toLower();
|
||||||
if (clientIdAndKey.isEmpty() || !clientIdAndKey.contains(':')) { return false; }
|
if (clientIdAndKey.isEmpty() || !clientIdAndKey.contains(':')) { return false; }
|
||||||
const QStringList stringList = clientIdAndKey.split(':');
|
const QStringList stringList = clientIdAndKey.split(':');
|
||||||
|
|||||||
Reference in New Issue
Block a user