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
75ac2dec
Commit
75ac2dec
authored
Aug 17, 2022
by
Laurent Montel
Browse files
Const'ify pointer + add parent
parent
7a9fa60b
Pipeline
#219095
passed with stage
in 27 minutes and 32 seconds
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
kaddressbook/plugins/mergelib/job/searchpotentialduplicatecontactjob.h
View file @
75ac2dec
...
...
@@ -26,9 +26,9 @@ Q_SIGNALS:
void
finished
(
const
QVector
<
Akonadi
::
Item
::
List
>
&
);
private:
Akonadi
::
Item
::
List
checkList
(
const
Akonadi
::
Item
::
List
&
lstItem
);
bool
isDuplicate
(
const
Akonadi
::
Item
&
itemA
,
const
Akonadi
::
Item
&
itemB
);
Akonadi
::
Item
::
List
mListItem
;
Q_REQUIRED_RESULT
Akonadi
::
Item
::
List
checkList
(
const
Akonadi
::
Item
::
List
&
lstItem
);
Q_REQUIRED_RESULT
bool
isDuplicate
(
const
Akonadi
::
Item
&
itemA
,
const
Akonadi
::
Item
&
itemB
);
const
Akonadi
::
Item
::
List
mListItem
;
QVector
<
Akonadi
::
Item
::
List
>
mListDuplicate
;
};
}
kaddressbook/plugins/mergelib/manualmerge/mergecontactwidget.cpp
View file @
75ac2dec
...
...
@@ -41,9 +41,9 @@ MergeContactWidget::MergeContactWidget(QWidget *parent)
selectContactWidget
->
setObjectName
(
QStringLiteral
(
"selectcontactwidget"
));
auto
vbox
=
new
QVBoxLayout
;
selectContactWidget
->
setLayout
(
vbox
);
auto
lab
=
new
QLabel
(
i18n
(
"Select contacts that you really want to merge:"
));
auto
lab
=
new
QLabel
(
i18n
(
"Select contacts that you really want to merge:"
)
,
this
);
vbox
->
addWidget
(
lab
);
mListWidget
=
new
MergeContactWidgetList
;
mListWidget
=
new
MergeContactWidgetList
(
this
)
;
mListWidget
->
setObjectName
(
QStringLiteral
(
"listcontact"
));
mListWidget
->
setSelectionMode
(
QAbstractItemView
::
SingleSelection
);
vbox
->
addWidget
(
mListWidget
);
...
...
@@ -79,7 +79,7 @@ MergeContactWidget::MergeContactWidget(QWidget *parent)
lay
->
addLayout
(
hbox
);
mMergeButton
=
new
QPushButton
(
i18n
(
"merge"
));
mMergeButton
=
new
QPushButton
(
i18n
(
"merge"
)
,
this
);
mMergeButton
->
setObjectName
(
QStringLiteral
(
"mergebutton"
));
hbox
->
addWidget
(
mMergeButton
);
mMergeButton
->
setEnabled
(
false
);
...
...
kaddressbook/plugins/mergelib/manualmerge/mergecontactwidgetlist.h
View file @
75ac2dec
...
...
@@ -19,7 +19,7 @@ public:
Q_REQUIRED_RESULT
Akonadi
::
Item
item
()
const
;
private:
Akonadi
::
Item
mItem
;
const
Akonadi
::
Item
mItem
;
};
class
MergeContactWidgetList
:
public
QListWidget
...
...
@@ -30,10 +30,10 @@ public:
~
MergeContactWidgetList
()
override
;
void
fillListContact
(
const
Akonadi
::
Item
::
List
&
items
);
Akonadi
::
Item
::
List
listSelectedContacts
()
const
;
Akonadi
::
Item
currentAkonadiItem
()
const
;
Q_REQUIRED_RESULT
Akonadi
::
Item
::
List
listSelectedContacts
()
const
;
Q_REQUIRED_RESULT
Akonadi
::
Item
currentAkonadiItem
()
const
;
private:
QString
itemName
(
const
KContacts
::
Addressee
&
address
)
const
;
Q_REQUIRED_RESULT
QString
itemName
(
const
KContacts
::
Addressee
&
address
)
const
;
};
}
kaddressbook/plugins/mergelib/searchduplicate/searchandmergecontactduplicatecontactdialog.cpp
View file @
75ac2dec
...
...
@@ -37,7 +37,7 @@ SearchAndMergeContactDuplicateContactDialog::SearchAndMergeContactDuplicateConta
mStackedWidget
=
new
QStackedWidget
(
this
);
mStackedWidget
->
setObjectName
(
QStringLiteral
(
"stackedwidget"
));
mSearchResult
=
new
SearchDuplicateResultWidget
;
mSearchResult
=
new
SearchDuplicateResultWidget
(
this
)
;
mSearchResult
->
setObjectName
(
QStringLiteral
(
"mergecontact"
));
mStackedWidget
->
addWidget
(
mSearchResult
);
connect
(
mSearchResult
,
&
SearchDuplicateResultWidget
::
contactMerged
,
this
,
&
SearchAndMergeContactDuplicateContactDialog
::
slotContactMerged
);
...
...
kaddressbook/plugins/mergelib/searchduplicate/searchduplicateresultwidget.cpp
View file @
75ac2dec
...
...
@@ -33,15 +33,15 @@ SearchDuplicateResultWidget::SearchDuplicateResultWidget(QWidget *parent)
splitter
->
setObjectName
(
QStringLiteral
(
"splitter"
));
splitter
->
setChildrenCollapsible
(
false
);
mainLayout
->
addWidget
(
splitter
);
mResult
=
new
ResultDuplicateTreeWidget
;
mResult
=
new
ResultDuplicateTreeWidget
(
this
)
;
mResult
->
setObjectName
(
QStringLiteral
(
"result_treewidget"
));
mContactViewer
=
new
KAddressBookGrantlee
::
GrantleeContactViewer
;
mContactViewer
=
new
KAddressBookGrantlee
::
GrantleeContactViewer
(
this
)
;
mContactViewer
->
setObjectName
(
QStringLiteral
(
"contact_viewer"
));
splitter
->
addWidget
(
mResult
);
splitter
->
addWidget
(
mContactViewer
);
connect
(
mResult
,
&
ResultDuplicateTreeWidget
::
showContactPreview
,
mContactViewer
,
&
KAddressBookGrantlee
::
GrantleeContactViewer
::
setContact
);
mMergeContactWarning
=
new
MergeContactLoseInformationWarning
;
mMergeContactWarning
=
new
MergeContactLoseInformationWarning
(
this
)
;
mMergeContactWarning
->
setObjectName
(
QStringLiteral
(
"mergecontactwarning"
));
connect
(
mMergeContactWarning
,
&
MergeContactLoseInformationWarning
::
continueMerging
,
this
,
&
SearchDuplicateResultWidget
::
slotAutomaticMerging
);
connect
(
mMergeContactWarning
,
...
...
@@ -58,7 +58,7 @@ SearchDuplicateResultWidget::SearchDuplicateResultWidget(QWidget *parent)
lab
->
setObjectName
(
QStringLiteral
(
"select_addressbook_label"
));
mergeLayout
->
addWidget
(
lab
);
mCollectionCombobox
=
new
Akonadi
::
CollectionComboBox
(
_k_searchDuplicateResultStubModel
);
mCollectionCombobox
=
new
Akonadi
::
CollectionComboBox
(
_k_searchDuplicateResultStubModel
,
this
);
mCollectionCombobox
->
setAccessRightsFilter
(
Akonadi
::
Collection
::
CanCreateItem
);
mCollectionCombobox
->
setMinimumWidth
(
250
);
mCollectionCombobox
->
setMimeTypeFilter
(
QStringList
()
<<
KContacts
::
Addressee
::
mimeType
());
...
...
@@ -67,7 +67,7 @@ SearchDuplicateResultWidget::SearchDuplicateResultWidget(QWidget *parent)
connect
(
mCollectionCombobox
,
qOverload
<
int
>
(
&
Akonadi
::
CollectionComboBox
::
activated
),
this
,
&
SearchDuplicateResultWidget
::
slotUpdateMergeButton
);
mergeLayout
->
addWidget
(
mCollectionCombobox
);
mMergeContact
=
new
QPushButton
(
i18n
(
"Merge"
));
mMergeContact
=
new
QPushButton
(
i18n
(
"Merge"
)
,
this
);
mMergeContact
->
setObjectName
(
QStringLiteral
(
"merge_contact_button"
));
connect
(
mMergeContact
,
&
QPushButton
::
clicked
,
this
,
&
SearchDuplicateResultWidget
::
slotMergeContact
);
mergeLayout
->
addWidget
(
mMergeContact
);
...
...
kaddressbook/plugins/searchduplicates/searchduplicatesplugininterface.cpp
View file @
75ac2dec
...
...
@@ -5,14 +5,13 @@
*/
#include
"searchduplicatesplugininterface.h"
#include
"searchduplicate/searchandmergecontactduplicatecontactdialog.h"
#include
<KActionCollection>
#include
<KLocalizedString>
#include
<QAction>
#include
<QPointer>
#include
"../mergelib/searchduplicate/searchandmergecontactduplicatecontactdialog.h"
SearchDuplicatesPluginInterface
::
SearchDuplicatesPluginInterface
(
QObject
*
parent
)
:
PimCommon
::
GenericPluginInterface
(
parent
)
{
...
...
@@ -25,7 +24,7 @@ void SearchDuplicatesPluginInterface::createAction(KActionCollection *ac)
QAction
*
action
=
ac
->
addAction
(
QStringLiteral
(
"search_duplicate_contacts"
));
action
->
setText
(
i18n
(
"Search Duplicate Contacts..."
));
connect
(
action
,
&
QAction
::
triggered
,
this
,
&
SearchDuplicatesPluginInterface
::
slotActivated
);
PimCommon
::
ActionType
type
(
action
,
PimCommon
::
ActionType
::
Tools
);
const
PimCommon
::
ActionType
type
(
action
,
PimCommon
::
ActionType
::
Tools
);
addActionType
(
type
);
}
...
...
kaddressbook/plugins/sendmail/sendmailplugininterface.cpp
View file @
75ac2dec
...
...
@@ -15,7 +15,6 @@
SendMailPluginInterface
::
SendMailPluginInterface
(
QObject
*
parent
)
:
PimCommon
::
GenericPluginInterface
(
parent
)
,
mAction
(
nullptr
)
{
}
...
...
@@ -27,7 +26,7 @@ void SendMailPluginInterface::createAction(KActionCollection *ac)
mAction
->
setText
(
i18n
(
"Send an email..."
));
mAction
->
setIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"mail-message-new"
)));
connect
(
mAction
,
&
QAction
::
triggered
,
this
,
&
SendMailPluginInterface
::
slotActivated
);
PimCommon
::
ActionType
type
(
mAction
,
PimCommon
::
ActionType
::
Action
);
const
PimCommon
::
ActionType
type
(
mAction
,
PimCommon
::
ActionType
::
Action
);
addActionType
(
type
);
}
...
...
kaddressbook/plugins/sendvcards/sendvcardsjob.h
View file @
75ac2dec
...
...
@@ -25,7 +25,7 @@ public:
Q_REQUIRED_RESULT
bool
start
();
KContacts
::
VCardConverter
::
Version
version
()
const
;
Q_REQUIRED_RESULT
KContacts
::
VCardConverter
::
Version
version
()
const
;
void
setVersion
(
KContacts
::
VCardConverter
::
Version
version
);
Q_SIGNALS:
...
...
kaddressbook/plugins/sendvcards/sendvcardsplugininterface.cpp
View file @
75ac2dec
...
...
@@ -34,7 +34,7 @@ void SendVcardsPluginInterface::createAction(KActionCollection *ac)
mAction
->
setText
(
i18n
(
"Send vCards..."
));
mAction
->
setIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"mail-message-new"
)));
connect
(
mAction
,
&
QAction
::
triggered
,
this
,
&
SendVcardsPluginInterface
::
slotActivated
);
PimCommon
::
ActionType
type
(
mAction
,
PimCommon
::
ActionType
::
Action
);
const
PimCommon
::
ActionType
type
(
mAction
,
PimCommon
::
ActionType
::
Action
);
addActionType
(
type
);
}
...
...
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