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 7e9da41b authored by Laurent Montel's avatar Laurent Montel 😁

Use const'ref

parent fe8e5b15
cmake_minimum_required(VERSION 3.0)
set(PIM_VERSION "5.10.41")
set(PIM_VERSION "5.10.42")
project(Akonadi VERSION ${PIM_VERSION})
set(CMAKE_CXX_STANDARD 14)
......
......@@ -28,7 +28,7 @@
namespace Akonadi {
class Q_DECL_HIDDEN AgentConfigurationBase::Private {
public:
Private(KSharedConfigPtr config, QWidget *parentWidget, const QVariantList &args)
Private(const KSharedConfigPtr &config, QWidget *parentWidget, const QVariantList &args)
: config(config)
, parentWidget(parentWidget)
{
......@@ -49,7 +49,7 @@ public:
using namespace Akonadi;
AgentConfigurationBase::AgentConfigurationBase(KSharedConfigPtr config,
AgentConfigurationBase::AgentConfigurationBase(const KSharedConfigPtr &config,
QWidget *parentWidget,
const QVariantList &args)
: QObject(reinterpret_cast<QObject*>(parentWidget))
......
......@@ -91,7 +91,7 @@ public:
*
* Subclasses must provide a constructor with this exact signature.
*/
explicit AgentConfigurationBase(KSharedConfigPtr config, QWidget *parentWidget,
explicit AgentConfigurationBase(const KSharedConfigPtr &config, QWidget *parentWidget,
const QVariantList &args);
~AgentConfigurationBase() override;
......
......@@ -35,7 +35,7 @@ public:
explicit AgentConfigurationFactoryBase(QObject *parent = nullptr);
~AgentConfigurationFactoryBase() override = default;
virtual AgentConfigurationBase *create(KSharedConfigPtr config, QWidget *parent, const QVariantList &args) const = 0;
virtual AgentConfigurationBase *create(const KSharedConfigPtr &config, QWidget *parent, const QVariantList &args) const = 0;
};
}
......@@ -46,7 +46,7 @@ public:
Q_PLUGIN_METADATA(IID "org.freedesktop.Akonadi.AgentConfig" FILE metadata) \
public: \
FactoryName(QObject *parent = nullptr): Akonadi::AgentConfigurationFactoryBase(parent) {} \
Akonadi::AgentConfigurationBase *create(KSharedConfigPtr config, QWidget *parent, const QVariantList &args) const override { \
Akonadi::AgentConfigurationBase *create(const KSharedConfigPtr &config, QWidget *parent, const QVariantList &args) const override { \
return new ClassName(config, parent, args); \
} \
};
......
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