Commit bd38be2a authored by Laurent Montel's avatar Laurent Montel
Browse files

Const'ify pointer

parent 00d28ccb
Pipeline #218940 canceled with stage
in 9 minutes and 18 seconds
......@@ -27,38 +27,38 @@ static const char myConfigGroupName[] = "MergeContactsDialog";
}
MergeContactsDialog::MergeContactsDialog(QWidget *parent)
: QDialog(parent)
, mButtonBox(new QDialogButtonBox(QDialogButtonBox::Close, this))
, mStackedWidget(new QStackedWidget(this))
, mNoEnoughContactSelected(new KABMergeContacts::MergeContactErrorLabel(KABMergeContacts::MergeContactErrorLabel::NotEnoughContactsSelected, this))
, mNoContactSelected(new KABMergeContacts::MergeContactErrorLabel(MergeContactErrorLabel::NoContactSelected, this))
, mManualMergeResultWidget(new KABMergeContacts::MergeContactWidget(this))
, mSelectInformation(new KABMergeContacts::MergeContactSelectInformationScrollArea(this))
, mMergeContactInfo(new KABMergeContacts::MergeContactInfoWidget(this))
{
setWindowTitle(i18nc("@title:window", "Select Contacts to merge"));
mButtonBox = new QDialogButtonBox(QDialogButtonBox::Close, this);
mButtonBox->setObjectName(QStringLiteral("buttonbox"));
auto mainLayout = new QVBoxLayout(this);
connect(mButtonBox, &QDialogButtonBox::rejected, this, &MergeContactsDialog::reject);
readConfig();
mStackedWidget = new QStackedWidget(this);
mStackedWidget->setObjectName(QStringLiteral("stackedwidget"));
mainLayout->addWidget(mStackedWidget);
mainLayout->addWidget(mButtonBox);
mNoEnoughContactSelected = new KABMergeContacts::MergeContactErrorLabel(KABMergeContacts::MergeContactErrorLabel::NotEnoughContactsSelected);
mNoEnoughContactSelected->setObjectName(QStringLiteral("notenoughcontactselected"));
mStackedWidget->addWidget(mNoEnoughContactSelected);
mNoContactSelected = new KABMergeContacts::MergeContactErrorLabel(MergeContactErrorLabel::NoContactSelected, this);
mNoContactSelected->setObjectName(QStringLiteral("nocontactselected"));
mStackedWidget->addWidget(mNoContactSelected);
mManualMergeResultWidget = new KABMergeContacts::MergeContactWidget(this);
mManualMergeResultWidget->setObjectName(QStringLiteral("manualmergeresultwidget"));
mStackedWidget->addWidget(mManualMergeResultWidget);
connect(mManualMergeResultWidget, &MergeContactWidget::customizeMergeContact, this, &MergeContactsDialog::slotCustomizeMergeContact);
connect(mManualMergeResultWidget, &MergeContactWidget::contactMerged, this, &MergeContactsDialog::slotContactMerged);
mSelectInformation = new KABMergeContacts::MergeContactSelectInformationScrollArea(this);
mSelectInformation->setObjectName(QStringLiteral("selectioninformation"));
mStackedWidget->addWidget(mSelectInformation);
mMergeContactInfo = new KABMergeContacts::MergeContactInfoWidget;
mMergeContactInfo->setObjectName(QStringLiteral("mergecontactinfowidget"));
mStackedWidget->addWidget(mMergeContactInfo);
......
......@@ -33,12 +33,12 @@ private:
void slotContactMerged(const Akonadi::Item &item);
void readConfig();
void writeConfig();
QDialogButtonBox *mButtonBox = nullptr;
QStackedWidget *mStackedWidget = nullptr;
KABMergeContacts::MergeContactErrorLabel *mNoEnoughContactSelected = nullptr;
KABMergeContacts::MergeContactErrorLabel *mNoContactSelected = nullptr;
KABMergeContacts::MergeContactWidget *mManualMergeResultWidget = nullptr;
KABMergeContacts::MergeContactSelectInformationScrollArea *mSelectInformation = nullptr;
KABMergeContacts::MergeContactInfoWidget *mMergeContactInfo = nullptr;
QDialogButtonBox *const mButtonBox;
QStackedWidget *const mStackedWidget;
KABMergeContacts::MergeContactErrorLabel *const mNoEnoughContactSelected;
KABMergeContacts::MergeContactErrorLabel *const mNoContactSelected;
KABMergeContacts::MergeContactWidget *const mManualMergeResultWidget;
KABMergeContacts::MergeContactSelectInformationScrollArea *const mSelectInformation;
KABMergeContacts::MergeContactInfoWidget *const mMergeContactInfo;
};
}
......@@ -51,11 +51,11 @@ MergeContactWidget::MergeContactWidget(QWidget *parent)
connect(mListWidget, &MergeContactWidgetList::itemChanged, this, &MergeContactWidget::slotUpdateMergeButton);
splitter->addWidget(selectContactWidget);
mMergeContactInfoWidget = new MergeContactInfoWidget;
mMergeContactInfoWidget = new MergeContactInfoWidget(this);
mMergeContactInfoWidget->setObjectName(QStringLiteral("mergecontactinfowidget"));
splitter->addWidget(mMergeContactInfoWidget);
mMergeContactWarning = new MergeContactLoseInformationWarning;
mMergeContactWarning = new MergeContactLoseInformationWarning(this);
mMergeContactWarning->setObjectName(QStringLiteral("mergecontactwarning"));
connect(mMergeContactWarning, &MergeContactLoseInformationWarning::continueMerging, this, &MergeContactWidget::slotAutomaticMerging);
connect(mMergeContactWarning, &MergeContactLoseInformationWarning::customizeMergingContacts, this, &MergeContactWidget::slotCustomizeMergingContacts);
......@@ -67,7 +67,7 @@ MergeContactWidget::MergeContactWidget(QWidget *parent)
lab = new QLabel(i18n("Select the addressbook in which to store merged contacts:"));
hbox->addWidget(lab);
mCollectionCombobox = new Akonadi::CollectionComboBox(_k_mergeStubModel);
mCollectionCombobox = new Akonadi::CollectionComboBox(_k_mergeStubModel, this);
mCollectionCombobox->setAccessRightsFilter(Akonadi::Collection::CanCreateItem);
mCollectionCombobox->setMinimumWidth(250);
mCollectionCombobox->setMimeTypeFilter(QStringList() << KContacts::Addressee::mimeType());
......
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