quick: Fix ownership of the floating view

Not nice to delete it in two places.
This commit is contained in:
Sergio Martins
2020-10-04 20:16:30 +01:00
parent 0ef56c1302
commit 3cdd5afe7a
2 changed files with 2 additions and 9 deletions

View File

@@ -58,7 +58,8 @@ FloatingWindowQuick::FloatingWindowQuick(Frame *frame, MainWindowBase *parent)
FloatingWindowQuick::~FloatingWindowQuick()
{
m_quickWindow->deleteLater();
QWidgetAdapter::setParent(nullptr);
delete m_quickWindow;
}
QWindow *FloatingWindowQuick::candidateParentWindow() const

View File

@@ -61,14 +61,6 @@ struct EnsureTopLevelsDeleted
~EnsureTopLevelsDeleted()
{
#ifdef KDDOCKWIDGETS_QTQUICK
// Delete the QQuickView. Too much assle to create and delete them for each test.
for (QWindow *window : qApp->topLevelWindows()) {
if (qobject_cast<QQuickView*>(window))
delete window;
}
#endif
if (topLevels().size() != 0) {
qWarning() << "There's still top-level widgets present!" << topLevels();
}