mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 02:55:44 +08:00
Ref T195, application restart functions
* allow to get current arguments joined with new ones * removed old inheritedArguments function * unregisterAsRunning (for restart) * restart function
This commit is contained in:
@@ -545,12 +545,12 @@ namespace BlackCore
|
||||
return m_interimPositionReceivers;
|
||||
}
|
||||
|
||||
QStringList CNetworkVatlib::inheritedArguments()
|
||||
QStringList CNetworkVatlib::vatlibArguments()
|
||||
{
|
||||
QStringList args;
|
||||
int id = 0;
|
||||
QString key;
|
||||
if (!getCmdLineClientIdAndKey(id, key)) return args;
|
||||
if (!getCmdLineClientIdAndKey(id, key)) { return args; }
|
||||
args << "--idAndKey";
|
||||
args << sApp->getParserValue("clientIdAndKey"); // as typed in
|
||||
return args;
|
||||
@@ -723,6 +723,11 @@ namespace BlackCore
|
||||
|
||||
bool CNetworkVatlib::getCmdLineClientIdAndKey(int &id, QString &key)
|
||||
{
|
||||
// init values
|
||||
id = 0;
|
||||
key = "";
|
||||
|
||||
// split parser values
|
||||
const QString clientIdAndKey = sApp->getParserValue("clientIdAndKey").toLower();
|
||||
if (clientIdAndKey.isEmpty() || !clientIdAndKey.contains(':')) { return false; }
|
||||
const auto stringList = clientIdAndKey.split(':');
|
||||
|
||||
@@ -117,7 +117,7 @@ namespace BlackCore
|
||||
//! @}
|
||||
|
||||
//! Arguments to be passed to another swift appplication
|
||||
static QStringList inheritedArguments();
|
||||
static QStringList vatlibArguments();
|
||||
|
||||
//! \name Weather functions
|
||||
//! @{
|
||||
|
||||
Reference in New Issue
Block a user