Replaced KGlobal::config() by KSharedConfig::openConfig()
Remodified: kded/kdedadaptor.cpp
This commit is contained in:
parent
7463dde514
commit
658fad620a
@ -82,7 +82,7 @@ KConfigGroup AbstractRunner::config() const
|
||||
group = "UnnamedRunner";
|
||||
}
|
||||
|
||||
KConfigGroup runners(KGlobal::config(), "Runners");
|
||||
KConfigGroup runners(KSharedConfig::openConfig(), "Runners");
|
||||
return KConfigGroup(&runners, group);
|
||||
}
|
||||
|
||||
|
@ -347,7 +347,7 @@ void Applet::saveState(KConfigGroup &group) const
|
||||
KConfigGroup Applet::config() const
|
||||
{
|
||||
if (d->transient) {
|
||||
return KConfigGroup(KGlobal::config(), "PlasmaTransientsConfig");
|
||||
return KConfigGroup(KSharedConfig::openConfig(), "PlasmaTransientsConfig");
|
||||
}
|
||||
|
||||
if (d->isContainment) {
|
||||
@ -367,7 +367,7 @@ KConfigGroup Applet::globalConfig() const
|
||||
KSharedConfig::Ptr coronaConfig = corona->config();
|
||||
globalAppletConfig = KConfigGroup(coronaConfig, group);
|
||||
} else {
|
||||
globalAppletConfig = KConfigGroup(KGlobal::config(), group);
|
||||
globalAppletConfig = KConfigGroup(KSharedConfig::openConfig(), group);
|
||||
}
|
||||
|
||||
return KConfigGroup(&globalAppletConfig, d->globalName());
|
||||
@ -1443,7 +1443,7 @@ void Applet::createConfigurationInterface(KConfigDialog *parent)
|
||||
|
||||
bool Applet::hasAuthorization(const QString &constraint) const
|
||||
{
|
||||
KConfigGroup constraintGroup(KGlobal::config(), "Constraints");
|
||||
KConfigGroup constraintGroup(KSharedConfig::openConfig(), "Constraints");
|
||||
return constraintGroup.readEntry(constraint, true);
|
||||
}
|
||||
|
||||
@ -1541,7 +1541,7 @@ QStringList Applet::listCategories(const QString &parentApp, bool visibleOnly)
|
||||
QString constraint = AppletPrivate::parentAppConstraint(parentApp);
|
||||
constraint.append(" and exist [X-KDE-PluginInfo-Category]");
|
||||
|
||||
KConfigGroup group(KGlobal::config(), "General");
|
||||
KConfigGroup group(KSharedConfig::openConfig(), "General");
|
||||
const QStringList excluded = group.readEntry("ExcludeCategories", QStringList());
|
||||
foreach (const QString &category, excluded) {
|
||||
constraint.append(" and [X-KDE-PluginInfo-Category] != '").append(category).append("'");
|
||||
|
@ -74,7 +74,7 @@ Corona::Corona(QObject *parent)
|
||||
|
||||
Corona::~Corona()
|
||||
{
|
||||
KConfigGroup trans(KGlobal::config(), "PlasmaTransientsConfig");
|
||||
KConfigGroup trans(KSharedConfig::openConfig(), "PlasmaTransientsConfig");
|
||||
trans.deleteGroup();
|
||||
|
||||
// FIXME: Same fix as in Plasma::View - make sure that when the focused widget is
|
||||
|
@ -72,7 +72,7 @@ CoronaBase::CoronaBase(QObject *parent)
|
||||
|
||||
CoronaBase::~CoronaBase()
|
||||
{
|
||||
KConfigGroup trans(KGlobal::config(), "PlasmaTransientsConfig");
|
||||
KConfigGroup trans(KSharedConfig::openConfig(), "PlasmaTransientsConfig");
|
||||
trans.deleteGroup();
|
||||
|
||||
delete d;
|
||||
|
@ -409,7 +409,7 @@ KPluginInfo::List PluginLoader::listAppletInfo(const QString &category, const QS
|
||||
|
||||
//note: constraint guaranteed non-empty from here down
|
||||
if (category.isEmpty()) { //use all but the excluded categories
|
||||
KConfigGroup group(KGlobal::config(), "General");
|
||||
KConfigGroup group(KSharedConfig::openConfig(), "General");
|
||||
QStringList excluded = group.readEntry("ExcludeCategories", QStringList());
|
||||
foreach (const QString &category, excluded) {
|
||||
constraint.append(" and [X-KDE-PluginInfo-Category] != '").append(category).append("'");
|
||||
|
@ -523,7 +523,7 @@ void AppletPrivate::propagateConfigChanged()
|
||||
|
||||
void AppletPrivate::filterOffers(QList<KService::Ptr> &offers)
|
||||
{
|
||||
KConfigGroup constraintGroup(KGlobal::config(), "Constraints");
|
||||
KConfigGroup constraintGroup(KSharedConfig::openConfig(), "Constraints");
|
||||
foreach (const QString &key, constraintGroup.keyList()) {
|
||||
//kDebug() << "security constraint" << key;
|
||||
if (constraintGroup.readEntry(key, true)) {
|
||||
@ -677,7 +677,7 @@ KConfigGroup *AppletPrivate::mainConfigGroup()
|
||||
if (corona) {
|
||||
containmentConfig = KConfigGroup(corona->config(), "Containments");
|
||||
} else {
|
||||
containmentConfig = KConfigGroup(KGlobal::config(), "Containments");
|
||||
containmentConfig = KConfigGroup(KSharedConfig::openConfig(), "Containments");
|
||||
}
|
||||
|
||||
if (package && !containmentConfig.hasGroup(QString::number(appletId))) {
|
||||
@ -701,7 +701,7 @@ KConfigGroup *AppletPrivate::mainConfigGroup()
|
||||
appletConfig = KConfigGroup(&appletConfig, "Applets");
|
||||
} else {
|
||||
kWarning() << "requesting config for" << q->name() << "without a containment!";
|
||||
appletConfig = KConfigGroup(KGlobal::config(), "Applets");
|
||||
appletConfig = KConfigGroup(KSharedConfig::openConfig(), "Applets");
|
||||
}
|
||||
|
||||
if (package && !appletConfig.hasGroup(QString::number(appletId))) {
|
||||
|
@ -125,7 +125,7 @@ public:
|
||||
|
||||
KConfigGroup configGroup()
|
||||
{
|
||||
return conf.isValid() ? conf : KConfigGroup(KGlobal::config(), "PlasmaRunnerManager");
|
||||
return conf.isValid() ? conf : KConfigGroup(KSharedConfig::openConfig(), "PlasmaRunnerManager");
|
||||
}
|
||||
|
||||
void clearSingleRunner()
|
||||
@ -183,7 +183,7 @@ public:
|
||||
if (conf.isValid()) {
|
||||
pluginConf = KConfigGroup(&conf, "Plugins");
|
||||
} else {
|
||||
pluginConf = KConfigGroup(KGlobal::config(), "Plugins");
|
||||
pluginConf = KConfigGroup(KSharedConfig::openConfig(), "Plugins");
|
||||
}
|
||||
|
||||
advertiseSingleRunnerIds.clear();
|
||||
|
@ -843,7 +843,7 @@ QFont Theme::font(FontRole role) const
|
||||
{
|
||||
switch (role) {
|
||||
case DesktopFont: {
|
||||
KConfigGroup cg(KGlobal::config(), "General");
|
||||
KConfigGroup cg(KSharedConfig::openConfig(), "General");
|
||||
return cg.readEntry("desktopFont", d->generalFont);
|
||||
}
|
||||
break;
|
||||
|
4
view.cpp
4
view.cpp
@ -365,7 +365,7 @@ Containment *View::swapContainment(Plasma::Containment *existing, const QString
|
||||
|
||||
KConfigGroup View::config() const
|
||||
{
|
||||
KConfigGroup views(KGlobal::config(), "PlasmaViews");
|
||||
KConfigGroup views(KSharedConfig::openConfig(), "PlasmaViews");
|
||||
return KConfigGroup(&views, QString::number(d->viewId));
|
||||
}
|
||||
|
||||
@ -375,7 +375,7 @@ void View::configNeedsSaving() const
|
||||
if (corona) {
|
||||
corona->requestConfigSync();
|
||||
} else {
|
||||
KGlobal::config()->sync();
|
||||
KSharedConfig::openConfig()->sync();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user