KGlobal::mainComponent().componentName() should be replaced with QCoreApplication::instance()->applicationName()
This commit is contained in:
parent
5534b9cfa0
commit
362a0a9372
@ -19,6 +19,8 @@
|
||||
|
||||
#include "abstracttoolbox.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include "containment.h"
|
||||
|
||||
#include <kservicetypetrader.h>
|
||||
@ -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();
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,6 @@
|
||||
|
||||
#include <kaction.h>
|
||||
#include <kdebug.h>
|
||||
#include <kglobal.h>
|
||||
#include <klocalizedstring.h>
|
||||
#include <kmimetype.h>
|
||||
#include <kshortcutsdialog.h>
|
||||
@ -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";
|
||||
}
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "pluginloader.h"
|
||||
|
||||
#include <kdebug.h>
|
||||
#include <kglobal.h>
|
||||
#include <kservice.h>
|
||||
#include <kservicetypetrader.h>
|
||||
#include <kstandarddirs.h>
|
||||
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user