diff -Nru kcmutils-5.70.0/debian/changelog kcmutils-5.70.0/debian/changelog --- kcmutils-5.70.0/debian/changelog 2020-05-20 21:29:04.000000000 +0000 +++ kcmutils-5.70.0/debian/changelog 2020-05-26 08:28:20.000000000 +0000 @@ -1,3 +1,9 @@ +kcmutils (5.70.0-0ubuntu3) groovy; urgency=medium + + * Add upstream_fix-kcmshell.patch + + -- Rik Mills Tue, 26 May 2020 09:28:20 +0100 + kcmutils (5.70.0-0ubuntu2) groovy; urgency=medium * Add upstream patch to fix systemsettings crash when attempting to diff -Nru kcmutils-5.70.0/debian/patches/series kcmutils-5.70.0/debian/patches/series --- kcmutils-5.70.0/debian/patches/series 2020-05-20 21:29:04.000000000 +0000 +++ kcmutils-5.70.0/debian/patches/series 2020-05-26 08:28:20.000000000 +0000 @@ -1 +1,2 @@ upstream_fix-crash-loading-external-app.patch +upstream_fix-kcmshell.patch diff -Nru kcmutils-5.70.0/debian/patches/upstream_fix-kcmshell.patch kcmutils-5.70.0/debian/patches/upstream_fix-kcmshell.patch --- kcmutils-5.70.0/debian/patches/upstream_fix-kcmshell.patch 1970-01-01 00:00:00.000000000 +0000 +++ kcmutils-5.70.0/debian/patches/upstream_fix-kcmshell.patch 2020-05-26 08:28:20.000000000 +0000 @@ -0,0 +1,134 @@ +From c2db5f797fd3f1eb632de8baa7c034469af69ed1 Mon Sep 17 00:00:00 2001 +From: David Faure +Date: Fri, 22 May 2020 13:22:54 +0200 +Subject: Repair kcmshell5 after previous commits, now with unittest + +--- + src/kcmoduleinfo.cpp | 14 ++++++++++++++ + src/kcmoduleinfo.h | 14 ++++++++++++++ + src/kcmoduleloader.cpp | 6 ++++-- + src/kcmultidialog.cpp | 4 ++-- + src/kpluginselector.cpp | 2 +- + src/ksettings/dialog.cpp | 2 +- + 6 files changed, 52 insertions(+), 6 deletions(-) + +--- a/src/kcmoduleinfo.cpp ++++ b/src/kcmoduleinfo.cpp +@@ -141,6 +141,11 @@ + delete d; + } + ++bool KCModuleInfo::isValid() const ++{ ++ return d->pluginInfo.isValid() || d->service; ++} ++ + void KCModuleInfo::Private::loadAll() + { + allLoaded = true; +@@ -247,3 +252,12 @@ + return d->weight; + } + ++QVariant KCModuleInfo::property(const QString &key) const ++{ ++ if (d->service) { ++ return d->service->property(key); ++ } else { ++ return d->pluginInfo.property(key); ++ } ++} ++ +--- a/src/kcmoduleinfo.h ++++ b/src/kcmoduleinfo.h +@@ -111,6 +111,12 @@ + ~KCModuleInfo(); + + /** ++ * Returns true if the KCM was found ++ * @since 5.71 ++ */ ++ bool isValid() const; ++ ++ /** + * @return the filename of the .desktop file that describes the KCM + */ + QString fileName() const; +@@ -170,6 +176,14 @@ + */ + int weight() const; + ++ /** ++ * @return The value associated to the @p key. You can use it if you ++ * want to read custom values. To do this you need to define ++ * your own servicetype and add it to the ServiceTypes keys. ++ * @since 5.71 ++ */ ++ QVariant property(const QString &key) const; ++ + private: + class Private; + Private *d; +--- a/src/kcmoduleloader.cpp ++++ b/src/kcmoduleloader.cpp +@@ -74,14 +74,16 @@ + * from the factory. + */ + +- if (!mod.pluginInfo().isValid()) ++ if (!mod.isValid()) { + return reportError(report, + i18n("The module %1 could not be found.", + mod.moduleName()), i18n("

The diagnosis is:
The desktop file %1 could not be found.

", mod.fileName()), parent); +- if (mod.service() && mod.service()->noDisplay()) ++ } ++ if (mod.service() && mod.service()->noDisplay()) { + return reportError(report, i18n("The module %1 is disabled.", mod.moduleName()), + i18n("

Either the hardware/software the module configures is not available or the module has been disabled by the administrator.

"), + parent); ++ } + + if (!mod.library().isEmpty()) { + QString error; +--- a/src/kcmultidialog.cpp ++++ b/src/kcmultidialog.cpp +@@ -464,7 +464,7 @@ + KPageWidgetItem *parentItem, const QStringList &args) + { + Q_D(KCMultiDialog); +- if (!moduleInfo.pluginInfo().isValid()) { ++ if (!moduleInfo.isValid()) { + return nullptr; + } + +@@ -490,7 +490,7 @@ + KCMultiDialogPrivate::CreatedModule cm; + cm.kcm = kcm; + cm.item = item; +- cm.componentNames = moduleInfo.pluginInfo().property(QStringLiteral("X-KDE-ParentComponents")).toStringList(); ++ cm.componentNames = moduleInfo.property(QStringLiteral("X-KDE-ParentComponents")).toStringList(); + d->modules.append(cm); + + if (qobject_cast(kcm->realModule())) { +--- a/src/kpluginselector.cpp ++++ b/src/kpluginselector.cpp +@@ -891,7 +891,7 @@ + + if (configDialog.exec() == QDialog::Accepted) { + for (KCModuleProxy *moduleProxy : qAsConst(moduleProxyList)) { +- const QStringList parentComponents = moduleProxy->moduleInfo().pluginInfo().property(QStringLiteral("X-KDE-ParentComponents")).toStringList(); ++ const QStringList parentComponents = moduleProxy->moduleInfo().property(QStringLiteral("X-KDE-ParentComponents")).toStringList(); + moduleProxy->save(); + for (const QString &parentComponent : parentComponents) { + emit configCommitted(parentComponent.toLatin1()); +--- a/src/ksettings/dialog.cpp ++++ b/src/ksettings/dialog.cpp +@@ -191,7 +191,7 @@ + bool enabled = true; + //qDebug() << "check whether the '" << moduleinfo->moduleName() << "' KCM should be shown"; + // for all parent components +- const QStringList parentComponents = moduleinfo->pluginInfo().property( ++ const QStringList parentComponents = moduleinfo->property( + QStringLiteral("X-KDE-ParentComponents")).toStringList(); + for (QStringList::ConstIterator pcit = parentComponents.begin(); + pcit != parentComponents.end(); ++pcit) {