Commit b95c15a3 authored by Laurent Montel's avatar Laurent Montel 😁

USe Q_NULLPTR

parent 3f0c10bc
......@@ -32,7 +32,7 @@ class AlarmListView : public EventListView
{
Q_OBJECT
public:
explicit AlarmListView(const QByteArray& configGroup, QWidget* parent = 0);
explicit AlarmListView(const QByteArray& configGroup, QWidget* parent = Q_NULLPTR);
void setModel(QAbstractItemModel*) Q_DECL_OVERRIDE;
void selectTimeColumns(bool time, bool timeTo);
......
......@@ -46,8 +46,8 @@ class AlarmTimeWidget : public QFrame
DEFER_TIME = 0x02, // "Defer to ..."
DEFER_ANY_TIME = DEFER_TIME | 0x04 // "Defer to ..." with 'any time' option
};
AlarmTimeWidget(const QString& groupBoxTitle, Mode, QWidget* parent = 0);
explicit AlarmTimeWidget(Mode, QWidget* parent = 0);
AlarmTimeWidget(const QString& groupBoxTitle, Mode, QWidget* parent = Q_NULLPTR);
explicit AlarmTimeWidget(Mode, QWidget* parent = Q_NULLPTR);
KDateTime getDateTime(int* minsFromNow = 0, bool checkExpired = true, bool showErrorMessage = true, QWidget** errorWidget = 0) const;
void setDateTime(const DateTime&);
void setMinDateTimeIsCurrent();
......
......@@ -44,7 +44,7 @@ class BirthdayDlg : public KDialog
{
Q_OBJECT
public:
explicit BirthdayDlg(QWidget* parent = 0);
explicit BirthdayDlg(QWidget* parent = Q_NULLPTR);
QVector<KAEvent> events() const;
protected Q_SLOTS:
......@@ -78,8 +78,8 @@ class BLineEdit : public QLineEdit
{
Q_OBJECT
public:
explicit BLineEdit(QWidget* parent = 0) : QLineEdit(parent) { }
explicit BLineEdit(const QString& text, QWidget* parent = 0) : QLineEdit(text, parent) { }
explicit BLineEdit(QWidget* parent = Q_NULLPTR) : QLineEdit(parent) { }
explicit BLineEdit(const QString& text, QWidget* parent = Q_NULLPTR) : QLineEdit(text, parent) { }
Q_SIGNALS:
void focusLost();
......
......@@ -141,7 +141,7 @@ class CollectionView : public QListView
{
Q_OBJECT
public:
explicit CollectionView(CollectionFilterCheckListModel*, QWidget* parent = 0);
explicit CollectionView(CollectionFilterCheckListModel*, QWidget* parent = Q_NULLPTR);
CollectionFilterCheckListModel* collectionModel() const { return static_cast<CollectionFilterCheckListModel*>(model()); }
Akonadi::Collection collection(int row) const;
Akonadi::Collection collection(const QModelIndex&) const;
......
......@@ -37,7 +37,7 @@ class DeferAlarmDlg : public KDialog
{
Q_OBJECT
public:
DeferAlarmDlg(const DateTime& initialDT, bool anyTimeOption, bool cancelButton, QWidget* parent = 0);
DeferAlarmDlg(const DateTime& initialDT, bool anyTimeOption, bool cancelButton, QWidget* parent = Q_NULLPTR);
void setLimit(const DateTime&);
DateTime setLimit(const KAEvent& event);
const DateTime& getDateTime() const { return mAlarmDateTime; }
......
......@@ -63,9 +63,9 @@ class EditAlarmDlg : public KDialog
RES_IGNORE // don't get resource
};
static EditAlarmDlg* create(bool Template, Type, QWidget* parent = 0,
static EditAlarmDlg* create(bool Template, Type, QWidget* parent = Q_NULLPTR,
GetResourceType = RES_PROMPT);
static EditAlarmDlg* create(bool Template, const KAEvent*, bool newAlarm, QWidget* parent = 0,
static EditAlarmDlg* create(bool Template, const KAEvent*, bool newAlarm, QWidget* parent = Q_NULLPTR,
GetResourceType = RES_PROMPT, bool readOnly = false);
virtual ~EditAlarmDlg();
bool getEvent(KAEvent&, Akonadi::Collection&);
......@@ -85,9 +85,9 @@ class EditAlarmDlg : public KDialog
static QString i18n_chk_ShowInKOrganizer(); // text of 'Show in KOrganizer' checkbox
protected:
EditAlarmDlg(bool Template, KAEvent::SubAction, QWidget* parent = 0,
EditAlarmDlg(bool Template, KAEvent::SubAction, QWidget* parent = Q_NULLPTR,
GetResourceType = RES_PROMPT);
EditAlarmDlg(bool Template, const KAEvent*, bool newAlarm, QWidget* parent = 0,
EditAlarmDlg(bool Template, const KAEvent*, bool newAlarm, QWidget* parent = Q_NULLPTR,
GetResourceType = RES_PROMPT, bool readOnly = false);
void init(const KAEvent* event);
void resizeEvent(QResizeEvent*) Q_DECL_OVERRIDE;
......
......@@ -53,8 +53,8 @@ class EditDisplayAlarmDlg : public EditAlarmDlg
{
Q_OBJECT
public:
explicit EditDisplayAlarmDlg(bool Template, QWidget* parent = 0, GetResourceType = RES_PROMPT);
EditDisplayAlarmDlg(bool Template, const KAEvent*, bool newAlarm, QWidget* parent = 0,
explicit EditDisplayAlarmDlg(bool Template, QWidget* parent = Q_NULLPTR, GetResourceType = RES_PROMPT);
EditDisplayAlarmDlg(bool Template, const KAEvent*, bool newAlarm, QWidget* parent = Q_NULLPTR,
GetResourceType = RES_PROMPT, bool readOnly = false);
// Methods to initialise values in the New Alarm dialogue.
......@@ -143,8 +143,8 @@ class EditCommandAlarmDlg : public EditAlarmDlg
{
Q_OBJECT
public:
explicit EditCommandAlarmDlg(bool Template, QWidget* parent = 0, GetResourceType = RES_PROMPT);
EditCommandAlarmDlg(bool Template, const KAEvent*, bool newAlarm, QWidget* parent = 0,
explicit EditCommandAlarmDlg(bool Template, QWidget* parent = Q_NULLPTR, GetResourceType = RES_PROMPT);
EditCommandAlarmDlg(bool Template, const KAEvent*, bool newAlarm, QWidget* parent = Q_NULLPTR,
GetResourceType = RES_PROMPT, bool readOnly = false);
// Methods to initialise values in the New Alarm dialogue.
......@@ -195,8 +195,8 @@ class EditEmailAlarmDlg : public EditAlarmDlg
{
Q_OBJECT
public:
explicit EditEmailAlarmDlg(bool Template, QWidget* parent = 0, GetResourceType = RES_PROMPT);
EditEmailAlarmDlg(bool Template, const KAEvent*, bool newAlarm, QWidget* parent = 0,
explicit EditEmailAlarmDlg(bool Template, QWidget* parent = Q_NULLPTR, GetResourceType = RES_PROMPT);
EditEmailAlarmDlg(bool Template, const KAEvent*, bool newAlarm, QWidget* parent = Q_NULLPTR,
GetResourceType = RES_PROMPT, bool readOnly = false);
// Methods to initialise values in the New Alarm dialogue.
......@@ -261,8 +261,8 @@ class EditAudioAlarmDlg : public EditAlarmDlg
{
Q_OBJECT
public:
explicit EditAudioAlarmDlg(bool Template, QWidget* parent = 0, GetResourceType = RES_PROMPT);
EditAudioAlarmDlg(bool Template, const KAEvent*, bool newAlarm, QWidget* parent = 0,
explicit EditAudioAlarmDlg(bool Template, QWidget* parent = Q_NULLPTR, GetResourceType = RES_PROMPT);
EditAudioAlarmDlg(bool Template, const KAEvent*, bool newAlarm, QWidget* parent = Q_NULLPTR,
GetResourceType = RES_PROMPT, bool readOnly = false);
// Methods to initialise values in the New Alarm dialogue.
......
......@@ -32,7 +32,7 @@ class EmailIdCombo : public KIdentityManagement::IdentityCombo
{
Q_OBJECT
public:
explicit EmailIdCombo(KIdentityManagement::IdentityManager*, QWidget* parent = 0);
explicit EmailIdCombo(KIdentityManagement::IdentityManager*, QWidget* parent = Q_NULLPTR);
void setReadOnly(bool ro) { mReadOnly = ro; }
protected:
......
......@@ -34,7 +34,7 @@ class EventListView : public QTreeView
{
Q_OBJECT
public:
explicit EventListView(QWidget* parent = 0);
explicit EventListView(QWidget* parent = Q_NULLPTR);
ItemListModel* itemModel() const { return static_cast<ItemListModel*>(model()); }
KAEvent event(int row) const;
KAEvent event(const QModelIndex&) const;
......
......@@ -34,7 +34,7 @@ class FontColourChooser : public QWidget
{
Q_OBJECT
public:
explicit FontColourChooser(QWidget* parent = 0,
explicit FontColourChooser(QWidget* parent = Q_NULLPTR,
const QStringList& fontList = QStringList(),
const QString& frameLabel = i18n("Requested font"),
bool fg = true, bool defaultFont = false, int visibleListSize = 8);
......
......@@ -33,7 +33,7 @@ class FontColourButton : public PushButton
{
Q_OBJECT
public:
explicit FontColourButton(QWidget* parent = 0);
explicit FontColourButton(QWidget* parent = Q_NULLPTR);
void setDefaultFont();
void setFont(const QFont&);
void setBgColour(const QColor& c) { mBgColour = c; }
......@@ -67,7 +67,7 @@ class FontColourDlg : public KDialog
Q_OBJECT
public:
FontColourDlg(const QColor& bg, const QColor& fg, const QFont&, bool defaultFont,
const QString& caption, QWidget* parent = 0);
const QString& caption, QWidget* parent = Q_NULLPTR);
bool defaultFont() const { return mDefaultFont; }
QFont font() const { return mFont; }
QColor bgColour() const { return mBgColour; }
......
......@@ -108,18 +108,18 @@ 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 = 0, QWidget* parent = 0);
bool editNewAlarm(const QString& templateName, QWidget* parent = 0);
void editNewAlarm(EditAlarmDlg::Type, QWidget* parent = 0);
void editNewAlarm(KAEvent::SubAction, QWidget* parent = 0, const AlarmText* = 0);
void editNewAlarm(const KAEvent* preset, QWidget* parent = 0);
void editAlarm(KAEvent*, QWidget* parent = 0);
bool editAlarmById(const EventId& eventID, QWidget* parent = 0);
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* = 0);
void editNewAlarm(const KAEvent* preset, QWidget* parent = Q_NULLPTR);
void editAlarm(KAEvent*, QWidget* parent = Q_NULLPTR);
bool editAlarmById(const EventId& eventID, QWidget* parent = Q_NULLPTR);
void updateEditedAlarm(EditAlarmDlg*, KAEvent&, Akonadi::Collection&);
void viewAlarm(const KAEvent*, QWidget* parent = 0);
void editNewTemplate(EditAlarmDlg::Type, QWidget* parent = 0);
void editNewTemplate(const KAEvent* preset, QWidget* parent = 0);
void editTemplate(KAEvent*, QWidget* parent = 0);
void viewAlarm(const KAEvent*, QWidget* parent = Q_NULLPTR);
void editNewTemplate(EditAlarmDlg::Type, QWidget* parent = Q_NULLPTR);
void editNewTemplate(const KAEvent* preset, QWidget* parent = Q_NULLPTR);
void editTemplate(KAEvent*, QWidget* parent = Q_NULLPTR);
void execNewAlarmDlg(EditAlarmDlg*);
/** Create a "New From Template" QAction */
KToggleAction* createAlarmEnableAction(QObject* parent);
......
......@@ -41,7 +41,7 @@ class ColourButton : public KColorButton
/** Constructor.
* @param parent The parent object of this widget.
*/
explicit ColourButton(QWidget* parent = 0);
explicit ColourButton(QWidget* parent = Q_NULLPTR);
/** Returns the selected colour. */
QColor colour() const { return color(); }
/** Sets the selected colour to @p c. */
......
......@@ -43,7 +43,7 @@ class ComboBox : public KComboBox
/** Constructor.
* @param parent The parent object of this widget.
*/
explicit ComboBox(QWidget* parent = 0);
explicit ComboBox(QWidget* parent = Q_NULLPTR);
/** Returns true if the widget is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the combo box is read-only for the user. If read-only,
......
......@@ -33,7 +33,7 @@ class FileDialog : public KFileDialog
QWidget* parent, QWidget* widget = 0)
: KFileDialog(startDir, filter, parent, widget) {}
static QString getSaveFileName(const KUrl& dir = KUrl(), const QString& filter = QString(),
QWidget* parent = 0, const QString& caption = QString(), bool* append = 0);
QWidget* parent = Q_NULLPTR, const QString& caption = QString(), bool* append = 0);
private Q_SLOTS:
void appendToggled(bool);
......
......@@ -44,12 +44,12 @@ class GroupBox : public QGroupBox
/** Constructor.
* @param parent The parent object of this widget.
*/
explicit GroupBox(QWidget* parent = 0);
explicit GroupBox(QWidget* parent = Q_NULLPTR);
/** Constructor for a group box with a title text.
* @param title The title text.
* @param parent The parent object of this widget.
*/
explicit GroupBox(const QString& title, QWidget* parent = 0);
explicit GroupBox(const QString& title, QWidget* parent = Q_NULLPTR);
/** Sets whether the group box is read-only for the user.
* @param readOnly True to set the widget read-only, false to enable its action.
*/
......
......@@ -37,7 +37,7 @@ class ItemBox : public KHBox
/** Constructor.
* @param parent The parent object of this widget.
*/
explicit ItemBox(QWidget* parent = 0);
explicit ItemBox(QWidget* parent = Q_NULLPTR);
void leftAlign();
private:
......
......@@ -66,11 +66,11 @@ class LineEdit : public KLineEdit
* @param type The content type for the line edit.
* @param parent The parent object of this widget.
*/
explicit LineEdit(Type type, QWidget* parent = 0);
explicit LineEdit(Type type, QWidget* parent = Q_NULLPTR);
/** Constructs a line edit whose content type is Text.
* @param parent The parent object of this widget.
*/
explicit LineEdit(QWidget* parent = 0);
explicit LineEdit(QWidget* parent = Q_NULLPTR);
/** Return the entered text.
* If the type is Url, tilde expansion is performed.
*/
......
......@@ -44,12 +44,12 @@ class Slider : public QSlider
/** Constructor.
* @param parent The parent object of this widget.
*/
explicit Slider(QWidget* parent = 0);
explicit Slider(QWidget* parent = Q_NULLPTR);
/** Constructor.
* @param orient The orientation of the slider, either Qt::Horizonal or Qt::Vertical.
* @param parent The parent object of this widget.
*/
explicit Slider(Qt::Orientation orient, QWidget* parent = 0);
explicit Slider(Qt::Orientation orient, QWidget* parent = Q_NULLPTR);
/** Constructor.
* @param minValue The minimum value which the slider can have.
* @param maxValue The maximum value which the slider can have.
......@@ -58,7 +58,7 @@ class Slider : public QSlider
* @param parent The parent object of this widget.
*/
Slider(int minValue, int maxValue, int pageStep, Qt::Orientation orient,
QWidget* parent = 0);
QWidget* parent = Q_NULLPTR);
/** Returns true if the slider is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the slider is read-only for the user.
......
......@@ -48,13 +48,13 @@ class SpinBox : public QSpinBox
/** Constructor.
* @param parent The parent object of this widget.
*/
explicit SpinBox(QWidget* parent = 0);
explicit SpinBox(QWidget* parent = Q_NULLPTR);
/** Constructor.
* @param minValue The minimum value which the spin box can have.
* @param maxValue The maximum value which the spin box can have.
* @param parent The parent object of this widget.
*/
SpinBox(int minValue, int maxValue, QWidget* parent = 0);
SpinBox(int minValue, int maxValue, QWidget* parent = Q_NULLPTR);
/** Returns true if the widget is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the spin box can be changed by the user.
......
......@@ -61,14 +61,14 @@ class SpinBox2 : public QFrame
/** Constructor.
* @param parent The parent object of this widget.
*/
explicit SpinBox2(QWidget* parent = 0);
explicit SpinBox2(QWidget* parent = Q_NULLPTR);
/** Constructor.
* @param minValue The minimum value which the spin box can have.
* @param maxValue The maximum value which the spin box can have.
* @param pageStep The (unshifted) step interval for the left-hand spin buttons.
* @param parent The parent object of this widget.
*/
SpinBox2(int minValue, int maxValue, int pageStep = 1, QWidget* parent = 0);
SpinBox2(int minValue, int maxValue, int pageStep = 1, QWidget* parent = Q_NULLPTR);
/** Sets whether the spin box can be changed by the user.
* @param readOnly True to set the widget read-only, false to set it read-write.
*/
......
......@@ -41,7 +41,7 @@ class StackedWidgetT : public T
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
explicit StackedWidgetT(StackedGroupT<T>* group, QWidget* parent = 0)
explicit StackedWidgetT(StackedGroupT<T>* group, QWidget* parent = Q_NULLPTR)
: T(parent),
mGroup(group)
{
......@@ -103,7 +103,7 @@ class StackedScrollGroup;
class StackedScrollWidget : public StackedWidgetT<QScrollArea>
{
public:
explicit StackedScrollWidget(StackedScrollGroup* group, QWidget* parent = 0);
explicit StackedScrollWidget(StackedScrollGroup* group, QWidget* parent = Q_NULLPTR);
QWidget* widget() const { return viewport()->findChild<QWidget*>(); }
};
......
......@@ -52,7 +52,7 @@ class TimeEdit : public QWidget
/** Constructor.
* @param parent The parent object of this widget.
*/
explicit TimeEdit(QWidget* parent = 0);
explicit TimeEdit(QWidget* parent = Q_NULLPTR);
/** Returns true if the widget is read only. */
bool isReadOnly() const { return mReadOnly; }
/** Sets whether the widget is read-only for the user. If read-only,
......
......@@ -50,13 +50,13 @@ class TimeSpinBox : public SpinBox2
* False for entry of 12-hour clock times (range 12:00 to 11:59).
* @param parent The parent object of this widget.
*/
explicit TimeSpinBox(bool use24hour, QWidget* parent = 0);
explicit TimeSpinBox(bool use24hour, QWidget* parent = Q_NULLPTR);
/** Constructor for a non-wrapping time spin box which can be used to enter a length of time.
* @param minMinute The minimum value which the spin box can hold, in minutes.
* @param maxMinute The maximum value which the spin box can hold, in minutes.
* @param parent The parent object of this widget.
*/
TimeSpinBox(int minMinute, int maxMinute, QWidget* parent = 0);
TimeSpinBox(int minMinute, int maxMinute, QWidget* parent = Q_NULLPTR);
/** Returns true if the spin box holds a valid value.
* An invalid value is displayed as asterisks.
*/
......
......@@ -41,7 +41,7 @@ class TimeZoneCombo : public ComboBox
/** Constructor.
* @param parent The parent object of this widget.
*/
explicit TimeZoneCombo(QWidget* parent = 0);
explicit TimeZoneCombo(QWidget* parent = Q_NULLPTR);
/** Returns the currently selected time zone, or null if none. */
KTimeZone timeZone() const;
/** Selects the specified time zone. */
......
......@@ -35,7 +35,7 @@ class MainWindowBase : public KXmlGuiWindow
Q_OBJECT
public:
explicit MainWindowBase(QWidget* parent = 0, Qt::WindowFlags f = Qt::Window);
explicit MainWindowBase(QWidget* parent = Q_NULLPTR, Qt::WindowFlags f = Qt::Window);
};
#endif // MAINWINDOWBASE_H
......
......@@ -63,7 +63,7 @@ class RecurrenceEdit : public QFrame
// Don't alter the order of these recurrence types
enum RepeatType { INVALID_RECUR = -1, NO_RECUR, AT_LOGIN, SUBDAILY, DAILY, WEEKLY, MONTHLY, ANNUAL };
explicit RecurrenceEdit(bool readOnly, QWidget* parent = 0);
explicit RecurrenceEdit(bool readOnly, QWidget* parent = Q_NULLPTR);
virtual ~RecurrenceEdit() { }
/** Set widgets to default values */
......
......@@ -75,7 +75,7 @@ class RepetitionDlg : public KDialog
{
Q_OBJECT
public:
RepetitionDlg(const QString& caption, bool readOnly, QWidget* parent = 0);
RepetitionDlg(const QString& caption, bool readOnly, QWidget* parent = Q_NULLPTR);
void setReadOnly(bool);
void set(const Repetition&, bool dateOnly = false, int maxDuration = -1);
Repetition repetition() const; // get the repetition interval and count
......
......@@ -57,7 +57,7 @@ class ResourceSelector : public QFrame
{
Q_OBJECT
public:
explicit ResourceSelector(QWidget* parent = 0);
explicit ResourceSelector(QWidget* parent = Q_NULLPTR);
void initActions(KActionCollection*);
void setContextMenu(QMenu*);
......
......@@ -37,7 +37,7 @@ class SpecialActionsButton : public QPushButton
{
Q_OBJECT
public:
explicit SpecialActionsButton(bool enableCheckboxes, QWidget* parent = 0);
explicit SpecialActionsButton(bool enableCheckboxes, QWidget* parent = Q_NULLPTR);
void setActions(const QString& pre, const QString& post, KAEvent::ExtraActionOptions);
const QString& preAction() const { return mPreAction; }
const QString& postAction() const { return mPostAction; }
......@@ -66,7 +66,7 @@ class SpecialActions : public QWidget
{
Q_OBJECT
public:
explicit SpecialActions(bool enableCheckboxes, QWidget* parent = 0);
explicit SpecialActions(bool enableCheckboxes, QWidget* parent = Q_NULLPTR);
void setActions(const QString& pre, const QString& post, KAEvent::ExtraActionOptions);
QString preAction() const;
QString postAction() const;
......@@ -95,7 +95,7 @@ class SpecialActionsDlg : public QDialog
public:
SpecialActionsDlg(const QString& preAction, const QString& postAction,
KAEvent::ExtraActionOptions, bool enableCheckboxes,
QWidget* parent = 0);
QWidget* parent = Q_NULLPTR);
QString preAction() const { return mActions->preAction(); }
QString postAction() const { return mActions->postAction(); }
KAEvent::ExtraActionOptions options() const { return mActions->options(); }
......
......@@ -34,7 +34,7 @@ class TemplateDlg : public KDialog
{
Q_OBJECT
public:
static TemplateDlg* create(QWidget* parent = 0);
static TemplateDlg* create(QWidget* parent = Q_NULLPTR);
~TemplateDlg();
Q_SIGNALS:
......
......@@ -30,7 +30,7 @@ class TemplateListView : public EventListView
{
Q_OBJECT
public:
explicit TemplateListView(QWidget* parent = 0);
explicit TemplateListView(QWidget* parent = Q_NULLPTR);
virtual void setModel(QAbstractItemModel*);
};
......
......@@ -35,7 +35,7 @@ class TemplatePickDlg : public QDialog
{
Q_OBJECT
public:
explicit TemplatePickDlg(KAEvent::Actions, QWidget* parent = 0);
explicit TemplatePickDlg(KAEvent::Actions, QWidget* parent = Q_NULLPTR);
KAEvent selectedTemplate() const;
protected:
void resizeEvent(QResizeEvent*) Q_DECL_OVERRIDE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment