Commit 4bb7d336 authored by Alexander Lohnau's avatar Alexander Lohnau 💬 Committed by Nate Graham

Port away from KNS3::DownloadDialog

The QWidgets components are about to be deprecated
and the QtQuick dialog has a bunch of visual improvements.

Considering that most KCMs already use the QtQuick components
this MR improves the consistency.

See frameworks/knewstuff!80
for the MR which introduced the non-deprecated dialog class.
parent 1a60087b
......@@ -28,7 +28,7 @@
#include <KAuthorized>
#include <KLocalizedString>
#include <KNewStuff3/KNS3/DownloadDialog>
#include <KNewStuff3/KNS3/QtQuickDialogWrapper>
#include <KWindowSystem>
#include <Plasma/Applet>
......@@ -110,7 +110,7 @@ public:
KCategorizedItemsViewModels::DefaultFilterModel filterModel;
bool showSpecialFilters = true;
DefaultItemFilterProxyModel filterItemModel;
QPointer<KNS3::DownloadDialog> newStuffDialog;
QPointer<KNS3::QtQuickDialogWrapper> newStuffDialog;
QScopedPointer<KActivities::Consumer> activitiesConsumer;
};
......@@ -475,11 +475,9 @@ void WidgetExplorer::immutabilityChanged(Plasma::Types::ImmutabilityType type)
void WidgetExplorer::downloadWidgets()
{
if (!d->newStuffDialog) {
d->newStuffDialog = new KNS3::DownloadDialog(QLatin1String("plasmoids.knsrc"));
d->newStuffDialog.data()->setWindowTitle(i18n("Download New Plasma Widgets"));
d->newStuffDialog.data()->setAttribute(Qt::WA_DeleteOnClose);
d->newStuffDialog = new KNS3::QtQuickDialogWrapper(QLatin1String("plasmoids.knsrc"));
}
d->newStuffDialog.data()->show();
d->newStuffDialog->open();
emit shouldClose();
}
......
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