Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KAddressBook
Commits
a41c9bd7
Commit
a41c9bd7
authored
Feb 03, 2021
by
Laurent Montel
😁
Browse files
Use auto vs auto * where it's possible
parent
20697df5
Pipeline
#49630
failed with stage
in 11 minutes and 46 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/mainwidget.cpp
View file @
a41c9bd7
...
...
@@ -209,7 +209,7 @@ MainWidget::MainWidget(KXMLGUIClient *guiClient, QWidget *parent)
mCollectionTree
->
setHeaderGroup
(
Akonadi
::
EntityTreeModel
::
CollectionTreeHeaders
);
mCollectionSelectionModel
=
new
QItemSelectionModel
(
mCollectionTree
);
auto
*
checkableProxyModel
=
new
StructuralCollectionsNotCheckableProxy
(
this
);
auto
checkableProxyModel
=
new
StructuralCollectionsNotCheckableProxy
(
this
);
checkableProxyModel
->
setSelectionModel
(
mCollectionSelectionModel
);
checkableProxyModel
->
setSourceModel
(
mCollectionTree
);
...
...
@@ -222,7 +222,7 @@ MainWidget::MainWidget(KXMLGUIClient *guiClient, QWidget *parent)
connect
(
mCollectionView
,
qOverload
<
const
Akonadi
::
Collection
&>
(
&
Akonadi
::
EntityTreeView
::
currentChanged
),
this
,
&
MainWidget
::
slotCurrentCollectionChanged
);
auto
*
selectionProxyModel
=
new
KSelectionProxyModel
(
mCollectionSelectionModel
,
this
);
auto
selectionProxyModel
=
new
KSelectionProxyModel
(
mCollectionSelectionModel
,
this
);
selectionProxyModel
->
setSourceModel
(
GlobalContactModel
::
instance
()
->
model
());
selectionProxyModel
->
setFilterBehavior
(
KSelectionProxyModel
::
ChildrenOfExactSelection
);
...
...
@@ -320,7 +320,7 @@ void MainWidget::initializeImportExportPlugin(KActionCollection *collection)
QList
<
QAction
*>
exportActions
;
for
(
KAddressBookImportExport
::
Plugin
*
plugin
:
listPlugins
)
{
if
(
plugin
->
isEnabled
())
{
auto
*
interface
=
static_cast
<
KAddressBookImportExport
::
PluginInterface
*>
(
plugin
->
createInterface
(
this
));
auto
interface
=
static_cast
<
KAddressBookImportExport
::
PluginInterface
*>
(
plugin
->
createInterface
(
this
));
interface
->
setItemSelectionModel
(
mItemView
->
selectionModel
());
interface
->
setParentWidget
(
this
);
interface
->
createAction
(
collection
);
...
...
src/manageshowcollectionproperties.cpp
View file @
a41c9bd7
...
...
@@ -46,7 +46,7 @@ void ManageShowCollectionProperties::showCollectionProperties()
dlg
->
raise
();
return
;
}
auto
*
sync
=
new
Akonadi
::
CollectionAttributesSynchronizationJob
(
col
);
auto
sync
=
new
Akonadi
::
CollectionAttributesSynchronizationJob
(
col
);
sync
->
setProperty
(
"collectionId"
,
id
);
connect
(
sync
,
&
KJob
::
result
,
this
,
&
ManageShowCollectionProperties
::
slotCollectionPropertiesContinued
);
sync
->
start
();
...
...
@@ -55,7 +55,7 @@ void ManageShowCollectionProperties::showCollectionProperties()
void
ManageShowCollectionProperties
::
slotCollectionPropertiesContinued
(
KJob
*
job
)
{
if
(
job
)
{
auto
*
sync
=
qobject_cast
<
Akonadi
::
CollectionAttributesSynchronizationJob
*>
(
job
);
auto
sync
=
qobject_cast
<
Akonadi
::
CollectionAttributesSynchronizationJob
*>
(
job
);
Q_ASSERT
(
sync
);
if
(
sync
->
property
(
"collectionId"
)
!=
mMainWidget
->
currentAddressBook
().
id
())
{
return
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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