diff --git a/Linphone/core/App.cpp b/Linphone/core/App.cpp index a3347dff5..e34ad3177 100644 --- a/Linphone/core/App.cpp +++ b/Linphone/core/App.cpp @@ -182,6 +182,7 @@ void App::init() { exit(-1); } mMainWindow = qobject_cast(obj); + QMetaObject::invokeMethod(obj, "initStackViewItem"); Q_ASSERT(mMainWindow); } }, diff --git a/Linphone/data/image/splashscreen-logo.svg b/Linphone/data/image/splashscreen-logo.svg new file mode 100644 index 000000000..1063c01c7 --- /dev/null +++ b/Linphone/data/image/splashscreen-logo.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Linphone/tool/LinphoneEnums.cpp b/Linphone/tool/LinphoneEnums.cpp index c5dc62423..fb6652a68 100644 --- a/Linphone/tool/LinphoneEnums.cpp +++ b/Linphone/tool/LinphoneEnums.cpp @@ -113,6 +113,8 @@ QString LinphoneEnums::toString(const LinphoneEnums::CallStatus &data) { return "AcceptedElsewhere"; case LinphoneEnums::CallStatus::DeclinedElsewhere: return "DeclinedElsewhere"; + default: + return QString(); } } @@ -129,6 +131,8 @@ QString LinphoneEnums::toString(const LinphoneEnums::CallDir &data) { return "Incoming"; case LinphoneEnums::CallDir::Outgoing: return "Outgoing"; + default: + return QString(); } } @@ -268,6 +272,8 @@ QString LinphoneEnums::toString(const LinphoneEnums::TransportType &type) { return "TLS"; case TransportType::Dtls: return "DTLS"; + default: + return QString(); } } void LinphoneEnums::fromString(const QString &transportType, LinphoneEnums::TransportType *transport) { diff --git a/Linphone/view/App/Main.qml b/Linphone/view/App/Main.qml index 9b8c13091..51be45d9b 100644 --- a/Linphone/view/App/Main.qml +++ b/Linphone/view/App/Main.qml @@ -32,17 +32,29 @@ AppWindow { mainWindowStackView.replace(mainPage, StackView.Immediate) mainWindowStackView.currentItem.transferCallSucceed() } + function initStackViewItem() { + if (accountProxy.haveAccount) mainWindowStackView.replace(mainPage, StackView.Immediate) + else if (SettingsCpp.getFirstLaunch()) mainWindowStackView.replace(welcomePage, StackView.Immediate) + else mainWindowStackView.replace(loginPage, StackView.Immediate) + } AccountProxy { - // TODO : change this so it does not display the main page for one second - // when we fail trying to connect the first account (account is added and - // removed shortly after) id: accountProxy } StackView { id: mainWindowStackView anchors.fill: parent - initialItem: accountProxy.haveAccount ? mainPage : SettingsCpp.getFirstLaunch() ? welcomePage : loginPage + initialItem: splashScreen + } + Component { + id: splashScreen + Rectangle { + color: DefaultStyle.grey_0 + Image { + anchors.centerIn: parent + source: AppIcons.splashscreenLogo + } + } } Component { id: welcomePage diff --git a/Linphone/view/Style/AppIcons.qml b/Linphone/view/Style/AppIcons.qml index 059c241c5..88a57bbf4 100644 --- a/Linphone/view/Style/AppIcons.qml +++ b/Linphone/view/Style/AppIcons.qml @@ -7,6 +7,7 @@ QtObject { property string lock: "image://internal/lock.svg" property string lockSimple: "image://internal/lock-simple.svg" property string welcomeOpenSource: "image://internal/open_source.svg" + property string splashscreenLogo: "image://internal/splashscreen-logo.svg" property string eyeHide: "image://internal/eye.svg" property string eyeShow: "image://internal/eye-slash.svg" property string downArrow: "image://internal/caret-down.svg"