Commit 405a168d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Rename some private class

parent 246c2ee7
Pipeline #88074 canceled with stage
......@@ -13,10 +13,10 @@
namespace Akonadi
{
class Q_DECL_HIDDEN AgentConfigurationBase::Private
class Q_DECL_HIDDEN AgentConfigurationBase::AgentConfigurationBasePrivate
{
public:
Private(const KSharedConfigPtr &config, QWidget *parentWidget, const QVariantList &args)
AgentConfigurationBasePrivate(const KSharedConfigPtr &config, QWidget *parentWidget, const QVariantList &args)
: config(config)
, parentWidget(parentWidget)
{
......@@ -39,7 +39,7 @@ using namespace Akonadi;
AgentConfigurationBase::AgentConfigurationBase(const KSharedConfigPtr &config, QWidget *parentWidget, const QVariantList &args)
: QObject(reinterpret_cast<QObject *>(parentWidget))
, d(new Private(config, parentWidget, args))
, d(new AgentConfigurationBasePrivate(config, parentWidget, args))
{
}
......
......@@ -149,9 +149,9 @@ Q_SIGNALS:
void enableOkButton(bool enabled);
private:
class Private;
friend class Private;
std::unique_ptr<Private> const d;
class AgentConfigurationBasePrivate;
friend class AgentConfigurationBasePrivate;
std::unique_ptr<AgentConfigurationBasePrivate> const d;
};
} // namespace
......
......@@ -12,7 +12,7 @@
using namespace Akonadi;
AgentType::AgentType()
: d(new Private)
: d(new AgentTypePrivate)
{
}
......
......@@ -125,8 +125,8 @@ public:
private:
/// @cond PRIVATE
class Private;
QSharedDataPointer<Private> d;
class AgentTypePrivate;
QSharedDataPointer<AgentTypePrivate> d;
/// @endcond
};
......
......@@ -15,14 +15,14 @@ namespace Akonadi
/**
* @internal
*/
class AgentType::Private : public QSharedData
class AgentType::AgentTypePrivate : public QSharedData
{
public:
Private()
AgentTypePrivate()
{
}
Private(const Private &other)
AgentTypePrivate(const AgentTypePrivate &other)
: QSharedData(other)
{
mIdentifier = other.mIdentifier;
......
......@@ -18,10 +18,10 @@ using namespace Akonadi;
/**
* @internal
*/
class Q_DECL_HIDDEN AgentInstanceModel::Private
class AgentInstanceModel::AgentInstanceModelPrivate
{
public:
explicit Private(AgentInstanceModel *parent)
explicit AgentInstanceModelPrivate(AgentInstanceModel *parent)
: mParent(parent)
{
}
......@@ -34,14 +34,14 @@ public:
void instanceChanged(const AgentInstance & /*instance*/);
};
void AgentInstanceModel::Private::instanceAdded(const AgentInstance &instance)
void AgentInstanceModel::AgentInstanceModelPrivate::instanceAdded(const AgentInstance &instance)
{
mParent->beginInsertRows(QModelIndex(), mInstances.count(), mInstances.count());
mInstances.append(instance);
mParent->endInsertRows();
}
void AgentInstanceModel::Private::instanceRemoved(const AgentInstance &instance)
void AgentInstanceModel::AgentInstanceModelPrivate::instanceRemoved(const AgentInstance &instance)
{
const int index = mInstances.indexOf(instance);
if (index == -1) {
......@@ -53,7 +53,7 @@ void AgentInstanceModel::Private::instanceRemoved(const AgentInstance &instance)
mParent->endRemoveRows();
}
void AgentInstanceModel::Private::instanceChanged(const AgentInstance &instance)
void AgentInstanceModel::AgentInstanceModelPrivate::instanceChanged(const AgentInstance &instance)
{
const int numberOfInstance(mInstances.count());
for (int i = 0; i < numberOfInstance; ++i) {
......@@ -71,7 +71,7 @@ void AgentInstanceModel::Private::instanceChanged(const AgentInstance &instance)
AgentInstanceModel::AgentInstanceModel(QObject *parent)
: QAbstractItemModel(parent)
, d(new Private(this))
, d(new AgentInstanceModelPrivate(this))
{
d->mInstances = AgentManager::self()->instances();
......
......@@ -82,8 +82,8 @@ public:
private:
/// @cond PRIVATE
class Private;
std::unique_ptr<Private> const d;
class AgentInstanceModelPrivate;
std::unique_ptr<AgentInstanceModelPrivate> const d;
/// @endcond
};
......
......@@ -15,10 +15,10 @@ using namespace Akonadi;
/**
* @internal
*/
class Q_DECL_HIDDEN AgentTypeModel::Private
class AgentTypeModel::AgentTypeModelPrivate
{
public:
explicit Private(AgentTypeModel *parent)
explicit AgentTypeModelPrivate(AgentTypeModel *parent)
: mParent(parent)
{
mTypes = AgentManager::self()->types();
......@@ -31,14 +31,14 @@ public:
void typeRemoved(const AgentType &agentType);
};
void AgentTypeModel::Private::typeAdded(const AgentType &agentType)
void AgentTypeModel::AgentTypeModelPrivate::typeAdded(const AgentType &agentType)
{
mTypes.append(agentType);
Q_EMIT mParent->layoutChanged();
}
void AgentTypeModel::Private::typeRemoved(const AgentType &agentType)
void AgentTypeModel::AgentTypeModelPrivate::typeRemoved(const AgentType &agentType)
{
mTypes.removeAll(agentType);
......@@ -47,7 +47,7 @@ void AgentTypeModel::Private::typeRemoved(const AgentType &agentType)
AgentTypeModel::AgentTypeModel(QObject *parent)
: QAbstractItemModel(parent)
, d(new Private(this))
, d(new AgentTypeModelPrivate(this))
{
connect(AgentManager::self(), &AgentManager::typeAdded, this, [this](const Akonadi::AgentType &type) {
d->typeAdded(type);
......
......@@ -72,8 +72,8 @@ public:
private:
/// @cond PRIVATE
class Private;
std::unique_ptr<Private> const d;
class AgentTypeModelPrivate;
std::unique_ptr<AgentTypeModelPrivate> const d;
/// @endcond
};
......
......@@ -41,10 +41,10 @@ static_assert(numAgentActionData == AgentActionManager::LastType, "agentActionDa
/**
* @internal
*/
class Q_DECL_HIDDEN AgentActionManager::Private
class Q_DECL_HIDDEN AgentActionManager::AgentActionManagerPrivate
{
public:
explicit Private(AgentActionManager *parent)
explicit AgentActionManagerPrivate(AgentActionManager *parent)
: q(parent)
{
mActions.fill(nullptr, AgentActionManager::LastType);
......@@ -213,7 +213,7 @@ public:
AgentActionManager::AgentActionManager(KActionCollection *actionCollection, QWidget *parent)
: QObject(parent)
, d(new Private(this))
, d(new AgentActionManagerPrivate(this))
{
d->mParentWidget = parent;
d->mActionCollection = actionCollection;
......
......@@ -154,8 +154,8 @@ Q_SIGNALS:
private:
/// @cond PRIVATE
class Private;
std::unique_ptr<Private> const d;
class AgentActionManagerPrivate;
std::unique_ptr<AgentActionManagerPrivate> const d;
Q_PRIVATE_SLOT(d, void updateActions())
......
......@@ -26,16 +26,16 @@
using namespace Akonadi;
using namespace std::chrono_literals;
AgentConfigurationWidget::Private::Private(const AgentInstance &instance)
AgentConfigurationWidget::AgentConfigurationWidgetPrivate::AgentConfigurationWidgetPrivate(const AgentInstance &instance)
: agentInstance(instance)
{
}
AgentConfigurationWidget::Private::~Private()
AgentConfigurationWidget::AgentConfigurationWidgetPrivate::~AgentConfigurationWidgetPrivate()
{
}
void AgentConfigurationWidget::Private::setupErrorWidget(QWidget *parent, const QString &text)
void AgentConfigurationWidget::AgentConfigurationWidgetPrivate::setupErrorWidget(QWidget *parent, const QString &text)
{
auto layout = new QVBoxLayout(parent);
layout->addStretch(2);
......@@ -45,7 +45,7 @@ void AgentConfigurationWidget::Private::setupErrorWidget(QWidget *parent, const
layout->addStretch(2);
}
bool AgentConfigurationWidget::Private::loadPlugin(const QString &pluginPath)
bool AgentConfigurationWidget::AgentConfigurationWidgetPrivate::loadPlugin(const QString &pluginPath)
{
if (pluginPath.isEmpty()) {
qCDebug(AKONADIWIDGETS_LOG) << "Haven't found config plugin for" << agentInstance.type().identifier();
......@@ -71,7 +71,7 @@ bool AgentConfigurationWidget::Private::loadPlugin(const QString &pluginPath)
AgentConfigurationWidget::AgentConfigurationWidget(const AgentInstance &instance, QWidget *parent)
: QWidget(parent)
, d(new Private(instance))
, d(new AgentConfigurationWidgetPrivate(instance))
{
if (AgentConfigurationManager::self()->registerInstanceConfiguration(instance.identifier())) {
const auto pluginPath = AgentConfigurationManager::self()->findConfigPlugin(instance.type().identifier());
......
......@@ -41,10 +41,10 @@ protected:
void childEvent(QChildEvent *event) override;
private:
class Private;
friend class Private;
class AgentConfigurationWidgetPrivate;
friend class AgentConfigurationWidgetPrivate;
friend class AgentConfigurationDialog;
std::unique_ptr<Private> const d;
std::unique_ptr<AgentConfigurationWidgetPrivate> const d;
};
}
......
......@@ -17,7 +17,7 @@
namespace Akonadi
{
class Q_DECL_HIDDEN AgentConfigurationWidget::Private
class Q_DECL_HIDDEN AgentConfigurationWidget::AgentConfigurationWidgetPrivate
{
private:
struct PluginLoaderDeleter {
......@@ -29,8 +29,8 @@ private:
};
public:
Private(const AgentInstance &instance);
~Private();
AgentConfigurationWidgetPrivate(const AgentInstance &instance);
~AgentConfigurationWidgetPrivate();
void setupErrorWidget(QWidget *parent, const QString &text);
bool loadPlugin(const QString &pluginPath);
......
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