This is a multi-part message in MIME format. --nextPart2362822.aEqfIAy3KE Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" On Saturday 21 March 2015 23:53:07 Albert Astals Cid wrote: > Too late for KDE Applications 15.04 though now that i think, so maybe we > actually have to suggest everybody using the migrator to add those extra > lines? OK, that means: --- a/src/lib/util/kdelibs4configmigrator.h +++ b/src/lib/util/kdelibs4configmigrator.h @@ -60,6 +60,10 @@ public: * look for old data to migrate as well * } * @endcode + * + * IMPORTANT: after migrate() returns true, call KSharedConfig::openConfig()->reparseConfiguration() + * so that the global config (very likely already created by e.g. the platform integration plugin) + * can see the migrated data. */ bool migrate(); But wait, this makes me realize another solution: kdelibs4configmigrator could load the framework integration plugin, which would take care of this, if installed. Patch attached. Tested, at least to the extent that the slot is indeed being called. Obviously that's still "too late for KDE Applications 15.04", so maybe fix the apps that you want to see fixed for 15.04 with a #if KCOREADDONS_VERSION < 0x050900 KSharedConfig::openConfig()->reparseConfiguration(); #endif and KF 5.9 will make this unnecessary, i.e. the doc change won't get committed. Any input? -- David Faure, faure@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5 --nextPart2362822.aEqfIAy3KE Content-Disposition: attachment; filename="kcoreaddons.diff" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="kcoreaddons.diff" diff --git a/src/lib/util/kdelibs4configmigrator.cpp b/src/lib/util/kdelibs4configmigrator.cpp index cde7ab4..c8560c1 100644 --- a/src/lib/util/kdelibs4configmigrator.cpp +++ b/src/lib/util/kdelibs4configmigrator.cpp @@ -26,6 +26,7 @@ #include #include #include +#include class Kdelibs4ConfigMigrator::Private { @@ -108,5 +109,12 @@ bool Kdelibs4ConfigMigrator::migrate() } } } + + // Trigger KSharedConfig::openConfig()->reparseConfiguration() via the framework integration plugin + QPluginLoader lib(QStringLiteral("kf5/FrameworkIntegrationPlugin")); + QObject *rootObj = lib.instance(); + if (rootObj) { + QMetaObject::invokeMethod(rootObj, "reparseConfiguration"); + } return true; } --nextPart2362822.aEqfIAy3KE Content-Disposition: attachment; filename="frameworkintegration.diff" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="frameworkintegration.diff" diff --git a/src/integrationplugin/frameworkintegrationplugin.cpp b/src/integrationplugin/frameworkintegrationplugin.cpp index a45ba9d..e44b73b 100644 --- a/src/integrationplugin/frameworkintegrationplugin.cpp +++ b/src/integrationplugin/frameworkintegrationplugin.cpp @@ -135,3 +135,8 @@ KFrameworkIntegrationPlugin::KFrameworkIntegrationPlugin() setProperty(KMESSAGEBOXDONTASKAGAIN_PROPERTY, QVariant::fromValue(&m_dontAskAgainConfigStorage)); setProperty(KMESSAGEBOXNOTIFY_PROPERTY, QVariant::fromValue(&m_notify)); } + +void KFrameworkIntegrationPlugin::reparseConfiguration() +{ + KSharedConfig::openConfig()->reparseConfiguration(); +} diff --git a/src/integrationplugin/frameworkintegrationplugin.h b/src/integrationplugin/frameworkintegrationplugin.h index f87a941..8639f7e 100644 --- a/src/integrationplugin/frameworkintegrationplugin.h +++ b/src/integrationplugin/frameworkintegrationplugin.h @@ -63,6 +63,9 @@ public: KFrameworkIntegrationPlugin(); +public Q_SLOTS: + void reparseConfiguration(); + private: KMessageBoxDontAskAgainConfigStorage m_dontAskAgainConfigStorage; KMessageBoxNotify m_notify; --nextPart2362822.aEqfIAy3KE Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KS2RlLWZyYW1l d29ya3MtZGV2ZWwgbWFpbGluZyBsaXN0CktkZS1mcmFtZXdvcmtzLWRldmVsQGtkZS5vcmcKaHR0 cHM6Ly9tYWlsLmtkZS5vcmcvbWFpbG1hbi9saXN0aW5mby9rZGUtZnJhbWV3b3Jrcy1kZXZlbAo= --nextPart2362822.aEqfIAy3KE--