Port away from KNS3::DownloadDialog

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

Porting is just like in https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/536.
wilder-5.22
Alexander Lohnau 5 years ago
parent 40067fdf7f
commit 3daeb0f3c2
  1. 10
      kcms/kfontinst/kcmfontinst/KCmFontInst.cpp

@ -63,7 +63,7 @@
#include <KPluginFactory> #include <KPluginFactory>
#include <KStandardAction> #include <KStandardAction>
#include <KZip> #include <KZip>
#include <KNewStuff3/KNS3/DownloadDialog> #include <KNewStuff3/KNS3/QtQuickDialogWrapper>
#include <KConfigGroup> #include <KConfigGroup>
#include <QStandardPaths> #include <QStandardPaths>
@ -851,10 +851,8 @@ void CKCmFontInst::duplicateFonts()
void CKCmFontInst::downloadFonts() void CKCmFontInst::downloadFonts()
{ {
KNS3::DownloadDialog *newStuff = new KNS3::DownloadDialog("kfontinst.knsrc", this); KNS3::QtQuickDialogWrapper newStuff(QStringLiteral("kfontinst.knsrc"));
newStuff->exec(); if(!newStuff.exec().isEmpty()) // We have new fonts, so need to reconfigure fontconfig...
if(!newStuff->changedEntries().isEmpty()) // We have new fonts, so need to reconfigure fontconfig...
{ {
// Ask dbus helper for the current fonts folder name... // Ask dbus helper for the current fonts folder name...
// We then sym-link our knewstuff3 download folder into the fonts folder... // We then sym-link our knewstuff3 download folder into the fonts folder...
@ -869,8 +867,6 @@ void CKCmFontInst::downloadFonts()
doCmd(CJobRunner::CMD_UPDATE, CJobRunner::ItemList()); doCmd(CJobRunner::CMD_UPDATE, CJobRunner::ItemList());
} }
delete newStuff;
} }
void CKCmFontInst::print() void CKCmFontInst::print()

Loading…
Cancel
Save