mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 05:23:06 +00:00
feat(src/app): do not display splashscreen when selftest option is used
This commit is contained in:
parent
273c056384
commit
708255c04f
3 changed files with 11 additions and 9 deletions
|
|
@ -26,7 +26,7 @@
|
|||
<context>
|
||||
<name>App</name>
|
||||
<message>
|
||||
<source>selftestResult</source>
|
||||
<source>selfTestResult</source>
|
||||
<translation>Linphone seems to be running correctly.</translation>
|
||||
</message>
|
||||
<message>
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
<translation>Specify the linphone configuration file to use.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>commandLineOptionSelftest</source>
|
||||
<source>commandLineOptionSelfTest</source>
|
||||
<translation>Run self test and exit 0 if it succeeded.</translation>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
<context>
|
||||
<name>App</name>
|
||||
<message>
|
||||
<source>selftestResult</source>
|
||||
<source>selfTestResult</source>
|
||||
<translation>Linphone semble fonctionner normalement.</translation>
|
||||
</message>
|
||||
<message>
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
<translation>Spécifier un fichier de configuration à utiliser.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>commandLineOptionSelftest</source>
|
||||
<source>commandLineOptionSelfTest</source>
|
||||
<translation>Éxécuter un test automatique et retourner 0 en cas de succès.</translation>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
|
|
@ -176,12 +176,14 @@ void App::initContentApp () {
|
|||
qFatal("Unable to open main window.");
|
||||
|
||||
// Load splashscreen.
|
||||
activeSplashScreen(this);
|
||||
bool selfTest = mParser.isSet("self-test");
|
||||
if (!selfTest)
|
||||
activeSplashScreen(this);
|
||||
|
||||
QObject::connect(
|
||||
CoreManager::getInstance()->getHandlers().get(),
|
||||
&CoreHandlers::coreStarted,
|
||||
this, mParser.isSet("selftest") ? &App::quit : &App::openAppAfterInit
|
||||
this, selfTest ? &App::quit : &App::openAppAfterInit
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -196,7 +198,7 @@ void App::parseArgs () {
|
|||
#ifndef __APPLE__
|
||||
{ "iconified", tr("commandLineOptionIconified") },
|
||||
#endif // ifndef __APPLE__
|
||||
{ "selftest", tr("commandLineOptionSelftest") },
|
||||
{ "self-test", tr("commandLineOptionSelfTest") },
|
||||
{ { "V", "verbose" }, tr("commandLineOptionVerbose") }
|
||||
});
|
||||
|
||||
|
|
@ -459,8 +461,8 @@ void App::openAppAfterInit () {
|
|||
// -----------------------------------------------------------------------------
|
||||
|
||||
void App::quit () {
|
||||
if (mParser.isSet("selftest"))
|
||||
cout << tr("selftestResult").toStdString() << endl;
|
||||
if (mParser.isSet("self-test"))
|
||||
cout << tr("selfTestResult").toStdString() << endl;
|
||||
|
||||
QApplication::quit();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue