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
Akonadi
Commits
2ff4e7df
Commit
2ff4e7df
authored
Sep 11, 2020
by
Laurent Montel
😁
Browse files
Const'ify pointer
parent
72bd55f8
Pipeline
#33849
passed with stage
in 43 minutes and 31 seconds
Changes
39
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/core/asyncselectionhandler_p.h
View file @
2ff4e7df
...
...
@@ -51,7 +51,7 @@ private Q_SLOTS:
private:
bool
scanSubTree
(
const
QModelIndex
&
index
,
bool
searchForItem
);
QAbstractItemModel
*
mModel
=
nullptr
;
QAbstractItemModel
*
const
mModel
;
Collection
mCollection
;
Item
mItem
;
};
...
...
src/core/changerecorder_p.cpp
View file @
2ff4e7df
...
...
@@ -20,11 +20,6 @@ using namespace Akonadi;
ChangeRecorderPrivate
::
ChangeRecorderPrivate
(
ChangeNotificationDependenciesFactory
*
dependenciesFactory_
,
ChangeRecorder
*
parent
)
:
MonitorPrivate
(
dependenciesFactory_
,
parent
)
,
settings
(
nullptr
)
,
enableChangeRecording
(
true
)
,
m_lastKnownNotificationsCount
(
0
)
,
m_startOffset
(
0
)
,
m_needFullSave
(
true
)
{
}
...
...
src/core/changerecorder_p.h
View file @
2ff4e7df
...
...
@@ -25,8 +25,8 @@ public:
ChangeRecorderPrivate
(
ChangeNotificationDependenciesFactory
*
dependenciesFactory_
,
ChangeRecorder
*
parent
);
Q_DECLARE_PUBLIC
(
ChangeRecorder
)
QSettings
*
settings
;
bool
enableChangeRecording
;
QSettings
*
settings
=
nullptr
;
bool
enableChangeRecording
=
true
;
int
pipelineSize
()
const
override
;
void
notificationsEnqueued
(
int
count
)
override
;
...
...
@@ -46,9 +46,9 @@ private:
void
notificationsLoaded
();
void
writeStartOffset
()
const
;
int
m_lastKnownNotificationsCount
;
// just for invariant checking
int
m_startOffset
;
// number of saved notifications to skip
bool
m_needFullSave
;
int
m_lastKnownNotificationsCount
=
0
;
// just for invariant checking
int
m_startOffset
=
0
;
// number of saved notifications to skip
bool
m_needFullSave
=
true
;
};
}
// namespace Akonadi
...
...
src/core/collectionfetchscope.cpp
View file @
2ff4e7df
...
...
@@ -20,9 +20,6 @@ public:
CollectionFetchScopePrivate
()
:
ancestorDepth
(
CollectionFetchScope
::
None
)
,
listFilter
(
CollectionFetchScope
::
Enabled
)
,
statistics
(
false
)
,
fetchIdOnly
(
true
)
,
mIgnoreRetrievalErrors
(
false
)
{
}
...
...
@@ -52,9 +49,9 @@ public:
CollectionFetchScope
::
ListFilter
listFilter
;
QSet
<
QByteArray
>
attributes
;
QScopedPointer
<
CollectionFetchScope
>
ancestorFetchScope
;
bool
statistics
;
bool
fetchIdOnly
;
bool
mIgnoreRetrievalErrors
;
bool
statistics
=
false
;
bool
fetchIdOnly
=
true
;
bool
mIgnoreRetrievalErrors
=
false
;
};
CollectionFetchScope
::
CollectionFetchScope
()
...
...
src/core/collectionpathresolver.cpp
View file @
2ff4e7df
...
...
@@ -25,7 +25,6 @@ public:
explicit
CollectionPathResolverPrivate
(
CollectionPathResolver
*
parent
)
:
JobPrivate
(
parent
)
,
mColId
(
-
1
)
,
mPathToId
(
false
)
{
}
...
...
src/core/conflicthandler_p.h
View file @
2ff4e7df
...
...
@@ -97,7 +97,7 @@ private:
void
useOtherItem
();
void
useBothItems
();
ConflictType
mConflictType
;
const
ConflictType
mConflictType
;
Akonadi
::
Item
mChangedItem
;
Akonadi
::
Item
mConflictingItem
;
...
...
src/core/control.cpp
View file @
2ff4e7df
...
...
@@ -36,7 +36,6 @@ class Q_DECL_HIDDEN Control::Private
public:
explicit
Private
(
Control
*
parent
)
:
mParent
(
parent
)
,
mEventLoop
(
nullptr
)
{
}
...
...
src/core/firstrun.cpp
View file @
2ff4e7df
...
...
@@ -34,7 +34,6 @@ using namespace Akonadi;
Firstrun
::
Firstrun
(
QObject
*
parent
)
:
QObject
(
parent
)
,
mConfig
(
new
KConfig
(
ServerManager
::
addNamespace
(
QStringLiteral
(
"akonadi-firstrunrc"
))))
,
mCurrentDefault
(
nullptr
)
{
//The code in firstrun is not safe in multi-instance mode
Q_ASSERT
(
!
ServerManager
::
hasInstanceIdentifier
());
...
...
src/core/firstrun_p.h
View file @
2ff4e7df
...
...
@@ -68,7 +68,7 @@ private Q_SLOTS:
private:
QStringList
mPendingDefaults
;
KConfig
*
mConfig
=
nullptr
;
KConfig
*
const
mConfig
;
KConfig
*
mCurrentDefault
=
nullptr
;
};
...
...
src/core/itemsync.cpp
View file @
2ff4e7df
...
...
@@ -77,7 +77,7 @@ public:
QSet
<
QString
>
mListedItems
;
ItemSync
::
TransactionMode
mTransactionMode
;
TransactionSequence
*
mCurrentTransaction
;
TransactionSequence
*
mCurrentTransaction
=
nullptr
;
int
mTransactionJobs
;
// fetch scope for initial item listing
...
...
src/core/jobs/agentinstancecreatejob.cpp
View file @
2ff4e7df
...
...
@@ -38,10 +38,7 @@ class AgentInstanceCreateJobPrivate : public KJobPrivateBase
public:
explicit
AgentInstanceCreateJobPrivate
(
AgentInstanceCreateJob
*
parent
)
:
q
(
parent
)
,
parentWidget
(
nullptr
)
,
safetyTimer
(
new
QTimer
(
parent
))
,
doConfig
(
false
)
,
tooLate
(
false
)
{
connect
(
AgentManager
::
self
(),
&
AgentManager
::
instanceAdded
,
this
,
&
AgentInstanceCreateJobPrivate
::
agentInstanceAdded
);
connect
(
safetyTimer
,
&
QTimer
::
timeout
,
this
,
&
AgentInstanceCreateJobPrivate
::
timeout
);
...
...
@@ -104,9 +101,9 @@ public:
QString
agentTypeId
;
AgentInstance
agentInstance
;
QWidget
*
parentWidget
=
nullptr
;
QTimer
*
safetyTimer
=
nullptr
;
bool
doConfig
;
bool
tooLate
;
QTimer
*
const
safetyTimer
;
bool
doConfig
=
false
;
bool
tooLate
=
false
;
};
}
// namespace Akonadi
...
...
src/core/jobs/itemmodifyjob.cpp
View file @
2ff4e7df
...
...
@@ -26,10 +26,6 @@ using namespace Akonadi;
ItemModifyJobPrivate
::
ItemModifyJobPrivate
(
ItemModifyJob
*
parent
)
:
JobPrivate
(
parent
)
,
mRevCheck
(
true
)
,
mIgnorePayload
(
false
)
,
mAutomaticConflictHandlingEnabled
(
true
)
,
mSilent
(
false
)
{
}
...
...
src/core/jobs/itemmodifyjob_p.h
View file @
2ff4e7df
...
...
@@ -54,13 +54,13 @@ public:
QSet
<
int
>
mOperations
;
QByteArray
mTag
;
Item
::
List
mItems
;
bool
mRevCheck
;
bool
mRevCheck
=
true
;
QSet
<
QByteArray
>
mParts
;
QSet
<
QByteArray
>
mForeignParts
;
QByteArray
mPendingData
;
bool
mIgnorePayload
;
bool
mAutomaticConflictHandlingEnabled
;
bool
mSilent
;
bool
mIgnorePayload
=
false
;
bool
mAutomaticConflictHandlingEnabled
=
true
;
bool
mSilent
=
false
;
};
}
...
...
src/core/jobs/recursiveitemfetchjob.cpp
View file @
2ff4e7df
...
...
@@ -22,7 +22,6 @@ public:
:
mParent
(
parent
)
,
mCollection
(
collection
)
,
mMimeTypes
(
mimeTypes
)
,
mFetchCount
(
0
)
{
}
...
...
@@ -71,13 +70,13 @@ public:
}
}
RecursiveItemFetchJob
*
mParent
=
nullptr
;
Collection
mCollection
;
RecursiveItemFetchJob
*
const
mParent
;
const
Collection
mCollection
;
Item
::
List
mItems
;
ItemFetchScope
mFetchScope
;
QStringList
mMimeTypes
;
const
QStringList
mMimeTypes
;
int
mFetchCount
;
int
mFetchCount
=
0
;
};
RecursiveItemFetchJob
::
RecursiveItemFetchJob
(
const
Collection
&
collection
,
const
QStringList
&
mimeTypes
,
QObject
*
parent
)
...
...
src/core/jobs/relationfetchjob.cpp
View file @
2ff4e7df
...
...
@@ -18,7 +18,6 @@ class Akonadi::RelationFetchJobPrivate : public JobPrivate
public:
explicit
RelationFetchJobPrivate
(
RelationFetchJob
*
parent
)
:
JobPrivate
(
parent
)
,
mEmitTimer
(
nullptr
)
{
mEmitTimer
.
setSingleShot
(
true
);
mEmitTimer
.
setInterval
(
std
::
chrono
::
milliseconds
{
100
});
...
...
src/core/jobs/searchcreatejob.cpp
View file @
2ff4e7df
...
...
@@ -27,8 +27,8 @@ public:
{
}
QString
mName
;
SearchQuery
mQuery
;
const
QString
mName
;
const
SearchQuery
mQuery
;
QStringList
mMimeTypes
;
QVector
<
Collection
>
mCollections
;
bool
mRecursive
=
false
;
...
...
src/core/jobs/specialcollectionsdiscoveryjob.cpp
View file @
2ff4e7df
...
...
@@ -26,8 +26,8 @@ public:
{
}
SpecialCollections
*
mSpecialCollections
=
nullptr
;
QStringList
mMimeTypes
;
SpecialCollections
*
const
mSpecialCollections
;
const
QStringList
mMimeTypes
;
};
Akonadi
::
SpecialCollectionsDiscoveryJob
::
SpecialCollectionsDiscoveryJob
(
SpecialCollections
*
collections
,
const
QStringList
&
mimeTypes
,
QObject
*
parent
)
...
...
src/core/jobs/trashjob.cpp
View file @
2ff4e7df
...
...
@@ -36,9 +36,6 @@ class TrashJob::TrashJobPrivate : public JobPrivate
public:
explicit
TrashJobPrivate
(
TrashJob
*
parent
)
:
JobPrivate
(
parent
)
,
mKeepTrashInCollection
(
false
)
,
mSetRestoreCollection
(
false
)
,
mDeleteIfInTrash
(
false
)
{
}
//4.
...
...
@@ -66,9 +63,9 @@ public:
Collection
mCollection
;
Collection
mRestoreCollection
;
Collection
mTrashCollection
;
bool
mKeepTrashInCollection
;
bool
mSetRestoreCollection
;
//only set restore collection when moved to trash collection (not in place)
bool
mDeleteIfInTrash
;
bool
mKeepTrashInCollection
=
false
;
bool
mSetRestoreCollection
=
false
;
//only set restore collection when moved to trash collection (not in place)
bool
mDeleteIfInTrash
=
false
;
QHash
<
Collection
,
Item
::
List
>
mCollectionItems
;
//list of trashed items sorted according to parent collection
QHash
<
Item
::
Id
,
Collection
>
mParentCollections
;
//fetched parent collection of items (containing the resource name)
...
...
src/core/models/agentinstancemodel.cpp
View file @
2ff4e7df
...
...
@@ -26,7 +26,7 @@ public:
{
}
AgentInstanceModel
*
mParent
=
nullptr
;
AgentInstanceModel
*
const
mParent
;
AgentInstance
::
List
mInstances
;
void
instanceAdded
(
const
AgentInstance
&
/*instance*/
);
...
...
src/core/models/agenttypemodel.cpp
View file @
2ff4e7df
...
...
@@ -24,7 +24,7 @@ public:
mTypes
=
AgentManager
::
self
()
->
types
();
}
AgentTypeModel
*
mParent
=
nullptr
;
AgentTypeModel
*
const
mParent
;
AgentType
::
List
mTypes
;
void
typeAdded
(
const
AgentType
&
agentType
);
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
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