Commit ea6c5da0 authored by Ronan's avatar Ronan

feat(app): remove usage of splashscreen

parent 75cd7aa5
This diff is collapsed.
......@@ -181,7 +181,6 @@
<file>assets/images/speaker_on_normal.svg</file>
<file>assets/images/speaker_on_pressed.svg</file>
<file>assets/images/speaker.svg</file>
<file>assets/images/splash_screen.svg</file>
<file>assets/images/tel_keypad_hovered.svg</file>
<file>assets/images/tel_keypad_normal.svg</file>
<file>assets/images/tel_keypad_pressed.svg</file>
......@@ -441,7 +440,6 @@
<file>ui/views/App/Settings/SettingsVideo.js</file>
<file>ui/views/App/Settings/SettingsVideo.qml</file>
<file>ui/views/App/Settings/SettingsWindow.qml</file>
<file>ui/views/App/SplashScreen/SplashScreen.qml</file>
<file>ui/views/App/Styles/Calls/CallStyle.qml</file>
<file>ui/views/App/Styles/Calls/CallsWindowStyle.qml</file>
<file>ui/views/App/Styles/Calls/ConferenceStyle.qml</file>
......@@ -471,6 +469,5 @@
<file>ui/views/App/Styles/Settings/SettingsAdvancedStyle.qml</file>
<file>ui/views/App/Styles/Settings/SettingsAudioStyle.qml</file>
<file>ui/views/App/Styles/Settings/SettingsWindowStyle.qml</file>
<file>ui/views/App/Styles/SplashScreen/SplashScreenStyle.qml</file>
</qresource>
</RCC>
......@@ -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<linphone::Config> 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));
......
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
}
}
}
}
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
}
}
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment