Verified Commit b309aff8 authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

Revert "widgetexplorer: Delete newStuffDialog on closed"

This reverts commit ee1cd1ab.

There will be a crash after the dialog is opened for the second time if
an installation is in progress, because the dialog component is not
deleted after QtQuickDialogWrapper is destructed.

CCBUG: 452865
parent e881c89d
Pipeline #167670 passed with stage
in 5 minutes and 45 seconds
......@@ -452,12 +452,10 @@ void WidgetExplorer::immutabilityChanged(Plasma::Types::ImmutabilityType type)
void WidgetExplorer::downloadWidgets()
{
if (d->newStuffDialog.isNull()) {
d->newStuffDialog = new KNS3::QtQuickDialogWrapper(QStringLiteral("plasmoids.knsrc"));
connect(d->newStuffDialog, &KNS3::QtQuickDialogWrapper::closed, d->newStuffDialog, &QObject::deleteLater);
d->newStuffDialog->open();
if (!d->newStuffDialog) {
d->newStuffDialog = new KNS3::QtQuickDialogWrapper(QLatin1String("plasmoids.knsrc"));
}
d->newStuffDialog->open();
Q_EMIT shouldClose();
}
......
Supports Markdown
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