remove deprecated version of loadLayout

This commit is contained in:
Aaron Seigo 2011-05-27 12:07:12 +02:00
parent 5f92b0d44f
commit 38004e0f9c
3 changed files with 6 additions and 29 deletions

View File

@ -273,8 +273,8 @@ void Corona::loadLayout(const QString &configName)
d->configName = configName; d->configName = configName;
} }
KSharedConfigPtr conf = config(); KConfigGroup conf(config(), QString());
d->importLayout(*conf, false); d->importLayout(conf, false);
} }
QList<Plasma::Containment *> Corona::importLayout(const KConfigGroup &conf) QList<Plasma::Containment *> Corona::importLayout(const KConfigGroup &conf)
@ -282,13 +282,6 @@ QList<Plasma::Containment *> Corona::importLayout(const KConfigGroup &conf)
return d->importLayout(conf, true); return d->importLayout(conf, true);
} }
#ifndef KDE_NO_DEPRECATED
QList<Plasma::Containment *> Corona::importLayout(const KConfigBase &conf)
{
return d->importLayout(conf, true);
}
#endif
Containment *Corona::containmentForScreen(int screen, int desktop) const Containment *Corona::containmentForScreen(int screen, int desktop) const
{ {
foreach (Containment *containment, d->containments) { foreach (Containment *containment, d->containments) {
@ -985,13 +978,11 @@ Containment *CoronaPrivate::addContainment(const QString &name, const QVariantLi
return containment; return containment;
} }
QList<Plasma::Containment *> CoronaPrivate::importLayout(const KConfigBase &conf, bool mergeConfig) QList<Plasma::Containment *> CoronaPrivate::importLayout(const KConfigGroup &conf, bool mergeConfig)
{ {
if (const KConfigGroup *group = dynamic_cast<const KConfigGroup *>(&conf)) { if (!conf.isValid()) {
if (!group->isValid()) {
return QList<Containment *>(); return QList<Containment *>();
} }
}
QList<Plasma::Containment *> newContainments; QList<Plasma::Containment *> newContainments;
QSet<uint> containmentsIds; QSet<uint> containmentsIds;

View File

@ -275,20 +275,6 @@ public:
*/ */
AbstractDialogManager *dialogManager(); 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<Plasma::Containment *> importLayout(const KConfigBase &config);
#endif
/** /**
* Returns the name of the preferred plugin to be used as containment toolboxes. * 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. * CustomContainments and CustomPanelContainments can still override it as their liking. It's also not guaranteed that the plugin will actually exist.

View File

@ -46,7 +46,7 @@ public:
void syncConfig(); void syncConfig();
Containment *addContainment(const QString &name, const QVariantList &args, uint id, bool delayedInit); Containment *addContainment(const QString &name, const QVariantList &args, uint id, bool delayedInit);
void offscreenWidgetDestroyed(QObject *); void offscreenWidgetDestroyed(QObject *);
QList<Plasma::Containment *> importLayout(const KConfigBase &conf, bool mergeConfig); QList<Plasma::Containment *> importLayout(const KConfigGroup &conf, bool mergeConfig);
static bool s_positioningContainments; static bool s_positioningContainments;