Commit 4a2674be authored by Ronan Abhamon's avatar Ronan Abhamon

fix(src/app/App): do not set parent of calls/settings windows

parent d18c57c5
...@@ -87,6 +87,8 @@ App::App (int &argc, char **argv) : QApplication(argc, argv) { ...@@ -87,6 +87,8 @@ App::App (int &argc, char **argv) : QApplication(argc, argv) {
App::~App () { App::~App () {
qInfo() << "Destroying app..."; qInfo() << "Destroying app...";
delete m_calls_window;
delete m_settings_window;
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
...@@ -153,14 +155,13 @@ void App::initContentApp () { ...@@ -153,14 +155,13 @@ void App::initContentApp () {
core->setParent(this); core->setParent(this);
} }
createSubWindows();
// Load main view. // Load main view.
qInfo() << "Loading main view..."; qInfo() << "Loading main view...";
m_engine.load(QUrl(QML_VIEW_MAIN_WINDOW)); m_engine.load(QUrl(QML_VIEW_MAIN_WINDOW));
if (m_engine.rootObjects().isEmpty()) if (m_engine.rootObjects().isEmpty())
qFatal("Unable to open main window."); qFatal("Unable to open main window.");
createSubWindows();
#ifndef __APPLE__ #ifndef __APPLE__
// Enable TrayIconSystem. // Enable TrayIconSystem.
if (!QSystemTrayIcon::isSystemTrayAvailable()) if (!QSystemTrayIcon::isSystemTrayAvailable())
...@@ -319,9 +320,7 @@ inline QQuickWindow *createSubWindow (App *app, const char *path) { ...@@ -319,9 +320,7 @@ inline QQuickWindow *createSubWindow (App *app, const char *path) {
} }
QQuickWindow *window = qobject_cast<QQuickWindow *>(component.create()); QQuickWindow *window = qobject_cast<QQuickWindow *>(component.create());
QQmlEngine::setObjectOwnership(window, QQmlEngine::CppOwnership); QQmlEngine::setObjectOwnership(window, QQmlEngine::CppOwnership);
window->setParent(app->getMainWindow());
return window; return window;
} }
......
belle-sip @ 7c5bb0a4
Subproject commit 73fac2d401c19c93529269665d7ed1c0ffa311d0 Subproject commit 7c5bb0a415950fe38f0857ed02c66b65b976be28
linphone @ 17df3b86
Subproject commit bad65fdb35b56791bd3774ded844090d3213437b Subproject commit 17df3b86a5a931bb6c994a70e96690e3a95d49c9
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