Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 999e7843 authored by Laurent Montel's avatar Laurent Montel 😁

Use c++11 style

parent 52d72588
......@@ -27,24 +27,6 @@
#include <KPluginFactory>
#include <QSet>
class ShortUrlEnginePluginManagerInstancePrivate
{
public:
ShortUrlEnginePluginManagerInstancePrivate()
: shortUrlEnginePluginManager(new ShortUrlEnginePluginManager)
{
}
~ShortUrlEnginePluginManagerInstancePrivate()
{
delete shortUrlEnginePluginManager;
}
ShortUrlEnginePluginManager *shortUrlEnginePluginManager;
};
Q_GLOBAL_STATIC(ShortUrlEnginePluginManagerInstancePrivate, sInstance)
class ShortUrlEnginePluginInfo
{
public:
......@@ -139,7 +121,8 @@ ShortUrlEnginePluginManager::~ShortUrlEnginePluginManager()
ShortUrlEnginePluginManager *ShortUrlEnginePluginManager::self()
{
return sInstance->shortUrlEnginePluginManager;
static ShortUrlEnginePluginManager s_self;
return &s_self;
}
QVector<ShortUrlEnginePlugin *> ShortUrlEnginePluginManager::pluginsList() const
......
......@@ -22,24 +22,6 @@
#include <QStandardPaths>
class ViewerPluginExternalScriptManagerInstancePrivate
{
public:
ViewerPluginExternalScriptManagerInstancePrivate()
: externalScriptPluginManager(new ViewerPluginExternalScriptManager)
{
}
~ViewerPluginExternalScriptManagerInstancePrivate()
{
delete externalScriptPluginManager;
}
ViewerPluginExternalScriptManager *externalScriptPluginManager;
};
Q_GLOBAL_STATIC(ViewerPluginExternalScriptManagerInstancePrivate, sInstance)
ViewerPluginExternalScriptManager::ViewerPluginExternalScriptManager(QObject *parent)
: QObject(parent)
{
......@@ -52,7 +34,8 @@ ViewerPluginExternalScriptManager::~ViewerPluginExternalScriptManager()
ViewerPluginExternalScriptManager *ViewerPluginExternalScriptManager::self()
{
return sInstance->externalScriptPluginManager;
static ViewerPluginExternalScriptManager s_self;
return &s_self;
}
void ViewerPluginExternalScriptManager::readExternalScriptInfo()
......
......@@ -24,27 +24,11 @@
using namespace AdBlock;
class AdblockManagerInstancePrivate
{
public:
AdblockManagerInstancePrivate()
: ablockManager(new AdblockManager)
{
}
~AdblockManagerInstancePrivate()
{
delete ablockManager;
}
AdblockManager *ablockManager;
};
Q_GLOBAL_STATIC(AdblockManagerInstancePrivate, sInstance)
AdblockManager *AdblockManager::self()
{
return sInstance->ablockManager;
static AdblockManager s_self;
return &s_self;
}
AdblockManager::AdblockManager(QObject *parent)
......
......@@ -23,8 +23,6 @@
#include "selectimapcreatefolderjob.h"
#include <QStandardItemModel>
Q_GLOBAL_STATIC(SelectImapFolderModel, s_selectImapFolderModel)
SelectImapFolderModel::SelectImapFolderModel(QObject *parent)
: QObject(parent)
{
......@@ -36,7 +34,8 @@ SelectImapFolderModel::~SelectImapFolderModel()
SelectImapFolderModel *SelectImapFolderModel::self()
{
return s_selectImapFolderModel;
static SelectImapFolderModel s_self;
return &s_self;
}
void SelectImapFolderModel::createNewFolder(const KSieveUi::SieveImapAccountSettings &account, const QString &folderName)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment