Commit 83920d5b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Const'ify pointer

parent 405189e5
Pipeline #95986 passed with stage
in 6 minutes and 46 seconds
......@@ -24,12 +24,12 @@
BackupFileStructureInfoDialog::BackupFileStructureInfoDialog(QWidget *parent)
: QDialog(parent)
, mEditor(new KPIMTextEdit::PlainTextEditorWidget(this))
{
setWindowTitle(i18nc("@title:window", "Archive File Structure"));
auto mainLayout = new QVBoxLayout(this);
QLabel *lab = new QLabel(i18n("Backup Archive Structure:"));
mainLayout->addWidget(lab);
mEditor = new KPIMTextEdit::PlainTextEditorWidget;
mEditor->editor()->setWebShortcutSupport(false);
mEditor->setReadOnly(true);
mainLayout->addWidget(mEditor);
......
......@@ -22,5 +22,5 @@ private:
void readConfig();
void writeConfig();
void loadStructure();
KPIMTextEdit::PlainTextEditorWidget *mEditor = nullptr;
KPIMTextEdit::PlainTextEditorWidget *const mEditor;
};
......@@ -29,12 +29,12 @@
ShowArchiveStructureDialog::ShowArchiveStructureDialog(const QString &filename, QWidget *parent)
: QDialog(parent)
, mFileName(filename)
, mTreeWidget(new QTreeWidget(this))
{
setWindowTitle(i18nc("@title:window", "Show Archive Content on file \"%1\"", filename));
setModal(true);
auto mainLayout = new QVBoxLayout(this);
mTreeWidget = new QTreeWidget(this);
mTreeWidget->header()->hide();
mTreeWidget->setAlternatingRowColors(true);
......
......@@ -38,7 +38,7 @@ private:
QTreeWidgetItem *addItem(QTreeWidgetItem *parent, const QString &name, const QString &fillFullPath);
QString mFileName;
QString mLogFile;
QTreeWidget *mTreeWidget = nullptr;
QTreeWidget *const mTreeWidget;
QPushButton *mExtractFile = nullptr;
QPushButton *mOpenFile = nullptr;
KZip *mZip = nullptr;
......
......@@ -27,5 +27,5 @@ public:
private:
QProgressDialog *mProgressDialog = nullptr;
QWidget *mParentWidget = nullptr;
QWidget *const mParentWidget;
};
......@@ -20,5 +20,5 @@ protected:
void addExportProgressIndicator() override;
private:
QWidget *mParentWidget = nullptr;
QWidget *const mParentWidget;
};
......@@ -9,8 +9,8 @@
UserFeedBackManager::UserFeedBackManager(QObject *parent)
: QObject(parent)
, mUserFeedbackProvider(new PimDataExportedUserFeedbackProvider(this))
{
mUserFeedbackProvider = new PimDataExportedUserFeedbackProvider(this);
}
UserFeedBackManager *UserFeedBackManager::self()
......
......@@ -21,5 +21,5 @@ public:
KUserFeedback::Provider *userFeedbackProvider() const;
private:
KUserFeedback::Provider *mUserFeedbackProvider = nullptr;
KUserFeedback::Provider *const mUserFeedbackProvider;
};
......@@ -13,6 +13,9 @@
PimDataExporterConfigureWidget::PimDataExporterConfigureWidget(QWidget *parent)
: QWidget(parent)
, mAlwaysOverrideFile(new QCheckBox(i18n("Always Override File")))
, mAlwaysOverrideDirectory(new QCheckBox(i18n("Always Override Directory")))
, mAlwaysMergeConfigFile(new QCheckBox(i18n("Always Merge Config File")))
{
auto layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
......@@ -24,15 +27,12 @@ PimDataExporterConfigureWidget::PimDataExporterConfigureWidget(QWidget *parent)
auto groupBoxLayout = new QVBoxLayout;
groupBox->setLayout(groupBoxLayout);
mAlwaysOverrideFile = new QCheckBox(i18n("Always Override File"));
mAlwaysOverrideFile->setObjectName(QStringLiteral("alwaysoverridefile"));
groupBoxLayout->addWidget(mAlwaysOverrideFile);
mAlwaysOverrideDirectory = new QCheckBox(i18n("Always Override Directory"));
mAlwaysOverrideDirectory->setObjectName(QStringLiteral("alwaysoverridedirectory"));
groupBoxLayout->addWidget(mAlwaysOverrideDirectory);
mAlwaysMergeConfigFile = new QCheckBox(i18n("Always Merge Config File"));
mAlwaysMergeConfigFile->setObjectName(QStringLiteral("alwaysmergeconfigfile"));
groupBoxLayout->addWidget(mAlwaysMergeConfigFile);
groupBoxLayout->addStretch(1);
......
......@@ -22,7 +22,7 @@ public Q_SLOTS:
private:
void initialize();
QCheckBox *mAlwaysOverrideFile = nullptr;
QCheckBox *mAlwaysOverrideDirectory = nullptr;
QCheckBox *mAlwaysMergeConfigFile = nullptr;
QCheckBox *const mAlwaysOverrideFile;
QCheckBox *const mAlwaysOverrideDirectory;
QCheckBox *const mAlwaysMergeConfigFile;
};
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