Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
});
}
+void Systray::destroyDialog(QQuickWindow *dialog) const
+{
+ dialog->destroy();
+ dialog->deleteLater();
+}
+
void Systray::createCallDialog(const Activity &callNotification, const AccountStatePtr accountState)
{
qCDebug(lcSystray) << "Starting a new call dialog for notification with id: " << callNotification._id << "with text: " << callNotification._subject;
return;
}
+ // This call dialog gets deallocated on close conditions
+ // by a call from the QML side to the destroyDialog slot
callDialog->createWithInitialProperties(initialProperties);
_callsAlreadyNotified.insert(callNotification._id);
}
void positionWindowAtScreenCenter(QQuickWindow *window) const;
void positionNotificationWindow(QQuickWindow *window) const;
+ // Do not use this for QQuickWindow components managed by the QML engine,
+ // only for those managed by the C++ engine
+ void destroyDialog(QQuickWindow *window) const;
+
void showWindow(WindowPosition position = WindowPosition::Default);
void hideWindow();
callStateChecker.checking = false;
ringSound.stop();
root.close();
+
+ Systray.destroyDialog(root);
}
width: root.windowWidth