Commit 007dbc98 authored by Laurent Montel's avatar Laurent Montel
Browse files

const'ify pointer

parent 96009b3d
Pipeline #231283 failed with stage
in 6 minutes and 46 seconds
......@@ -28,6 +28,7 @@ GoogleSettingsDialog::GoogleSettingsDialog(GoogleResource *resource, GoogleSetti
: QDialog()
, m_resource(resource)
, m_settings(settings)
, m_ui(new Ui::GoogleSettingsDialog)
{
if (wId) {
setAttribute(Qt::WA_NativeWindow, true);
......@@ -44,7 +45,6 @@ GoogleSettingsDialog::GoogleSettingsDialog(GoogleResource *resource, GoogleSetti
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
mainLayout->addWidget(buttonBox);
m_ui = new Ui::GoogleSettingsDialog;
m_ui->setupUi(mainWidget);
m_ui->refreshSpinBox->setSuffix(ki18np(" minute", " minutes"));
......
......@@ -35,7 +35,7 @@ protected:
private:
GoogleResource *const m_resource;
GoogleSettings *const m_settings;
Ui::GoogleSettingsDialog *m_ui = nullptr;
Ui::GoogleSettingsDialog *const m_ui;
KGAPI2::AccountPtr m_account;
private Q_SLOTS:
void slotConfigure();
......
......@@ -87,6 +87,7 @@ MaildirResource::MaildirResource(const QString &id)
: ResourceBase(id)
, mSettings(new MaildirSettings(config()))
, mFsWatcher(new KDirWatch(this))
, mChangedCleanerTimer(new QTimer(this))
{
// we cannot be sure that a config file is existing
// the MaildirResource will always be build
......@@ -123,7 +124,6 @@ MaildirResource::MaildirResource(const QString &id)
synchronizeCollectionTree();
}
mChangedCleanerTimer = new QTimer(this);
connect(mChangedCleanerTimer, &QTimer::timeout, this, &MaildirResource::changedCleaner);
}
......
......@@ -84,5 +84,5 @@ private:
KDirWatch *const mFsWatcher;
QHash<QString, KPIM::Maildir> mMaildirsForCollection;
QSet<QString> mChangedFiles; // files changed by the resource and that should be ignored in slotFileChanged
QTimer *mChangedCleanerTimer = nullptr;
QTimer *const mChangedCleanerTimer;
};
Supports Markdown
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