From ea6c5da00d2197c73cf12004c22e58ba29d35523 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Fri, 15 Jun 2018 11:33:34 +0200 Subject: [PATCH] feat(app): remove usage of splashscreen --- assets/images/splash_screen.svg | 28 ---------- resources.qrc | 3 -- src/app/App.cpp | 19 ------- ui/views/App/SplashScreen/SplashScreen.qml | 51 ------------------- .../Styles/SplashScreen/SplashScreenStyle.qml | 16 ------ ui/views/App/Styles/qmldir | 4 -- 6 files changed, 121 deletions(-) delete mode 100644 assets/images/splash_screen.svg delete mode 100644 ui/views/App/SplashScreen/SplashScreen.qml delete mode 100644 ui/views/App/Styles/SplashScreen/SplashScreenStyle.qml diff --git a/assets/images/splash_screen.svg b/assets/images/splash_screen.svg deleted file mode 100644 index 5932eb29c..000000000 --- a/assets/images/splash_screen.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - chat liste copy - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/resources.qrc b/resources.qrc index 9e47c852f..d22b9a713 100644 --- a/resources.qrc +++ b/resources.qrc @@ -181,7 +181,6 @@ assets/images/speaker_on_normal.svg assets/images/speaker_on_pressed.svg assets/images/speaker.svg - assets/images/splash_screen.svg assets/images/tel_keypad_hovered.svg assets/images/tel_keypad_normal.svg assets/images/tel_keypad_pressed.svg @@ -441,7 +440,6 @@ ui/views/App/Settings/SettingsVideo.js ui/views/App/Settings/SettingsVideo.qml ui/views/App/Settings/SettingsWindow.qml - ui/views/App/SplashScreen/SplashScreen.qml ui/views/App/Styles/Calls/CallStyle.qml ui/views/App/Styles/Calls/CallsWindowStyle.qml ui/views/App/Styles/Calls/ConferenceStyle.qml @@ -471,6 +469,5 @@ ui/views/App/Styles/Settings/SettingsAdvancedStyle.qml ui/views/App/Styles/Settings/SettingsAudioStyle.qml ui/views/App/Styles/Settings/SettingsWindowStyle.qml - ui/views/App/Styles/SplashScreen/SplashScreenStyle.qml diff --git a/src/app/App.cpp b/src/app/App.cpp index 8f7a366a1..75e372342 100644 --- a/src/app/App.cpp +++ b/src/app/App.cpp @@ -59,8 +59,6 @@ namespace { constexpr char cQmlViewCallsWindow[] = "qrc:/ui/views/App/Calls/CallsWindow.qml"; constexpr char cQmlViewSettingsWindow[] = "qrc:/ui/views/App/Settings/SettingsWindow.qml"; - constexpr char cQmlViewSplashScreen[] = "qrc:/ui/views/App/SplashScreen/SplashScreen.qml"; - constexpr int cVersionUpdateCheckInterval = 86400000; // 24 hours in milliseconds. } @@ -138,15 +136,6 @@ static QQuickWindow *createSubWindow (QQmlApplicationEngine *engine, const char // ----------------------------------------------------------------------------- -static void activeSplashScreen (QQmlApplicationEngine *engine) { - qInfo() << QStringLiteral("Open splash screen..."); - QQuickWindow *splashScreen = ::createSubWindow(engine, cQmlViewSplashScreen); - QObject::connect(CoreManager::getInstance()->getHandlers().get(), &CoreHandlers::coreStarted, splashScreen, [splashScreen] { - splashScreen->close(); - splashScreen->deleteLater(); - }); -} - void App::initContentApp () { shared_ptr config = ::getConfigIfExists(*mParser); bool mustBeIconified = false; @@ -232,14 +221,6 @@ void App::initContentApp () { // Enable notifications. mNotifier = new Notifier(mEngine); - // Load splashscreen. - #ifdef Q_OS_MACOS - ::activeSplashScreen(mEngine); - #else - if (!mustBeIconified) - ::activeSplashScreen(mEngine); - #endif // ifdef Q_OS_MACOS - // Load main view. qInfo() << QStringLiteral("Loading main view..."); mEngine->load(QUrl(cQmlViewMainWindow)); diff --git a/ui/views/App/SplashScreen/SplashScreen.qml b/ui/views/App/SplashScreen/SplashScreen.qml deleted file mode 100644 index 8b02f10a0..000000000 --- a/ui/views/App/SplashScreen/SplashScreen.qml +++ /dev/null @@ -1,51 +0,0 @@ -import QtQuick 2.7 -import QtQuick.Window 2.2 - -import Common 1.0 - -import App.Styles 1.0 - -// ============================================================================= - -Window { - color: SplashScreenStyle.color - flags: Qt.SplashScreen - modality: Qt.ApplicationModal - visible: image.status === Image.Ready - - x: (Screen.width - image.width) / 2 - y: (Screen.height - image.height) / 2 - - height: image.paintedHeight - width: image.paintedWidth - - onClosing: indicator.running = false - - Image { - id: image - - anchors.centerIn: parent - - height: SplashScreenStyle.height - width: SplashScreenStyle.width - - fillMode: Image.PreserveAspectFit - mipmap: true - - source: Constants.imagesPath + 'splash_screen' + Constants.imagesFormat - - BusyIndicator { - id: indicator - - height: SplashScreenStyle.busyIndicator.height - width: SplashScreenStyle.busyIndicator.width - - anchors { - bottom: parent.bottom - bottomMargin: SplashScreenStyle.busyIndicator.bottomMargin - - horizontalCenter: parent.horizontalCenter - } - } - } -} diff --git a/ui/views/App/Styles/SplashScreen/SplashScreenStyle.qml b/ui/views/App/Styles/SplashScreen/SplashScreenStyle.qml deleted file mode 100644 index e436cd2d6..000000000 --- a/ui/views/App/Styles/SplashScreen/SplashScreenStyle.qml +++ /dev/null @@ -1,16 +0,0 @@ -pragma Singleton -import QtQml 2.2 - -// ============================================================================= - -QtObject { - property color color: '#444444' // Not a `Common.Color`. Specific case. - property int height: 350 - property int width: 620 - - property QtObject busyIndicator: QtObject { - property int bottomMargin: 25 - property int height: 24 - property int width: 24 - } -} diff --git a/ui/views/App/Styles/qmldir b/ui/views/App/Styles/qmldir index 1ad06dd13..9b5656441 100644 --- a/ui/views/App/Styles/qmldir +++ b/ui/views/App/Styles/qmldir @@ -44,7 +44,3 @@ singleton SettingsWindowStyle 1.0 Settings/SettingsWi singleton SettingsSipAccountsEditStyle 1.0 Settings/Dialogs/SettingsSipAccountsEditStyle.qml singleton SettingsVideoPreviewStyle 1.0 Settings/Dialogs/SettingsVideoPreviewStyle.qml - -# SplashScreen Window ---------------------------------------------------------- - -singleton SplashScreenStyle 1.0 SplashScreen/SplashScreenStyle.qml