Commit 2ff10b87 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Const'ify pointer

parent a644941d
Pipeline #62039 passed with stage
in 23 minutes and 8 seconds
......@@ -12,10 +12,10 @@
ConfigurePluginPage::ConfigurePluginPage(QWidget *parent, const QVariantList &args)
: ConfigModule(parent, args)
, mConfigurePlugins(new PimCommon::ConfigurePluginsWidget(new ConfigurePluginsListWidget(this), this))
{
auto l = new QHBoxLayout(this);
l->setContentsMargins({});
mConfigurePlugins = new PimCommon::ConfigurePluginsWidget(new ConfigurePluginsListWidget(this), this);
l->addWidget(mConfigurePlugins);
connect(mConfigurePlugins, &PimCommon::ConfigurePluginsWidget::changed, this, &ConfigurePluginPage::slotConfigureChanged);
......
......@@ -27,6 +27,6 @@ public:
private:
void slotConfigureChanged();
PimCommon::ConfigurePluginsWidget *mConfigurePlugins = nullptr;
PimCommon::ConfigurePluginsWidget *const mConfigurePlugins;
};
......@@ -22,15 +22,15 @@ using namespace KMail;
KMKnotify::KMKnotify(QWidget *parent)
: QDialog(parent)
, m_comboNotify(new QComboBox(this))
, m_notifyWidget(new KNotifyConfigWidget(this))
{
setWindowTitle(i18nc("@title:window", "Notification"));
auto mainLayout = new QVBoxLayout(this);
m_comboNotify = new QComboBox(this);
m_comboNotify->setSizeAdjustPolicy(QComboBox::AdjustToContents);
mainLayout->addWidget(m_comboNotify);
m_notifyWidget = new KNotifyConfigWidget(this);
mainLayout->addWidget(m_notifyWidget);
m_comboNotify->setFocus();
......
......@@ -29,8 +29,8 @@ private:
void initCombobox();
void writeConfig();
void readConfig();
QComboBox *m_comboNotify = nullptr;
KNotifyConfigWidget *m_notifyWidget = nullptr;
QComboBox *const m_comboNotify;
KNotifyConfigWidget *const m_notifyWidget;
bool m_changed = false;
};
}
......
......@@ -16,12 +16,12 @@
PotentialPhishingDetailDialog::PotentialPhishingDetailDialog(QWidget *parent)
: QDialog(parent)
, mPotentialPhishingDetailWidget(new PotentialPhishingDetailWidget(this))
{
setWindowTitle(i18nc("@title:window", "Details"));
auto topLayout = new QVBoxLayout(this);
setModal(true);
mPotentialPhishingDetailWidget = new PotentialPhishingDetailWidget(this);
mPotentialPhishingDetailWidget->setObjectName(QStringLiteral("potentialphising_widget"));
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
......
......@@ -23,6 +23,6 @@ private:
void slotSave();
void readConfig();
void writeConfig();
PotentialPhishingDetailWidget *mPotentialPhishingDetailWidget = nullptr;
PotentialPhishingDetailWidget *const mPotentialPhishingDetailWidget;
};
......@@ -21,6 +21,8 @@
IdentityAddVcardDialog::IdentityAddVcardDialog(const QStringList &shadowIdentities, QWidget *parent)
: QDialog(parent)
, mButtonGroup(new QButtonGroup(this))
, mComboBox(new QComboBox(this))
, mVCardPath(new KUrlRequester(this))
{
setWindowTitle(i18nc("@title:window", "Create own vCard"));
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
......@@ -56,7 +58,6 @@ IdentityAddVcardDialog::IdentityAddVcardDialog(const QStringList &shadowIdentiti
auto hlay = new QHBoxLayout(); // inherits spacing
vlay->addLayout(hlay);
mVCardPath = new KUrlRequester(this);
mVCardPath->setObjectName(QStringLiteral("kurlrequester_vcardpath"));
mVCardPath->setMimeTypeFilters({QStringLiteral("text/vcard"), QStringLiteral("all/allfiles")});
......@@ -79,7 +80,6 @@ IdentityAddVcardDialog::IdentityAddVcardDialog(const QStringList &shadowIdentiti
// row 5: combobox with existing identities and label
hlay = new QHBoxLayout(); // inherits spacing
vlay->addLayout(hlay);
mComboBox = new QComboBox(this);
mComboBox->setObjectName(QStringLiteral("identity_combobox"));
mComboBox->setEditable(false);
......
......@@ -27,7 +27,7 @@ public:
private:
QButtonGroup *const mButtonGroup;
QComboBox *mComboBox = nullptr;
KUrlRequester *mVCardPath = nullptr;
QComboBox *const mComboBox;
KUrlRequester *const mVCardPath;
};
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