Commit eba88607 authored by Laurent Montel's avatar Laurent Montel 😁

Clean up code

parent c11b2b99
Pipeline #36709 passed with stage
in 74 minutes
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include <Libkleo/Enum> #include <Libkleo/Enum>
CryptoPagePlugin::CryptoPagePlugin() CryptoPagePlugin::CryptoPagePlugin()
: mReadOnly(false)
{ {
KIconLoader::global()->addAppDir(QStringLiteral("libkleopatra")); KIconLoader::global()->addAppDir(QStringLiteral("libkleopatra"));
......
...@@ -11,10 +11,10 @@ ...@@ -11,10 +11,10 @@
InsertShorturlConfigureDialog::InsertShorturlConfigureDialog(QWidget *parent) InsertShorturlConfigureDialog::InsertShorturlConfigureDialog(QWidget *parent)
: QDialog(parent) : QDialog(parent)
, mInsertShortUrlWidget(new InsertShorturlConfigureWidget(this))
{ {
QVBoxLayout *mainLayout = new QVBoxLayout(this); QVBoxLayout *mainLayout = new QVBoxLayout(this);
mInsertShortUrlWidget = new InsertShorturlConfigureWidget(this);
mInsertShortUrlWidget->setObjectName(QStringLiteral("insertshorturlwidget")); mInsertShortUrlWidget->setObjectName(QStringLiteral("insertshorturlwidget"));
mainLayout->addWidget(mInsertShortUrlWidget); mainLayout->addWidget(mInsertShortUrlWidget);
......
...@@ -19,7 +19,7 @@ public: ...@@ -19,7 +19,7 @@ public:
void accept() override; void accept() override;
private: private:
InsertShorturlConfigureWidget *mInsertShortUrlWidget = nullptr; InsertShorturlConfigureWidget *const mInsertShortUrlWidget;
}; };
#endif // INSERTSHORTURLCONFIGUREDIALOG_H #endif // INSERTSHORTURLCONFIGUREDIALOG_H
...@@ -25,13 +25,13 @@ using namespace std::placeholders; ...@@ -25,13 +25,13 @@ using namespace std::placeholders;
AkonadiPimDataSource::AkonadiPimDataSource(QObject *parent) AkonadiPimDataSource::AkonadiPimDataSource(QObject *parent)
: QObject(parent) : QObject(parent)
, mCalendar(new EventModel(this))
{ {
Akonadi::AttributeFactory::registerAttribute<Akonadi::CollectionColorAttribute>(); Akonadi::AttributeFactory::registerAttribute<Akonadi::CollectionColorAttribute>();
connect(SettingsChangeNotifier::self(), &SettingsChangeNotifier::settingsChanged, connect(SettingsChangeNotifier::self(), &SettingsChangeNotifier::settingsChanged,
this, &AkonadiPimDataSource::onSettingsChanged); this, &AkonadiPimDataSource::onSettingsChanged);
mCalendar = new EventModel(this);
onSettingsChanged(); onSettingsChanged();
......
...@@ -30,7 +30,7 @@ private Q_SLOTS: ...@@ -30,7 +30,7 @@ private Q_SLOTS:
void onSettingsChanged(); void onSettingsChanged();
private: private:
EventModel *mCalendar = nullptr; EventModel *const mCalendar;
EventViews::PrefsPtr mEventViewsPrefs; EventViews::PrefsPtr mEventViewsPrefs;
mutable QHash<qint64, QString> mColorCache; mutable QHash<qint64, QString> mColorCache;
}; };
......
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