Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KDE PIM Add-ons
Commits
bd38be2a
Commit
bd38be2a
authored
Aug 17, 2022
by
Laurent Montel
Browse files
Const'ify pointer
parent
00d28ccb
Pipeline
#218940
canceled with stage
in 9 minutes and 18 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
kaddressbook/plugins/mergelib/manualmerge/mergecontactsdialog.cpp
View file @
bd38be2a
...
...
@@ -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
);
...
...
kaddressbook/plugins/mergelib/manualmerge/mergecontactsdialog.h
View file @
bd38be2a
...
...
@@ -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
;
};
}
kaddressbook/plugins/mergelib/manualmerge/mergecontactwidget.cpp
View file @
bd38be2a
...
...
@@ -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
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment