mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-07-30 12:25:37 +02:00
mainapplication: fix destruction ordering
Every models (like UtilsAdapter for example) owns a pointer of LRCInstance. So, when the MainApplication is destroyed, the QmlEngine and all structures owning a pointer of LRCInstance MUST be destroyed before LRCInstance to avoid any segfault GitLab: #631 Change-Id: Id30aaca325fe7172188bba468acd73525e62a34a
This commit is contained in:
parent
84a60d39df
commit
83f6857332
2 changed files with 5 additions and 2 deletions
|
@ -155,7 +155,11 @@ MainApplication::MainApplication(int& argc, char** argv)
|
|||
QObject::connect(this, &QApplication::aboutToQuit, [this] { cleanup(); });
|
||||
}
|
||||
|
||||
MainApplication::~MainApplication() {}
|
||||
MainApplication::~MainApplication()
|
||||
{
|
||||
engine_.reset();
|
||||
lrcInstance_.reset();
|
||||
}
|
||||
|
||||
bool
|
||||
MainApplication::init()
|
||||
|
|
|
@ -80,7 +80,6 @@ private:
|
|||
private:
|
||||
QScopedPointer<QFile> debugFile_;
|
||||
QScopedPointer<QQmlApplicationEngine> engine_;
|
||||
|
||||
QScopedPointer<LRCInstance> lrcInstance_;
|
||||
|
||||
QScopedPointer<ConnectivityMonitor> connectivityMonitor_;
|
||||
|
|
Loading…
Add table
Reference in a new issue