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
1a5ae7cb
Commit
1a5ae7cb
authored
Nov 23, 2021
by
Laurent Montel
Browse files
Use =default + use {}
parent
31f62905
Pipeline
#100216
passed with stage
in 50 minutes and 48 seconds
Changes
367
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
akonadi-import-wizard/evolutionv1/evolutionv1importdata.cpp
View file @
1a5ae7cb
...
...
@@ -21,9 +21,7 @@ Evolutionv1ImportData::Evolutionv1ImportData(QObject *parent, const QList<QVaria
mPath
=
MailImporter
::
FilterEvolution
::
defaultSettingsPath
();
}
Evolutionv1ImportData
::~
Evolutionv1ImportData
()
{
}
Evolutionv1ImportData
::~
Evolutionv1ImportData
()
=
default
;
bool
Evolutionv1ImportData
::
foundMailer
()
const
{
...
...
akonadi-import-wizard/evolutionv2/evolutionv2importdata.cpp
View file @
1a5ae7cb
...
...
@@ -21,9 +21,7 @@ Evolutionv2ImportData::Evolutionv2ImportData(QObject *parent, const QList<QVaria
mPath
=
MailImporter
::
FilterEvolution_v2
::
defaultSettingsPath
();
}
Evolutionv2ImportData
::~
Evolutionv2ImportData
()
{
}
Evolutionv2ImportData
::~
Evolutionv2ImportData
()
=
default
;
bool
Evolutionv2ImportData
::
foundMailer
()
const
{
...
...
akonadi-import-wizard/geary/gearyaddressbook.cpp
View file @
1a5ae7cb
...
...
@@ -10,9 +10,7 @@ GearyAddressBook::GearyAddressBook(const QString &filename)
{
}
GearyAddressBook
::~
GearyAddressBook
()
{
}
GearyAddressBook
::~
GearyAddressBook
()
=
default
;
void
GearyAddressBook
::
importAddressBook
()
{
...
...
akonadi-import-wizard/geary/gearyimportdata.cpp
View file @
1a5ae7cb
...
...
@@ -22,9 +22,7 @@ GearyImportData::GearyImportData(QObject *parent, const QList<QVariant> &)
mPath
=
MailImporter
::
OtherMailerUtil
::
gearyDefaultPath
();
}
GearyImportData
::~
GearyImportData
()
{
}
GearyImportData
::~
GearyImportData
()
=
default
;
bool
GearyImportData
::
foundMailer
()
const
{
...
...
akonadi-import-wizard/nylas-mail/nylasmaildata.cpp
View file @
1a5ae7cb
...
...
@@ -21,9 +21,7 @@ NylasMailImportData::NylasMailImportData(QObject *parent, const QList<QVariant>
mPath
=
MailImporter
::
OtherMailerUtil
::
nylasMailDefaultPath
();
}
NylasMailImportData
::~
NylasMailImportData
()
{
}
NylasMailImportData
::~
NylasMailImportData
()
=
default
;
bool
NylasMailImportData
::
foundMailer
()
const
{
...
...
akonadi-import-wizard/nylas-mail/nylasmailsettings.cpp
View file @
1a5ae7cb
...
...
@@ -16,9 +16,7 @@ NylasMailSettings::NylasMailSettings(const QString &filename)
{
}
NylasMailSettings
::~
NylasMailSettings
()
{
}
NylasMailSettings
::~
NylasMailSettings
()
=
default
;
void
NylasMailSettings
::
importSettings
()
{
...
...
akonadi-import-wizard/opera/operaaddressbook.cpp
View file @
1a5ae7cb
...
...
@@ -69,9 +69,7 @@ void OperaAddressBook::importAddressBook()
appendContact
(
contact
);
}
OperaAddressBook
::~
OperaAddressBook
()
{
}
OperaAddressBook
::~
OperaAddressBook
()
=
default
;
void
OperaAddressBook
::
appendContact
(
KContacts
::
Addressee
*
contact
)
{
...
...
akonadi-import-wizard/opera/operaimportdata.cpp
View file @
1a5ae7cb
...
...
@@ -22,9 +22,7 @@ OperaImportData::OperaImportData(QObject *parent, const QList<QVariant> &)
mPath
=
MailImporter
::
FilterOpera
::
defaultSettingsPath
();
}
OperaImportData
::~
OperaImportData
()
{
}
OperaImportData
::~
OperaImportData
()
=
default
;
bool
OperaImportData
::
foundMailer
()
const
{
...
...
akonadi-import-wizard/opera/operasettings.cpp
View file @
1a5ae7cb
...
...
@@ -41,9 +41,7 @@ void OperaSettings::importSettings()
}
}
OperaSettings
::~
OperaSettings
()
{
}
OperaSettings
::~
OperaSettings
()
=
default
;
void
OperaSettings
::
readAccount
(
const
KConfigGroup
&
grp
)
{
...
...
kaddressbook/editorpages/cryptopageplugin.cpp
View file @
1a5ae7cb
...
...
@@ -102,9 +102,7 @@ CryptoPagePlugin::CryptoPagePlugin()
box
->
setLayout
(
boxLayout
);
}
CryptoPagePlugin
::~
CryptoPagePlugin
()
{
}
CryptoPagePlugin
::~
CryptoPagePlugin
()
=
default
;
QString
CryptoPagePlugin
::
title
()
const
{
...
...
kaddressbook/importexportplugins/csv/import/csvimportdialog.cpp
View file @
1a5ae7cb
...
...
@@ -252,7 +252,7 @@ KContacts::AddresseeList CSVImportDialog::contacts() const
qApp
->
processEvents
();
if
(
progressDialog
.
wasCanceled
())
{
return
KContacts
::
AddresseeList
()
;
return
{}
;
}
progressDialog
.
setValue
(
progressDialog
.
value
()
+
1
);
...
...
kaddressbook/importexportplugins/csv/import/dateparser.cpp
View file @
1a5ae7cb
...
...
@@ -12,9 +12,7 @@ DateParser::DateParser(const QString &pattern)
{
}
DateParser
::~
DateParser
()
{
}
DateParser
::~
DateParser
()
=
default
;
QDateTime
DateParser
::
parse
(
const
QString
&
dateStr
)
const
{
...
...
@@ -33,14 +31,14 @@ QDateTime DateParser::parse(const QString &dateStr) const
currPos
+=
2
;
}
else
{
return
QDateTime
()
;
return
{}
;
}
}
else
if
(
mPattern
[
i
]
==
QLatin1Char
(
'Y'
))
{
// YYYY
if
(
currPos
+
3
<
dateStr
.
length
())
{
year
=
QStringView
(
dateStr
).
mid
(
currPos
,
4
).
toInt
();
currPos
+=
4
;
}
else
{
return
QDateTime
()
;
return
{}
;
}
}
else
if
(
mPattern
[
i
]
==
QLatin1Char
(
'm'
))
{
// M or MM
if
(
currPos
+
1
<
dateStr
.
length
())
{
...
...
@@ -62,13 +60,13 @@ QDateTime DateParser::parse(const QString &dateStr) const
}
}
return
QDateTime
()
;
return
{}
;
}
else
if
(
mPattern
[
i
]
==
QLatin1Char
(
'M'
))
{
// 0M or MM
if
(
currPos
+
1
<
dateStr
.
length
())
{
month
=
QStringView
(
dateStr
).
mid
(
currPos
,
2
).
toInt
();
currPos
+=
2
;
}
else
{
return
QDateTime
()
;
return
{}
;
}
}
else
if
(
mPattern
[
i
]
==
QLatin1Char
(
'd'
))
{
// D or DD
if
(
currPos
+
1
<
dateStr
.
length
())
{
...
...
@@ -88,34 +86,34 @@ QDateTime DateParser::parse(const QString &dateStr) const
}
}
return
QDateTime
()
;
return
{}
;
}
else
if
(
mPattern
[
i
]
==
QLatin1Char
(
'D'
))
{
// 0D or DD
if
(
currPos
+
1
<
dateStr
.
length
())
{
day
=
QStringView
(
dateStr
).
mid
(
currPos
,
2
).
toInt
();
currPos
+=
2
;
}
else
{
return
QDateTime
()
;
return
{}
;
}
}
else
if
(
mPattern
[
i
]
==
QLatin1Char
(
'H'
))
{
// 0H or HH
if
(
currPos
+
1
<
dateStr
.
length
())
{
hour
=
QStringView
(
dateStr
).
mid
(
currPos
,
2
).
toInt
();
currPos
+=
2
;
}
else
{
return
QDateTime
()
;
return
{}
;
}
}
else
if
(
mPattern
[
i
]
==
QLatin1Char
(
'I'
))
{
// 0I or II
if
(
currPos
+
1
<
dateStr
.
length
())
{
minute
=
QStringView
(
dateStr
).
mid
(
currPos
,
2
).
toInt
();
currPos
+=
2
;
}
else
{
return
QDateTime
()
;
return
{}
;
}
}
else
if
(
mPattern
[
i
]
==
QLatin1Char
(
'S'
))
{
// 0S or SS
if
(
currPos
+
1
<
dateStr
.
length
())
{
second
=
QStringView
(
dateStr
).
mid
(
currPos
,
2
).
toInt
();
currPos
+=
2
;
}
else
{
return
QDateTime
()
;
return
{}
;
}
}
else
{
currPos
++
;
...
...
kaddressbook/importexportplugins/csv/import/qcsvmodel.cpp
View file @
1a5ae7cb
...
...
@@ -110,9 +110,7 @@ QCsvModel::QCsvModel(QObject *parent)
connect
(
mParser
,
&
CsvParser
::
ended
,
this
,
&
QCsvModel
::
finishedLoading
);
}
QCsvModel
::~
QCsvModel
()
{
}
QCsvModel
::~
QCsvModel
()
=
default
;
bool
QCsvModel
::
load
(
QIODevice
*
device
)
{
...
...
@@ -232,24 +230,24 @@ int QCsvModel::rowCount(const QModelIndex &parent) const
QVariant
QCsvModel
::
data
(
const
QModelIndex
&
index
,
int
role
)
const
{
if
(
!
index
.
isValid
())
{
return
QVariant
()
;
return
{}
;
}
if
(
index
.
row
()
==
0
)
{
if
(
index
.
column
()
>=
mFieldIdentifiers
.
count
())
{
return
QVariant
()
;
return
{}
;
}
if
(
role
==
Qt
::
DisplayRole
||
role
==
Qt
::
EditRole
)
{
return
mFieldIdentifiers
.
at
(
index
.
column
());
}
return
QVariant
()
;
return
{}
;
}
const
QPair
<
int
,
int
>
pair
(
index
.
row
()
-
1
,
index
.
column
());
if
(
!
mFields
.
contains
(
pair
))
{
return
QVariant
()
;
return
{}
;
}
const
QString
data
=
mFields
.
value
(
pair
);
...
...
@@ -257,7 +255,7 @@ QVariant QCsvModel::data(const QModelIndex &index, int role) const
if
(
role
==
Qt
::
DisplayRole
)
{
return
data
;
}
else
{
return
QVariant
()
;
return
{}
;
}
}
...
...
kaddressbook/importexportplugins/csv/import/qcsvreader.cpp
View file @
1a5ae7cb
...
...
@@ -12,9 +12,7 @@
#include
<QTextStream>
#include
<QVector>
QCsvBuilderInterface
::~
QCsvBuilderInterface
()
{
}
QCsvBuilderInterface
::~
QCsvBuilderInterface
()
=
default
;
class
QCsvReaderPrivate
{
...
...
@@ -340,7 +338,7 @@ uint QCsvStandardBuilder::columnCount() const
QString
QCsvStandardBuilder
::
data
(
uint
row
,
uint
column
)
const
{
if
(
row
>
d
->
mRowCount
||
column
>
d
->
mColumnCount
||
column
>=
(
uint
)
d
->
mRows
[
row
].
count
())
{
return
QString
()
;
return
{}
;
}
return
d
->
mRows
[
row
][
column
];
...
...
kaddressbook/importexportplugins/csv/import/templateselectiondialog.cpp
View file @
1a5ae7cb
...
...
@@ -63,7 +63,7 @@ public:
Q_REQUIRED_RESULT
QVariant
data
(
const
QModelIndex
&
index
,
int
role
=
Qt
::
DisplayRole
)
const
override
{
if
(
!
index
.
isValid
()
||
index
.
row
()
>=
mTemplates
.
count
()
||
index
.
column
()
>=
2
)
{
return
QVariant
()
;
return
{}
;
}
if
(
role
==
Qt
::
DisplayRole
)
{
...
...
@@ -78,7 +78,7 @@ public:
return
mTemplates
[
index
.
row
()].
isDeletable
;
}
return
QVariant
()
;
return
{}
;
}
bool
removeRows
(
int
row
,
int
count
,
const
QModelIndex
&
parent
=
QModelIndex
())
override
...
...
kaddressbook/importexportplugins/windows-contacts/importwindowcontact.cpp
View file @
1a5ae7cb
...
...
@@ -13,13 +13,9 @@
// https://docs.microsoft.com/en-us/previous-versions//ms735869(v=vs.85)
ImportWindowContact
::
ImportWindowContact
()
{
}
ImportWindowContact
::
ImportWindowContact
()
=
default
;
ImportWindowContact
::~
ImportWindowContact
()
{
}
ImportWindowContact
::~
ImportWindowContact
()
=
default
;
KContacts
::
Addressee
::
List
ImportWindowContact
::
importFile
(
const
QString
&
fileName
)
{
...
...
kaddressbook/plugins/checkgravatar/checkgravatarplugin.cpp
View file @
1a5ae7cb
...
...
@@ -15,9 +15,7 @@ CheckGravatarPlugin::CheckGravatarPlugin(QObject *parent, const QList<QVariant>
{
}
CheckGravatarPlugin
::~
CheckGravatarPlugin
()
{
}
CheckGravatarPlugin
::~
CheckGravatarPlugin
()
=
default
;
PimCommon
::
GenericPluginInterface
*
CheckGravatarPlugin
::
createInterface
(
QObject
*
parent
)
{
...
...
kaddressbook/plugins/checkgravatar/checkgravatarplugininterface.cpp
View file @
1a5ae7cb
...
...
@@ -21,9 +21,7 @@ CheckGravatarPluginInterface::CheckGravatarPluginInterface(QObject *parent)
{
}
CheckGravatarPluginInterface
::~
CheckGravatarPluginInterface
()
{
}
CheckGravatarPluginInterface
::~
CheckGravatarPluginInterface
()
=
default
;
void
CheckGravatarPluginInterface
::
updateActions
(
int
numberOfSelectedItems
,
int
numberOfSelectedCollections
)
{
...
...
kaddressbook/plugins/checkgravatar/gravatar/autotests/gravatarupdatedialogtest.cpp
View file @
1a5ae7cb
...
...
@@ -15,9 +15,7 @@ GravatarUpdateDialogTest::GravatarUpdateDialogTest(QObject *parent)
{
}
GravatarUpdateDialogTest
::~
GravatarUpdateDialogTest
()
{
}
GravatarUpdateDialogTest
::~
GravatarUpdateDialogTest
()
=
default
;
void
GravatarUpdateDialogTest
::
shouldHaveDefaultValue
()
{
...
...
kaddressbook/plugins/checkgravatar/gravatar/autotests/gravatarupdatejobtest.cpp
View file @
1a5ae7cb
...
...
@@ -13,9 +13,7 @@ GravatarUpdateJobTest::GravatarUpdateJobTest(QObject *parent)
{
}
GravatarUpdateJobTest
::~
GravatarUpdateJobTest
()
{
}
GravatarUpdateJobTest
::~
GravatarUpdateJobTest
()
=
default
;
void
GravatarUpdateJobTest
::
shouldHaveDefaultValue
()
{
...
...
Prev
1
2
3
4
5
…
19
Next
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