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
KDE PIM Runtime
Commits
0f477196
Commit
0f477196
authored
Sep 04, 2020
by
Laurent Montel
😁
Browse files
Modernize code
parent
0546e16e
Pipeline
#32938
failed with stage
in 48 minutes and 16 seconds
Changes
27
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
agents/migration/migrationagent.cpp
View file @
0f477196
...
...
@@ -21,7 +21,7 @@
namespace
Akonadi
{
MigrationAgent
::
MigrationAgent
(
const
QString
&
id
)
:
AgentBase
(
id
)
:
AgentBase
(
id
)
,
mScheduler
(
new
KUiServerJobTracker
)
{
KLocalizedString
::
setApplicationDomain
(
"akonadi_migration_agent"
);
...
...
agents/migration/migrationscheduler.cpp
View file @
0f477196
...
...
@@ -58,7 +58,7 @@ void LogModel::message(MigratorBase::MessageType type, const QString &msg)
}
Row
::
Row
(
const
QSharedPointer
<
MigratorBase
>
&
migrator
,
MigratorModel
&
model
)
:
QObject
()
:
QObject
()
,
mMigrator
(
migrator
)
,
mModel
(
model
)
{
...
...
agents/newmailnotifier/newmailnotifiershowmessagejob.h
View file @
0f477196
...
...
@@ -20,7 +20,7 @@ public:
void
start
()
override
;
private:
Akonadi
::
Item
::
Id
mId
;
const
Akonadi
::
Item
::
Id
mId
;
};
#endif // NEWMAILNOTIFIERSHOWMESSAGEJOB_H
agents/newmailnotifier/specialnotifierjob.h
View file @
0f477196
...
...
@@ -39,13 +39,13 @@ private:
void
slotActivateNotificationAction
(
unsigned
int
index
);
void
emitNotification
(
const
QPixmap
&
pixmap
=
QPixmap
());
void
deleteItemDone
(
KJob
*
job
);
QStringList
mListEmails
;
const
QStringList
mListEmails
;
QString
mDefaultIconName
;
QString
mSubject
;
QString
mFrom
;
QString
mPath
;
const
QString
mPath
;
Akonadi
::
Item
mItem
;
Akonadi
::
Item
::
Id
mItemId
;
const
Akonadi
::
Item
::
Id
mItemId
;
};
#endif // SPECIALNOTIFIERJOB_H
migration/gid/gidmigrationjob.cpp
View file @
0f477196
...
...
@@ -14,7 +14,7 @@
using
namespace
Akonadi
;
UpdateJob
::
UpdateJob
(
const
Collection
&
col
,
QObject
*
parent
)
:
Job
(
parent
)
:
Job
(
parent
)
,
mCollection
(
col
)
,
mModJobRunning
(
false
)
{
...
...
migration/gid/gidmigrator.h
View file @
0f477196
...
...
@@ -17,19 +17,19 @@ public:
GidMigrator
(
const
QString
&
mimeType
);
~
GidMigrator
()
override
;
QString
displayName
()
const
override
;
QString
description
()
const
override
;
Q_REQUIRED_RESULT
QString
displayName
()
const
override
;
Q_REQUIRED_RESULT
QString
description
()
const
override
;
bool
canStart
()
override
;
Q_REQUIRED_RESULT
bool
canStart
()
override
;
bool
shouldAutostart
()
const
override
;
Q_REQUIRED_RESULT
bool
shouldAutostart
()
const
override
;
protected:
void
startWork
()
override
;
private
Q_SLOTS
:
void
migrationFinished
(
KJob
*
);
private:
QString
mMimeType
;
const
QString
mMimeType
;
};
#endif // GIDMIGRATOR_H
migration/gid/main.cpp
View file @
0f477196
...
...
@@ -29,7 +29,7 @@ int main(int argc, char **argv)
QStringLiteral
(
"0.1"
),
i18n
(
"Migration of Akonadi Items to support GID"
),
KAboutLicense
::
LGPL
,
i18n
(
"(c) 2013-20
16
the Akonadi developers"
),
i18n
(
"(c) 2013-20
20
the Akonadi developers"
),
QStringLiteral
(
"https://community.kde.org/KDE_PIM/Akonadi"
));
aboutData
.
addAuthor
(
i18n
(
"Christian Mollekopf"
),
i18n
(
"Author"
),
QStringLiteral
(
"mollekopf@kolabsys.com"
));
...
...
migration/googlegroupware/googleresourcemigrator.h
View file @
0f477196
...
...
@@ -20,10 +20,10 @@ class GoogleResourceMigrator : public MigratorBase
public:
explicit
GoogleResourceMigrator
();
QString
displayName
()
const
override
;
QString
description
()
const
override
;
Q_REQUIRED_RESULT
QString
displayName
()
const
override
;
Q_REQUIRED_RESULT
QString
description
()
const
override
;
bool
shouldAutostart
()
const
override
;
Q_REQUIRED_RESULT
bool
shouldAutostart
()
const
override
;
protected:
void
startWork
()
override
;
...
...
@@ -50,10 +50,10 @@ private:
T
contacts
{};
};
bool
migrateAccount
(
const
QString
&
account
,
const
Instances
&
oldInstances
,
const
Akonadi
::
AgentInstance
&
newInstance
);
Q_REQUIRED_RESULT
bool
migrateAccount
(
const
QString
&
account
,
const
Instances
&
oldInstances
,
const
Akonadi
::
AgentInstance
&
newInstance
);
void
removeLegacyInstances
(
const
QString
&
account
,
const
Instances
&
instances
);
QString
mergeAccountNames
(
const
ResourceValues
<
QString
>
&
accountName
,
const
Instances
&
oldInstances
)
const
;
int
mergeAccountIds
(
const
ResourceValues
<
int
>
&
accountId
,
const
Instances
&
oldInstances
)
const
;
Q_REQUIRED_RESULT
QString
mergeAccountNames
(
const
ResourceValues
<
QString
>
&
accountName
,
const
Instances
&
oldInstances
)
const
;
Q_REQUIRED_RESULT
int
mergeAccountIds
(
const
ResourceValues
<
int
>
&
accountId
,
const
Instances
&
oldInstances
)
const
;
QMap
<
QString
,
Instances
>
mMigrations
;
int
mMigrationCount
=
0
;
...
...
migration/infodialog.cpp
View file @
0f477196
...
...
@@ -28,10 +28,7 @@ enum {
bool
InfoDialog
::
mError
=
false
;
InfoDialog
::
InfoDialog
(
bool
closeWhenDone
)
:
mMigratorCount
(
0
)
,
mChange
(
false
)
,
mCloseWhenDone
(
closeWhenDone
)
,
mAutoScrollList
(
true
)
:
mCloseWhenDone
(
closeWhenDone
)
{
setAttribute
(
Qt
::
WA_DeleteOnClose
);
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
(
this
);
...
...
migration/infodialog.h
View file @
0f477196
...
...
@@ -57,7 +57,7 @@ private:
static
bool
mError
;
bool
mChange
=
false
;
bool
mCloseWhenDone
=
false
;
bool
mAutoScrollList
=
fals
e
;
bool
mAutoScrollList
=
tru
e
;
};
#endif
migration/kmigratorbase.cpp
View file @
0f477196
...
...
@@ -44,7 +44,7 @@ QString messageTypeToString(KMigratorBase::MessageType type)
}
}
KMigratorBase
::
KMigratorBase
()
:
m_logFile
(
nullptr
)
KMigratorBase
::
KMigratorBase
()
{
const
QString
logFileName
=
QStandardPaths
::
writableLocation
(
QStandardPaths
::
GenericDataLocation
)
+
QLatin1Char
(
'/'
)
+
QCoreApplication
::
applicationName
()
+
QLatin1String
(
"/migration.log"
);
QFileInfo
fileInfo
(
logFileName
);
...
...
migration/migratorbase.cpp
View file @
0f477196
...
...
@@ -59,9 +59,8 @@ static MigratorBase::MigrationState identifierToState(const QString &identifier)
}
MigratorBase
::
MigratorBase
(
const
QString
&
identifier
,
QObject
*
parent
)
:
QObject
(
parent
)
:
QObject
(
parent
)
,
mIdentifier
(
identifier
)
,
mMigrationState
(
None
)
,
mConfig
(
new
KConfig
(
Akonadi
::
ServerManager
::
addNamespace
(
QStringLiteral
(
"akonadi-migrationrc"
))))
{
const
QString
logFileName
=
QStandardPaths
::
writableLocation
(
QStandardPaths
::
GenericDataLocation
)
+
QLatin1Char
(
'/'
)
+
QCoreApplication
::
applicationName
()
+
QLatin1Char
(
'/'
)
+
identifier
...
...
migration/migratorbase.h
View file @
0f477196
...
...
@@ -211,7 +211,7 @@ private:
void
setLogfile
(
const
QString
&
);
const
QString
mIdentifier
;
MigrationState
mMigrationState
;
MigrationState
mMigrationState
=
None
;
QScopedPointer
<
QFile
>
mLogFile
;
QScopedPointer
<
KConfig
>
mConfig
;
int
mProgress
;
...
...
resources/dav/resource/daverror-kdepim-runtime.cpp
View file @
0f477196
...
...
@@ -15,8 +15,8 @@ QString translateErrorString(const Error &error)
QString
result
;
ErrorNumber
errorNumber
=
error
.
errorNumber
();
int
responseCode
=
error
.
responseCode
();
QString
errorText
=
error
.
errorText
();
const
int
responseCode
=
error
.
responseCode
();
const
QString
errorText
=
error
.
errorText
();
QString
err
=
error
.
translatedJobError
();
switch
(
errorNumber
)
{
...
...
resources/dav/resource/davgroupwareresource.cpp
View file @
0f477196
...
...
@@ -64,7 +64,6 @@ typedef QSharedPointer<KCalendarCore::Incidence> IncidencePtr;
DavGroupwareResource
::
DavGroupwareResource
(
const
QString
&
id
)
:
ResourceBase
(
id
)
,
FreeBusyProviderBase
()
,
mSyncErrorNotified
(
false
)
{
AttributeFactory
::
registerAttribute
<
EntityDisplayAttribute
>
();
AttributeFactory
::
registerAttribute
<
DavProtocolAttribute
>
();
...
...
resources/dav/resource/searchdialog.h
View file @
0f477196
...
...
@@ -39,7 +39,7 @@ private:
void
onCollectionsFetchJobFinished
(
KJob
*
job
);
Ui
::
SearchDialog
mUi
;
QStandardItemModel
*
mModel
=
nullptr
;
QStandardItemModel
*
const
mModel
;
int
mSubJobCount
=
0
;
};
...
...
resources/dav/resource/setupwizard.cpp
View file @
0f477196
...
...
@@ -39,7 +39,7 @@ enum GroupwareServers {
static
QString
settingsToUrl
(
const
QWizard
*
wizard
,
const
QString
&
protocol
)
{
QString
desktopFilePath
=
wizard
->
property
(
"providerDesktopFilePath"
).
toString
();
const
QString
desktopFilePath
=
wizard
->
property
(
"providerDesktopFilePath"
).
toString
();
if
(
desktopFilePath
.
isEmpty
())
{
return
QString
();
}
...
...
@@ -49,14 +49,14 @@ static QString settingsToUrl(const QWizard *wizard, const QString &protocol)
return
QString
();
}
QStringList
supportedProtocols
=
service
->
property
(
QStringLiteral
(
"X-DavGroupware-SupportedProtocols"
)).
toStringList
();
const
QStringList
supportedProtocols
=
service
->
property
(
QStringLiteral
(
"X-DavGroupware-SupportedProtocols"
)).
toStringList
();
if
(
!
supportedProtocols
.
contains
(
protocol
))
{
return
QString
();
}
QString
pathPattern
;
QString
pathPropertyName
(
QStringLiteral
(
"X-DavGroupware-"
)
+
protocol
+
QStringLiteral
(
"Path"
));
const
QString
pathPropertyName
(
QStringLiteral
(
"X-DavGroupware-"
)
+
protocol
+
QStringLiteral
(
"Path"
));
if
(
service
->
property
(
pathPropertyName
).
isNull
())
{
return
QString
();
}
...
...
resources/ews/ewsclient/ewsattachment.cpp
View file @
0f477196
...
...
@@ -38,22 +38,18 @@ public:
QString
mContentType
;
QString
mContentId
;
QString
mContentLocation
;
long
mSize
;
long
mSize
=
0
;
QDateTime
mLastModifiedTime
;
bool
mIsInline
;
bool
mIsContactPhoto
;
bool
mIsInline
=
false
;
bool
mIsContactPhoto
=
false
;
QByteArray
mContent
;
EwsItem
mItem
;
bool
mValid
;
bool
mValid
=
false
;
QBitArray
mValidFields
;
};
EwsAttachmentPrivate
::
EwsAttachmentPrivate
()
:
mType
(
EwsAttachment
::
UnknownAttachment
)
,
mSize
(
0
)
,
mIsInline
(
false
)
,
mIsContactPhoto
(
false
)
,
mValid
(
false
)
,
mValidFields
(
NumFields
)
{
}
...
...
resources/ews/ewscreateitemjob.h
View file @
0f477196
...
...
@@ -37,7 +37,7 @@ protected:
Akonadi
::
Item
mItem
;
Akonadi
::
Collection
mCollection
;
EwsClient
&
mClient
;
EwsTagStore
*
mTagStore
=
nullptr
;
EwsTagStore
*
const
mTagStore
;
};
#endif
resources/ews/ewsfetchitemdetailjob.cpp
View file @
0f477196
...
...
@@ -10,7 +10,6 @@
EwsFetchItemDetailJob
::
EwsFetchItemDetailJob
(
EwsClient
&
client
,
QObject
*
parent
,
const
Akonadi
::
Collection
&
collection
)
:
KCompositeJob
(
parent
)
,
mDeletedItems
(
nullptr
)
,
mClient
(
client
)
,
mCollection
(
collection
)
{
...
...
Prev
1
2
Next
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