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 Add-ons
Commits
e0f86a20
Commit
e0f86a20
authored
Aug 28, 2020
by
Laurent Montel
😁
Browse files
Fix clazy warning
parent
a37f9e9d
Pipeline
#32197
failed with stage
in 60 minutes and 6 seconds
Changes
15
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
kaddressbook/importexportplugins/windows-contacts/autotests/importwindowcontacttest.cpp
View file @
e0f86a20
...
...
@@ -93,7 +93,7 @@ void ImportWindowContactTest::shouldImportWindowContact()
}
qDebug
()
<<
" EXPECTED"
;
for
(
const
KContacts
::
Addressee
&
address
:
result
)
{
for
(
const
KContacts
::
Addressee
&
address
:
qAsConst
(
result
)
)
{
qDebug
()
<<
"Data: "
<<
address
.
toString
();
}
}
...
...
korganizer/plugins/picoftheday/picoftheday.cpp
View file @
e0f86a20
...
...
@@ -54,7 +54,7 @@ Element::List Picoftheday::createDayElements(const QDate &date)
////////////////////////////////////////////////////////////////////////////////
POTDElement
::
POTDElement
(
const
QString
&
id
,
const
QDate
&
date
,
const
QSize
&
initialThumbSize
)
POTDElement
::
POTDElement
(
const
QString
&
id
,
QDate
date
,
QSize
initialThumbSize
)
:
StoredElement
(
id
)
,
mDate
(
date
)
,
mThumbSize
(
initialThumbSize
)
...
...
@@ -340,7 +340,7 @@ QPixmap POTDElement::newPixmap(const QSize &size)
return
mPixmap
.
scaled
(
size
,
Qt
::
KeepAspectRatio
,
Qt
::
SmoothTransformation
);
}
void
POTDElement
::
setThumbnailSize
(
const
QSize
&
size
)
void
POTDElement
::
setThumbnailSize
(
QSize
size
)
{
mThumbSize
=
size
;
}
korganizer/plugins/picoftheday/picoftheday.h
View file @
e0f86a20
...
...
@@ -46,13 +46,12 @@ class POTDElement : public StoredElement
Q_OBJECT
public:
POTDElement
(
const
QString
&
id
,
const
QDate
&
date
,
const
QSize
&
initialThumbSize
);
POTDElement
(
const
QString
&
id
,
QDate
date
,
QSize
initialThumbSize
);
~
POTDElement
()
{
}
void
setDate
(
const
QDate
&
date
);
void
setThumbnailSize
(
const
QSize
&
size
);
void
setThumbnailSize
(
QSize
size
);
/** @reimp from Element */
QPixmap
newPixmap
(
const
QSize
&
size
)
override
;
...
...
plugins/messageviewer/bodypartformatter/calendar/text_calendar.cpp
View file @
e0f86a20
...
...
@@ -1084,7 +1084,7 @@ public:
return
stat
;
}
void
showCalendar
(
const
QDate
&
date
)
const
void
showCalendar
(
QDate
date
)
const
{
// If korganizer or kontact is running, bring it to the front. Otherwise start korganizer.
if
(
KontactInterface
::
PimUniqueApplication
::
activateApplication
(
QStringLiteral
(
"korganizer"
)))
{
...
...
plugins/messageviewer/bodypartformatter/itinerary/itineraryrenderer.cpp
View file @
e0f86a20
...
...
@@ -189,6 +189,7 @@ bool ItineraryRenderer::render(const MimeTreeParser::MessagePartPtr &msgPart, Me
data
.
insert
(
QStringLiteral
(
"groupId"
),
i
);
QVector
<
QVariant
>
reservations
;
reservations
.
reserve
(
d
.
reservations
.
count
());
for
(
const
auto
&
r
:
d
.
reservations
)
{
QVariantMap
m
;
m
.
insert
(
QStringLiteral
(
"reservation"
),
r
);
...
...
@@ -231,6 +232,6 @@ bool ItineraryRenderer::render(const MimeTreeParser::MessagePartPtr &msgPart, Me
dynamic_cast
<
GrantleeTheme
::
Engine
*>
(
const_cast
<
Grantlee
::
Engine
*>
(
t
->
engine
()))
->
localizer
()
->
setApplicationDomain
(
QByteArrayLiteral
(
"messageviewer_semantic_plugin"
));
Grantlee
::
OutputStream
s
(
htmlWriter
->
stream
());
t
->
render
(
&
s
,
&
c
);
dynamic
_cast
<
GrantleeTheme
::
Engine
*>
(
const_cast
<
Grantlee
::
Engine
*>
(
t
->
engine
()))
->
localizer
()
->
setApplicationDomain
(
QByteArrayLiteral
(
"libmessageviewer"
));
qobject
_cast
<
GrantleeTheme
::
Engine
*>
(
const_cast
<
Grantlee
::
Engine
*>
(
t
->
engine
()))
->
localizer
()
->
setApplicationDomain
(
QByteArrayLiteral
(
"libmessageviewer"
));
return
false
;
// yes, false, we want the rest of the email rendered normally after this
}
plugins/messageviewer/bodypartformatter/itinerary/itineraryurlhandler.cpp
View file @
e0f86a20
...
...
@@ -169,7 +169,7 @@ ItineraryMemento *ItineraryUrlHandler::memento(MimeTreeParser::Interface::BodyPa
return
dynamic_cast
<
ItineraryMemento
*>
(
nodeHelper
->
bodyPartMemento
(
node
->
topLevel
(),
ItineraryMemento
::
identifier
()));
}
void
ItineraryUrlHandler
::
showCalendar
(
const
QDate
&
date
)
const
void
ItineraryUrlHandler
::
showCalendar
(
QDate
date
)
const
{
// ensure KOrganizer or Kontact are running
if
(
KontactInterface
::
PimUniqueApplication
::
activateApplication
(
QStringLiteral
(
"korganizer"
)))
{
...
...
plugins/messageviewer/bodypartformatter/itinerary/itineraryurlhandler.h
View file @
e0f86a20
...
...
@@ -31,7 +31,7 @@ public:
static
bool
hasItineraryApp
();
private:
ItineraryMemento
*
memento
(
MimeTreeParser
::
Interface
::
BodyPart
*
part
)
const
;
void
showCalendar
(
const
QDate
&
date
)
const
;
void
showCalendar
(
QDate
date
)
const
;
void
addToCalendar
(
ItineraryMemento
*
memento
)
const
;
void
openInApp
(
MimeTreeParser
::
Interface
::
BodyPart
*
part
)
const
;
void
openWithKDEConnect
(
MimeTreeParser
::
Interface
::
BodyPart
*
part
,
const
QString
&
deviceId
)
const
;
...
...
plugins/messageviewerheaderplugins/autotests/grantleeheaderstyleplugintest.cpp
View file @
e0f86a20
...
...
@@ -107,7 +107,8 @@ void GrantleeHeaderStylePluginTest::testThemeActivation()
QVERIFY
(
interface
->
mThemeManager
->
themes
().
contains
(
themeName
));
for
(
const
auto
&
action
:
act
->
actions
())
{
const
auto
actions
=
act
->
actions
();
for
(
const
auto
&
action
:
actions
)
{
if
(
action
->
data
()
==
themeName
)
{
action
->
trigger
();
break
;
...
...
plugins/messageviewerplugins/createeventplugin/eventdatetimewidget.cpp
View file @
e0f86a20
...
...
@@ -79,12 +79,12 @@ QTime EventDateTimeWidget::time() const
return
mTimeEdit
->
time
();
}
void
EventDateTimeWidget
::
setTime
(
const
QTime
&
time
)
void
EventDateTimeWidget
::
setTime
(
QTime
time
)
{
mTimeEdit
->
setTime
(
time
);
}
void
EventDateTimeWidget
::
setDate
(
const
QDate
&
date
)
void
EventDateTimeWidget
::
setDate
(
QDate
date
)
{
mDateEdit
->
setDate
(
date
);
}
plugins/messageviewerplugins/createeventplugin/eventdatetimewidget.h
View file @
e0f86a20
...
...
@@ -26,8 +26,8 @@ public:
QDate
date
()
const
;
QTime
time
()
const
;
void
setTime
(
const
QTime
&
time
);
void
setDate
(
const
QDate
&
date
);
void
setTime
(
QTime
time
);
void
setDate
(
QDate
date
);
Q_SIGNALS:
void
dateTimeChanged
(
const
QDateTime
&
dateTime
);
...
...
plugins/plasma/pimeventsplugin/autotests/eventdatavisitortest.cpp
View file @
e0f86a20
...
...
@@ -25,7 +25,7 @@ template<typename Visitor>
class
TestableVisitor
:
public
Visitor
{
public:
TestableVisitor
(
PimDataSource
*
source
,
const
QDate
&
start
=
QDate
(),
const
QDate
&
end
=
QDate
())
TestableVisitor
(
PimDataSource
*
source
,
QDate
start
=
QDate
(),
QDate
end
=
QDate
())
:
Visitor
(
source
,
start
,
end
)
{
}
...
...
@@ -35,7 +35,7 @@ public:
return
Visitor
::
generateUid
(
incidence
,
recurrenceId
);
}
bool
callIsInRange
(
const
QDate
&
start
,
const
QDate
&
end
)
const
bool
callIsInRange
(
QDate
start
,
QDate
end
)
const
{
return
Visitor
::
isInRange
(
start
,
end
);
}
...
...
plugins/plasma/pimeventsplugin/autotests/pimeventsplugintest.cpp
View file @
e0f86a20
...
...
@@ -167,7 +167,7 @@ void PimEventsPluginTest::testEventModified()
QVERIFY
(
source
.
calendar
()
->
addEvent
(
event
));
QCOMPARE
(
eventModifiedSpy
.
size
(),
1
);
const
auto
result
=
eventModifiedSpy
.
takeFirst
().
f
irst
().
value
<
CalendarEvents
::
EventData
>
();
const
auto
result
=
eventModifiedSpy
.
takeFirst
().
constF
irst
().
value
<
CalendarEvents
::
EventData
>
();
// TODO: Test for other property changes too?
QCOMPARE
(
result
.
title
(),
event
->
summary
());
QCOMPARE
(
result
.
uid
(),
expectedData
[
0
].
uid
());
...
...
plugins/plasma/pimeventsplugin/eventdatavisitor.cpp
View file @
e0f86a20
...
...
@@ -9,7 +9,7 @@
#include "pimdatasource.h"
#include "pimeventsplugin_debug.h"
BaseEventDataVisitor
::
BaseEventDataVisitor
(
PimDataSource
*
dataSource
,
const
QDate
&
start
,
const
QDate
&
end
)
BaseEventDataVisitor
::
BaseEventDataVisitor
(
PimDataSource
*
dataSource
,
QDate
start
,
QDate
end
)
:
mDataSource
(
dataSource
)
,
mStart
(
start
)
,
mEnd
(
end
)
...
...
@@ -43,7 +43,7 @@ bool BaseEventDataVisitor::act(const KCalendarCore::Todo::List &todos)
return
ok
;
}
bool
BaseEventDataVisitor
::
isInRange
(
const
QDate
&
start
,
const
QDate
&
end
)
const
bool
BaseEventDataVisitor
::
isInRange
(
QDate
start
,
QDate
end
)
const
{
if
(
!
mStart
.
isValid
()
||
!
mEnd
.
isValid
())
{
return
true
;
...
...
@@ -185,7 +185,7 @@ CalendarEvents::EventData EventDataVisitor::incidenceData(const KCalendarCore::I
return
data
;
}
EventDataIdVisitor
::
EventDataIdVisitor
(
PimDataSource
*
dataSource
,
const
QDate
&
start
,
const
QDate
&
end
)
EventDataIdVisitor
::
EventDataIdVisitor
(
PimDataSource
*
dataSource
,
QDate
start
,
QDate
end
)
:
BaseEventDataVisitor
(
dataSource
,
start
,
end
)
{
}
...
...
plugins/plasma/pimeventsplugin/eventdatavisitor.h
View file @
e0f86a20
...
...
@@ -23,10 +23,10 @@ public:
bool
act
(
const
KCalendarCore
::
Todo
::
List
&
todos
);
protected:
BaseEventDataVisitor
(
PimDataSource
*
dataSource
,
const
QDate
&
start
,
const
QDate
&
end
);
BaseEventDataVisitor
(
PimDataSource
*
dataSource
,
QDate
start
,
QDate
end
);
QString
generateUid
(
const
KCalendarCore
::
Incidence
::
Ptr
&
incidence
,
const
QDateTime
&
recurrenceId
=
{})
const
;
bool
isInRange
(
const
QDate
&
start
,
const
QDate
&
end
)
const
;
bool
isInRange
(
QDate
start
,
QDate
end
)
const
;
QVector
<
CalendarEvents
::
EventData
>
explodeIncidenceOccurences
(
const
CalendarEvents
::
EventData
&
ed
,
const
KCalendarCore
::
Incidence
::
Ptr
&
incidence
,
bool
&
ok
);
protected:
...
...
@@ -68,7 +68,7 @@ private:
class
EventDataIdVisitor
:
public
BaseEventDataVisitor
{
public:
explicit
EventDataIdVisitor
(
PimDataSource
*
dataSource
,
const
QDate
&
start
,
const
QDate
&
end
);
explicit
EventDataIdVisitor
(
PimDataSource
*
dataSource
,
QDate
start
,
QDate
end
);
const
QStringList
&
results
()
const
;
...
...
plugins/webengineurlinterceptor/adblock/tests/adblockblockableelementgui.h
View file @
e0f86a20
...
...
@@ -10,7 +10,7 @@
#include <QWidget>
class
QWebEngineView
;
namespace
AdBlock
{
class
AdBlockResult
;
struct
AdBlockResult
;
}
class
AdblockBlockableElementGui
:
public
QWidget
...
...
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