mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-01 17:16:24 +00:00
fix(app): execute command at startup correctly (not when core is restarted)
This commit is contained in:
parent
d4e89205a0
commit
3d3ada014b
1 changed files with 7 additions and 14 deletions
|
|
@ -173,6 +173,13 @@ void App::initContentApp () {
|
|||
// Init core.
|
||||
CoreManager::init(this, mParser->value("config"));
|
||||
|
||||
// Execute command argument if needed.
|
||||
if (!mEngine) {
|
||||
const QString commandArgument = getCommandArgument();
|
||||
if (!commandArgument.isEmpty())
|
||||
mCli->executeCommand(commandArgument);
|
||||
}
|
||||
|
||||
// Init engine content.
|
||||
mEngine = new QQmlApplicationEngine();
|
||||
|
||||
|
|
@ -215,13 +222,6 @@ void App::initContentApp () {
|
|||
if (mEngine->rootObjects().isEmpty())
|
||||
qFatal("Unable to open main window.");
|
||||
|
||||
// Execute command argument if needed.
|
||||
{
|
||||
const QString commandArgument = getCommandArgument();
|
||||
if (!commandArgument.isEmpty())
|
||||
mCli->executeCommand(commandArgument);
|
||||
}
|
||||
|
||||
QObject::connect(
|
||||
CoreManager::getInstance()->getHandlers().get(),
|
||||
&CoreHandlers::coreStarted,
|
||||
|
|
@ -551,13 +551,6 @@ void App::openAppAfterInit () {
|
|||
}
|
||||
}
|
||||
|
||||
// Execute command argument if needed.
|
||||
{
|
||||
const QString commandArgument = getCommandArgument();
|
||||
if (!commandArgument.isEmpty())
|
||||
mCli->executeCommand(commandArgument);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_UPDATE_CHECK
|
||||
QTimer *timer = new QTimer(mEngine);
|
||||
timer->setInterval(VERSION_UPDATE_CHECK_INTERVAL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue