Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PIM Calendar Support
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PIM
PIM Calendar Support
Commits
90b6ac7e
Commit
90b6ac7e
authored
Jan 01, 2017
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Q_NULLPTR
parent
f87b7dcb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
10 deletions
+10
-10
src/attachmenthandler.cpp
src/attachmenthandler.cpp
+5
-5
src/calendarutils.cpp
src/calendarutils.cpp
+2
-2
src/incidenceattachmentmodel.cpp
src/incidenceattachmentmodel.cpp
+1
-1
src/utils.cpp
src/utils.cpp
+2
-2
No files found.
src/attachmenthandler.cpp
View file @
90b6ac7e
...
...
@@ -143,7 +143,7 @@ Attachment::Ptr AttachmentHandler::find(const QString &attachmentName,
return
find
(
attachmentName
,
incidence
);
}
static
QTemporaryFile
*
s_tempFile
=
0
;
static
QTemporaryFile
*
s_tempFile
=
Q_NULLPTR
;
static
QUrl
tempFileForAttachment
(
const
Attachment
::
Ptr
&
attachment
)
{
...
...
@@ -165,7 +165,7 @@ static QUrl tempFileForAttachment(const Attachment::Ptr &attachment)
if
(
tf
.
size
()
!=
attachment
->
size
())
{
//whoops. failed to write the entire attachment. return an invalid URL.
delete
s_tempFile
;
s_tempFile
=
0
;
s_tempFile
=
Q_NULLPTR
;
return
url
;
}
...
...
@@ -186,7 +186,7 @@ bool AttachmentHandler::view(const Attachment::Ptr &attachment)
// put the attachment in a temporary file and launch it
QUrl
tempUrl
=
tempFileForAttachment
(
attachment
);
if
(
tempUrl
.
isValid
())
{
stat
=
KRun
::
runUrl
(
tempUrl
,
attachment
->
mimeType
(),
0
,
true
);
stat
=
KRun
::
runUrl
(
tempUrl
,
attachment
->
mimeType
(),
Q_NULLPTR
,
true
);
}
else
{
stat
=
false
;
KMessageBox
::
error
(
...
...
@@ -194,7 +194,7 @@ bool AttachmentHandler::view(const Attachment::Ptr &attachment)
i18n
(
"Unable to create a temporary file for the attachment."
));
}
delete
s_tempFile
;
s_tempFile
=
0
;
s_tempFile
=
Q_NULLPTR
;
}
return
stat
;
}
...
...
@@ -257,7 +257,7 @@ bool AttachmentHandler::saveAs(const Attachment::Ptr &attachment)
i18n
(
"Unable to create a temporary file for the attachment."
));
}
delete
s_tempFile
;
s_tempFile
=
0
;
s_tempFile
=
Q_NULLPTR
;
}
return
stat
;
}
...
...
src/calendarutils.cpp
View file @
90b6ac7e
...
...
@@ -152,7 +152,7 @@ bool CalendarUtilsPrivate::purgeCompletedSubTodos(const KCalCore::Todo::Ptr &tod
if
(
deleteThisTodo
)
{
if
(
todo
->
isCompleted
())
{
if
(
!
mChanger
->
deleteIncidence
(
mCalendar
->
item
(
todo
),
0
))
{
if
(
!
mChanger
->
deleteIncidence
(
mCalendar
->
item
(
todo
),
Q_NULLPTR
))
{
allPurged
=
false
;
}
}
else
{
...
...
@@ -259,7 +259,7 @@ void CalendarUtils::purgeCompletedTodos()
// endMultiModify();
if
(
!
allDeleted
)
{
KMessageBox
::
information
(
0
,
Q_NULLPTR
,
i18nc
(
"@info"
,
"Unable to purge to-dos with uncompleted children."
),
i18nc
(
"@title:window"
,
"Delete To-do"
),
...
...
src/incidenceattachmentmodel.cpp
View file @
90b6ac7e
...
...
@@ -36,7 +36,7 @@ class IncidenceAttachmentModelPrivate
IncidenceAttachmentModelPrivate
(
IncidenceAttachmentModel
*
qq
,
const
QPersistentModelIndex
&
modelIndex
,
const
Akonadi
::
Item
&
item
=
Akonadi
::
Item
())
:
q_ptr
(
qq
),
m_modelIndex
(
modelIndex
),
m_item
(
item
),
m_monitor
(
0
)
:
q_ptr
(
qq
),
m_modelIndex
(
modelIndex
),
m_item
(
item
),
m_monitor
(
Q_NULLPTR
)
{
if
(
modelIndex
.
isValid
())
{
QObject
::
connect
(
modelIndex
.
model
(),
SIGNAL
(
dataChanged
(
QModelIndex
,
QModelIndex
)),
...
...
src/utils.cpp
View file @
90b6ac7e
...
...
@@ -196,7 +196,7 @@ QMimeData *CalendarSupport::createMimeData(const Akonadi::Item::List &items,
const
KDateTime
::
Spec
&
timeSpec
)
{
if
(
items
.
isEmpty
())
{
return
0
;
return
Q_NULLPTR
;
}
KCalCore
::
MemoryCalendar
::
Ptr
cal
(
new
KCalCore
::
MemoryCalendar
(
timeSpec
));
...
...
@@ -215,7 +215,7 @@ QMimeData *CalendarSupport::createMimeData(const Akonadi::Item::List &items,
}
if
(
incidencesFound
==
0
)
{
return
0
;
return
Q_NULLPTR
;
}
std
::
unique_ptr
<
QMimeData
>
mimeData
(
new
QMimeData
);
...
...
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