From 5ff5c18b3243a4e88568db9c5770d34991d7e4f2 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Wed, 15 Aug 2018 19:07:56 +0200 Subject: [PATCH] Avoid Qt warning of unused cmd.line argument (QCommandLineParser: option not defined) Log msg: QCommandLineParser: option not defined: "clientIdAndKey" --- src/blackcore/vatsim/networkvatlib.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/blackcore/vatsim/networkvatlib.cpp b/src/blackcore/vatsim/networkvatlib.cpp index 8a39d0381..4e7725f4b 100644 --- a/src/blackcore/vatsim/networkvatlib.cpp +++ b/src/blackcore/vatsim/networkvatlib.cpp @@ -581,6 +581,8 @@ namespace BlackCore int id = 0; QString key; if (!CNetworkVatlib::getCmdLineClientIdAndKey(id, key)) { return args; } + + // from cmd. line args << "--idAndKey"; args << sApp->getParserValue("clientIdAndKey"); // as typed in return args; @@ -762,6 +764,7 @@ namespace BlackCore key = ""; // split parser values + if (CNetworkVatlib::getCmdLineOptions().isEmpty()) { return false; } // no such option, avoid warnings const QString clientIdAndKey = sApp->getParserValue("clientIdAndKey").toLower(); if (clientIdAndKey.isEmpty() || !clientIdAndKey.contains(':')) { return false; } const QStringList stringList = clientIdAndKey.split(':');