More K_GLOBAL_STATIC -> Q_GLOBAL_STATIC porting

Acked by dfaure
REVIEW: 105611
This commit is contained in:
Albert Astals Cid 2012-07-19 21:16:59 +02:00
parent f65d8b2abb
commit 75ccb1b463
9 changed files with 18 additions and 22 deletions

View File

@ -87,11 +87,11 @@ class DataEngineManagerSingleton
DataEngineManager self;
};
K_GLOBAL_STATIC(DataEngineManagerSingleton, privateDataEngineManagerSelf)
Q_GLOBAL_STATIC(DataEngineManagerSingleton, privateDataEngineManagerSelf)
DataEngineManager *DataEngineManager::self()
{
return &privateDataEngineManagerSelf->self;
return &privateDataEngineManagerSelf()->self;
}
DataEngineManager::DataEngineManager()

View File

@ -67,7 +67,7 @@ class AssociatedApplicationManagerSingleton
AssociatedApplicationManager self;
};
K_GLOBAL_STATIC(AssociatedApplicationManagerSingleton, privateAssociatedApplicationManagerSelf)
Q_GLOBAL_STATIC(AssociatedApplicationManagerSingleton, privateAssociatedApplicationManagerSelf)
AssociatedApplicationManager::AssociatedApplicationManager(QObject *parent)
@ -83,7 +83,7 @@ AssociatedApplicationManager::~AssociatedApplicationManager()
AssociatedApplicationManager *AssociatedApplicationManager::self()
{
return &privateAssociatedApplicationManagerSelf->self;
return &privateAssociatedApplicationManagerSelf()->self;
}
void AssociatedApplicationManager::setApplication(Plasma::Applet *applet, const QString &application)

View File

@ -19,8 +19,6 @@
#include "private/componentinstaller_p.h"
#include <kglobal.h>
#ifdef PLASMA_ENABLE_PACKAGEKIT_SUPPORT
#include <QSet>
#include <QDBusInterface>
@ -47,11 +45,11 @@ class ComponentInstallerSingleton
ComponentInstaller self;
};
K_GLOBAL_STATIC(ComponentInstallerSingleton, privateComponentInstallerSelf)
Q_GLOBAL_STATIC(ComponentInstallerSingleton, privateComponentInstallerSelf)
ComponentInstaller *ComponentInstaller::self()
{
return &privateComponentInstallerSelf->self;
return &privateComponentInstallerSelf()->self;
}
ComponentInstaller::ComponentInstaller()

View File

@ -43,7 +43,7 @@ public:
StorageThread self;
};
K_GLOBAL_STATIC(StorageThreadSingleton, privateStorageThreadSelf)
Q_GLOBAL_STATIC(StorageThreadSingleton, privateStorageThreadSelf)
StorageThread::StorageThread(QObject *parent)
@ -61,7 +61,7 @@ StorageThread::~StorageThread()
Plasma::StorageThread *StorageThread::self()
{
return &privateStorageThreadSelf->self;
return &privateStorageThreadSelf()->self;
}
void StorageThread::initializeDb(StorageJob *caller)

View File

@ -28,8 +28,6 @@
#include <fixx11h.h>
#endif
#include <kglobal.h>
namespace Plasma
{
@ -67,11 +65,11 @@ class WindowShadowsSingleton
WindowShadows self;
};
K_GLOBAL_STATIC(WindowShadowsSingleton, privateWindowShadowsSelf)
Q_GLOBAL_STATIC(WindowShadowsSingleton, privateWindowShadowsSelf)
WindowShadows *WindowShadows::self()
{
return &privateWindowShadowsSelf->self;
return &privateWindowShadowsSelf()->self;
}
WindowShadows::WindowShadows(QObject *parent)

View File

@ -117,11 +117,11 @@ class AccessManagerSingleton
AccessManager self;
};
K_GLOBAL_STATIC(AccessManagerSingleton, privateAccessManagerSelf)
Q_GLOBAL_STATIC(AccessManagerSingleton, privateAccessManagerSelf)
AccessManager *AccessManager::self()
{
return &privateAccessManagerSelf->self;
return &privateAccessManagerSelf()->self;
}
AccessManager::AccessManager()

View File

@ -60,11 +60,11 @@ class AuthorizationManagerSingleton
AuthorizationManager self;
};
K_GLOBAL_STATIC(AuthorizationManagerSingleton, privateAuthorizationManagerSelf)
Q_GLOBAL_STATIC(AuthorizationManagerSingleton, privateAuthorizationManagerSelf)
AuthorizationManager *AuthorizationManager::self()
{
return &privateAuthorizationManagerSelf->self;
return &privateAuthorizationManagerSelf()->self;
}
AuthorizationManager::AuthorizationManager()

View File

@ -460,11 +460,11 @@ public:
Theme self;
};
K_GLOBAL_STATIC(ThemeSingleton, privateThemeSelf)
Q_GLOBAL_STATIC(ThemeSingleton, privateThemeSelf)
Theme *Theme::defaultTheme()
{
return &privateThemeSelf->self;
return &privateThemeSelf()->self;
}
Theme::Theme(QObject *parent)

View File

@ -110,11 +110,11 @@ class ToolTipManagerSingleton
}
ToolTipManager self;
};
K_GLOBAL_STATIC(ToolTipManagerSingleton, privateInstance)
Q_GLOBAL_STATIC(ToolTipManagerSingleton, privateInstance)
ToolTipManager *ToolTipManager::self()
{
return &privateInstance->self;
return &privateInstance()->self;
}
ToolTipManager::ToolTipManager(QObject *parent)