Commit 408902d8 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

const'ify pointer

parent 205d5938
Pipeline #50226 passed with stage
in 26 minutes and 46 seconds
......@@ -15,10 +15,11 @@
CryptoStateIndicatorWidget::CryptoStateIndicatorWidget(QWidget *parent)
: QWidget(parent)
, mSignatureStateIndicator(new QLabel(this))
, mEncryptionStateIndicator(new QLabel(this))
{
auto hbox = new QHBoxLayout(this);
hbox->setContentsMargins({});
mSignatureStateIndicator = new QLabel(this);
mSignatureStateIndicator->setAlignment(Qt::AlignHCenter);
mSignatureStateIndicator->setTextFormat(Qt::PlainText);
hbox->addWidget(mSignatureStateIndicator);
......@@ -29,7 +30,6 @@ CryptoStateIndicatorWidget::CryptoStateIndicatorWidget(QWidget *parent)
mSignatureStateIndicator->setPalette(p);
mSignatureStateIndicator->setAutoFillBackground(true);
mEncryptionStateIndicator = new QLabel(this);
mEncryptionStateIndicator->setAlignment(Qt::AlignHCenter);
mEncryptionStateIndicator->setTextFormat(Qt::PlainText);
hbox->addWidget(mEncryptionStateIndicator);
......
......@@ -24,8 +24,8 @@ public:
private:
void updateShowAlwaysIndicator();
QLabel *mSignatureStateIndicator = nullptr;
QLabel *mEncryptionStateIndicator = nullptr;
QLabel *const mSignatureStateIndicator;
QLabel *const mEncryptionStateIndicator;
bool mShowAlwaysIndicator = true;
bool mIsSign = false;
bool mIsEncrypted = false;
......
......@@ -20,6 +20,7 @@
IdentityAddVcardDialog::IdentityAddVcardDialog(const QStringList &shadowIdentities, QWidget *parent)
: QDialog(parent)
, mButtonGroup(new QButtonGroup(this))
{
setWindowTitle(i18nc("@title:window", "Create own vCard"));
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
......@@ -38,7 +39,6 @@ IdentityAddVcardDialog::IdentityAddVcardDialog(const QStringList &shadowIdentiti
auto vlay = new QVBoxLayout(mainWidget);
vlay->setContentsMargins({});
mButtonGroup = new QButtonGroup(this);
mButtonGroup->setObjectName(QStringLiteral("buttongroup"));
// row 1: radio button
......
......@@ -27,7 +27,7 @@ public:
Q_REQUIRED_RESULT QUrl existingVCard() const;
private:
QButtonGroup *mButtonGroup = nullptr;
QButtonGroup *const mButtonGroup;
QComboBox *mComboBox = nullptr;
KUrlRequester *mVCardPath = nullptr;
};
......
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