From 362a0a9372938b100be391fce428a781f7daf1ae Mon Sep 17 00:00:00 2001 From: Jignesh Kakadiya Date: Mon, 18 Jun 2012 13:11:26 +0530 Subject: [PATCH] KGlobal::mainComponent().componentName() should be replaced with QCoreApplication::instance()->applicationName() --- abstracttoolbox.cpp | 4 +++- coronabase.cpp | 5 ++--- pluginloader.cpp | 9 ++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/abstracttoolbox.cpp b/abstracttoolbox.cpp index 1ca59d261..a51b81417 100644 --- a/abstracttoolbox.cpp +++ b/abstracttoolbox.cpp @@ -19,6 +19,8 @@ #include "abstracttoolbox.h" +#include + #include "containment.h" #include @@ -78,7 +80,7 @@ KPluginInfo::List AbstractToolBox::listToolBoxInfo(const QString { KPluginInfo::List list; - if (parentApp.isEmpty() || parentApp == KGlobal::mainComponent().componentName()) { + if (parentApp.isEmpty() || parentApp == QCoreApplication::instance()->applicationName()) { list = KPluginInfo::List(); } diff --git a/coronabase.cpp b/coronabase.cpp index 3fc8fa216..da6cc07d4 100644 --- a/coronabase.cpp +++ b/coronabase.cpp @@ -35,7 +35,6 @@ #include #include -#include #include #include #include @@ -91,7 +90,7 @@ void CoronaBase::setDefaultContainmentPlugin(const QString &name) { // we could check if it is in: // Containment::listContainments().contains(name) || - // Containment::listContainments(QString(), KGlobal::mainComponent().componentName()).contains(name) + // Containment::listContainments(QString(), QCoreApplication::instance()->applicationName()).contains(name) // but that seems like overkill d->defaultContainmentPlugin = name; } @@ -454,7 +453,7 @@ CoronaBasePrivate::CoronaBasePrivate(CoronaBase *corona) actions(corona) { if (KGlobal::hasMainComponent()) { - configName = KGlobal::mainComponent().componentName() + "-appletsrc"; + configName = QCoreApplication::instance()->applicationName() + "-appletsrc"; } else { configName = "plasma-appletsrc"; } diff --git a/pluginloader.cpp b/pluginloader.cpp index fed65c4a2..98a3db1d3 100644 --- a/pluginloader.cpp +++ b/pluginloader.cpp @@ -20,7 +20,6 @@ #include "pluginloader.h" #include -#include #include #include #include @@ -401,7 +400,7 @@ KPluginInfo::List PluginLoader::listAppletInfo(const QString &category, const QS { KPluginInfo::List list; - if (!d->isDefaultLoader && (parentApp.isEmpty() || parentApp == KGlobal::mainComponent().componentName())) { + if (!d->isDefaultLoader && (parentApp.isEmpty() || parentApp == QCoreApplication::instance()->applicationName())) { list = internalAppletInfo(category); } @@ -435,7 +434,7 @@ KPluginInfo::List PluginLoader::listDataEngineInfo(const QString &parentApp) { KPluginInfo::List list; - if (!d->isDefaultLoader && (parentApp.isEmpty() || parentApp == KGlobal::mainComponent().componentName())) { + if (!d->isDefaultLoader && (parentApp.isEmpty() || parentApp == QCoreApplication::instance()->applicationName())) { list = internalDataEngineInfo(); } @@ -454,7 +453,7 @@ KPluginInfo::List PluginLoader::listRunnerInfo(const QString &parentApp) { KPluginInfo::List list; - if (!d->isDefaultLoader && (parentApp.isEmpty() || parentApp == KGlobal::mainComponent().componentName())) { + if (!d->isDefaultLoader && (parentApp.isEmpty() || parentApp == QCoreApplication::instance()->applicationName())) { list = internalRunnerInfo(); } @@ -473,7 +472,7 @@ KPluginInfo::List PluginLoader::listContainmentActionsInfo(const QString &parent { KPluginInfo::List list; - if (!d->isDefaultLoader && (parentApp.isEmpty() || parentApp == KGlobal::mainComponent().componentName())) { + if (!d->isDefaultLoader && (parentApp.isEmpty() || parentApp == QCoreApplication::instance()->applicationName())) { list = internalContainmentActionsInfo(); }