diff --git a/corona.cpp b/corona.cpp index 5741f5288..1f601da13 100644 --- a/corona.cpp +++ b/corona.cpp @@ -273,8 +273,8 @@ void Corona::loadLayout(const QString &configName) d->configName = configName; } - KSharedConfigPtr conf = config(); - d->importLayout(*conf, false); + KConfigGroup conf(config(), QString()); + d->importLayout(conf, false); } QList Corona::importLayout(const KConfigGroup &conf) @@ -282,13 +282,6 @@ QList Corona::importLayout(const KConfigGroup &conf) return d->importLayout(conf, true); } -#ifndef KDE_NO_DEPRECATED -QList Corona::importLayout(const KConfigBase &conf) -{ - return d->importLayout(conf, true); -} -#endif - Containment *Corona::containmentForScreen(int screen, int desktop) const { foreach (Containment *containment, d->containments) { @@ -985,12 +978,10 @@ Containment *CoronaPrivate::addContainment(const QString &name, const QVariantLi return containment; } -QList CoronaPrivate::importLayout(const KConfigBase &conf, bool mergeConfig) +QList CoronaPrivate::importLayout(const KConfigGroup &conf, bool mergeConfig) { - if (const KConfigGroup *group = dynamic_cast(&conf)) { - if (!group->isValid()) { - return QList(); - } + if (!conf.isValid()) { + return QList(); } QList newContainments; diff --git a/corona.h b/corona.h index fe963dfad..16725a53f 100644 --- a/corona.h +++ b/corona.h @@ -275,20 +275,6 @@ public: */ AbstractDialogManager *dialogManager(); - /** - * Imports an applet layout from a config file. The results will be added to the - * current set of Containments. - * @deprecated Use the 4.6 version that takes a KConfigGroup - * - * @param config the name of the config file to load from, - * or the default config file if QString() - * @return the list of containments that were loaded - * @since 4.5 - */ -#ifndef KDE_NO_DEPRECATED - KDE_DEPRECATED QList importLayout(const KConfigBase &config); -#endif - /** * Returns the name of the preferred plugin to be used as containment toolboxes. * CustomContainments and CustomPanelContainments can still override it as their liking. It's also not guaranteed that the plugin will actually exist. diff --git a/private/corona_p.h b/private/corona_p.h index 5749c28b8..9a2a84031 100644 --- a/private/corona_p.h +++ b/private/corona_p.h @@ -46,7 +46,7 @@ public: void syncConfig(); Containment *addContainment(const QString &name, const QVariantList &args, uint id, bool delayedInit); void offscreenWidgetDestroyed(QObject *); - QList importLayout(const KConfigBase &conf, bool mergeConfig); + QList importLayout(const KConfigGroup &conf, bool mergeConfig); static bool s_positioningContainments;