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
KAlarm
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
0
Merge Requests
0
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
KAlarm
Commits
fc142a54
Commit
fc142a54
authored
Feb 12, 2015
by
David Jarvie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reinstate 0 instead of Q_NULLPTR for non-pointer types
parent
72d8c523
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
44 additions
and
44 deletions
+44
-44
alarmtimewidget.cpp
alarmtimewidget.cpp
+1
-1
birthdaydlg.cpp
birthdaydlg.cpp
+1
-1
calendarmigrator.cpp
calendarmigrator.cpp
+1
-1
collectionmodel.cpp
collectionmodel.cpp
+2
-2
dbushandler.cpp
dbushandler.cpp
+1
-1
editdlg.cpp
editdlg.cpp
+1
-1
editdlg_p.h
editdlg_p.h
+7
-7
functions.h
functions.h
+1
-1
kamail.cpp
kamail.cpp
+1
-1
lib/label.h
lib/label.h
+3
-3
lib/spinbox2_p.h
lib/spinbox2_p.h
+8
-8
main.cpp
main.cpp
+1
-1
prefdlg.cpp
prefdlg.cpp
+1
-1
recurrenceedit.cpp
recurrenceedit.cpp
+2
-2
recurrenceedit_p.h
recurrenceedit_p.h
+10
-10
resourceselector.cpp
resourceselector.cpp
+1
-1
specialactions.cpp
specialactions.cpp
+2
-2
No files found.
alarmtimewidget.cpp
View file @
fc142a54
...
...
@@ -252,7 +252,7 @@ void AlarmTimeWidget::init(Mode mode, const QString& title)
void
AlarmTimeWidget
::
setReadOnly
(
bool
ro
)
{
mAtTimeRadio
->
setReadOnly
(
ro
);
mDateEdit
->
setOptions
(
ro
?
KDateComboBox
::
Options
(
Q_NULLPTR
)
:
KDateComboBox
::
EditDate
|
KDateComboBox
::
SelectDate
|
KDateComboBox
::
DatePicker
);
mDateEdit
->
setOptions
(
ro
?
KDateComboBox
::
Options
(
0
)
:
KDateComboBox
::
EditDate
|
KDateComboBox
::
SelectDate
|
KDateComboBox
::
DatePicker
);
mTimeEdit
->
setReadOnly
(
ro
);
if
(
mAnyTimeCheckBox
)
mAnyTimeCheckBox
->
setReadOnly
(
ro
);
...
...
birthdaydlg.cpp
View file @
fc142a54
...
...
@@ -234,7 +234,7 @@ BirthdayDlg::BirthdayDlg(QWidget* parent)
Preferences
::
defaultSoundVolume
(),
-
1
,
0
,
Preferences
::
defaultSoundRepeat
());
if
(
mSpecialActionsButton
)
{
KAEvent
::
ExtraActionOptions
opts
(
Q_NULLPTR
);
KAEvent
::
ExtraActionOptions
opts
(
0
);
if
(
Preferences
::
defaultExecPreActionOnDeferral
())
opts
|=
KAEvent
::
ExecPreActOnDeferral
;
if
(
Preferences
::
defaultCancelOnPreActionError
())
...
...
calendarmigrator.cpp
View file @
fc142a54
...
...
@@ -137,7 +137,7 @@ bool CalendarMigrator::mCompleted = false;
CalendarMigrator
::
CalendarMigrator
(
QObject
*
parent
)
:
QObject
(
parent
),
mExistingAlarmTypes
(
Q_NULLPTR
)
mExistingAlarmTypes
(
0
)
{
}
...
...
collectionmodel.cpp
View file @
fc142a54
...
...
@@ -759,8 +759,8 @@ CalEvent::Types CollectionControlModel::setEnabled(const Collection& collection,
CalEvent
::
Types
CollectionControlModel
::
setEnabledStatus
(
const
Collection
&
collection
,
CalEvent
::
Types
types
,
bool
inserted
)
{
qCDebug
(
KALARM_LOG
)
<<
"id:"
<<
collection
.
id
()
<<
", types="
<<
types
;
CalEvent
::
Types
disallowedStdTypes
(
Q_NULLPTR
);
CalEvent
::
Types
stdTypes
(
Q_NULLPTR
);
CalEvent
::
Types
disallowedStdTypes
(
0
);
CalEvent
::
Types
stdTypes
(
0
);
// Prevent the enabling of duplicate alarm types if another collection
// uses the same backend storage.
...
...
dbushandler.cpp
View file @
fc142a54
...
...
@@ -457,7 +457,7 @@ KDateTime DBusHandler::convertDateTime(const QString& dateTime, const KDateTime&
*/
KAEvent
::
Flags
DBusHandler
::
convertStartFlags
(
const
KDateTime
&
start
,
unsigned
flags
)
{
KAEvent
::
Flags
kaEventFlags
=
Q_NULLPTR
;
KAEvent
::
Flags
kaEventFlags
=
0
;
if
(
flags
&
REPEAT_AT_LOGIN
)
kaEventFlags
|=
KAEvent
::
REPEAT_AT_LOGIN
;
if
(
flags
&
BEEP
)
kaEventFlags
|=
KAEvent
::
BEEP
;
if
(
flags
&
SPEAK
)
kaEventFlags
|=
KAEvent
::
SPEAK
;
...
...
editdlg.cpp
View file @
fc142a54
...
...
@@ -798,7 +798,7 @@ void EditAlarmDlg::setEvent(KAEvent& event, const QString& text, bool trial)
*/
KAEvent
::
Flags
EditAlarmDlg
::
getAlarmFlags
()
const
{
KAEvent
::
Flags
flags
(
Q_NULLPTR
);
KAEvent
::
Flags
flags
(
0
);
if
(
mShowInKorganizer
&&
mShowInKorganizer
->
isEnabled
()
&&
mShowInKorganizer
->
isChecked
())
flags
|=
KAEvent
::
COPY_KORGANIZER
;
if
(
mRecurrenceEdit
->
repeatType
()
==
RecurrenceEdit
::
AT_LOGIN
)
...
...
editdlg_p.h
View file @
fc142a54
...
...
@@ -36,10 +36,10 @@ class PageFrame : public QFrame
explicit
PageFrame
(
QWidget
*
parent
=
nullptr
)
:
QFrame
(
parent
)
{
}
protected:
v
irtual
void
showEvent
(
QShowEvent
*
)
override
{
emit
shown
();
}
v
oid
showEvent
(
QShowEvent
*
)
override
{
emit
shown
();
}
Q_SIGNALS:
void
shown
();
void
shown
();
};
class
TextEdit
:
public
KTextEdit
...
...
@@ -47,11 +47,11 @@ class TextEdit : public KTextEdit
Q_OBJECT
public:
explicit
TextEdit
(
QWidget
*
parent
);
virtual
QSize
sizeHint
()
const
override
{
return
minimumSizeHint
();
}
virtual
QSize
minimumSizeHint
()
const
override
{
return
minimumSize
();
}
QSize
sizeHint
()
const
override
{
return
minimumSizeHint
();
}
QSize
minimumSizeHint
()
const
override
{
return
minimumSize
();
}
protected:
v
irtual
void
dragEnterEvent
(
QDragEnterEvent
*
)
override
;
v
oid
dragEnterEvent
(
QDragEnterEvent
*
)
override
;
};
class
CommandEdit
:
public
QWidget
...
...
@@ -65,8 +65,8 @@ class CommandEdit : public QWidget
QString
text
(
EditAlarmDlg
*
,
bool
showErrorMessage
)
const
;
void
setText
(
const
AlarmText
&
);
void
setReadOnly
(
bool
);
virtual
QSize
minimumSizeHint
()
const
override
;
virtual
QSize
sizeHint
()
const
override
{
return
minimumSizeHint
();
}
QSize
minimumSizeHint
()
const
override
;
QSize
sizeHint
()
const
override
{
return
minimumSizeHint
();
}
Q_SIGNALS:
void
scriptToggled
(
bool
);
...
...
functions.h
View file @
fc142a54
...
...
@@ -108,7 +108,7 @@ bool showFileErrMessage(const QString& filename, FileErr, FileErr
QString
pathOrUrl
(
const
QString
&
url
);
QString
browseFile
(
const
QString
&
caption
,
QString
&
defaultDir
,
const
QString
&
initialFile
=
QString
(),
const
QString
&
filter
=
QString
(),
KFile
::
Modes
mode
=
Q_NULLPTR
,
QWidget
*
parent
=
Q_NULLPTR
);
const
QString
&
filter
=
QString
(),
KFile
::
Modes
mode
=
0
,
QWidget
*
parent
=
Q_NULLPTR
);
bool
editNewAlarm
(
const
QString
&
templateName
,
QWidget
*
parent
=
Q_NULLPTR
);
void
editNewAlarm
(
EditAlarmDlg
::
Type
,
QWidget
*
parent
=
Q_NULLPTR
);
void
editNewAlarm
(
KAEvent
::
SubAction
,
QWidget
*
parent
=
Q_NULLPTR
,
const
AlarmText
*
=
Q_NULLPTR
);
...
...
kamail.cpp
View file @
fc142a54
...
...
@@ -687,7 +687,7 @@ QByteArray autoDetectCharset(const QString& text)
}
}
}
return
Q
_NULLPTR
;
return
Q
ByteArray
()
;
}
//-----------------------------------------------------------------------------
...
...
lib/label.h
View file @
fc142a54
...
...
@@ -49,13 +49,13 @@ class Label : public QLabel
* @param parent The parent object of this widget.
* @param f Flags. See QWidget constructor for details.
*/
explicit
Label
(
QWidget
*
parent
,
Qt
::
WindowFlags
f
=
Q_NULLPTR
);
explicit
Label
(
QWidget
*
parent
,
Qt
::
WindowFlags
f
=
0
);
/** Constructs a label that displays @p text.
* @param text Text string to display.
* @param parent The parent object of this widget.
* @param f Flags. See QWidget constructor for details.
*/
Label
(
const
QString
&
text
,
QWidget
*
parent
,
Qt
::
WindowFlags
f
=
Q_NULLPTR
);
Label
(
const
QString
&
text
,
QWidget
*
parent
,
Qt
::
WindowFlags
f
=
0
);
/** Constructs a label, with a buddy widget, that displays @p text.
* @param buddy Buddy widget which receives the keyboard focus when the
* label's accelerator key is pressed. If @p buddy is a radio
...
...
@@ -65,7 +65,7 @@ class Label : public QLabel
* @param parent The parent object of this widget.
* @param f Flags. See QWidget constructor for details.
*/
Label
(
QWidget
*
buddy
,
const
QString
&
text
,
QWidget
*
parent
,
Qt
::
WindowFlags
f
=
Q_NULLPTR
);
Label
(
QWidget
*
buddy
,
const
QString
&
text
,
QWidget
*
parent
,
Qt
::
WindowFlags
f
=
0
);
/** Sets the label's buddy widget which receives the keyboard focus when the
* label's accelerator key is pressed. If @p buddy is a radio button,
* @p buddy is in addition selected when the accelerator key is pressed.
...
...
lib/spinbox2_p.h
View file @
fc142a54
...
...
@@ -48,7 +48,7 @@ class ExtraSpinBox : public SpinBox
void
painted
();
protected:
v
irtual
void
paintEvent
(
QPaintEvent
*
)
override
;
v
oid
paintEvent
(
QPaintEvent
*
)
override
;
private:
int
mInhibitPaintSignal
;
...
...
@@ -75,14 +75,14 @@ class SpinMirror : public QGraphicsView
void
setButtonPos
(
const
QPoint
&
);
protected:
virtual
bool
event
(
QEvent
*
)
override
;
v
irtual
void
resizeEvent
(
QResizeEvent
*
)
override
;
bool
event
(
QEvent
*
)
override
;
v
oid
resizeEvent
(
QResizeEvent
*
)
override
;
virtual
void
styleChange
(
QStyle
&
);
v
irtual
void
mousePressEvent
(
QMouseEvent
*
e
)
override
{
mouseEvent
(
e
);
}
v
irtual
void
mouseReleaseEvent
(
QMouseEvent
*
e
)
override
{
mouseEvent
(
e
);
}
v
irtual
void
mouseMoveEvent
(
QMouseEvent
*
e
)
override
{
mouseEvent
(
e
);
}
v
irtual
void
mouseDoubleClickEvent
(
QMouseEvent
*
e
)
override
{
mouseEvent
(
e
);
}
v
irtual
void
wheelEvent
(
QWheelEvent
*
)
override
;
v
oid
mousePressEvent
(
QMouseEvent
*
e
)
override
{
mouseEvent
(
e
);
}
v
oid
mouseReleaseEvent
(
QMouseEvent
*
e
)
override
{
mouseEvent
(
e
);
}
v
oid
mouseMoveEvent
(
QMouseEvent
*
e
)
override
{
mouseEvent
(
e
);
}
v
oid
mouseDoubleClickEvent
(
QMouseEvent
*
e
)
override
{
mouseEvent
(
e
);
}
v
oid
wheelEvent
(
QWheelEvent
*
)
override
;
private:
void
mouseEvent
(
QMouseEvent
*
);
...
...
main.cpp
View file @
fc142a54
...
...
@@ -43,7 +43,7 @@ int main(int argc, char* argv[])
migrate
.
migrate
();
KLocalizedString
::
setApplicationDomain
(
"kalarm"
);
K4AboutData
aboutData
(
PROGRAM_NAME
,
Q_NULLPTR
,
ki18n
(
"KAlarm"
),
KALARM_VERSION
,
K4AboutData
aboutData
(
PROGRAM_NAME
,
0
,
ki18n
(
"KAlarm"
),
KALARM_VERSION
,
ki18n
(
"Personal alarm message, command and email scheduler for KDE"
),
K4AboutData
::
License_GPL
,
ki18n
(
"Copyright 2001-2014, David Jarvie"
),
KLocalizedString
(),
"http://www.astrojar.org.uk/kalarm"
);
...
...
prefdlg.cpp
View file @
fc142a54
...
...
@@ -1417,7 +1417,7 @@ void EditPrefTab::restore(bool, bool allTabs)
case
TimePeriod
::
Minutes
:
index
=
0
;
break
;
}
mReminderUnits
->
setCurrentIndex
(
index
);
KAEvent
::
ExtraActionOptions
opts
(
Q_NULLPTR
);
KAEvent
::
ExtraActionOptions
opts
(
0
);
if
(
Preferences
::
defaultExecPreActionOnDeferral
())
opts
|=
KAEvent
::
ExecPreActOnDeferral
;
if
(
Preferences
::
defaultCancelOnPreActionError
())
...
...
recurrenceedit.cpp
View file @
fc142a54
...
...
@@ -278,7 +278,7 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent)
"<para><note>This applies to the main recurrence only. It does not limit any sub-repetition which will occur regardless after the last main recurrence.</note></para>"
));
mRangeButtonGroup
->
addButton
(
mEndDateButton
);
mEndDateEdit
=
new
KDateComboBox
(
mRangeButtonBox
);
mEndDateEdit
->
setOptions
(
mReadOnly
?
KDateComboBox
::
Options
(
Q_NULLPTR
)
:
KDateComboBox
::
EditDate
|
KDateComboBox
::
SelectDate
|
KDateComboBox
::
DatePicker
);
mEndDateEdit
->
setOptions
(
mReadOnly
?
KDateComboBox
::
Options
(
0
)
:
KDateComboBox
::
EditDate
|
KDateComboBox
::
SelectDate
|
KDateComboBox
::
DatePicker
);
static
const
QString
tzText
=
i18nc
(
"@info"
,
"This uses the same time zone as the start time."
);
mEndDateEdit
->
setWhatsThis
(
xi18nc
(
"@info:whatsthis"
,
"<para>Enter the last date to repeat the alarm.</para><para>%1</para>"
,
tzText
));
...
...
@@ -338,7 +338,7 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent)
vlayout
->
setMargin
(
0
);
hlayout
->
addLayout
(
vlayout
);
mExceptionDateEdit
=
new
KDateComboBox
(
mExceptionGroup
);
mExceptionDateEdit
->
setOptions
(
mReadOnly
?
KDateComboBox
::
Options
(
Q_NULLPTR
)
:
KDateComboBox
::
EditDate
|
KDateComboBox
::
SelectDate
|
KDateComboBox
::
DatePicker
);
mExceptionDateEdit
->
setOptions
(
mReadOnly
?
KDateComboBox
::
Options
(
0
)
:
KDateComboBox
::
EditDate
|
KDateComboBox
::
SelectDate
|
KDateComboBox
::
DatePicker
);
mExceptionDateEdit
->
setDate
(
KDateTime
::
currentLocalDate
());
mExceptionDateEdit
->
setWhatsThis
(
i18nc
(
"@info:whatsthis"
,
"Enter a date to insert in the exceptions list. "
...
...
recurrenceedit_p.h
View file @
fc142a54
...
...
@@ -98,9 +98,9 @@ class DayWeekRule : public Rule
void
setDays
(
bool
);
void
setDays
(
const
QBitArray
&
days
);
void
setDay
(
int
dayOfWeek
);
virtual
QWidget
*
validate
(
QString
&
errorMessage
)
override
;
v
irtual
void
saveState
()
override
;
virtual
bool
stateChanged
()
const
override
;
QWidget
*
validate
(
QString
&
errorMessage
)
override
;
v
oid
saveState
()
override
;
bool
stateChanged
()
const
override
;
private:
CheckBox
*
mDayBox
[
7
];
...
...
@@ -141,8 +141,8 @@ class MonthYearRule : public Rule
void
setDate
(
int
dayOfMonth
);
void
setPosition
(
int
week
,
int
dayOfWeek
);
void
setDefaultValues
(
int
dayOfMonth
,
int
dayOfWeek
);
v
irtual
void
saveState
()
override
;
virtual
bool
stateChanged
()
const
override
;
v
oid
saveState
()
override
;
bool
stateChanged
()
const
override
;
Q_SIGNALS:
void
typeChanged
(
DayPosType
);
...
...
@@ -193,15 +193,15 @@ class YearlyRule : public MonthYearRule
void
setDefaultValues
(
int
dayOfMonth
,
int
dayOfWeek
,
int
month
);
KARecurrence
::
Feb29Type
feb29Type
()
const
;
void
setFeb29Type
(
KARecurrence
::
Feb29Type
);
virtual
QWidget
*
validate
(
QString
&
errorMessage
)
override
;
v
irtual
void
saveState
()
override
;
virtual
bool
stateChanged
()
const
override
;
QWidget
*
validate
(
QString
&
errorMessage
)
override
;
v
oid
saveState
()
override
;
bool
stateChanged
()
const
override
;
protected:
v
irtual
void
daySelected
(
int
day
)
override
;
v
oid
daySelected
(
int
day
)
override
;
protected
Q_SLOTS
:
v
irtual
void
clicked
(
QAbstractButton
*
)
override
;
v
oid
clicked
(
QAbstractButton
*
)
override
;
private
Q_SLOTS
:
void
enableFeb29
();
...
...
resourceselector.cpp
View file @
fc142a54
...
...
@@ -611,7 +611,7 @@ void ResourceSelector::showInfo()
name
,
id
,
calType
,
alarmTypeString
,
storage
,
location
,
perms
,
enabled
,
std
);
// Display the collection information. Because the user requested
// the information, don't raise a KNotify event.
KAMessageBox
::
information
(
this
,
text
,
QString
(),
QString
(),
Q_NULLPTR
);
KAMessageBox
::
information
(
this
,
text
,
QString
(),
QString
(),
0
);
}
}
...
...
specialactions.cpp
View file @
fc142a54
...
...
@@ -48,7 +48,7 @@
SpecialActionsButton
::
SpecialActionsButton
(
bool
enableCheckboxes
,
QWidget
*
parent
)
:
QPushButton
(
i18nc
(
"@action:button"
,
"Special Actions..."
),
parent
),
mOptions
(
Q_NULLPTR
),
mOptions
(
0
),
mEnableCheckboxes
(
enableCheckboxes
),
mReadOnly
(
false
)
{
...
...
@@ -248,7 +248,7 @@ QString SpecialActions::postAction() const
KAEvent
::
ExtraActionOptions
SpecialActions
::
options
()
const
{
KAEvent
::
ExtraActionOptions
opts
=
Q_NULLPTR
;
KAEvent
::
ExtraActionOptions
opts
=
0
;
if
(
mExecOnDeferral
->
isChecked
())
opts
|=
KAEvent
::
ExecPreActOnDeferral
;
if
(
mCancelOnError
->
isChecked
())
opts
|=
KAEvent
::
CancelOnPreActError
;
if
(
mDontShowError
->
isChecked
())
opts
|=
KAEvent
::
DontShowPreActError
;
...
...
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