Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
KDE PIM Runtime
Commits
f0380ed4
Commit
f0380ed4
authored
Aug 04, 2020
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix clazy warning
parent
a90d2fe5
Pipeline
#29614
failed with stage
in 48 minutes and 40 seconds
Changes
18
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
22 additions
and
21 deletions
+22
-21
resources/dav/resource/davfreebusyhandler.cpp
resources/dav/resource/davfreebusyhandler.cpp
+4
-4
resources/dav/resource/setupwizard.h
resources/dav/resource/setupwizard.h
+1
-1
resources/ews/ewsclient/ewscreateitemrequest.cpp
resources/ews/ewsclient/ewscreateitemrequest.cpp
+1
-1
resources/ews/ewsclient/ewseventrequestbase.h
resources/ews/ewsclient/ewseventrequestbase.h
+1
-1
resources/ews/ewsclient/ewsmailbox.h
resources/ews/ewsclient/ewsmailbox.h
+1
-1
resources/ews/ewsclient/ewssyncfolderhierarchyrequest.h
resources/ews/ewsclient/ewssyncfolderhierarchyrequest.h
+1
-1
resources/ews/test/isolatedtestbase.cpp
resources/ews/test/isolatedtestbase.cpp
+1
-1
resources/google-groupware/calendarhandler.cpp
resources/google-groupware/calendarhandler.cpp
+1
-2
resources/imap/autotests/dummypasswordrequester.cpp
resources/imap/autotests/dummypasswordrequester.cpp
+1
-1
resources/imap/resourcestateinterface.cpp
resources/imap/resourcestateinterface.cpp
+1
-1
resources/kolab/pimkolab/freebusy/freebusy.cpp
resources/kolab/pimkolab/freebusy/freebusy.cpp
+2
-2
resources/kolab/pimkolab/freebusy/freebusy.h
resources/kolab/pimkolab/freebusy/freebusy.h
+1
-1
resources/kolab/pimkolab/kolabformat/errorhandler.cpp
resources/kolab/pimkolab/kolabformat/errorhandler.cpp
+1
-1
resources/kolab/pimkolab/kolabformatV2/incidence.cpp
resources/kolab/pimkolab/kolabformatV2/incidence.cpp
+1
-1
resources/kolab/pimkolab/utils/kolabformatchecker.cpp
resources/kolab/pimkolab/utils/kolabformatchecker.cpp
+1
-0
resources/mixedmaildir/autotests/collectionmovetest.cpp
resources/mixedmaildir/autotests/collectionmovetest.cpp
+0
-1
resources/pop3/autotests/pop3test.cpp
resources/pop3/autotests/pop3test.cpp
+2
-0
resources/tomboynotes/o2/o2simplecrypt.cpp
resources/tomboynotes/o2/o2simplecrypt.cpp
+1
-1
No files found.
resources/dav/resource/davfreebusyhandler.cpp
View file @
f0380ed4
...
...
@@ -146,7 +146,7 @@ void DavFreeBusyHandler::onRetrieveFreeBusyJobFinished(KJob *job)
if
(
job
->
error
())
{
if
(
retrievalJobCount
==
0
&&
!
mRequestsTracker
[
email
].
retrievalJobSuccessful
)
{
Q_EMIT
(
freeBusyRetrieved
(
email
,
QString
(),
false
,
job
->
errorString
())
)
;
Q_EMIT
freeBusyRetrieved
(
email
,
QString
(),
false
,
job
->
errorString
());
}
return
;
}
...
...
@@ -196,7 +196,7 @@ void DavFreeBusyHandler::onRetrieveFreeBusyJobFinished(KJob *job)
QDomElement
responseElement
=
firstChildElementNS
(
scheduleResponse
,
QStringLiteral
(
"urn:ietf:params:xml:ns:caldav"
),
QStringLiteral
(
"response"
));
if
(
responseElement
.
isNull
())
{
if
(
retrievalJobCount
==
0
&&
!
mRequestsTracker
[
email
].
retrievalJobSuccessful
)
{
Q_EMIT
(
freeBusyRetrieved
(
email
,
QString
(),
false
,
i18n
(
"Invalid response from the server"
))
)
;
Q_EMIT
freeBusyRetrieved
(
email
,
QString
(),
false
,
i18n
(
"Invalid response from the server"
));
}
return
;
}
...
...
@@ -207,7 +207,7 @@ void DavFreeBusyHandler::onRetrieveFreeBusyJobFinished(KJob *job)
QDomElement
calendarDataElement
=
firstChildElementNS
(
responseElement
,
QStringLiteral
(
"urn:ietf:params:xml:ns:caldav"
),
QStringLiteral
(
"calendar-data"
));
if
(
calendarDataElement
.
isNull
())
{
if
(
retrievalJobCount
==
0
&&
!
mRequestsTracker
[
email
].
retrievalJobSuccessful
)
{
Q_EMIT
(
freeBusyRetrieved
(
email
,
QString
(),
false
,
i18n
(
"Invalid response from the server"
))
)
;
Q_EMIT
freeBusyRetrieved
(
email
,
QString
(),
false
,
i18n
(
"Invalid response from the server"
));
}
return
;
}
...
...
@@ -218,7 +218,7 @@ void DavFreeBusyHandler::onRetrieveFreeBusyJobFinished(KJob *job)
KCalendarCore
::
FreeBusy
::
Ptr
fb
=
format
.
parseFreeBusy
(
rawData
);
if
(
fb
.
isNull
())
{
if
(
retrievalJobCount
==
0
&&
!
mRequestsTracker
[
email
].
retrievalJobSuccessful
)
{
Q_EMIT
(
freeBusyRetrieved
(
email
,
QString
(),
false
,
i18n
(
"Unable to parse free-busy data received"
))
)
;
Q_EMIT
freeBusyRetrieved
(
email
,
QString
(),
false
,
i18n
(
"Unable to parse free-busy data received"
));
}
return
;
}
...
...
resources/dav/resource/setupwizard.h
View file @
f0380ed4
...
...
@@ -55,7 +55,7 @@ public:
class
Url
{
public:
typedef
Q
List
<
Url
>
List
;
typedef
Q
Vector
<
Url
>
List
;
KDAV
::
Protocol
protocol
;
QString
url
;
...
...
resources/ews/ewsclient/ewscreateitemrequest.cpp
View file @
f0380ed4
...
...
@@ -125,7 +125,7 @@ EwsCreateItemRequest::Response::Response(QXmlStreamReader &reader)
while
(
reader
.
readNextStartElement
())
{
if
(
reader
.
namespaceUri
()
!=
ewsMsgNsUri
&&
reader
.
namespaceUri
()
!=
ewsTypeNsUri
)
{
setErrorMsg
(
QStringLiteral
(
"Unexpected namespace in %1 element: %2"
)
.
arg
(
QStringLiteral
(
"ResponseMessage"
)
).
arg
(
reader
.
namespaceUri
().
toString
()));
.
arg
(
QStringLiteral
(
"ResponseMessage"
)
,
reader
.
namespaceUri
().
toString
()));
return
;
}
...
...
resources/ews/ewsclient/ewseventrequestbase.h
View file @
f0380ed4
...
...
@@ -40,7 +40,7 @@ public:
class
Event
{
public:
typedef
Q
List
<
Event
>
List
;
typedef
Q
Vector
<
Event
>
List
;
EwsEventType
type
()
const
{
...
...
resources/ews/ewsclient/ewsmailbox.h
View file @
f0380ed4
...
...
@@ -36,7 +36,7 @@ class Mailbox;
class
EwsMailbox
{
public:
typedef
Q
List
<
EwsMailbox
>
List
;
typedef
Q
Vector
<
EwsMailbox
>
List
;
EwsMailbox
();
explicit
EwsMailbox
(
QXmlStreamReader
&
reader
);
...
...
resources/ews/ewsclient/ewssyncfolderhierarchyrequest.h
View file @
f0380ed4
...
...
@@ -41,7 +41,7 @@ public:
class
Change
{
public:
typedef
Q
List
<
Change
>
List
;
typedef
Q
Vector
<
Change
>
List
;
ChangeType
type
()
const
{
...
...
resources/ews/test/isolatedtestbase.cpp
View file @
f0380ed4
...
...
@@ -317,7 +317,7 @@ SyncFolderHierInitialDialogEntry::SyncFolderHierInitialDialogEntry(const Isolate
xml
+=
QStringLiteral
(
"</t:Create>"
);
}
xQuery
=
IsolatedTestBase
::
loadResourceAsString
(
QStringLiteral
(
":/xquery/syncfolderhierarhy-emptystate"
))
.
arg
(
syncState
).
arg
(
xml
);
.
arg
(
syncState
,
xml
);
}
UnsubscribeDialogEntry
::
UnsubscribeDialogEntry
(
const
QString
&
descr
,
const
ReplyCallback
&
callback
)
...
...
resources/google-groupware/calendarhandler.cpp
View file @
f0380ed4
...
...
@@ -49,8 +49,6 @@
using
namespace
KGAPI2
;
using
namespace
Akonadi
;
static
constexpr
uint32_t
KGAPIEventVersion
=
1
;
QString
CalendarHandler
::
mimeType
()
{
return
KCalendarCore
::
Event
::
eventMimeType
();
...
...
@@ -174,6 +172,7 @@ void CalendarHandler::slotItemsRetrieved(KGAPI2::Job *job)
const
ObjectsList
objects
=
fetchJob
->
items
();
bool
isIncremental
=
!
fetchJob
->
syncToken
().
isEmpty
();
qCDebug
(
GOOGLE_CALENDAR_LOG
)
<<
"Retrieved"
<<
objects
.
count
()
<<
"events for calendar"
<<
collection
.
remoteId
();
changedItems
.
reserve
(
objects
.
count
());
for
(
const
ObjectPtr
&
object
:
objects
)
{
const
EventPtr
event
=
object
.
dynamicCast
<
Event
>
();
if
(
event
->
useDefaultReminders
()
&&
attr
)
{
...
...
resources/imap/autotests/dummypasswordrequester.cpp
View file @
f0380ed4
...
...
@@ -59,7 +59,7 @@ void DummyPasswordRequester::setDelays(const QList<int> &delays)
void
DummyPasswordRequester
::
requestPassword
(
RequestType
request
,
const
QString
&
/*serverError*/
)
{
QVERIFY2
(
!
m_expectedCalls
.
isEmpty
(),
QString
::
fromLatin1
(
"Got unexpected call: %1"
).
arg
(
request
).
toUtf8
().
constData
());
QVERIFY2
(
!
m_expectedCalls
.
isEmpty
(),
QString
Literal
(
"Got unexpected call: %1"
).
arg
(
request
).
toUtf8
().
constData
());
QCOMPARE
((
int
)
request
,
(
int
)
m_expectedCalls
.
takeFirst
());
int
delay
=
20
;
...
...
resources/imap/resourcestateinterface.cpp
View file @
f0380ed4
...
...
@@ -39,7 +39,7 @@ QString ResourceStateInterface::mailBoxForCollection(const Akonadi::Collection &
/*if ( showWarnings && collection.remoteId() != rootRemoteId())
qCWarning(IMAPRESOURCE_LOG) << "RID mismatch, is " << collection.remoteId() << " expected " << rootRemoteId();
*/
return
QString
Literal
(
""
);
// see below, this intentionally not just QString()!
return
Q
Latin1
String
(
""
);
// see below, this intentionally not just QString()!
}
const
QString
parentMailbox
=
mailBoxForCollection
(
collection
.
parentCollection
());
if
(
parentMailbox
.
isNull
())
{
// invalid, != isEmpty() here!
...
...
resources/kolab/pimkolab/freebusy/freebusy.cpp
View file @
f0380ed4
...
...
@@ -164,7 +164,7 @@ Kolab::Period addLocalPeriod(const QDateTime &eventStart, const QDateTime &event
Freebusy
generateFreeBusy
(
const
std
::
vector
<
Event
>
&
events
,
const
cDateTime
&
startDate
,
const
cDateTime
&
endDate
)
{
Q
List
<
KCalendarCore
::
Event
::
Ptr
>
list
;
Q
Vector
<
KCalendarCore
::
Event
::
Ptr
>
list
;
list
.
reserve
(
events
.
size
());
for
(
const
Kolab
::
Event
&
e
:
events
)
{
list
.
append
(
Kolab
::
Conversion
::
toKCalendarCore
(
e
));
...
...
@@ -173,7 +173,7 @@ Freebusy generateFreeBusy(const std::vector< Event > &events, const cDateTime &s
return
generateFreeBusy
(
list
,
Kolab
::
Conversion
::
toDate
(
startDate
),
Kolab
::
Conversion
::
toDate
(
endDate
),
person
,
startDate
.
isDateOnly
());
}
Freebusy
generateFreeBusy
(
const
Q
List
<
KCalendarCore
::
Event
::
Ptr
>
&
events
,
const
QDateTime
&
startDate
,
const
QDateTime
&
endDate
,
const
KCalendarCore
::
Person
&
organizer
,
bool
allDay
)
Freebusy
generateFreeBusy
(
const
Q
Vector
<
KCalendarCore
::
Event
::
Ptr
>
&
events
,
const
QDateTime
&
startDate
,
const
QDateTime
&
endDate
,
const
KCalendarCore
::
Person
&
organizer
,
bool
allDay
)
{
/*
* TODO the conversion of date-only values to date-time is only necessary because xCal doesn't allow date only. iCalendar doesn't seem to make this restriction so it looks like a bug.
...
...
resources/kolab/pimkolab/freebusy/freebusy.h
View file @
f0380ed4
...
...
@@ -25,7 +25,7 @@
namespace
Kolab
{
namespace
FreebusyUtils
{
KOLAB_EXPORT
Freebusy
generateFreeBusy
(
const
Q
List
<
KCalendarCore
::
Event
::
Ptr
>
&
events
,
const
QDateTime
&
startDate
,
const
QDateTime
&
endDate
,
const
KCalendarCore
::
Person
&
organizer
,
bool
allDay
);
KOLAB_EXPORT
Freebusy
generateFreeBusy
(
const
Q
Vector
<
KCalendarCore
::
Event
::
Ptr
>
&
events
,
const
QDateTime
&
startDate
,
const
QDateTime
&
endDate
,
const
KCalendarCore
::
Person
&
organizer
,
bool
allDay
);
KOLAB_EXPORT
std
::
string
toIFB
(
const
Kolab
::
Freebusy
&
);
Kolab
::
Freebusy
generateFreeBusy
(
const
std
::
vector
<
Kolab
::
Event
>
&
events
,
const
Kolab
::
cDateTime
&
startDate
,
const
Kolab
::
cDateTime
&
endDate
);
...
...
resources/kolab/pimkolab/kolabformat/errorhandler.cpp
View file @
f0380ed4
...
...
@@ -78,7 +78,7 @@ void ErrorHandler::addError(ErrorHandler::Severity s, const QString &message, co
if
(
!
lst
.
isEmpty
())
{
filename
=
lst
.
last
();
}
const
QString
output
=
QTime
::
currentTime
().
toString
(
Q
Latin1
String
(
"(hh:mm:ss) "
))
+
filename
+
QLatin1String
(
":
\t
"
)
+
message
;
const
QString
output
=
QTime
::
currentTime
().
toString
(
QString
Literal
(
"(hh:mm:ss) "
))
+
filename
+
QLatin1String
(
":
\t
"
)
+
message
;
std
::
cout
<<
output
.
toStdString
()
<<
std
::
endl
;
if
(
s
==
Debug
)
{
return
;
...
...
resources/kolab/pimkolab/kolabformatV2/incidence.cpp
View file @
f0380ed4
...
...
@@ -773,7 +773,7 @@ void Incidence::setRecurrence(KCalendarCore::Recurrence *recur)
case
KCalendarCore
::
Recurrence
::
rYearlyDay
:
// YearlyDay (day N of the year). Not supported by Outlook
mRecurrence
.
cycle
=
QStringLiteral
(
"yearly"
);
mRecurrence
.
type
=
QStringLiteral
(
"yearday"
);
mRecurrence
.
dayNumber
=
QString
::
number
(
recur
->
yearDays
().
f
irst
());
mRecurrence
.
dayNumber
=
QString
::
number
(
recur
->
yearDays
().
constF
irst
());
break
;
case
KCalendarCore
::
Recurrence
::
rYearlyPos
:
// (weekday X of week N of month Y)
mRecurrence
.
cycle
=
QStringLiteral
(
"yearly"
);
...
...
resources/kolab/pimkolab/utils/kolabformatchecker.cpp
View file @
f0380ed4
...
...
@@ -45,6 +45,7 @@ KMime::Message::Ptr readMimeFile(const QString &fileName, bool &ok)
int
main
(
int
argc
,
char
*
argv
[])
{
vector
<
string
>
inputFiles
;
inputFiles
.
reserve
(
argc
-
1
);
for
(
int
i
=
1
;
i
<
argc
;
++
i
)
{
inputFiles
.
push_back
(
argv
[
i
]);
}
...
...
resources/mixedmaildir/autotests/collectionmovetest.cpp
View file @
f0380ed4
...
...
@@ -1147,7 +1147,6 @@ void CollectionMoveTest::testMoveToMBox()
QVERIFY
(
TestDataUtil
::
installFolder
(
QStringLiteral
(
"mbox"
),
topDir
.
path
(),
QStringLiteral
(
"collection5"
)));
QFileInfo
fileInfo5
(
topDir
,
QStringLiteral
(
"collection5"
));
QVERIFY
(
TestDataUtil
::
installFolder
(
QStringLiteral
(
"mbox"
),
topDir
.
path
(),
QStringLiteral
(
"collection6"
)));
QFileInfo
fileInfo6
(
topDir
,
QStringLiteral
(
"collection6"
));
// first level maildir parent
QDir
subDir1
=
topDir
;
...
...
resources/pop3/autotests/pop3test.cpp
View file @
f0380ed4
...
...
@@ -493,6 +493,8 @@ void Pop3Test::testBigFetch()
QList
<
QByteArray
>
mails
;
QStringList
uids
;
QString
allowedRetrs
;
mails
.
reserve
(
1000
);
uids
.
reserve
(
1000
);
for
(
int
i
=
0
;
i
<
1000
;
i
++
)
{
QByteArray
newMail
=
simpleMail1
;
newMail
.
append
(
QString
::
number
(
i
+
1
).
toLatin1
());
...
...
resources/tomboynotes/o2/o2simplecrypt.cpp
View file @
f0380ed4
...
...
@@ -182,7 +182,7 @@ QByteArray O0SimpleCrypt::decryptToByteArray(const QByteArray &cypher)
return
QByteArray
();
}
if
(
!
cypher
.
length
())
{
if
(
cypher
.
isEmpty
())
{
m_lastError
=
ErrorUnknownVersion
;
return
QByteArray
();
}
...
...
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