diff --git a/src/kded.h b/src/kded.h --- a/src/kded.h +++ b/src/kded.h @@ -70,6 +70,7 @@ void unregisterWindowId(qlonglong windowId, const QString &sender); //@} void recreate(bool initial); + // TODO KF6 remove void loadSecondPhase(); //@{ diff --git a/src/kded.cpp b/src/kded.cpp --- a/src/kded.cpp +++ b/src/kded.cpp @@ -211,12 +211,6 @@ } } - // There will be a "phase 2" only if we're in the KDE startup. - // If kded is restarted by its crashhandled or by hand, - // then there will be no second phase autoload, so load - // these modules now, if in a KDE session. - const bool loadPhase2Now = (kde_running && qEnvironmentVariableIntValue("KDED_STARTED_BY_KDEINIT") == 0); - // Preload kded modules. const QVector kdedModules = availableModules(); for (const KPluginMetaData &module : kdedModules) { @@ -238,7 +232,7 @@ break; case 2: // autoload delayed, only in KDE default: - if (!loadPhase2Now) { + if (!kde_running) { prevent_autoload = true; } break; @@ -267,16 +261,7 @@ void Kded::loadSecondPhase() { - qCDebug(KDED) << "Loading second phase autoload"; - KSharedConfig::Ptr config = KSharedConfig::openConfig(); - const QVector kdedModules = availableModules(); - for (const KPluginMetaData &module : kdedModules) { - const bool autoload = isModuleAutoloaded(module); - if (autoload && phaseForModule(module) == 2) { - qCDebug(KDED) << "2nd phase: loading" << module.pluginId(); - loadModule(module, false); - } - } + qCDebug(KDED) << "Second phase autoload is deprecated"; } void Kded::noDemandLoad(const QString &obj) diff --git a/src/kdedadaptor.h b/src/kdedadaptor.h --- a/src/kdedadaptor.h +++ b/src/kdedadaptor.h @@ -39,6 +39,7 @@ void registerWindowId(qlonglong windowId, const QDBusMessage &); void unregisterWindowId(qlonglong windowId, const QDBusMessage &); void reconfigure(); + // TODO KF6 remove void loadSecondPhase(); void quit();