aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-20 17:31:18 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-21 12:26:21 +0000
commitf4f5e857447d42738b1b60b5c4184f39df2f1593 (patch)
treecae2e6a223cb48350b9634c0a04b39847ebc4299 /src/templates
parent7cad85c2f0930e4f8531a0508c28abdae0f3e0de (diff)
C++11 keywords
- Q_NULLPTR -> nullptr - Q_DECL_OVERRIDE -> override Change-Id: I8ee65caafd43ab41b6de43835200cac6c8ffa278 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/templates')
-rw-r--r--src/templates/qquickabstractbutton.cpp6
-rw-r--r--src/templates/qquickabstractbutton_p.h24
-rw-r--r--src/templates/qquickapplicationwindow.cpp26
-rw-r--r--src/templates/qquickapplicationwindow_p.h8
-rw-r--r--src/templates/qquickbusyindicator_p.h4
-rw-r--r--src/templates/qquickbutton_p.h4
-rw-r--r--src/templates/qquickbuttongroup.cpp12
-rw-r--r--src/templates/qquickbuttongroup_p.h4
-rw-r--r--src/templates/qquickcheckbox_p.h10
-rw-r--r--src/templates/qquickcombobox.cpp6
-rw-r--r--src/templates/qquickcombobox_p.h26
-rw-r--r--src/templates/qquickcontainer.cpp16
-rw-r--r--src/templates/qquickcontainer_p.h6
-rw-r--r--src/templates/qquickcontainer_p_p.h8
-rw-r--r--src/templates/qquickcontrol.cpp2
-rw-r--r--src/templates/qquickcontrol_p.h20
-rw-r--r--src/templates/qquickcontrol_p_p.h6
-rw-r--r--src/templates/qquickdial.cpp2
-rw-r--r--src/templates/qquickdial_p.h22
-rw-r--r--src/templates/qquickdrawer.cpp4
-rw-r--r--src/templates/qquickdrawer_p.h16
-rw-r--r--src/templates/qquickframe.cpp2
-rw-r--r--src/templates/qquickframe_p.h2
-rw-r--r--src/templates/qquickgroupbox.cpp2
-rw-r--r--src/templates/qquickgroupbox_p.h4
-rw-r--r--src/templates/qquickitemdelegate_p.h4
-rw-r--r--src/templates/qquicklabel.cpp2
-rw-r--r--src/templates/qquicklabel_p.h8
-rw-r--r--src/templates/qquicklabel_p_p.h4
-rw-r--r--src/templates/qquickmenu.cpp20
-rw-r--r--src/templates/qquickmenu_p.h4
-rw-r--r--src/templates/qquickmenu_p_p.h8
-rw-r--r--src/templates/qquickmenuitem_p.h6
-rw-r--r--src/templates/qquickoverlay.cpp4
-rw-r--r--src/templates/qquickoverlay_p.h18
-rw-r--r--src/templates/qquickpage.cpp10
-rw-r--r--src/templates/qquickpage_p.h10
-rw-r--r--src/templates/qquickpageindicator.cpp8
-rw-r--r--src/templates/qquickpageindicator_p.h14
-rw-r--r--src/templates/qquickpane.cpp4
-rw-r--r--src/templates/qquickpane_p.h6
-rw-r--r--src/templates/qquickpopup.cpp16
-rw-r--r--src/templates/qquickpopup_p.h2
-rw-r--r--src/templates/qquickpopup_p_p.h2
-rw-r--r--src/templates/qquickpressandholdhelper.cpp6
-rw-r--r--src/templates/qquickprogressbar.cpp2
-rw-r--r--src/templates/qquickprogressbar_p.h8
-rw-r--r--src/templates/qquickradiobutton_p.h6
-rw-r--r--src/templates/qquickrangeslider.cpp18
-rw-r--r--src/templates/qquickrangeslider_p.h20
-rw-r--r--src/templates/qquickscrollbar.cpp8
-rw-r--r--src/templates/qquickscrollbar_p.h12
-rw-r--r--src/templates/qquickscrollindicator.cpp8
-rw-r--r--src/templates/qquickscrollindicator_p.h4
-rw-r--r--src/templates/qquickslider.cpp2
-rw-r--r--src/templates/qquickslider_p.h22
-rw-r--r--src/templates/qquickspinbox.cpp4
-rw-r--r--src/templates/qquickspinbox_p.h28
-rw-r--r--src/templates/qquickstackview.cpp40
-rw-r--r--src/templates/qquickstackview_p.cpp22
-rw-r--r--src/templates/qquickstackview_p.h10
-rw-r--r--src/templates/qquickstackview_p_p.h6
-rw-r--r--src/templates/qquickswipeview.cpp14
-rw-r--r--src/templates/qquickswipeview_p.h6
-rw-r--r--src/templates/qquickswitch_p.h6
-rw-r--r--src/templates/qquicktabbar.cpp2
-rw-r--r--src/templates/qquicktabbar_p.h16
-rw-r--r--src/templates/qquicktabbutton_p.h6
-rw-r--r--src/templates/qquicktextarea.cpp2
-rw-r--r--src/templates/qquicktextarea_p.h26
-rw-r--r--src/templates/qquicktextarea_p_p.h12
-rw-r--r--src/templates/qquicktextfield.cpp4
-rw-r--r--src/templates/qquicktextfield_p.h26
-rw-r--r--src/templates/qquicktextfield_p_p.h12
-rw-r--r--src/templates/qquicktoolbar_p.h4
-rw-r--r--src/templates/qquicktoolbutton_p.h4
-rw-r--r--src/templates/qquicktumbler.cpp20
-rw-r--r--src/templates/qquicktumbler_p.h10
78 files changed, 394 insertions, 394 deletions
diff --git a/src/templates/qquickabstractbutton.cpp b/src/templates/qquickabstractbutton.cpp
index 9839cc4c..5fde4be1 100644
--- a/src/templates/qquickabstractbutton.cpp
+++ b/src/templates/qquickabstractbutton.cpp
@@ -110,7 +110,7 @@ static const int AUTO_REPEAT_INTERVAL = 100;
QQuickAbstractButtonPrivate::QQuickAbstractButtonPrivate() :
pressed(false), checked(false), checkable(false), highlighted(false), autoExclusive(false), autoRepeat(false),
- delayTimer(0), repeatTimer(0), repeatButton(Qt::NoButton), label(Q_NULLPTR), indicator(Q_NULLPTR), group(Q_NULLPTR)
+ delayTimer(0), repeatTimer(0), repeatButton(Qt::NoButton), label(nullptr), indicator(nullptr), group(nullptr)
{
}
@@ -155,13 +155,13 @@ QQuickAbstractButton *QQuickAbstractButtonPrivate::findCheckedButton() const
// gives the QRadioButton behavior. Notice that tst_radiobutton.qml needs
// to be updated.
if (!autoExclusive /*|| buttons.count() == 1*/)
- return Q_NULLPTR;
+ return nullptr;
for (QQuickAbstractButton *button : buttons) {
if (button->isChecked() && button != q)
return button;
}
- return checked ? const_cast<QQuickAbstractButton *>(q) : Q_NULLPTR;
+ return checked ? const_cast<QQuickAbstractButton *>(q) : nullptr;
}
QList<QQuickAbstractButton *> QQuickAbstractButtonPrivate::findExclusiveButtons() const
diff --git a/src/templates/qquickabstractbutton_p.h b/src/templates/qquickabstractbutton_p.h
index e0296dc0..9c0ba134 100644
--- a/src/templates/qquickabstractbutton_p.h
+++ b/src/templates/qquickabstractbutton_p.h
@@ -69,7 +69,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickAbstractButton : public QQuickControl
Q_PROPERTY(QQuickItem *label READ label WRITE setLabel NOTIFY labelChanged FINAL)
public:
- explicit QQuickAbstractButton(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickAbstractButton(QQuickItem *parent = nullptr);
~QQuickAbstractButton();
QString text() const;
@@ -121,22 +121,22 @@ Q_SIGNALS:
protected:
QQuickAbstractButton(QQuickAbstractButtonPrivate &dd, QQuickItem *parent);
- void focusOutEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
- void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseDoubleClickEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseUngrabEvent() Q_DECL_OVERRIDE;
- void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
+ void focusOutEvent(QFocusEvent *event) override;
+ void keyPressEvent(QKeyEvent *event) override;
+ void keyReleaseEvent(QKeyEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ void mouseDoubleClickEvent(QMouseEvent *event) override;
+ void mouseUngrabEvent() override;
+ void timerEvent(QTimerEvent *event) override;
virtual void checkStateSet();
virtual void nextCheckState();
#ifndef QT_NO_ACCESSIBILITY
- void accessibilityActiveChanged(bool active) Q_DECL_OVERRIDE;
- QAccessible::Role accessibleRole() const Q_DECL_OVERRIDE;
+ void accessibilityActiveChanged(bool active) override;
+ QAccessible::Role accessibleRole() const override;
#endif
private:
diff --git a/src/templates/qquickapplicationwindow.cpp b/src/templates/qquickapplicationwindow.cpp
index 71adf87e..b49f80af 100644
--- a/src/templates/qquickapplicationwindow.cpp
+++ b/src/templates/qquickapplicationwindow.cpp
@@ -91,17 +91,17 @@ class QQuickApplicationWindowPrivate : public QQuickItemChangeListener
public:
QQuickApplicationWindowPrivate()
: complete(false)
- , contentItem(Q_NULLPTR)
- , header(Q_NULLPTR)
- , footer(Q_NULLPTR)
- , overlay(Q_NULLPTR)
- , activeFocusControl(Q_NULLPTR)
+ , contentItem(nullptr)
+ , header(nullptr)
+ , footer(nullptr)
+ , overlay(nullptr)
+ , activeFocusControl(nullptr)
{ }
void relayout();
- void itemImplicitWidthChanged(QQuickItem *item) Q_DECL_OVERRIDE;
- void itemImplicitHeightChanged(QQuickItem *item) Q_DECL_OVERRIDE;
+ void itemImplicitWidthChanged(QQuickItem *item) override;
+ void itemImplicitHeightChanged(QQuickItem *item) override;
void updateFont(const QFont &);
inline void setFont_helper(const QFont &f) {
@@ -465,7 +465,7 @@ class QQuickApplicationWindowAttachedPrivate : public QObjectPrivate
Q_DECLARE_PUBLIC(QQuickApplicationWindowAttached)
public:
- QQuickApplicationWindowAttachedPrivate() : window(Q_NULLPTR) { }
+ QQuickApplicationWindowAttachedPrivate() : window(nullptr) { }
void windowChange(QQuickWindow *wnd);
@@ -541,7 +541,7 @@ QQuickApplicationWindow *QQuickApplicationWindowAttached::window() const
QQuickItem *QQuickApplicationWindowAttached::contentItem() const
{
Q_D(const QQuickApplicationWindowAttached);
- return d->window ? d->window->contentItem() : Q_NULLPTR;
+ return d->window ? d->window->contentItem() : nullptr;
}
/*!
@@ -557,7 +557,7 @@ QQuickItem *QQuickApplicationWindowAttached::contentItem() const
QQuickItem *QQuickApplicationWindowAttached::activeFocusControl() const
{
Q_D(const QQuickApplicationWindowAttached);
- return d->window ? d->window->activeFocusControl() : Q_NULLPTR;
+ return d->window ? d->window->activeFocusControl() : nullptr;
}
/*!
@@ -570,7 +570,7 @@ QQuickItem *QQuickApplicationWindowAttached::activeFocusControl() const
QQuickItem *QQuickApplicationWindowAttached::header() const
{
Q_D(const QQuickApplicationWindowAttached);
- return d->window ? d->window->header() : Q_NULLPTR;
+ return d->window ? d->window->header() : nullptr;
}
/*!
@@ -583,7 +583,7 @@ QQuickItem *QQuickApplicationWindowAttached::header() const
QQuickItem *QQuickApplicationWindowAttached::footer() const
{
Q_D(const QQuickApplicationWindowAttached);
- return d->window ? d->window->footer() : Q_NULLPTR;
+ return d->window ? d->window->footer() : nullptr;
}
/*!
@@ -595,7 +595,7 @@ QQuickItem *QQuickApplicationWindowAttached::footer() const
QQuickOverlay *QQuickApplicationWindowAttached::overlay() const
{
Q_D(const QQuickApplicationWindowAttached);
- return d->window ? d->window->overlay() : Q_NULLPTR;
+ return d->window ? d->window->overlay() : nullptr;
}
QT_END_NAMESPACE
diff --git a/src/templates/qquickapplicationwindow_p.h b/src/templates/qquickapplicationwindow_p.h
index c9e619be..f1410344 100644
--- a/src/templates/qquickapplicationwindow_p.h
+++ b/src/templates/qquickapplicationwindow_p.h
@@ -74,7 +74,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickApplicationWindow : public QQuickWindowQmlImp
Q_CLASSINFO("DefaultProperty", "data")
public:
- explicit QQuickApplicationWindow(QWindow *parent = Q_NULLPTR);
+ explicit QQuickApplicationWindow(QWindow *parent = nullptr);
~QQuickApplicationWindow();
QQuickItem *contentItem() const;
@@ -109,8 +109,8 @@ Q_SIGNALS:
protected:
bool isComponentComplete() const;
- void componentComplete() Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
+ void componentComplete() override;
+ void resizeEvent(QResizeEvent *event) override;
private:
Q_DISABLE_COPY(QQuickApplicationWindow)
@@ -130,7 +130,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickApplicationWindowAttached : public QObject
Q_PROPERTY(QQuickOverlay *overlay READ overlay NOTIFY overlayChanged FINAL)
public:
- explicit QQuickApplicationWindowAttached(QObject *parent = Q_NULLPTR);
+ explicit QQuickApplicationWindowAttached(QObject *parent = nullptr);
QQuickApplicationWindow *window() const;
QQuickItem *contentItem() const;
diff --git a/src/templates/qquickbusyindicator_p.h b/src/templates/qquickbusyindicator_p.h
index 8be19d5c..e5e72044 100644
--- a/src/templates/qquickbusyindicator_p.h
+++ b/src/templates/qquickbusyindicator_p.h
@@ -60,7 +60,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickBusyIndicator : public QQuickControl
Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged FINAL)
public:
- explicit QQuickBusyIndicator(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickBusyIndicator(QQuickItem *parent = nullptr);
bool isRunning() const;
void setRunning(bool running);
@@ -70,7 +70,7 @@ Q_SIGNALS:
protected:
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::Role accessibleRole() const Q_DECL_OVERRIDE;
+ QAccessible::Role accessibleRole() const override;
#endif
private:
diff --git a/src/templates/qquickbutton_p.h b/src/templates/qquickbutton_p.h
index 83d22fb8..12c3667c 100644
--- a/src/templates/qquickbutton_p.h
+++ b/src/templates/qquickbutton_p.h
@@ -57,10 +57,10 @@ class Q_LABSTEMPLATES_EXPORT QQuickButton : public QQuickAbstractButton
Q_OBJECT
public:
- explicit QQuickButton(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickButton(QQuickItem *parent = nullptr);
protected:
- QFont defaultFont() const Q_DECL_OVERRIDE;
+ QFont defaultFont() const override;
};
QT_END_NAMESPACE
diff --git a/src/templates/qquickbuttongroup.cpp b/src/templates/qquickbuttongroup.cpp
index 042b4c38..af975cad 100644
--- a/src/templates/qquickbuttongroup.cpp
+++ b/src/templates/qquickbuttongroup.cpp
@@ -127,7 +127,7 @@ class QQuickButtonGroupPrivate : public QObjectPrivate
Q_DECLARE_PUBLIC(QQuickButtonGroup)
public:
- QQuickButtonGroupPrivate() : checkedButton(Q_NULLPTR) { }
+ QQuickButtonGroupPrivate() : checkedButton(nullptr) { }
void clear();
void updateCurrent();
@@ -144,7 +144,7 @@ public:
void QQuickButtonGroupPrivate::clear()
{
for (QQuickAbstractButton *button : qAsConst(buttons)) {
- QQuickAbstractButtonPrivate::get(button)->group = Q_NULLPTR;
+ QQuickAbstractButtonPrivate::get(button)->group = nullptr;
QObjectPrivate::disconnect(button, &QQuickAbstractButton::checkedChanged, this, &QQuickButtonGroupPrivate::updateCurrent);
}
buttons.clear();
@@ -182,7 +182,7 @@ void QQuickButtonGroupPrivate::buttons_clear(QQmlListProperty<QQuickAbstractButt
if (!p->buttons.isEmpty()) {
p->clear();
QQuickButtonGroup *q = static_cast<QQuickButtonGroup *>(prop->object);
- q->setCheckedButton(Q_NULLPTR);
+ q->setCheckedButton(nullptr);
emit q->buttonsChanged();
}
}
@@ -310,11 +310,11 @@ void QQuickButtonGroup::removeButton(QQuickAbstractButton *button)
if (!button || !d->buttons.contains(button))
return;
- QQuickAbstractButtonPrivate::get(button)->group = Q_NULLPTR;
+ QQuickAbstractButtonPrivate::get(button)->group = nullptr;
QObjectPrivate::disconnect(button, &QQuickAbstractButton::checkedChanged, d, &QQuickButtonGroupPrivate::updateCurrent);
if (d->checkedButton == button)
- setCheckedButton(Q_NULLPTR);
+ setCheckedButton(nullptr);
d->buttons.removeOne(button);
emit buttonsChanged();
@@ -323,7 +323,7 @@ void QQuickButtonGroup::removeButton(QQuickAbstractButton *button)
class QQuickButtonGroupAttachedPrivate : public QObjectPrivate
{
public:
- QQuickButtonGroupAttachedPrivate() : group(Q_NULLPTR) { }
+ QQuickButtonGroupAttachedPrivate() : group(nullptr) { }
QQuickButtonGroup *group;
};
diff --git a/src/templates/qquickbuttongroup_p.h b/src/templates/qquickbuttongroup_p.h
index 6210079d..5863e70b 100644
--- a/src/templates/qquickbuttongroup_p.h
+++ b/src/templates/qquickbuttongroup_p.h
@@ -66,7 +66,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickButtonGroup : public QObject
Q_PROPERTY(QQmlListProperty<QQuickAbstractButton> buttons READ buttons NOTIFY buttonsChanged FINAL)
public:
- explicit QQuickButtonGroup(QObject *parent = Q_NULLPTR);
+ explicit QQuickButtonGroup(QObject *parent = nullptr);
~QQuickButtonGroup();
static QQuickButtonGroupAttached *qmlAttachedProperties(QObject *object);
@@ -95,7 +95,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickButtonGroupAttached : public QObject
Q_PROPERTY(QQuickButtonGroup *group READ group WRITE setGroup NOTIFY groupChanged FINAL)
public:
- explicit QQuickButtonGroupAttached(QObject *parent = Q_NULLPTR);
+ explicit QQuickButtonGroupAttached(QObject *parent = nullptr);
QQuickButtonGroup *group() const;
void setGroup(QQuickButtonGroup *group);
diff --git a/src/templates/qquickcheckbox_p.h b/src/templates/qquickcheckbox_p.h
index 4c0d505f..e3dcf76e 100644
--- a/src/templates/qquickcheckbox_p.h
+++ b/src/templates/qquickcheckbox_p.h
@@ -61,7 +61,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickCheckBox : public QQuickAbstractButton
Q_PROPERTY(Qt::CheckState checkState READ checkState WRITE setCheckState NOTIFY checkStateChanged FINAL)
public:
- explicit QQuickCheckBox(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickCheckBox(QQuickItem *parent = nullptr);
bool isTristate() const;
void setTristate(bool tristate);
@@ -74,13 +74,13 @@ Q_SIGNALS:
void checkStateChanged();
protected:
- QFont defaultFont() const Q_DECL_OVERRIDE;
+ QFont defaultFont() const override;
- void checkStateSet() Q_DECL_OVERRIDE;
- void nextCheckState() Q_DECL_OVERRIDE;
+ void checkStateSet() override;
+ void nextCheckState() override;
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::Role accessibleRole() const Q_DECL_OVERRIDE;
+ QAccessible::Role accessibleRole() const override;
#endif
private:
diff --git a/src/templates/qquickcombobox.cpp b/src/templates/qquickcombobox.cpp
index c079b1e3..9bf1c4e6 100644
--- a/src/templates/qquickcombobox.cpp
+++ b/src/templates/qquickcombobox.cpp
@@ -123,8 +123,8 @@ class QQuickComboBoxPrivate : public QQuickControlPrivate
public:
QQuickComboBoxPrivate() : pressed(false), ownModel(false), hasDisplayText(false),
- hideTimer(0), highlightedIndex(-1), currentIndex(-1), delegateModel(Q_NULLPTR),
- delegate(Q_NULLPTR), popup(Q_NULLPTR) { }
+ hideTimer(0), highlightedIndex(-1), currentIndex(-1), delegateModel(nullptr),
+ delegate(nullptr), popup(nullptr) { }
bool isPopupVisible() const;
void showPopup();
@@ -204,7 +204,7 @@ void QQuickComboBoxPrivate::pressedOutside()
void QQuickComboBoxPrivate::itemClicked()
{
Q_Q(QQuickComboBox);
- int index = delegateModel->indexOf(q->sender(), Q_NULLPTR);
+ int index = delegateModel->indexOf(q->sender(), nullptr);
if (index != -1) {
setHighlightedIndex(index);
emit q->highlighted(index);
diff --git a/src/templates/qquickcombobox_p.h b/src/templates/qquickcombobox_p.h
index 050e8c7c..30bc7760 100644
--- a/src/templates/qquickcombobox_p.h
+++ b/src/templates/qquickcombobox_p.h
@@ -72,7 +72,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickComboBox : public QQuickControl
Q_PROPERTY(QQuickPopup *popup READ popup WRITE setPopup NOTIFY popupChanged FINAL)
public:
- explicit QQuickComboBox(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickComboBox(QQuickItem *parent = nullptr);
int count() const;
@@ -123,18 +123,18 @@ Q_SIGNALS:
void highlighted(int index);
protected:
- void focusOutEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
- void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseUngrabEvent() Q_DECL_OVERRIDE;
- void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
-
- void componentComplete() Q_DECL_OVERRIDE;
-
- QFont defaultFont() const Q_DECL_OVERRIDE;
+ void focusOutEvent(QFocusEvent *event) override;
+ void keyPressEvent(QKeyEvent *event) override;
+ void keyReleaseEvent(QKeyEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ void mouseUngrabEvent() override;
+ void timerEvent(QTimerEvent *event) override;
+
+ void componentComplete() override;
+
+ QFont defaultFont() const override;
private:
Q_DISABLE_COPY(QQuickComboBox)
diff --git a/src/templates/qquickcontainer.cpp b/src/templates/qquickcontainer.cpp
index 90c46e14..c6638768 100644
--- a/src/templates/qquickcontainer.cpp
+++ b/src/templates/qquickcontainer.cpp
@@ -62,7 +62,7 @@ static QQuickItem *effectiveContentItem(QQuickItem *item)
return item;
}
-QQuickContainerPrivate::QQuickContainerPrivate() : contentModel(Q_NULLPTR), currentIndex(-1), updatingCurrent(false)
+QQuickContainerPrivate::QQuickContainerPrivate() : contentModel(nullptr), currentIndex(-1), updatingCurrent(false)
{
}
@@ -153,7 +153,7 @@ void QQuickContainerPrivate::removeItem(int index, QQuickItem *item)
}
QQuickItemPrivate::get(item)->removeItemChangeListener(this, QQuickItemPrivate::Destroyed | QQuickItemPrivate::Parent);
- item->setParentItem(Q_NULLPTR);
+ item->setParentItem(nullptr);
contentModel->remove(index);
q->itemRemoved(index, item);
@@ -182,7 +182,7 @@ void QQuickContainerPrivate::itemParentChanged(QQuickItem *item, QQuickItem *par
{
// remove dynamically unparented items (eg. by a Repeater)
if (!parent)
- removeItem(contentModel->indexOf(item, Q_NULLPTR), item);
+ removeItem(contentModel->indexOf(item, nullptr), item);
}
void QQuickContainerPrivate::itemSiblingOrderChanged(QQuickItem *)
@@ -192,14 +192,14 @@ void QQuickContainerPrivate::itemSiblingOrderChanged(QQuickItem *)
QList<QQuickItem *> siblings = effectiveContentItem(contentItem)->childItems();
for (int i = 0; i < siblings.count(); ++i) {
QQuickItem* sibling = siblings.at(i);
- int index = contentModel->indexOf(sibling, Q_NULLPTR);
+ int index = contentModel->indexOf(sibling, nullptr);
q->moveItem(index, i);
}
}
void QQuickContainerPrivate::itemDestroyed(QQuickItem *item)
{
- int index = contentModel->indexOf(item, Q_NULLPTR);
+ int index = contentModel->indexOf(item, nullptr);
if (index != -1)
removeItem(index, item);
}
@@ -213,7 +213,7 @@ void QQuickContainerPrivate::contentData_append(QQmlListProperty<QObject> *prop,
if (QQuickItemPrivate::get(item)->isTransparentForPositioner()) {
QQuickItemPrivate::get(item)->addItemChangeListener(p, QQuickItemPrivate::SiblingOrder);
item->setParentItem(effectiveContentItem(p->contentItem));
- } else if (p->contentModel->indexOf(item, Q_NULLPTR) == -1) {
+ } else if (p->contentModel->indexOf(item, nullptr) == -1) {
q->addItem(item);
}
} else {
@@ -331,7 +331,7 @@ void QQuickContainer::insertItem(int index, QQuickItem *item)
if (index < 0 || index > count)
index = count;
- int oldIndex = d->contentModel->indexOf(item, Q_NULLPTR);
+ int oldIndex = d->contentModel->indexOf(item, nullptr);
if (oldIndex != -1) {
if (oldIndex < index)
--index;
@@ -463,7 +463,7 @@ void QQuickContainer::itemChange(ItemChange change, const ItemChangeData &data)
Q_D(QQuickContainer);
QQuickControl::itemChange(change, data);
if (change == QQuickItem::ItemChildAddedChange && isComponentComplete() && data.item != d->background && data.item != d->contentItem) {
- if (!QQuickItemPrivate::get(data.item)->isTransparentForPositioner() && d->contentModel->indexOf(data.item, Q_NULLPTR) == -1)
+ if (!QQuickItemPrivate::get(data.item)->isTransparentForPositioner() && d->contentModel->indexOf(data.item, nullptr) == -1)
addItem(data.item);
}
}
diff --git a/src/templates/qquickcontainer_p.h b/src/templates/qquickcontainer_p.h
index 83476f66..e11d5716 100644
--- a/src/templates/qquickcontainer_p.h
+++ b/src/templates/qquickcontainer_p.h
@@ -67,7 +67,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickContainer : public QQuickControl
Q_CLASSINFO("DefaultProperty", "contentData")
public:
- explicit QQuickContainer(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickContainer(QQuickItem *parent = nullptr);
~QQuickContainer();
int count() const;
@@ -96,8 +96,8 @@ Q_SIGNALS:
protected:
QQuickContainer(QQuickContainerPrivate &dd, QQuickItem *parent);
- void itemChange(ItemChange change, const ItemChangeData &data) Q_DECL_OVERRIDE;
- void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) Q_DECL_OVERRIDE;
+ void itemChange(ItemChange change, const ItemChangeData &data) override;
+ void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override;
virtual bool isContent(QQuickItem *item) const;
virtual void itemAdded(int index, QQuickItem *item);
diff --git a/src/templates/qquickcontainer_p_p.h b/src/templates/qquickcontainer_p_p.h
index 6eb79c88..8c1d470c 100644
--- a/src/templates/qquickcontainer_p_p.h
+++ b/src/templates/qquickcontainer_p_p.h
@@ -71,10 +71,10 @@ public:
void _q_currentIndexChanged();
- void itemChildAdded(QQuickItem *item, QQuickItem *child) Q_DECL_OVERRIDE;
- void itemSiblingOrderChanged(QQuickItem *item) Q_DECL_OVERRIDE;
- void itemParentChanged(QQuickItem *item, QQuickItem *parent) Q_DECL_OVERRIDE;
- void itemDestroyed(QQuickItem *item) Q_DECL_OVERRIDE;
+ void itemChildAdded(QQuickItem *item, QQuickItem *child) override;
+ void itemSiblingOrderChanged(QQuickItem *item) override;
+ void itemParentChanged(QQuickItem *item, QQuickItem *parent) override;
+ void itemDestroyed(QQuickItem *item) override;
static void contentData_append(QQmlListProperty<QObject> *prop, QObject *obj);
static int contentData_count(QQmlListProperty<QObject> *prop);
diff --git a/src/templates/qquickcontrol.cpp b/src/templates/qquickcontrol.cpp
index b8433853..6914037d 100644
--- a/src/templates/qquickcontrol.cpp
+++ b/src/templates/qquickcontrol.cpp
@@ -68,7 +68,7 @@ QT_BEGIN_NAMESPACE
QQuickControlPrivate::QQuickControlPrivate() :
hasTopPadding(false), hasLeftPadding(false), hasRightPadding(false), hasBottomPadding(false), hasLocale(false),
padding(0), topPadding(0), leftPadding(0), rightPadding(0), bottomPadding(0), spacing(0), focusReason(Qt::OtherFocusReason),
- background(Q_NULLPTR), contentItem(Q_NULLPTR), accessibleAttached(Q_NULLPTR)
+ background(nullptr), contentItem(nullptr), accessibleAttached(nullptr)
{
#ifndef QT_NO_ACCESSIBILITY
QAccessible::installActivationObserver(this);
diff --git a/src/templates/qquickcontrol_p.h b/src/templates/qquickcontrol_p.h
index 8d4055e5..648a140b 100644
--- a/src/templates/qquickcontrol_p.h
+++ b/src/templates/qquickcontrol_p.h
@@ -75,7 +75,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickControl : public QQuickItem
Q_PROPERTY(QQuickItem *contentItem READ contentItem WRITE setContentItem NOTIFY contentItemChanged FINAL)
public:
- explicit QQuickControl(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickControl(QQuickItem *parent = nullptr);
QFont font() const;
void setFont(const QFont &);
@@ -144,18 +144,18 @@ protected:
QQuickControl(QQuickControlPrivate &dd, QQuickItem *parent);
- void classBegin() Q_DECL_OVERRIDE;
- void componentComplete() Q_DECL_OVERRIDE;
+ void classBegin() override;
+ void componentComplete() override;
- void itemChange(ItemChange change, const ItemChangeData &value) Q_DECL_OVERRIDE;
+ void itemChange(ItemChange change, const ItemChangeData &value) override;
- void focusInEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
- void focusOutEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
+ void focusInEvent(QFocusEvent *event) override;
+ void focusOutEvent(QFocusEvent *event) override;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
virtual void mirrorChange();
virtual void paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding);
diff --git a/src/templates/qquickcontrol_p_p.h b/src/templates/qquickcontrol_p_p.h
index 21f6c1b1..1450184b 100644
--- a/src/templates/qquickcontrol_p_p.h
+++ b/src/templates/qquickcontrol_p_p.h
@@ -77,7 +77,7 @@ public:
return control->d_func();
}
- void mirrorChange() Q_DECL_OVERRIDE;
+ void mirrorChange() override;
void setTopPadding(qreal value, bool reset = false);
void setLeftPadding(qreal value, bool reset = false);
@@ -88,8 +88,8 @@ public:
void resizeContent();
#ifndef QT_NO_ACCESSIBILITY
- void accessibilityActiveChanged(bool active) Q_DECL_OVERRIDE;
- QAccessible::Role accessibleRole() const Q_DECL_OVERRIDE;
+ void accessibilityActiveChanged(bool active) override;
+ QAccessible::Role accessibleRole() const override;
#endif
void updateFont(const QFont &);
diff --git a/src/templates/qquickdial.cpp b/src/templates/qquickdial.cpp
index dcc2b293..3c354be4 100644
--- a/src/templates/qquickdial.cpp
+++ b/src/templates/qquickdial.cpp
@@ -90,7 +90,7 @@ public:
stepSize(0),
pressed(false),
snapMode(QQuickDial::NoSnap),
- handle(Q_NULLPTR)
+ handle(nullptr)
{
}
diff --git a/src/templates/qquickdial_p.h b/src/templates/qquickdial_p.h
index 19d37547..2fd2f649 100644
--- a/src/templates/qquickdial_p.h
+++ b/src/templates/qquickdial_p.h
@@ -71,7 +71,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickDial : public QQuickControl
Q_PROPERTY(QQuickItem *handle READ handle WRITE setHandle NOTIFY handleChanged FINAL)
public:
- explicit QQuickDial(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickDial(QQuickItem *parent = nullptr);
qreal from() const;
void setFrom(qreal from);
@@ -121,18 +121,18 @@ Q_SIGNALS:
void handleChanged();
protected:
- void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseUngrabEvent() Q_DECL_OVERRIDE;
- void mirrorChange() Q_DECL_OVERRIDE;
- void componentComplete() Q_DECL_OVERRIDE;
+ void keyPressEvent(QKeyEvent *event) override;
+ void keyReleaseEvent(QKeyEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ void mouseUngrabEvent() override;
+ void mirrorChange() override;
+ void componentComplete() override;
#ifndef QT_NO_ACCESSIBILITY
- void accessibilityActiveChanged(bool active) Q_DECL_OVERRIDE;
- QAccessible::Role accessibleRole() const Q_DECL_OVERRIDE;
+ void accessibilityActiveChanged(bool active) override;
+ QAccessible::Role accessibleRole() const override;
#endif
private:
diff --git a/src/templates/qquickdrawer.cpp b/src/templates/qquickdrawer.cpp
index ca6c8c13..e0216872 100644
--- a/src/templates/qquickdrawer.cpp
+++ b/src/templates/qquickdrawer.cpp
@@ -95,14 +95,14 @@ class QQuickDrawerPrivate : public QQuickControlPrivate, public QQuickItemChange
public:
QQuickDrawerPrivate() : edge(Qt::LeftEdge), offset(0), position(0),
- content(Q_NULLPTR), animation(Q_NULLPTR) { }
+ content(nullptr), animation(nullptr) { }
void updateContent();
bool handleMousePressEvent(QQuickItem *item, QMouseEvent *event);
bool handleMouseMoveEvent(QQuickItem *item, QMouseEvent *event);
bool handleMouseReleaseEvent(QQuickItem *item, QMouseEvent *event);
- void itemGeometryChanged(QQuickItem *, const QRectF &, const QRectF &) Q_DECL_OVERRIDE;
+ void itemGeometryChanged(QQuickItem *, const QRectF &, const QRectF &) override;
Qt::Edge edge;
qreal offset;
diff --git a/src/templates/qquickdrawer_p.h b/src/templates/qquickdrawer_p.h
index f953b0fd..39f1802a 100644
--- a/src/templates/qquickdrawer_p.h
+++ b/src/templates/qquickdrawer_p.h
@@ -66,7 +66,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickDrawer : public QQuickControl
Q_CLASSINFO("DefaultProperty", "contentItem")
public:
- explicit QQuickDrawer(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickDrawer(QQuickItem *parent = nullptr);
Qt::Edge edge() const;
void setEdge(Qt::Edge edge);
@@ -92,13 +92,13 @@ Q_SIGNALS:
void animationChanged();
protected:
- bool childMouseEventFilter(QQuickItem *child, QEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseUngrabEvent() Q_DECL_OVERRIDE;
- void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
- void componentComplete() Q_DECL_OVERRIDE;
+ bool childMouseEventFilter(QQuickItem *child, QEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ void mouseUngrabEvent() override;
+ void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
+ void componentComplete() override;
virtual qreal positionAt(const QPointF &point) const;
diff --git a/src/templates/qquickframe.cpp b/src/templates/qquickframe.cpp
index 386aa5fb..68be30a2 100644
--- a/src/templates/qquickframe.cpp
+++ b/src/templates/qquickframe.cpp
@@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE
\sa {Customizing Frame}, {Container Controls}
*/
-QQuickFramePrivate::QQuickFramePrivate() : frame(Q_NULLPTR)
+QQuickFramePrivate::QQuickFramePrivate() : frame(nullptr)
{
}
diff --git a/src/templates/qquickframe_p.h b/src/templates/qquickframe_p.h
index 0bfd63e8..8f5ac775 100644
--- a/src/templates/qquickframe_p.h
+++ b/src/templates/qquickframe_p.h
@@ -60,7 +60,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickFrame : public QQuickPane
Q_PROPERTY(QQuickItem *frame READ frame WRITE setFrame NOTIFY frameChanged FINAL)
public:
- explicit QQuickFrame(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickFrame(QQuickItem *parent = nullptr);
QQuickItem *frame() const;
void setFrame(QQuickItem *frame);
diff --git a/src/templates/qquickgroupbox.cpp b/src/templates/qquickgroupbox.cpp
index ef8789a5..d324bb15 100644
--- a/src/templates/qquickgroupbox.cpp
+++ b/src/templates/qquickgroupbox.cpp
@@ -81,7 +81,7 @@ QT_BEGIN_NAMESPACE
class QQuickGroupBoxPrivate : public QQuickFramePrivate
{
public:
- QQuickGroupBoxPrivate() : label(Q_NULLPTR) { }
+ QQuickGroupBoxPrivate() : label(nullptr) { }
QString title;
QQuickItem *label;
diff --git a/src/templates/qquickgroupbox_p.h b/src/templates/qquickgroupbox_p.h
index b81d6534..81ba58ab 100644
--- a/src/templates/qquickgroupbox_p.h
+++ b/src/templates/qquickgroupbox_p.h
@@ -61,7 +61,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickGroupBox : public QQuickFrame
Q_PROPERTY(QQuickItem *label READ label WRITE setLabel NOTIFY labelChanged FINAL)
public:
- explicit QQuickGroupBox(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickGroupBox(QQuickItem *parent = nullptr);
QString title() const;
void setTitle(const QString &title);
@@ -74,7 +74,7 @@ Q_SIGNALS:
void labelChanged();
protected:
- QFont defaultFont() const Q_DECL_OVERRIDE;
+ QFont defaultFont() const override;
private:
Q_DISABLE_COPY(QQuickGroupBox)
diff --git a/src/templates/qquickitemdelegate_p.h b/src/templates/qquickitemdelegate_p.h
index 01e7b39c..be293047 100644
--- a/src/templates/qquickitemdelegate_p.h
+++ b/src/templates/qquickitemdelegate_p.h
@@ -59,11 +59,11 @@ class Q_LABSTEMPLATES_EXPORT QQuickItemDelegate : public QQuickAbstractButton
Q_OBJECT
public:
- explicit QQuickItemDelegate(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickItemDelegate(QQuickItem *parent = nullptr);
protected:
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::Role accessibleRole() const Q_DECL_OVERRIDE;
+ QAccessible::Role accessibleRole() const override;
#endif
private:
diff --git a/src/templates/qquicklabel.cpp b/src/templates/qquicklabel.cpp
index d2c86037..e749645c 100644
--- a/src/templates/qquicklabel.cpp
+++ b/src/templates/qquicklabel.cpp
@@ -81,7 +81,7 @@ QQuickLabel::~QQuickLabel()
}
QQuickLabelPrivate::QQuickLabelPrivate()
- : background(Q_NULLPTR), accessibleAttached(Q_NULLPTR)
+ : background(nullptr), accessibleAttached(nullptr)
{
#ifndef QT_NO_ACCESSIBILITY
QAccessible::installActivationObserver(this);
diff --git a/src/templates/qquicklabel_p.h b/src/templates/qquicklabel_p.h
index 26f72840..7bb09d1b 100644
--- a/src/templates/qquicklabel_p.h
+++ b/src/templates/qquicklabel_p.h
@@ -62,7 +62,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickLabel : public QQuickText
Q_PROPERTY(QQuickItem *background READ background WRITE setBackground NOTIFY backgroundChanged FINAL)
public:
- explicit QQuickLabel(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickLabel(QQuickItem *parent = nullptr);
~QQuickLabel();
QFont font() const;
@@ -76,10 +76,10 @@ Q_SIGNALS:
void backgroundChanged();
protected:
- void classBegin() Q_DECL_OVERRIDE;
+ void classBegin() override;
- void itemChange(ItemChange change, const ItemChangeData &value) Q_DECL_OVERRIDE;
- void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
+ void itemChange(ItemChange change, const ItemChangeData &value) override;
+ void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
private:
Q_DISABLE_COPY(QQuickLabel)
diff --git a/src/templates/qquicklabel_p_p.h b/src/templates/qquicklabel_p_p.h
index a4e9f4e5..9d0ff05c 100644
--- a/src/templates/qquicklabel_p_p.h
+++ b/src/templates/qquicklabel_p_p.h
@@ -78,8 +78,8 @@ public:
void _q_textChanged(const QString &text);
#ifndef QT_NO_ACCESSIBILITY
- void accessibilityActiveChanged(bool active) Q_DECL_OVERRIDE;
- QAccessible::Role accessibleRole() const Q_DECL_OVERRIDE;
+ void accessibilityActiveChanged(bool active) override;
+ QAccessible::Role accessibleRole() const override;
#endif
QQuickItem *background;
diff --git a/src/templates/qquickmenu.cpp b/src/templates/qquickmenu.cpp
index d08583f3..69a409eb 100644
--- a/src/templates/qquickmenu.cpp
+++ b/src/templates/qquickmenu.cpp
@@ -89,8 +89,8 @@ QT_BEGIN_NAMESPACE
*/
QQuickMenuPrivate::QQuickMenuPrivate() :
- contentModel(Q_NULLPTR),
- dummyFocusItem(Q_NULLPTR),
+ contentModel(nullptr),
+ dummyFocusItem(nullptr),
ignoreActiveFocusChanges(false)
{
Q_Q(QQuickMenu);
@@ -120,7 +120,7 @@ void QQuickMenuPrivate::removeItem(int index, QQuickItem *item)
contentData.removeOne(item);
QQuickItemPrivate::get(item)->removeItemChangeListener(this, QQuickItemPrivate::Destroyed | QQuickItemPrivate::Parent);
- item->setParentItem(Q_NULLPTR);
+ item->setParentItem(nullptr);
contentModel->remove(index);
}
@@ -135,7 +135,7 @@ void QQuickMenuPrivate::itemParentChanged(QQuickItem *item, QQuickItem *parent)
{
// remove dynamically unparented items (eg. by a Repeater)
if (!parent)
- removeItem(contentModel->indexOf(item, Q_NULLPTR), item);
+ removeItem(contentModel->indexOf(item, nullptr), item);
}
void QQuickMenuPrivate::itemSiblingOrderChanged(QQuickItem *)
@@ -145,14 +145,14 @@ void QQuickMenuPrivate::itemSiblingOrderChanged(QQuickItem *)
QList<QQuickItem *> siblings = contentItem->childItems();
for (int i = 0; i < siblings.count(); ++i) {
QQuickItem* sibling = siblings.at(i);
- int index = contentModel->indexOf(sibling, Q_NULLPTR);
+ int index = contentModel->indexOf(sibling, nullptr);
q->moveItem(index, i);
}
}
void QQuickMenuPrivate::itemDestroyed(QQuickItem *item)
{
- int index = contentModel->indexOf(item, Q_NULLPTR);
+ int index = contentModel->indexOf(item, nullptr);
if (index != -1)
removeItem(index, item);
}
@@ -189,7 +189,7 @@ void QQuickMenuPrivate::onItemPressed()
{
Q_Q(QQuickMenu);
QQuickItem *item = qobject_cast<QQuickItem*>(q->sender());
- int itemIndex = contentModel->indexOf(item, Q_NULLPTR);
+ int itemIndex = contentModel->indexOf(item, nullptr);
Q_ASSERT(itemIndex != -1);
if (!contentItem->property("currentIndex").isValid())
@@ -211,7 +211,7 @@ void QQuickMenuPrivate::onItemActiveFocusChanged()
if (!contentItem->property("currentIndex").isValid())
return;
- int indexOfItem = contentModel->indexOf(item, Q_NULLPTR);
+ int indexOfItem = contentModel->indexOf(item, nullptr);
contentItem->setProperty("currentIndex", indexOfItem);
}
@@ -261,7 +261,7 @@ void QQuickMenuPrivate::contentData_append(QQmlListProperty<QObject> *prop, QObj
if (QQuickItemPrivate::get(item)->isTransparentForPositioner()) {
QQuickItemPrivate::get(item)->addItemChangeListener(p, QQuickItemPrivate::SiblingOrder);
item->setParentItem(p->contentItem);
- } else if (p->contentModel->indexOf(item, Q_NULLPTR) == -1) {
+ } else if (p->contentModel->indexOf(item, nullptr) == -1) {
q->addItem(item);
QQuickMenuItem *menuItem = qobject_cast<QQuickMenuItem *>(item);
@@ -339,7 +339,7 @@ void QQuickMenu::insertItem(int index, QQuickItem *item)
if (index < 0 || index > count)
index = count;
- int oldIndex = d->contentModel->indexOf(item, Q_NULLPTR);
+ int oldIndex = d->contentModel->indexOf(item, nullptr);
if (oldIndex != -1) {
if (oldIndex < index)
--index;
diff --git a/src/templates/qquickmenu_p.h b/src/templates/qquickmenu_p.h
index 78d27556..a54cafbd 100644
--- a/src/templates/qquickmenu_p.h
+++ b/src/templates/qquickmenu_p.h
@@ -67,7 +67,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickMenu : public QQuickPopup
Q_CLASSINFO("DefaultProperty", "contentData")
public:
- explicit QQuickMenu(QObject *parent = Q_NULLPTR);
+ explicit QQuickMenu(QObject *parent = nullptr);
Q_INVOKABLE QQuickItem *itemAt(int index) const;
Q_INVOKABLE void addItem(QQuickItem *item);
@@ -82,7 +82,7 @@ public:
void setTitle(QString &title);
protected:
- bool eventFilter(QObject *object, QEvent *event) Q_DECL_OVERRIDE;
+ bool eventFilter(QObject *object, QEvent *event) override;
Q_SIGNALS:
void titleChanged();
diff --git a/src/templates/qquickmenu_p_p.h b/src/templates/qquickmenu_p_p.h
index 6ef382c9..e06c0299 100644
--- a/src/templates/qquickmenu_p_p.h
+++ b/src/templates/qquickmenu_p_p.h
@@ -69,10 +69,10 @@ public:
void moveItem(int from, int to);
void removeItem(int index, QQuickItem *item);
- void itemChildAdded(QQuickItem *item, QQuickItem *child) Q_DECL_OVERRIDE;
- void itemSiblingOrderChanged(QQuickItem *item) Q_DECL_OVERRIDE;
- void itemParentChanged(QQuickItem *item, QQuickItem *parent) Q_DECL_OVERRIDE;
- void itemDestroyed(QQuickItem *item) Q_DECL_OVERRIDE;
+ void itemChildAdded(QQuickItem *item, QQuickItem *child) override;
+ void itemSiblingOrderChanged(QQuickItem *item) override;
+ void itemParentChanged(QQuickItem *item, QQuickItem *parent) override;
+ void itemDestroyed(QQuickItem *item) override;
void onContentItemChanged();
void onItemPressed();
diff --git a/src/templates/qquickmenuitem_p.h b/src/templates/qquickmenuitem_p.h
index 91d1e91e..812597be 100644
--- a/src/templates/qquickmenuitem_p.h
+++ b/src/templates/qquickmenuitem_p.h
@@ -59,16 +59,16 @@ class Q_LABSTEMPLATES_EXPORT QQuickMenuItem : public QQuickAbstractButton
Q_OBJECT
public:
- explicit QQuickMenuItem(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickMenuItem(QQuickItem *parent = nullptr);
Q_SIGNALS:
void triggered();
protected:
- QFont defaultFont() const Q_DECL_OVERRIDE;
+ QFont defaultFont() const override;
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::Role accessibleRole() const Q_DECL_OVERRIDE;
+ QAccessible::Role accessibleRole() const override;
#endif
private:
diff --git a/src/templates/qquickoverlay.cpp b/src/templates/qquickoverlay.cpp
index e06d28ea..5455676f 100644
--- a/src/templates/qquickoverlay.cpp
+++ b/src/templates/qquickoverlay.cpp
@@ -109,7 +109,7 @@ void QQuickOverlayPrivate::resizeBackground()
}
QQuickOverlayPrivate::QQuickOverlayPrivate() :
- background(Q_NULLPTR),
+ background(nullptr),
modalPopups(0)
{
}
@@ -152,7 +152,7 @@ void QQuickOverlay::itemChange(ItemChange change, const ItemChangeData &data)
Q_D(QQuickOverlay);
QQuickItem::itemChange(change, data);
- QQuickPopup *popup = Q_NULLPTR;
+ QQuickPopup *popup = nullptr;
if (change == ItemChildAddedChange || change == ItemChildRemovedChange) {
QQuickDrawer *drawer = qobject_cast<QQuickDrawer *>(data.item);
if (drawer) {
diff --git a/src/templates/qquickoverlay_p.h b/src/templates/qquickoverlay_p.h
index a48b54ed..b532720f 100644
--- a/src/templates/qquickoverlay_p.h
+++ b/src/templates/qquickoverlay_p.h
@@ -61,7 +61,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickOverlay : public QQuickItem
Q_PROPERTY(QQuickItem *background READ background WRITE setBackground NOTIFY backgroundChanged FINAL)
public:
- explicit QQuickOverlay(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickOverlay(QQuickItem *parent = nullptr);
QQuickItem *background() const;
void setBackground(QQuickItem *background);
@@ -72,15 +72,15 @@ Q_SIGNALS:
void released();
protected:
- void itemChange(ItemChange change, const ItemChangeData &data) Q_DECL_OVERRIDE;
- void geometryChanged(const QRectF &oldGeometry, const QRectF &newGeometry) Q_DECL_OVERRIDE;
+ void itemChange(ItemChange change, const ItemChangeData &data) override;
+ void geometryChanged(const QRectF &oldGeometry, const QRectF &newGeometry) override;
- void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- bool childMouseEventFilter(QQuickItem *item, QEvent *event) Q_DECL_OVERRIDE;
+ void keyPressEvent(QKeyEvent *event) override;
+ void keyReleaseEvent(QKeyEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ bool childMouseEventFilter(QQuickItem *item, QEvent *event) override;
private:
Q_DISABLE_COPY(QQuickOverlay)
diff --git a/src/templates/qquickpage.cpp b/src/templates/qquickpage.cpp
index 8302dca0..c7719103 100644
--- a/src/templates/qquickpage.cpp
+++ b/src/templates/qquickpage.cpp
@@ -91,14 +91,14 @@ public:
void relayout();
- void itemImplicitWidthChanged(QQuickItem *item) Q_DECL_OVERRIDE;
- void itemImplicitHeightChanged(QQuickItem *item) Q_DECL_OVERRIDE;
+ void itemImplicitWidthChanged(QQuickItem *item) override;
+ void itemImplicitHeightChanged(QQuickItem *item) override;
QQuickItem *header;
QQuickItem *footer;
};
-QQuickPagePrivate::QQuickPagePrivate() : header(Q_NULLPTR), footer(Q_NULLPTR)
+QQuickPagePrivate::QQuickPagePrivate() : header(nullptr), footer(nullptr)
{
}
@@ -221,7 +221,7 @@ void QQuickPage::setFooter(QQuickItem *footer)
QQmlListProperty<QObject> QQuickPage::contentData()
{
Q_D(QQuickPage);
- return QQmlListProperty<QObject>(d->contentItem, Q_NULLPTR,
+ return QQmlListProperty<QObject>(d->contentItem, nullptr,
QQuickItemPrivate::data_append,
QQuickItemPrivate::data_count,
QQuickItemPrivate::data_at,
@@ -238,7 +238,7 @@ QQmlListProperty<QObject> QQuickPage::contentData()
QQmlListProperty<QQuickItem> QQuickPage::contentChildren()
{
Q_D(QQuickPage);
- return QQmlListProperty<QQuickItem>(d->contentItem, Q_NULLPTR,
+ return QQmlListProperty<QQuickItem>(d->contentItem, nullptr,
QQuickItemPrivate::children_append,
QQuickItemPrivate::children_count,
QQuickItemPrivate::children_at,
diff --git a/src/templates/qquickpage_p.h b/src/templates/qquickpage_p.h
index 157f0507..c21bb0ac 100644
--- a/src/templates/qquickpage_p.h
+++ b/src/templates/qquickpage_p.h
@@ -65,7 +65,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickPage : public QQuickControl
Q_CLASSINFO("DefaultProperty", "contentData")
public:
- explicit QQuickPage(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickPage(QQuickItem *parent = nullptr);
QQuickItem *header() const;
void setHeader(QQuickItem *header);
@@ -82,12 +82,12 @@ Q_SIGNALS:
void contentChildrenChanged();
protected:
- void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) Q_DECL_OVERRIDE;
- void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
- void paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding) Q_DECL_OVERRIDE;
+ void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override;
+ void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
+ void paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding) override;
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::Role accessibleRole() const Q_DECL_OVERRIDE;
+ QAccessible::Role accessibleRole() const override;
#endif
private:
diff --git a/src/templates/qquickpageindicator.cpp b/src/templates/qquickpageindicator.cpp
index 31e31aa2..400a5237 100644
--- a/src/templates/qquickpageindicator.cpp
+++ b/src/templates/qquickpageindicator.cpp
@@ -68,7 +68,7 @@ class QQuickPageIndicatorPrivate : public QQuickControlPrivate, public QQuickIte
public:
QQuickPageIndicatorPrivate() : count(0), currentIndex(0),
- interactive(false), delegate(Q_NULLPTR), pressedItem(Q_NULLPTR)
+ interactive(false), delegate(nullptr), pressedItem(nullptr)
{
}
@@ -89,7 +89,7 @@ QQuickItem *QQuickPageIndicatorPrivate::itemAt(const QPoint &pos) const
{
Q_Q(const QQuickPageIndicator);
if (!contentItem || !q->contains(pos))
- return Q_NULLPTR;
+ return nullptr;
QPointF contentPos = q->mapToItem(contentItem, pos);
QQuickItem *item = contentItem->childAt(contentPos.x(), contentPos.y());
@@ -100,7 +100,7 @@ QQuickItem *QQuickPageIndicatorPrivate::itemAt(const QPoint &pos) const
// find the nearest
qreal distance = qInf();
- QQuickItem *nearest = Q_NULLPTR;
+ QQuickItem *nearest = nullptr;
const auto childItems = contentItem->childItems();
for (QQuickItem *child : childItems) {
if (QQuickItemPrivate::get(child)->isTransparentForPositioner())
@@ -121,7 +121,7 @@ QQuickItem *QQuickPageIndicatorPrivate::itemAt(const QPoint &pos) const
void QQuickPageIndicatorPrivate::updatePressed(bool pressed, const QPoint &pos)
{
QQuickItem *prevItem = pressedItem;
- pressedItem = pressed ? itemAt(pos) : Q_NULLPTR;
+ pressedItem = pressed ? itemAt(pos) : nullptr;
if (prevItem != pressedItem) {
setContextProperty(prevItem, QStringLiteral("pressed"), false);
setContextProperty(pressedItem, QStringLiteral("pressed"), pressed);
diff --git a/src/templates/qquickpageindicator_p.h b/src/templates/qquickpageindicator_p.h
index 487b4d6e..b776cbb6 100644
--- a/src/templates/qquickpageindicator_p.h
+++ b/src/templates/qquickpageindicator_p.h
@@ -64,7 +64,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickPageIndicator : public QQuickControl
Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL)
public:
- explicit QQuickPageIndicator(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickPageIndicator(QQuickItem *parent = nullptr);
int count() const;
void setCount(int count);
@@ -85,15 +85,15 @@ Q_SIGNALS:
void delegateChanged();
protected:
- void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) Q_DECL_OVERRIDE;
+ void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseUngrabEvent() Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ void mouseUngrabEvent() override;
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::Role accessibleRole() const Q_DECL_OVERRIDE;
+ QAccessible::Role accessibleRole() const override;
#endif
private:
diff --git a/src/templates/qquickpane.cpp b/src/templates/qquickpane.cpp
index 27e76ea3..bbec8e42 100644
--- a/src/templates/qquickpane.cpp
+++ b/src/templates/qquickpane.cpp
@@ -140,7 +140,7 @@ void QQuickPane::setContentHeight(qreal height)
QQmlListProperty<QObject> QQuickPane::contentData()
{
Q_D(QQuickPane);
- return QQmlListProperty<QObject>(d->contentItem, Q_NULLPTR,
+ return QQmlListProperty<QObject>(d->contentItem, nullptr,
QQuickItemPrivate::data_append,
QQuickItemPrivate::data_count,
QQuickItemPrivate::data_at,
@@ -157,7 +157,7 @@ QQmlListProperty<QObject> QQuickPane::contentData()
QQmlListProperty<QQuickItem> QQuickPane::contentChildren()
{
Q_D(QQuickPane);
- return QQmlListProperty<QQuickItem>(d->contentItem, Q_NULLPTR,
+ return QQmlListProperty<QQuickItem>(d->contentItem, nullptr,
QQuickItemPrivate::children_append,
QQuickItemPrivate::children_count,
QQuickItemPrivate::children_at,
diff --git a/src/templates/qquickpane_p.h b/src/templates/qquickpane_p.h
index e599f55f..51039f32 100644
--- a/src/templates/qquickpane_p.h
+++ b/src/templates/qquickpane_p.h
@@ -65,7 +65,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickPane : public QQuickControl
Q_CLASSINFO("DefaultProperty", "contentData")
public:
- explicit QQuickPane(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickPane(QQuickItem *parent = nullptr);
qreal contentWidth() const;
void setContentWidth(qreal width);
@@ -84,10 +84,10 @@ Q_SIGNALS:
protected:
QQuickPane(QQuickPanePrivate &dd, QQuickItem *parent);
- void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) Q_DECL_OVERRIDE;
+ void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override;
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::Role accessibleRole() const Q_DECL_OVERRIDE;
+ QAccessible::Role accessibleRole() const override;
#endif
private:
diff --git a/src/templates/qquickpopup.cpp b/src/templates/qquickpopup.cpp
index 2e826591..87c63f8d 100644
--- a/src/templates/qquickpopup.cpp
+++ b/src/templates/qquickpopup.cpp
@@ -61,10 +61,10 @@ QQuickPopupPrivate::QQuickPopupPrivate()
: QObjectPrivate()
, focus(false)
, modal(false)
- , contentItem(Q_NULLPTR)
- , overlay(Q_NULLPTR)
- , enter(Q_NULLPTR)
- , exit(Q_NULLPTR)
+ , contentItem(nullptr)
+ , overlay(nullptr)
+ , enter(nullptr)
+ , exit(nullptr)
, transitionManager(this)
{
}
@@ -78,8 +78,8 @@ void QQuickPopupPrivate::finalizeEnterTransition()
void QQuickPopupPrivate::finalizeExitTransition()
{
Q_Q(QQuickPopup);
- overlay = Q_NULLPTR;
- contentItem->setParentItem(Q_NULLPTR);
+ overlay = nullptr;
+ contentItem->setParentItem(nullptr);
emit q->visibleChanged();
}
@@ -146,7 +146,7 @@ void QQuickPopup::open()
return;
}
- QQuickWindow *window = Q_NULLPTR;
+ QQuickWindow *window = nullptr;
QObject *p = parent();
while (p && !window) {
if (QQuickItem *item = qobject_cast<QQuickItem *>(p)) {
@@ -278,7 +278,7 @@ void QQuickPopup::setModal(bool modal)
bool QQuickPopup::isVisible() const
{
Q_D(const QQuickPopup);
- return d->overlay != Q_NULLPTR /*&& !d->transitionManager.isRunning()*/;
+ return d->overlay != nullptr /*&& !d->transitionManager.isRunning()*/;
}
/*!
diff --git a/src/templates/qquickpopup_p.h b/src/templates/qquickpopup_p.h
index 630b7a4a..8eb5e150 100644
--- a/src/templates/qquickpopup_p.h
+++ b/src/templates/qquickpopup_p.h
@@ -69,7 +69,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickPopup : public QObject
Q_PROPERTY(QQuickTransition *exit READ exit WRITE setExit NOTIFY exitChanged FINAL)
public:
- explicit QQuickPopup(QObject *parent = Q_NULLPTR);
+ explicit QQuickPopup(QObject *parent = nullptr);
QQuickItem *contentItem() const;
void setContentItem(QQuickItem *item);
diff --git a/src/templates/qquickpopup_p_p.h b/src/templates/qquickpopup_p_p.h
index b0c6d709..3a5909b7 100644
--- a/src/templates/qquickpopup_p_p.h
+++ b/src/templates/qquickpopup_p_p.h
@@ -69,7 +69,7 @@ public:
void transitionExit();
protected:
- void finished() Q_DECL_OVERRIDE;
+ void finished() override;
private:
enum TransitionState {
diff --git a/src/templates/qquickpressandholdhelper.cpp b/src/templates/qquickpressandholdhelper.cpp
index 29b3bb0a..6f3ddcbc 100644
--- a/src/templates/qquickpressandholdhelper.cpp
+++ b/src/templates/qquickpressandholdhelper.cpp
@@ -45,10 +45,10 @@
QT_BEGIN_NAMESPACE
QQuickPressAndHoldHelper::QQuickPressAndHoldHelper()
- : control(Q_NULLPTR)
+ : control(nullptr)
, longPress(false)
, pressAndHoldSignalIndex(-1)
- , delayedMousePressEvent(Q_NULLPTR)
+ , delayedMousePressEvent(nullptr)
{ }
void QQuickPressAndHoldHelper::mousePressEvent(QMouseEvent *event)
@@ -91,7 +91,7 @@ void QQuickPressAndHoldHelper::timerEvent(QTimerEvent *)
mev.setAccepted(true);
// Use fast signal invocation since we already got its index
QQuickMouseEvent *mevPtr = &mev;
- void *args[] = { Q_NULLPTR, &mevPtr };
+ void *args[] = { nullptr, &mevPtr };
QMetaObject::metacall(control, QMetaObject::InvokeMetaMethod, pressAndHoldSignalIndex, args);
if (!mev.isAccepted())
longPress = false;
diff --git a/src/templates/qquickprogressbar.cpp b/src/templates/qquickprogressbar.cpp
index aa0789bc..114b117e 100644
--- a/src/templates/qquickprogressbar.cpp
+++ b/src/templates/qquickprogressbar.cpp
@@ -68,7 +68,7 @@ QT_BEGIN_NAMESPACE
class QQuickProgressBarPrivate : public QQuickControlPrivate
{
public:
- QQuickProgressBarPrivate() : from(0), to(1.0), value(0), indeterminate(false), indicator(Q_NULLPTR)
+ QQuickProgressBarPrivate() : from(0), to(1.0), value(0), indeterminate(false), indicator(nullptr)
{
}
diff --git a/src/templates/qquickprogressbar_p.h b/src/templates/qquickprogressbar_p.h
index f94c718e..1bf21b41 100644
--- a/src/templates/qquickprogressbar_p.h
+++ b/src/templates/qquickprogressbar_p.h
@@ -66,7 +66,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickProgressBar : public QQuickControl
Q_PROPERTY(QQuickItem *indicator READ indicator WRITE setIndicator NOTIFY indicatorChanged FINAL)
public:
- explicit QQuickProgressBar(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickProgressBar(QQuickItem *parent = nullptr);
qreal from() const;
void setFrom(qreal from);
@@ -96,11 +96,11 @@ Q_SIGNALS:
void indicatorChanged();
protected:
- void mirrorChange() Q_DECL_OVERRIDE;
- void componentComplete() Q_DECL_OVERRIDE;
+ void mirrorChange() override;
+ void componentComplete() override;
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::Role accessibleRole() const Q_DECL_OVERRIDE;
+ QAccessible::Role accessibleRole() const override;
#endif
private:
diff --git a/src/templates/qquickradiobutton_p.h b/src/templates/qquickradiobutton_p.h
index 7d664864..2b9821aa 100644
--- a/src/templates/qquickradiobutton_p.h
+++ b/src/templates/qquickradiobutton_p.h
@@ -57,13 +57,13 @@ class Q_LABSTEMPLATES_EXPORT QQuickRadioButton : public QQuickAbstractButton
Q_OBJECT
public:
- explicit QQuickRadioButton(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickRadioButton(QQuickItem *parent = nullptr);
protected:
- QFont defaultFont() const Q_DECL_OVERRIDE;
+ QFont defaultFont() const override;
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::Role accessibleRole() const Q_DECL_OVERRIDE;
+ QAccessible::Role accessibleRole() const override;
#endif
};
diff --git a/src/templates/qquickrangeslider.cpp b/src/templates/qquickrangeslider.cpp
index 70d5a03d..0a16cafc 100644
--- a/src/templates/qquickrangeslider.cpp
+++ b/src/templates/qquickrangeslider.cpp
@@ -85,7 +85,7 @@ public:
isPendingValue(false),
pendingValue(0),
position(0),
- handle(Q_NULLPTR),
+ handle(nullptr),
slider(slider),
pressed(false)
{
@@ -295,11 +295,11 @@ public:
from(defaultFrom),
to(defaultTo),
stepSize(0),
- first(Q_NULLPTR),
- second(Q_NULLPTR),
+ first(nullptr),
+ second(nullptr),
orientation(Qt::Horizontal),
snapMode(QQuickRangeSlider::NoSnap),
- track(Q_NULLPTR)
+ track(nullptr)
{
}
@@ -690,7 +690,7 @@ void QQuickRangeSlider::keyPressEvent(QKeyEvent *event)
QQuickControl::keyPressEvent(event);
QQuickRangeSliderNode *focusNode = d->first->handle()->hasActiveFocus()
- ? d->first : (d->second->handle()->hasActiveFocus() ? d->second : Q_NULLPTR);
+ ? d->first : (d->second->handle()->hasActiveFocus() ? d->second : nullptr);
if (!focusNode)
return;
@@ -741,8 +741,8 @@ void QQuickRangeSlider::mousePressEvent(QMouseEvent *event)
QQuickItem *secondHandle = d->second->handle();
const bool firstHit = firstHandle && firstHandle->contains(mapToItem(firstHandle, d->pressPoint));
const bool secondHit = secondHandle && secondHandle->contains(mapToItem(secondHandle, d->pressPoint));
- QQuickRangeSliderNode *hitNode = Q_NULLPTR;
- QQuickRangeSliderNode *otherNode = Q_NULLPTR;
+ QQuickRangeSliderNode *hitNode = nullptr;
+ QQuickRangeSliderNode *otherNode = nullptr;
if (firstHit && secondHit) {
// choose highest
@@ -775,7 +775,7 @@ void QQuickRangeSlider::mouseMoveEvent(QMouseEvent *event)
setKeepMouseGrab(QQuickWindowPrivate::dragOverThreshold(event->pos().y() - d->pressPoint.y(), Qt::YAxis, event));
}
if (keepMouseGrab()) {
- QQuickRangeSliderNode *pressedNode = d->first->isPressed() ? d->first : (d->second->isPressed() ? d->second : Q_NULLPTR);
+ QQuickRangeSliderNode *pressedNode = d->first->isPressed() ? d->first : (d->second->isPressed() ? d->second : nullptr);
if (pressedNode) {
qreal pos = positionAt(this, pressedNode->handle(), event->pos());
if (d->snapMode == SnapAlways)
@@ -794,7 +794,7 @@ void QQuickRangeSlider::mouseReleaseEvent(QMouseEvent *event)
if (!keepMouseGrab())
return;
- QQuickRangeSliderNode *pressedNode = d->first->isPressed() ? d->first : (d->second->isPressed() ? d->second : Q_NULLPTR);
+ QQuickRangeSliderNode *pressedNode = d->first->isPressed() ? d->first : (d->second->isPressed() ? d->second : nullptr);
if (!pressedNode)
return;
diff --git a/src/templates/qquickrangeslider_p.h b/src/templates/qquickrangeslider_p.h
index 604666c8..24653b0e 100644
--- a/src/templates/qquickrangeslider_p.h
+++ b/src/templates/qquickrangeslider_p.h
@@ -68,7 +68,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickRangeSlider : public QQuickControl
Q_PROPERTY(QQuickItem *track READ track WRITE setTrack NOTIFY trackChanged FINAL)
public:
- explicit QQuickRangeSlider(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickRangeSlider(QQuickItem *parent = nullptr);
qreal from() const;
void setFrom(qreal from);
@@ -109,17 +109,17 @@ Q_SIGNALS:
void trackChanged();
protected:
- void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseUngrabEvent() Q_DECL_OVERRIDE;
- void mirrorChange() Q_DECL_OVERRIDE;
- void componentComplete() Q_DECL_OVERRIDE;
+ void keyPressEvent(QKeyEvent *event) override;
+ void keyReleaseEvent(QKeyEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ void mouseUngrabEvent() override;
+ void mirrorChange() override;
+ void componentComplete() override;
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::Role accessibleRole() const Q_DECL_OVERRIDE;
+ QAccessible::Role accessibleRole() const override;
#endif
private:
diff --git a/src/templates/qquickscrollbar.cpp b/src/templates/qquickscrollbar.cpp
index 23db7fcf..caabbcf7 100644
--- a/src/templates/qquickscrollbar.cpp
+++ b/src/templates/qquickscrollbar.cpp
@@ -81,7 +81,7 @@ class QQuickScrollBarPrivate : public QQuickControlPrivate
public:
QQuickScrollBarPrivate() : size(0), position(0), offset(0),
active(false), pressed(false), moving(false),
- orientation(Qt::Vertical), handle(Q_NULLPTR)
+ orientation(Qt::Vertical), handle(nullptr)
{
}
@@ -114,7 +114,7 @@ QQuickScrollBarAttached *QQuickScrollBar::qmlAttachedProperties(QObject *object)
return new QQuickScrollBarAttached(flickable);
qWarning() << "ScrollBar must be attached to a Flickable" << object;
- return Q_NULLPTR;
+ return nullptr;
}
/*!
@@ -307,7 +307,7 @@ QAccessible::Role QQuickScrollBar::accessibleRole() const
class QQuickScrollBarAttachedPrivate : public QObjectPrivate, public QQuickItemChangeListener
{
public:
- QQuickScrollBarAttachedPrivate(QQuickFlickable *flickable) : flickable(flickable), horizontal(Q_NULLPTR), vertical(Q_NULLPTR) { }
+ QQuickScrollBarAttachedPrivate(QQuickFlickable *flickable) : flickable(flickable), horizontal(nullptr), vertical(nullptr) { }
void activateHorizontal();
void activateVertical();
@@ -317,7 +317,7 @@ public:
void layoutHorizontal(bool move = true);
void layoutVertical(bool move = true);
- void itemGeometryChanged(QQuickItem *item, const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
+ void itemGeometryChanged(QQuickItem *item, const QRectF &newGeometry, const QRectF &oldGeometry) override;
QQuickFlickable *flickable;
QQuickScrollBar *horizontal;
diff --git a/src/templates/qquickscrollbar_p.h b/src/templates/qquickscrollbar_p.h
index b944f92a..6eb8b798 100644
--- a/src/templates/qquickscrollbar_p.h
+++ b/src/templates/qquickscrollbar_p.h
@@ -67,7 +67,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickScrollBar : public QQuickControl
Q_PROPERTY(QQuickItem *handle READ handle WRITE setHandle NOTIFY handleChanged FINAL)
public:
- explicit QQuickScrollBar(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickScrollBar(QQuickItem *parent = nullptr);
static QQuickScrollBarAttached *qmlAttachedProperties(QObject *object);
@@ -99,15 +99,15 @@ Q_SIGNALS:
void handleChanged();
protected:
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
virtual qreal positionAt(const QPoint &point) const;
#ifndef QT_NO_ACCESSIBILITY
- void accessibilityActiveChanged(bool active) Q_DECL_OVERRIDE;
- QAccessible::Role accessibleRole() const Q_DECL_OVERRIDE;
+ void accessibilityActiveChanged(bool active) override;
+ QAccessible::Role accessibleRole() const override;
#endif
private:
diff --git a/src/templates/qquickscrollindicator.cpp b/src/templates/qquickscrollindicator.cpp
index b041e2ab..59f2acc0 100644
--- a/src/templates/qquickscrollindicator.cpp
+++ b/src/templates/qquickscrollindicator.cpp
@@ -80,7 +80,7 @@ class QQuickScrollIndicatorPrivate : public QQuickControlPrivate
{
public:
QQuickScrollIndicatorPrivate() : size(0), position(0),
- active(false), orientation(Qt::Vertical), indicator(Q_NULLPTR)
+ active(false), orientation(Qt::Vertical), indicator(nullptr)
{
}
@@ -103,7 +103,7 @@ QQuickScrollIndicatorAttached *QQuickScrollIndicator::qmlAttachedProperties(QObj
return new QQuickScrollIndicatorAttached(flickable);
qWarning() << "ScrollIndicator must be attached to a Flickable" << object;
- return Q_NULLPTR;
+ return nullptr;
}
/*!
@@ -223,7 +223,7 @@ void QQuickScrollIndicator::setIndicator(QQuickItem *indicator)
class QQuickScrollIndicatorAttachedPrivate : public QObjectPrivate, public QQuickItemChangeListener
{
public:
- QQuickScrollIndicatorAttachedPrivate(QQuickFlickable *flickable) : flickable(flickable), horizontal(Q_NULLPTR), vertical(Q_NULLPTR) { }
+ QQuickScrollIndicatorAttachedPrivate(QQuickFlickable *flickable) : flickable(flickable), horizontal(nullptr), vertical(nullptr) { }
void activateHorizontal();
void activateVertical();
@@ -231,7 +231,7 @@ public:
void layoutHorizontal(bool move = true);
void layoutVertical(bool move = true);
- void itemGeometryChanged(QQuickItem *item, const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
+ void itemGeometryChanged(QQuickItem *item, const QRectF &newGeometry, const QRectF &oldGeometry) override;
QQuickFlickable *flickable;
QQuickScrollIndicator *horizontal;
diff --git a/src/templates/qquickscrollindicator_p.h b/src/templates/qquickscrollindicator_p.h
index 1f5f07b7..15002700 100644
--- a/src/templates/qquickscrollindicator_p.h
+++ b/src/templates/qquickscrollindicator_p.h
@@ -66,7 +66,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickScrollIndicator : public QQuickControl
Q_PROPERTY(QQuickItem *indicator READ indicator WRITE setIndicator NOTIFY indicatorChanged FINAL)
public:
- explicit QQuickScrollIndicator(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickScrollIndicator(QQuickItem *parent = nullptr);
static QQuickScrollIndicatorAttached *qmlAttachedProperties(QObject *object);
@@ -95,7 +95,7 @@ Q_SIGNALS:
protected:
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::Role accessibleRole() const Q_DECL_OVERRIDE;
+ QAccessible::Role accessibleRole() const override;
#endif
private:
diff --git a/src/templates/qquickslider.cpp b/src/templates/qquickslider.cpp
index bdb18ad9..f1eca648 100644
--- a/src/templates/qquickslider.cpp
+++ b/src/templates/qquickslider.cpp
@@ -78,7 +78,7 @@ class QQuickSliderPrivate : public QQuickControlPrivate
public:
QQuickSliderPrivate() : from(0), to(1), value(0), position(0), stepSize(0), pressed(false),
orientation(Qt::Horizontal), snapMode(QQuickSlider::NoSnap),
- handle(Q_NULLPTR), track(Q_NULLPTR)
+ handle(nullptr), track(nullptr)
{
}
diff --git a/src/templates/qquickslider_p.h b/src/templates/qquickslider_p.h
index 663ad684..b348baa9 100644
--- a/src/templates/qquickslider_p.h
+++ b/src/templates/qquickslider_p.h
@@ -70,7 +70,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickSlider : public QQuickControl
Q_PROPERTY(QQuickItem *track READ track WRITE setTrack NOTIFY trackChanged FINAL)
public:
- explicit QQuickSlider(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickSlider(QQuickItem *parent = nullptr);
qreal from() const;
void setFrom(qreal from);
@@ -127,18 +127,18 @@ Q_SIGNALS:
void trackChanged();
protected:
- void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseUngrabEvent() Q_DECL_OVERRIDE;
- void mirrorChange() Q_DECL_OVERRIDE;
- void componentComplete() Q_DECL_OVERRIDE;
+ void keyPressEvent(QKeyEvent *event) override;
+ void keyReleaseEvent(QKeyEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ void mouseUngrabEvent() override;
+ void mirrorChange() override;
+ void componentComplete() override;
#ifndef QT_NO_ACCESSIBILITY
- void accessibilityActiveChanged(bool active) Q_DECL_OVERRIDE;
- QAccessible::Role accessibleRole() const Q_DECL_OVERRIDE;
+ void accessibilityActiveChanged(bool active) override;
+ QAccessible::Role accessibleRole() const override;
#endif
private:
diff --git a/src/templates/qquickspinbox.cpp b/src/templates/qquickspinbox.cpp
index 13770e46..83eefbf3 100644
--- a/src/templates/qquickspinbox.cpp
+++ b/src/templates/qquickspinbox.cpp
@@ -89,7 +89,7 @@ class QQuickSpinBoxPrivate : public QQuickControlPrivate
public:
QQuickSpinBoxPrivate() : from(0), to(99), value(0), stepSize(1),
- delayTimer(0), repeatTimer(0), up(Q_NULLPTR), down(Q_NULLPTR), validator(Q_NULLPTR) { }
+ delayTimer(0), repeatTimer(0), up(nullptr), down(nullptr), validator(nullptr) { }
int boundValue(int value) const;
void updateValue();
@@ -623,7 +623,7 @@ QAccessible::Role QQuickSpinBox::accessibleRole() const
class QQuickSpinButtonPrivate : public QObjectPrivate
{
public:
- QQuickSpinButtonPrivate() : pressed(false), indicator(Q_NULLPTR) { }
+ QQuickSpinButtonPrivate() : pressed(false), indicator(nullptr) { }
bool pressed;
QQuickItem *indicator;
};
diff --git a/src/templates/qquickspinbox_p.h b/src/templates/qquickspinbox_p.h
index 0ad5e70d..5d05c25b 100644
--- a/src/templates/qquickspinbox_p.h
+++ b/src/templates/qquickspinbox_p.h
@@ -72,7 +72,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickSpinBox : public QQuickControl
Q_PROPERTY(QQuickSpinButton *down READ down CONSTANT FINAL)
public:
- explicit QQuickSpinBox(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickSpinBox(QQuickItem *parent = nullptr);
int from() const;
void setFrom(int from);
@@ -112,21 +112,21 @@ Q_SIGNALS:
void valueFromTextChanged();
protected:
- bool childMouseEventFilter(QQuickItem *child, QEvent *event) Q_DECL_OVERRIDE;
- void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseUngrabEvent() Q_DECL_OVERRIDE;
- void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
-
- void componentComplete() Q_DECL_OVERRIDE;
- void itemChange(ItemChange change, const ItemChangeData &value) Q_DECL_OVERRIDE;
- void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) Q_DECL_OVERRIDE;
+ bool childMouseEventFilter(QQuickItem *child, QEvent *event) override;
+ void keyPressEvent(QKeyEvent *event) override;
+ void keyReleaseEvent(QKeyEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ void mouseUngrabEvent() override;
+ void timerEvent(QTimerEvent *event) override;
+
+ void componentComplete() override;
+ void itemChange(ItemChange change, const ItemChangeData &value) override;
+ void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override;
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::Role accessibleRole() const Q_DECL_OVERRIDE;
+ QAccessible::Role accessibleRole() const override;
#endif
private:
diff --git a/src/templates/qquickstackview.cpp b/src/templates/qquickstackview.cpp
index 3d39c80c..29b631dc 100644
--- a/src/templates/qquickstackview.cpp
+++ b/src/templates/qquickstackview.cpp
@@ -270,7 +270,7 @@ QQuickStackView::~QQuickStackView()
{
Q_D(QQuickStackView);
if (d->transitioner) {
- d->transitioner->setChangeListener(Q_NULLPTR);
+ d->transitioner->setChangeListener(nullptr);
delete d->transitioner;
}
qDeleteAll(d->removals);
@@ -282,7 +282,7 @@ QQuickStackAttached *QQuickStackView::qmlAttachedProperties(QObject *object)
QQuickItem *item = qobject_cast<QQuickItem *>(object);
if (!item) {
qmlInfo(object) << "StackView must be attached to an Item";
- return Q_NULLPTR;
+ return nullptr;
}
return new QQuickStackAttached(item);
}
@@ -339,7 +339,7 @@ QQuickItem *QQuickStackView::get(int index, LoadBehavior behavior)
element->load(this);
return element->item;
}
- return Q_NULLPTR;
+ return nullptr;
}
/*!
@@ -365,7 +365,7 @@ QQuickItem *QQuickStackView::find(const QJSValue &callback, LoadBehavior behavio
QJSValue func(callback);
QQmlEngine *engine = qmlEngine(this);
if (!engine || !func.isCallable()) // TODO: warning?
- return Q_NULLPTR;
+ return nullptr;
for (int i = d->elements.count() - 1; i >= 0; --i) {
QQuickStackElement *element = d->elements.at(i);
@@ -378,7 +378,7 @@ QQuickItem *QQuickStackView::find(const QJSValue &callback, LoadBehavior behavio
}
}
- return Q_NULLPTR;
+ return nullptr;
}
/*!
@@ -449,7 +449,7 @@ void QQuickStackView::push(QQmlV4Function *args)
return;
}
- QQuickStackElement *exit = Q_NULLPTR;
+ QQuickStackElement *exit = nullptr;
if (!d->elements.isEmpty())
exit = d->elements.top();
@@ -533,7 +533,7 @@ void QQuickStackView::pop(QQmlV4Function *args)
operation = static_cast<Operation>(lastArg->toInt32());
}
- QQuickItem *previousItem = Q_NULLPTR;
+ QQuickItem *previousItem = nullptr;
if (d->popElements(enter)) {
if (exit)
@@ -616,7 +616,7 @@ void QQuickStackView::replace(QQmlV4Function *args)
if (lastArg->isInt32())
operation = static_cast<Operation>(lastArg->toInt32());
- QQuickStackElement *target = Q_NULLPTR;
+ QQuickStackElement *target = nullptr;
QV4::ScopedValue firstArg(scope, (*args)[0]);
if (firstArg->isNull())
target = d->elements.value(0);
@@ -631,7 +631,7 @@ void QQuickStackView::replace(QQmlV4Function *args)
}
int depth = d->elements.count();
- QQuickStackElement* exit = Q_NULLPTR;
+ QQuickStackElement* exit = nullptr;
if (!d->elements.isEmpty())
exit = d->elements.pop();
@@ -659,7 +659,7 @@ void QQuickStackView::replace(QQmlV4Function *args)
void QQuickStackView::clear()
{
Q_D(QQuickStackView);
- d->setCurrentItem(Q_NULLPTR);
+ d->setCurrentItem(nullptr);
qDeleteAll(d->elements);
d->elements.clear();
emit depthChanged();
@@ -702,7 +702,7 @@ QQuickTransition *QQuickStackView::popEnter() const
Q_D(const QQuickStackView);
if (d->transitioner)
return d->transitioner->removeDisplacedTransition;
- return Q_NULLPTR;
+ return nullptr;
}
void QQuickStackView::setPopEnter(QQuickTransition *enter)
@@ -728,7 +728,7 @@ QQuickTransition *QQuickStackView::popExit() const
Q_D(const QQuickStackView);
if (d->transitioner)
return d->transitioner->removeTransition;
- return Q_NULLPTR;
+ return nullptr;
}
void QQuickStackView::setPopExit(QQuickTransition *exit)
@@ -754,7 +754,7 @@ QQuickTransition *QQuickStackView::pushEnter() const
Q_D(const QQuickStackView);
if (d->transitioner)
return d->transitioner->addTransition;
- return Q_NULLPTR;
+ return nullptr;
}
void QQuickStackView::setPushEnter(QQuickTransition *enter)
@@ -780,7 +780,7 @@ QQuickTransition *QQuickStackView::pushExit() const
Q_D(const QQuickStackView);
if (d->transitioner)
return d->transitioner->addDisplacedTransition;
- return Q_NULLPTR;
+ return nullptr;
}
void QQuickStackView::setPushExit(QQuickTransition *exit)
@@ -806,7 +806,7 @@ QQuickTransition *QQuickStackView::replaceEnter() const
Q_D(const QQuickStackView);
if (d->transitioner)
return d->transitioner->moveTransition;
- return Q_NULLPTR;
+ return nullptr;
}
void QQuickStackView::setReplaceEnter(QQuickTransition *enter)
@@ -832,7 +832,7 @@ QQuickTransition *QQuickStackView::replaceExit() const
Q_D(const QQuickStackView);
if (d->transitioner)
return d->transitioner->moveDisplacedTransition;
- return Q_NULLPTR;
+ return nullptr;
}
void QQuickStackView::setReplaceExit(QQuickTransition *exit)
@@ -850,7 +850,7 @@ void QQuickStackView::componentComplete()
QQuickControl::componentComplete();
Q_D(QQuickStackView);
- QQuickStackElement *element = Q_NULLPTR;
+ QQuickStackElement *element = nullptr;
if (QObject *o = d->initialItem.value<QObject *>())
element = QQuickStackElement::fromObject(o, this);
else if (d->initialItem.canConvert<QString>())
@@ -887,11 +887,11 @@ void QQuickStackAttachedPrivate::itemParentChanged(QQuickItem *item, QQuickItem
{
Q_Q(QQuickStackAttached);
int oldIndex = element ? element->index : -1;
- QQuickStackView *oldView = element ? element->view : Q_NULLPTR;
+ QQuickStackView *oldView = element ? element->view : nullptr;
QQuickStackView::Status oldStatus = element ? element->status : QQuickStackView::Inactive;
QQuickStackView *newView = qobject_cast<QQuickStackView *>(parent);
- element = newView ? QQuickStackViewPrivate::get(newView)->findElement(item) : Q_NULLPTR;
+ element = newView ? QQuickStackViewPrivate::get(newView)->findElement(item) : nullptr;
int newIndex = element ? element->index : -1;
QQuickStackView::Status newStatus = element ? element->status : QQuickStackView::Inactive;
@@ -940,7 +940,7 @@ int QQuickStackAttached::index() const
QQuickStackView *QQuickStackAttached::view() const
{
Q_D(const QQuickStackAttached);
- return d->element ? d->element->view : Q_NULLPTR;
+ return d->element ? d->element->view : nullptr;
}
/*!
diff --git a/src/templates/qquickstackview_p.cpp b/src/templates/qquickstackview_p.cpp
index 1240d162..a34b62e9 100644
--- a/src/templates/qquickstackview_p.cpp
+++ b/src/templates/qquickstackview_p.cpp
@@ -62,15 +62,15 @@ public:
QQuickStackIncubator(QQuickStackElement *element) : QQmlIncubator(Synchronous), element(element) { }
protected:
- void setInitialState(QObject *object) Q_DECL_OVERRIDE { element->incubate(object); }
+ void setInitialState(QObject *object) override { element->incubate(object); }
private:
QQuickStackElement *element;
};
-QQuickStackElement::QQuickStackElement() : QQuickItemViewTransitionableItem(Q_NULLPTR),
+QQuickStackElement::QQuickStackElement() : QQuickItemViewTransitionableItem(nullptr),
index(-1), init(false), removal(false), ownItem(false), ownComponent(false), widthValid(false), heightValid(false),
- context(Q_NULLPTR), component(Q_NULLPTR), incubator(Q_NULLPTR), view(Q_NULLPTR),
+ context(nullptr), component(nullptr), incubator(nullptr), view(nullptr),
status(QQuickStackView::Inactive)
{
}
@@ -84,9 +84,9 @@ QQuickStackElement::~QQuickStackElement()
delete component;
if (ownItem && item) {
- item->setParentItem(Q_NULLPTR);
+ item->setParentItem(nullptr);
item->deleteLater();
- item = Q_NULLPTR;
+ item = nullptr;
} else if (item) {
item->setVisible(false);
if (item->parentItem() != originalParent) {
@@ -94,7 +94,7 @@ QQuickStackElement::~QQuickStackElement()
} else {
QQuickStackAttached *attached = attachedStackObject(this);
if (attached)
- QQuickStackAttachedPrivate::get(attached)->itemParentChanged(item, Q_NULLPTR);
+ QQuickStackAttachedPrivate::get(attached)->itemParentChanged(item, nullptr);
}
}
@@ -239,10 +239,10 @@ void QQuickStackElement::startTransition(QQuickItemViewTransitioner *transitione
void QQuickStackElement::itemDestroyed(QQuickItem *)
{
- item = Q_NULLPTR;
+ item = nullptr;
}
-QQuickStackViewPrivate::QQuickStackViewPrivate() : busy(false), currentItem(Q_NULLPTR), transitioner(Q_NULLPTR)
+QQuickStackViewPrivate::QQuickStackViewPrivate() : busy(false), currentItem(nullptr), transitioner(nullptr)
{
}
@@ -317,14 +317,14 @@ QQuickStackElement *QQuickStackViewPrivate::findElement(QQuickItem *item) const
return e;
}
}
- return Q_NULLPTR;
+ return nullptr;
}
QQuickStackElement *QQuickStackViewPrivate::findElement(const QV4::Value &value) const
{
if (const QV4::QObjectWrapper *o = value.as<QV4::QObjectWrapper>())
return findElement(qobject_cast<QQuickItem *>(o->object()));
- return Q_NULLPTR;
+ return nullptr;
}
QQuickStackElement *QQuickStackViewPrivate::createElement(const QV4::Value &value)
@@ -334,7 +334,7 @@ QQuickStackElement *QQuickStackViewPrivate::createElement(const QV4::Value &valu
return QQuickStackElement::fromString(s->toQString(), q);
if (const QV4::QObjectWrapper *o = value.as<QV4::QObjectWrapper>())
return QQuickStackElement::fromObject(o->object(), q);
- return Q_NULLPTR;
+ return nullptr;
}
bool QQuickStackViewPrivate::pushElements(const QList<QQuickStackElement *> &elems)
diff --git a/src/templates/qquickstackview_p.h b/src/templates/qquickstackview_p.h
index 6b78b50a..34a430e7 100644
--- a/src/templates/qquickstackview_p.h
+++ b/src/templates/qquickstackview_p.h
@@ -73,7 +73,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickStackView : public QQuickControl
Q_PROPERTY(QQuickTransition *replaceExit READ replaceExit WRITE setReplaceExit NOTIFY replaceExitChanged FINAL)
public:
- explicit QQuickStackView(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickStackView(QQuickItem *parent = nullptr);
~QQuickStackView();
static QQuickStackAttached *qmlAttachedProperties(QObject *object);
@@ -145,9 +145,9 @@ Q_SIGNALS:
void replaceExitChanged();
protected:
- void componentComplete() Q_DECL_OVERRIDE;
- void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
- bool childMouseEventFilter(QQuickItem *, QEvent *) Q_DECL_OVERRIDE;
+ void componentComplete() override;
+ void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
+ bool childMouseEventFilter(QQuickItem *, QEvent *) override;
private:
Q_DISABLE_COPY(QQuickStackView)
@@ -164,7 +164,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickStackAttached : public QObject
Q_PROPERTY(QQuickStackView::Status status READ status NOTIFY statusChanged FINAL)
public:
- explicit QQuickStackAttached(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickStackAttached(QQuickItem *parent = nullptr);
~QQuickStackAttached();
int index() const;
diff --git a/src/templates/qquickstackview_p_p.h b/src/templates/qquickstackview_p_p.h
index d14c6326..93d08034 100644
--- a/src/templates/qquickstackview_p_p.h
+++ b/src/templates/qquickstackview_p_p.h
@@ -82,7 +82,7 @@ public:
bool prepareTransition(QQuickItemViewTransitioner *transitioner, const QRectF &viewBounds);
void startTransition(QQuickItemViewTransitioner *transitioner);
- void itemDestroyed(QQuickItem *item) Q_DECL_OVERRIDE;
+ void itemDestroyed(QQuickItem *item) override;
int index;
bool init;
@@ -129,7 +129,7 @@ public:
void replaceTransition(QQuickStackElement *enter, QQuickStackElement *exit, const QRectF &viewBounds, bool immediate);
void completeTransition(QQuickStackElement *element, QQuickTransition *transition);
- void viewItemTransitionFinished(QQuickItemViewTransitionableItem *item) Q_DECL_OVERRIDE;
+ void viewItemTransitionFinished(QQuickItemViewTransitionableItem *item) override;
void setBusy(bool busy);
bool busy;
@@ -145,7 +145,7 @@ class QQuickStackAttachedPrivate : public QObjectPrivate, public QQuickItemChang
Q_DECLARE_PUBLIC(QQuickStackAttached)
public:
- QQuickStackAttachedPrivate() : element(Q_NULLPTR) { }
+ QQuickStackAttachedPrivate() : element(nullptr) { }
static QQuickStackAttachedPrivate *get(QQuickStackAttached *attached)
{
diff --git a/src/templates/qquickswipeview.cpp b/src/templates/qquickswipeview.cpp
index 2f0dee54..40366af1 100644
--- a/src/templates/qquickswipeview.cpp
+++ b/src/templates/qquickswipeview.cpp
@@ -109,7 +109,7 @@ QQuickSwipeViewAttached *QQuickSwipeView::qmlAttachedProperties(QObject *object)
QQuickItem *item = qobject_cast<QQuickItem *>(object);
if (!item) {
qWarning() << "SwipeView: attached properties must be accessed from within a child item";
- return Q_NULLPTR;
+ return nullptr;
}
return new QQuickSwipeViewAttached(item);
@@ -159,7 +159,7 @@ class QQuickSwipeViewAttachedPrivate : public QObjectPrivate, public QQuickItemC
public:
QQuickSwipeViewAttachedPrivate(QQuickItem *item) :
item(item),
- swipeView(Q_NULLPTR),
+ swipeView(nullptr),
index(-1),
isCurrent(false)
{
@@ -170,9 +170,9 @@ public:
void updateView(QQuickItem *parent);
- void itemChildAdded(QQuickItem *, QQuickItem *) Q_DECL_OVERRIDE;
- void itemChildRemoved(QQuickItem *, QQuickItem *) Q_DECL_OVERRIDE;
- void itemParentChanged(QQuickItem *, QQuickItem *) Q_DECL_OVERRIDE;
+ void itemChildAdded(QQuickItem *, QQuickItem *) override;
+ void itemChildRemoved(QQuickItem *, QQuickItem *) override;
+ void itemParentChanged(QQuickItem *, QQuickItem *) override;
void updateIndex();
void updateIsCurrent();
@@ -192,7 +192,7 @@ public:
void QQuickSwipeViewAttachedPrivate::updateIndex()
{
- setIndex(swipeView ? QQuickSwipeViewPrivate::get(swipeView)->contentModel->indexOf(item, Q_NULLPTR) : -1);
+ setIndex(swipeView ? QQuickSwipeViewPrivate::get(swipeView)->contentModel->indexOf(item, nullptr) : -1);
}
void QQuickSwipeViewAttachedPrivate::updateIsCurrent()
@@ -259,7 +259,7 @@ void QQuickSwipeViewAttachedPrivate::updateView(QQuickItem *parent)
// - A non-visual or weird type like TestCase, when child items are created from components
// wherein the attached properties are used
// - null, when the item was removed with removeItem()
- QQuickSwipeView *view = Q_NULLPTR;
+ QQuickSwipeView *view = nullptr;
if (parent) {
view = qobject_cast<QQuickSwipeView*>(parent);
if (!view) {
diff --git a/src/templates/qquickswipeview_p.h b/src/templates/qquickswipeview_p.h
index bf733c7b..7a649300 100644
--- a/src/templates/qquickswipeview_p.h
+++ b/src/templates/qquickswipeview_p.h
@@ -60,13 +60,13 @@ class Q_LABSTEMPLATES_EXPORT QQuickSwipeView : public QQuickContainer
Q_OBJECT
public:
- explicit QQuickSwipeView(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickSwipeView(QQuickItem *parent = nullptr);
static QQuickSwipeViewAttached *qmlAttachedProperties(QObject *object);
protected:
- void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
- void itemAdded(int index, QQuickItem *item) Q_DECL_OVERRIDE;
+ void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
+ void itemAdded(int index, QQuickItem *item) override;
private:
Q_DISABLE_COPY(QQuickSwipeView)
diff --git a/src/templates/qquickswitch_p.h b/src/templates/qquickswitch_p.h
index 94d0d601..ee8f49f8 100644
--- a/src/templates/qquickswitch_p.h
+++ b/src/templates/qquickswitch_p.h
@@ -61,7 +61,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickSwitch : public QQuickAbstractButton
Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL)
public:
- explicit QQuickSwitch(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickSwitch(QQuickItem *parent = nullptr);
qreal position() const;
void setPosition(qreal position);
@@ -73,8 +73,8 @@ Q_SIGNALS:
void visualPositionChanged();
protected:
- void mirrorChange() Q_DECL_OVERRIDE;
- bool childMouseEventFilter(QQuickItem *child, QEvent *event) Q_DECL_OVERRIDE;
+ void mirrorChange() override;
+ bool childMouseEventFilter(QQuickItem *child, QEvent *event) override;
virtual qreal positionAt(const QPoint &point) const;
diff --git a/src/templates/qquicktabbar.cpp b/src/templates/qquicktabbar.cpp
index a2fc1e11..d2362f0c 100644
--- a/src/templates/qquicktabbar.cpp
+++ b/src/templates/qquicktabbar.cpp
@@ -84,7 +84,7 @@ void QQuickTabBarPrivate::updateCurrentIndex()
Q_Q(QQuickTabBar);
QQuickTabButton *button = qobject_cast<QQuickTabButton *>(q->sender());
if (button && button->isChecked())
- q->setCurrentIndex(contentModel->indexOf(button, Q_NULLPTR));
+ q->setCurrentIndex(contentModel->indexOf(button, nullptr));
}
void QQuickTabBarPrivate::updateLayout()
diff --git a/src/templates/qquicktabbar_p.h b/src/templates/qquicktabbar_p.h
index 7d6f674c..7ecb8230 100644
--- a/src/templates/qquicktabbar_p.h
+++ b/src/templates/qquicktabbar_p.h
@@ -59,18 +59,18 @@ class Q_LABSTEMPLATES_EXPORT QQuickTabBar : public QQuickContainer
Q_OBJECT
public:
- explicit QQuickTabBar(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickTabBar(QQuickItem *parent = nullptr);
protected:
- void updatePolish() Q_DECL_OVERRIDE;
- void componentComplete() Q_DECL_OVERRIDE;
- void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
- bool isContent(QQuickItem *item) const Q_DECL_OVERRIDE;
- void itemAdded(int index, QQuickItem *item) Q_DECL_OVERRIDE;
- void itemRemoved(int index, QQuickItem *item) Q_DECL_OVERRIDE;
+ void updatePolish() override;
+ void componentComplete() override;
+ void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
+ bool isContent(QQuickItem *item) const override;
+ void itemAdded(int index, QQuickItem *item) override;
+ void itemRemoved(int index, QQuickItem *item) override;
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::Role accessibleRole() const Q_DECL_OVERRIDE;
+ QAccessible::Role accessibleRole() const override;
#endif
private:
diff --git a/src/templates/qquicktabbutton_p.h b/src/templates/qquicktabbutton_p.h
index c02a206f..07a020e5 100644
--- a/src/templates/qquicktabbutton_p.h
+++ b/src/templates/qquicktabbutton_p.h
@@ -57,13 +57,13 @@ class Q_LABSTEMPLATES_EXPORT QQuickTabButton : public QQuickAbstractButton
Q_OBJECT
public:
- explicit QQuickTabButton(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickTabButton(QQuickItem *parent = nullptr);
protected:
- QFont defaultFont() const Q_DECL_OVERRIDE;
+ QFont defaultFont() const override;
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::Role accessibleRole() const Q_DECL_OVERRIDE;
+ QAccessible::Role accessibleRole() const override;
#endif
};
diff --git a/src/templates/qquicktextarea.cpp b/src/templates/qquicktextarea.cpp
index fbc14573..98fd7648 100644
--- a/src/templates/qquicktextarea.cpp
+++ b/src/templates/qquicktextarea.cpp
@@ -79,7 +79,7 @@ QT_BEGIN_NAMESPACE
*/
QQuickTextAreaPrivate::QQuickTextAreaPrivate()
- : background(Q_NULLPTR), focusReason(Qt::OtherFocusReason), accessibleAttached(Q_NULLPTR)
+ : background(nullptr), focusReason(Qt::OtherFocusReason), accessibleAttached(nullptr)
{
#ifndef QT_NO_ACCESSIBILITY
QAccessible::installActivationObserver(this);
diff --git a/src/templates/qquicktextarea_p.h b/src/templates/qquicktextarea_p.h
index acf67359..623dc952 100644
--- a/src/templates/qquicktextarea_p.h
+++ b/src/templates/qquicktextarea_p.h
@@ -68,7 +68,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickTextArea : public QQuickTextEdit
Q_PROPERTY(Qt::FocusReason focusReason READ focusReason WRITE setFocusReason NOTIFY focusReasonChanged FINAL)
public:
- explicit QQuickTextArea(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickTextArea(QQuickItem *parent = nullptr);
~QQuickTextArea();
QFont font() const;
@@ -93,18 +93,18 @@ Q_SIGNALS:
void pressAndHold(QQuickMouseEvent *event);
protected:
- void classBegin() Q_DECL_OVERRIDE;
-
- void itemChange(ItemChange change, const ItemChangeData &value) Q_DECL_OVERRIDE;
- void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
- QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data) Q_DECL_OVERRIDE;
-
- void focusInEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
- void focusOutEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
+ void classBegin() override;
+
+ void itemChange(ItemChange change, const ItemChangeData &value) override;
+ void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
+ QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data) override;
+
+ void focusInEvent(QFocusEvent *event) override;
+ void focusOutEvent(QFocusEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ void timerEvent(QTimerEvent *event) override;
private:
Q_DISABLE_COPY(QQuickTextArea)
diff --git a/src/templates/qquicktextarea_p_p.h b/src/templates/qquicktextarea_p_p.h
index 2a16e5cc..35dd704d 100644
--- a/src/templates/qquicktextarea_p_p.h
+++ b/src/templates/qquicktextarea_p_p.h
@@ -78,17 +78,17 @@ public:
void resizeBackground();
void resolveFont();
- qreal getImplicitWidth() const Q_DECL_OVERRIDE;
- qreal getImplicitHeight() const Q_DECL_OVERRIDE;
+ qreal getImplicitWidth() const override;
+ qreal getImplicitHeight() const override;
- void implicitWidthChanged() Q_DECL_OVERRIDE;
- void implicitHeightChanged() Q_DECL_OVERRIDE;
+ void implicitWidthChanged() override;
+ void implicitHeightChanged() override;
void _q_readOnlyChanged(bool isReadOnly);
#ifndef QT_NO_ACCESSIBILITY
- void accessibilityActiveChanged(bool active) Q_DECL_OVERRIDE;
- QAccessible::Role accessibleRole() const Q_DECL_OVERRIDE;
+ void accessibilityActiveChanged(bool active) override;
+ QAccessible::Role accessibleRole() const override;
#endif
QQuickItem *background;
diff --git a/src/templates/qquicktextfield.cpp b/src/templates/qquicktextfield.cpp
index ec8c24ab..a8a6895e 100644
--- a/src/templates/qquicktextfield.cpp
+++ b/src/templates/qquicktextfield.cpp
@@ -89,9 +89,9 @@ QT_BEGIN_NAMESPACE
*/
QQuickTextFieldPrivate::QQuickTextFieldPrivate()
- : background(Q_NULLPTR)
+ : background(nullptr)
, focusReason(Qt::OtherFocusReason)
- , accessibleAttached(Q_NULLPTR)
+ , accessibleAttached(nullptr)
{
#ifndef QT_NO_ACCESSIBILITY
QAccessible::installActivationObserver(this);
diff --git a/src/templates/qquicktextfield_p.h b/src/templates/qquicktextfield_p.h
index 23658cc6..ee5f3470 100644
--- a/src/templates/qquicktextfield_p.h
+++ b/src/templates/qquicktextfield_p.h
@@ -68,7 +68,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickTextField : public QQuickTextInput
Q_PROPERTY(Qt::FocusReason focusReason READ focusReason WRITE setFocusReason NOTIFY focusReasonChanged FINAL)
public:
- explicit QQuickTextField(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickTextField(QQuickItem *parent = nullptr);
~QQuickTextField();
QFont font() const;
@@ -93,18 +93,18 @@ Q_SIGNALS:
void pressAndHold(QQuickMouseEvent *mouse);
protected:
- void classBegin() Q_DECL_OVERRIDE;
-
- void itemChange(ItemChange change, const ItemChangeData &value) Q_DECL_OVERRIDE;
- void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
- QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data) Q_DECL_OVERRIDE;
-
- void focusInEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
- void focusOutEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
+ void classBegin() override;
+
+ void itemChange(ItemChange change, const ItemChangeData &value) override;
+ void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
+ QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data) override;
+
+ void focusInEvent(QFocusEvent *event) override;
+ void focusOutEvent(QFocusEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ void timerEvent(QTimerEvent *event) override;
private:
Q_DISABLE_COPY(QQuickTextField)
diff --git a/src/templates/qquicktextfield_p_p.h b/src/templates/qquicktextfield_p_p.h
index 29b01f15..3f799a5f 100644
--- a/src/templates/qquicktextfield_p_p.h
+++ b/src/templates/qquicktextfield_p_p.h
@@ -78,18 +78,18 @@ public:
void resizeBackground();
void resolveFont();
- qreal getImplicitWidth() const Q_DECL_OVERRIDE;
- qreal getImplicitHeight() const Q_DECL_OVERRIDE;
+ qreal getImplicitWidth() const override;
+ qreal getImplicitHeight() const override;
- void implicitWidthChanged() Q_DECL_OVERRIDE;
- void implicitHeightChanged() Q_DECL_OVERRIDE;
+ void implicitWidthChanged() override;
+ void implicitHeightChanged() override;
void _q_readOnlyChanged(bool isReadOnly);
void _q_echoModeChanged(QQuickTextField::EchoMode echoMode);
#ifndef QT_NO_ACCESSIBILITY
- void accessibilityActiveChanged(bool active) Q_DECL_OVERRIDE;
- QAccessible::Role accessibleRole() const Q_DECL_OVERRIDE;
+ void accessibilityActiveChanged(bool active) override;
+ QAccessible::Role accessibleRole() const override;
#endif
QQuickItem *background;
diff --git a/src/templates/qquicktoolbar_p.h b/src/templates/qquicktoolbar_p.h
index 501f74c7..98bcf509 100644
--- a/src/templates/qquicktoolbar_p.h
+++ b/src/templates/qquicktoolbar_p.h
@@ -57,11 +57,11 @@ class Q_LABSTEMPLATES_EXPORT QQuickToolBar : public QQuickFrame
Q_OBJECT
public:
- explicit QQuickToolBar(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickToolBar(QQuickItem *parent = nullptr);
protected:
#ifndef QT_NO_ACCESSIBILITY
- QAccessible::Role accessibleRole() const Q_DECL_OVERRIDE;
+ QAccessible::Role accessibleRole() const override;
#endif
};
diff --git a/src/templates/qquicktoolbutton_p.h b/src/templates/qquicktoolbutton_p.h
index 25f2134d..a4b4d227 100644
--- a/src/templates/qquicktoolbutton_p.h
+++ b/src/templates/qquicktoolbutton_p.h
@@ -57,10 +57,10 @@ class Q_LABSTEMPLATES_EXPORT QQuickToolButton : public QQuickButton
Q_OBJECT
public:
- explicit QQuickToolButton(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickToolButton(QQuickItem *parent = nullptr);
protected:
- QFont defaultFont() const Q_DECL_OVERRIDE;
+ QFont defaultFont() const override;
};
QT_END_NAMESPACE
diff --git a/src/templates/qquicktumbler.cpp b/src/templates/qquicktumbler.cpp
index adfb1189..b1a64051 100644
--- a/src/templates/qquicktumbler.cpp
+++ b/src/templates/qquicktumbler.cpp
@@ -75,7 +75,7 @@ class QQuickTumblerPrivate : public QQuickControlPrivate, public QQuickItemChang
public:
QQuickTumblerPrivate() :
- delegate(Q_NULLPTR),
+ delegate(nullptr),
visibleItemCount(3)
{
}
@@ -91,8 +91,8 @@ public:
void _q_updateItemHeights();
void _q_updateItemWidths();
- void itemChildAdded(QQuickItem *, QQuickItem *) Q_DECL_OVERRIDE;
- void itemChildRemoved(QQuickItem *, QQuickItem *) Q_DECL_OVERRIDE;
+ void itemChildAdded(QQuickItem *, QQuickItem *) override;
+ void itemChildRemoved(QQuickItem *, QQuickItem *) override;
};
static QList<QQuickItem *> contentItemChildItems(QQuickItem *contentItem)
@@ -124,7 +124,7 @@ namespace {
else if (contentType == ListViewContentItem)
return qobject_cast<QQuickFlickable*>(rootContentItem)->contentItem();
- return Q_NULLPTR;
+ return nullptr;
}
static inline ContentItemType contentItemType(QQuickItem *rootContentItem)
@@ -253,7 +253,7 @@ void QQuickTumbler::setCurrentIndex(int currentIndex)
QQuickItem *QQuickTumbler::currentItem() const
{
Q_D(const QQuickTumbler);
- return d->contentItem ? d->contentItem->property("currentItem").value<QQuickItem*>() : Q_NULLPTR;
+ return d->contentItem ? d->contentItem->property("currentItem").value<QQuickItem*>() : nullptr;
}
/*!
@@ -303,7 +303,7 @@ QQuickTumblerAttached *QQuickTumbler::qmlAttachedProperties(QObject *object)
QQuickItem *delegateItem = qobject_cast<QQuickItem *>(object);
if (!delegateItem) {
qWarning() << "Tumbler: attached properties of Tumbler must be accessed from within a delegate item";
- return Q_NULLPTR;
+ return nullptr;
}
return new QQuickTumblerAttached(delegateItem);
@@ -396,7 +396,7 @@ class QQuickTumblerAttachedPrivate : public QObjectPrivate, public QQuickItemCha
Q_DECLARE_PUBLIC(QQuickTumblerAttached)
public:
QQuickTumblerAttachedPrivate(QQuickItem *delegateItem) :
- tumbler(Q_NULLPTR),
+ tumbler(nullptr),
index(-1),
displacement(1)
{
@@ -425,9 +425,9 @@ public:
~QQuickTumblerAttachedPrivate() {
}
- void itemGeometryChanged(QQuickItem *item, const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
- void itemChildAdded(QQuickItem *, QQuickItem *) Q_DECL_OVERRIDE;
- void itemChildRemoved(QQuickItem *, QQuickItem *) Q_DECL_OVERRIDE;
+ void itemGeometryChanged(QQuickItem *item, const QRectF &newGeometry, const QRectF &oldGeometry) override;
+ void itemChildAdded(QQuickItem *, QQuickItem *) override;
+ void itemChildRemoved(QQuickItem *, QQuickItem *) override;
void _q_calculateDisplacement();
diff --git a/src/templates/qquicktumbler_p.h b/src/templates/qquicktumbler_p.h
index ad57acbb..6c329496 100644
--- a/src/templates/qquicktumbler_p.h
+++ b/src/templates/qquicktumbler_p.h
@@ -68,7 +68,7 @@ class Q_LABSTEMPLATES_EXPORT QQuickTumbler : public QQuickControl
Q_PROPERTY(int visibleItemCount READ visibleItemCount WRITE setVisibleItemCount NOTIFY visibleItemCountChanged FINAL)
public:
- explicit QQuickTumbler(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickTumbler(QQuickItem *parent = nullptr);
~QQuickTumbler();
QVariant model() const;
@@ -97,10 +97,10 @@ Q_SIGNALS:
void visibleItemCountChanged();
protected:
- void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) Q_DECL_OVERRIDE;
- void componentComplete() Q_DECL_OVERRIDE;
- void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) Q_DECL_OVERRIDE;
- void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
+ void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override;
+ void componentComplete() override;
+ void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override;
+ void keyPressEvent(QKeyEvent *event) override;
private:
Q_DISABLE_COPY(QQuickTumbler)