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 Calendar
Commits
947f4a4b
Commit
947f4a4b
authored
Aug 13, 2021
by
Laurent Montel
😁
Browse files
const'ify variable + initialize variable in headers etc.
parent
b46a382a
Pipeline
#74652
passed with stage
in 6 minutes and 1 second
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
autotests/calendarbasetest.cpp
View file @
947f4a4b
...
...
@@ -46,7 +46,7 @@ void CalendarBaseTest::fetchCollection()
AKVERIFYEXEC
(
job
);
// Find our collection
Collection
::
List
collections
=
job
->
collections
();
const
Collection
::
List
collections
=
job
->
collections
();
QVERIFY
(
!
collections
.
isEmpty
());
mCollection
=
collections
.
first
();
...
...
src/calendarmodel.cpp
View file @
947f4a4b
...
...
@@ -74,19 +74,20 @@ QVariant CalendarModel::entityData(const Akonadi::Item &item, int column, int ro
}
switch
(
role
)
{
case
Qt
::
DecorationRole
:
case
Qt
::
DecorationRole
:
{
if
(
column
!=
Summary
)
{
return
QVariant
();
}
if
(
inc
->
type
()
==
KCalendarCore
::
IncidenceBase
::
TypeTodo
)
{
const
auto
incType
{
inc
->
type
()};
if
(
incType
==
KCalendarCore
::
IncidenceBase
::
TypeTodo
)
{
return
QIcon
::
fromTheme
(
QStringLiteral
(
"view-pim-tasks"
));
}
else
if
(
inc
->
t
ype
()
==
KCalendarCore
::
IncidenceBase
::
TypeJournal
)
{
}
else
if
(
inc
T
ype
==
KCalendarCore
::
IncidenceBase
::
TypeJournal
)
{
return
QIcon
::
fromTheme
(
QStringLiteral
(
"view-pim-journal"
));
}
else
if
(
inc
->
t
ype
()
==
KCalendarCore
::
IncidenceBase
::
TypeEvent
)
{
}
else
if
(
inc
T
ype
==
KCalendarCore
::
IncidenceBase
::
TypeEvent
)
{
return
QIcon
::
fromTheme
(
QStringLiteral
(
"view-calendar"
));
}
return
QIcon
::
fromTheme
(
QStringLiteral
(
"network-wired"
));
}
case
Qt
::
DisplayRole
:
switch
(
column
)
{
case
Summary
:
...
...
src/freebusydownloadjob_p.h
View file @
947f4a4b
...
...
@@ -26,15 +26,15 @@ public:
void
start
()
override
;
QUrl
url
()
const
;
QByteArray
rawFreeBusyData
()
const
;
Q_REQUIRED_RESULT
QUrl
url
()
const
;
Q_REQUIRED_RESULT
QByteArray
rawFreeBusyData
()
const
;
private
Q_SLOTS
:
void
slotData
(
KIO
::
Job
*
,
const
QByteArray
&
data
);
void
slotResult
(
KJob
*
job
);
private:
QUrl
mUrl
;
const
QUrl
mUrl
;
QByteArray
mFreeBusyData
;
QWidget
*
const
mParent
;
};
...
...
src/history.cpp
View file @
947f4a4b
...
...
@@ -26,8 +26,6 @@ History::~History()
History
::
Private
::
Private
(
History
*
qq
)
:
mChanger
(
new
IncidenceChanger
(
/*history=*/
false
,
qq
))
,
mOperationTypeInProgress
(
TypeNone
)
,
mUndoAllInProgress
(
false
)
,
mEnabled
(
true
)
,
q
(
qq
)
{
mChanger
->
setObjectName
(
QStringLiteral
(
"changer"
));
// for auto-connects
...
...
src/history_p.h
View file @
947f4a4b
...
...
@@ -89,14 +89,14 @@ public:
Entry
::
Ptr
mEntryInProgress
;
QString
mLastErrorString
;
bool
mUndoAllInProgress
;
bool
mUndoAllInProgress
=
false
;
/**
* When recordCreation/Deletion/Modification is called and an undo operation is already in progress
* the entry is added here.
*/
QVector
<
Entry
::
Ptr
>
mQueuedEntries
;
bool
mEnabled
;
bool
mEnabled
=
true
;
QPointer
<
QWidget
>
mCurrentParent
;
public
Q_SLOTS
:
...
...
src/standardcalendaractionmanager.cpp
View file @
947f4a4b
...
...
@@ -26,8 +26,6 @@ public:
Private
(
KActionCollection
*
actionCollection
,
QWidget
*
parentWidget
,
StandardCalendarActionManager
*
parent
)
:
mActionCollection
(
actionCollection
)
,
mParentWidget
(
parentWidget
)
,
mCollectionSelectionModel
(
nullptr
)
,
mItemSelectionModel
(
nullptr
)
,
mParent
(
parent
)
{
mGenericManager
=
new
StandardActionManager
(
actionCollection
,
parentWidget
);
...
...
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