aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/util')
-rw-r--r--src/quick/util/qquickanimation.cpp4
-rw-r--r--src/quick/util/qquickanimation_p.h16
-rw-r--r--src/quick/util/qquickanimation_p_p.h2
-rw-r--r--src/quick/util/qquickglobal.cpp24
-rw-r--r--src/quick/util/qquickpath.cpp199
-rw-r--r--src/quick/util/qquickpath_p.h58
-rw-r--r--src/quick/util/qquickprofiler_p.h9
-rw-r--r--src/quick/util/qquickpropertychanges.cpp2
-rw-r--r--src/quick/util/qquickshortcut_p.h8
-rw-r--r--src/quick/util/qquickstate.cpp6
-rw-r--r--src/quick/util/qquickstate_p.h2
-rw-r--r--src/quick/util/util.pri2
12 files changed, 287 insertions, 45 deletions
diff --git a/src/quick/util/qquickanimation.cpp b/src/quick/util/qquickanimation.cpp
index bfac46adb9..76b9b8f343 100644
--- a/src/quick/util/qquickanimation.cpp
+++ b/src/quick/util/qquickanimation.cpp
@@ -2112,7 +2112,7 @@ void QQuickPropertyAnimation::setFrom(const QVariant &f)
return;
d->from = f;
d->fromIsDefined = f.isValid();
- emit fromChanged(f);
+ emit fromChanged();
}
/*!
@@ -2139,7 +2139,7 @@ void QQuickPropertyAnimation::setTo(const QVariant &t)
return;
d->to = t;
d->toIsDefined = t.isValid();
- emit toChanged(t);
+ emit toChanged();
}
/*!
diff --git a/src/quick/util/qquickanimation_p.h b/src/quick/util/qquickanimation_p.h
index e27871dcaa..5edbcc089a 100644
--- a/src/quick/util/qquickanimation_p.h
+++ b/src/quick/util/qquickanimation_p.h
@@ -309,8 +309,8 @@ protected:
QObject *defaultTarget = 0) override;
Q_SIGNALS:
void durationChanged(int);
- void fromChanged(const QVariant &);
- void toChanged(const QVariant &);
+ void fromChanged();
+ void toChanged();
void easingChanged(const QEasingCurve &);
void propertiesChanged(const QString &);
void targetChanged();
@@ -340,8 +340,8 @@ class Q_QUICK_PRIVATE_EXPORT QQuickNumberAnimation : public QQuickPropertyAnimat
Q_OBJECT
Q_DECLARE_PRIVATE(QQuickPropertyAnimation)
- Q_PROPERTY(qreal from READ from WRITE setFrom)
- Q_PROPERTY(qreal to READ to WRITE setTo)
+ Q_PROPERTY(qreal from READ from WRITE setFrom NOTIFY fromChanged)
+ Q_PROPERTY(qreal to READ to WRITE setTo NOTIFY toChanged)
public:
QQuickNumberAnimation(QObject *parent=0);
@@ -365,8 +365,8 @@ class Q_QUICK_PRIVATE_EXPORT QQuickVector3dAnimation : public QQuickPropertyAnim
Q_OBJECT
Q_DECLARE_PRIVATE(QQuickPropertyAnimation)
- Q_PROPERTY(QVector3D from READ from WRITE setFrom)
- Q_PROPERTY(QVector3D to READ to WRITE setTo)
+ Q_PROPERTY(QVector3D from READ from WRITE setFrom NOTIFY fromChanged)
+ Q_PROPERTY(QVector3D to READ to WRITE setTo NOTIFY toChanged)
public:
QQuickVector3dAnimation(QObject *parent=0);
@@ -385,8 +385,8 @@ class Q_QUICK_PRIVATE_EXPORT QQuickRotationAnimation : public QQuickPropertyAnim
Q_OBJECT
Q_DECLARE_PRIVATE(QQuickRotationAnimation)
- Q_PROPERTY(qreal from READ from WRITE setFrom)
- Q_PROPERTY(qreal to READ to WRITE setTo)
+ Q_PROPERTY(qreal from READ from WRITE setFrom NOTIFY fromChanged)
+ Q_PROPERTY(qreal to READ to WRITE setTo NOTIFY toChanged)
Q_PROPERTY(RotationDirection direction READ direction WRITE setDirection NOTIFY directionChanged)
public:
diff --git a/src/quick/util/qquickanimation_p_p.h b/src/quick/util/qquickanimation_p_p.h
index a7abc5a004..7a1bd8ff13 100644
--- a/src/quick/util/qquickanimation_p_p.h
+++ b/src/quick/util/qquickanimation_p_p.h
@@ -199,7 +199,7 @@ public:
QQuickAnimationGroup *group;
QAbstractAnimationJob* animationInstance;
- static QQmlProperty createProperty(QObject *obj, const QString &str, QObject *infoObj, QString *errorMessage = Q_NULLPTR);
+ static QQmlProperty createProperty(QObject *obj, const QString &str, QObject *infoObj, QString *errorMessage = nullptr);
};
class QQuickPauseAnimationPrivate : public QQuickAbstractAnimationPrivate
diff --git a/src/quick/util/qquickglobal.cpp b/src/quick/util/qquickglobal.cpp
index 14ead56740..5f8d2b94d3 100644
--- a/src/quick/util/qquickglobal.cpp
+++ b/src/quick/util/qquickglobal.cpp
@@ -398,7 +398,7 @@ public:
return QMatrix4x4(matVals);
}
- const QMetaObject *getMetaObjectForMetaType(int type) Q_DECL_OVERRIDE
+ const QMetaObject *getMetaObjectForMetaType(int type) override
{
switch (type) {
case QMetaType::QColor:
@@ -422,7 +422,7 @@ public:
return 0;
}
- bool init(int type, QVariant& dst) Q_DECL_OVERRIDE
+ bool init(int type, QVariant& dst) override
{
switch (type) {
case QMetaType::QColor:
@@ -452,7 +452,7 @@ public:
return false;
}
- bool create(int type, int argc, const void *argv[], QVariant *v) Q_DECL_OVERRIDE
+ bool create(int type, int argc, const void *argv[], QVariant *v) override
{
switch (type) {
case QMetaType::QFont: // must specify via js-object.
@@ -519,7 +519,7 @@ public:
return true;
}
- bool createFromString(int type, const QString &s, void *data, size_t dataSize) Q_DECL_OVERRIDE
+ bool createFromString(int type, const QString &s, void *data, size_t dataSize) override
{
bool ok = false;
@@ -542,7 +542,7 @@ public:
return false;
}
- bool createStringFrom(int type, const void *data, QString *s) Q_DECL_OVERRIDE
+ bool createStringFrom(int type, const void *data, QString *s) override
{
if (type == QMetaType::QColor) {
const QColor *color = reinterpret_cast<const QColor *>(data);
@@ -553,7 +553,7 @@ public:
return false;
}
- bool variantFromString(const QString &s, QVariant *v) Q_DECL_OVERRIDE
+ bool variantFromString(const QString &s, QVariant *v) override
{
QColor c(s);
if (c.isValid()) {
@@ -596,7 +596,7 @@ public:
return false;
}
- bool variantFromString(int type, const QString &s, QVariant *v) Q_DECL_OVERRIDE
+ bool variantFromString(int type, const QString &s, QVariant *v) override
{
bool ok = false;
@@ -639,7 +639,7 @@ public:
return false;
}
- bool variantFromJsObject(int type, QQmlV4Handle object, QV4::ExecutionEngine *v4, QVariant *v) Q_DECL_OVERRIDE
+ bool variantFromJsObject(int type, QQmlV4Handle object, QV4::ExecutionEngine *v4, QVariant *v) override
{
QV4::Scope scope(v4);
#ifndef QT_NO_DEBUG
@@ -665,7 +665,7 @@ public:
return (*(reinterpret_cast<const T *>(lhs)) == rhs.value<T>());
}
- bool equal(int type, const void *lhs, const QVariant &rhs) Q_DECL_OVERRIDE
+ bool equal(int type, const void *lhs, const QVariant &rhs) override
{
switch (type) {
case QMetaType::QColor:
@@ -698,7 +698,7 @@ public:
return true;
}
- bool store(int type, const void *src, void *dst, size_t dstSize) Q_DECL_OVERRIDE
+ bool store(int type, const void *src, void *dst, size_t dstSize) override
{
Q_UNUSED(dstSize);
switch (type) {
@@ -728,7 +728,7 @@ public:
return true;
}
- bool read(const QVariant &src, void *dst, int dstType) Q_DECL_OVERRIDE
+ bool read(const QVariant &src, void *dst, int dstType) override
{
switch (dstType) {
case QMetaType::QColor:
@@ -762,7 +762,7 @@ public:
return false;
}
- bool write(int type, const void *src, QVariant& dst) Q_DECL_OVERRIDE
+ bool write(int type, const void *src, QVariant& dst) override
{
switch (type) {
case QMetaType::QColor:
diff --git a/src/quick/util/qquickpath.cpp b/src/quick/util/qquickpath.cpp
index b19eec6fb3..0323dc9286 100644
--- a/src/quick/util/qquickpath.cpp
+++ b/src/quick/util/qquickpath.cpp
@@ -60,7 +60,8 @@ QT_BEGIN_NAMESPACE
This type is the base for all path types. It cannot
be instantiated.
- \sa Path, PathAttribute, PathPercent, PathLine, PathQuad, PathCubic, PathArc, PathCurve, PathSvg
+ \sa Path, PathAttribute, PathPercent, PathLine, PathQuad, PathCubic, PathArc,
+ PathAngleArc, PathCurve, PathSvg
*/
/*!
@@ -71,7 +72,7 @@ QT_BEGIN_NAMESPACE
\brief Defines a path for use by \l PathView and \l Shape
A Path is composed of one or more path segments - PathLine, PathQuad,
- PathCubic, PathArc, PathCurve, PathSvg.
+ PathCubic, PathArc, PathAngleArc, PathCurve, PathSvg.
The spacing of the items along the Path can be adjusted via a
PathPercent object.
@@ -121,6 +122,12 @@ QT_BEGIN_NAMESPACE
\li Yes
\li Yes
\row
+ \li PathAngleArc
+ \li Yes
+ \li Yes
+ \li Yes
+ \li Yes
+ \row
\li PathSvg
\li Yes
\li Yes
@@ -149,7 +156,7 @@ QT_BEGIN_NAMESPACE
\note Path is a non-visual type; it does not display anything on its own.
To draw a path, use \l Shape.
- \sa PathView, Shape, PathAttribute, PathPercent, PathLine, PathMove, PathQuad, PathCubic, PathArc, PathCurve, PathSvg
+ \sa PathView, Shape, PathAttribute, PathPercent, PathLine, PathMove, PathQuad, PathCubic, PathArc, PathAngleArc, PathCurve, PathSvg
*/
QQuickPath::QQuickPath(QObject *parent)
: QObject(*(new QQuickPathPrivate), parent)
@@ -236,6 +243,7 @@ bool QQuickPath::isClosed() const
\li \l PathQuad - a quadratic Bezier curve to a given position with a control point.
\li \l PathCubic - a cubic Bezier curve to a given position with two control points.
\li \l PathArc - an arc to a given position with a radius.
+ \li \l PathAngleArc - an arc specified by center point, radii, and angles.
\li \l PathSvg - a path specified as an SVG path data string.
\li \l PathCurve - a point on a Catmull-Rom curve.
\li \l PathAttribute - an attribute at a given position in the path.
@@ -1078,7 +1086,7 @@ void QQuickPathAttribute::setValue(qreal value)
}
\endqml
- \sa Path, PathQuad, PathCubic, PathArc, PathCurve, PathSvg, PathMove
+ \sa Path, PathQuad, PathCubic, PathArc, PathAngleArc, PathCurve, PathSvg, PathMove
*/
/*!
@@ -1144,7 +1152,7 @@ void QQuickPathLine::addToPath(QPainterPath &path, const QQuickPathData &data)
between the operations of drawing a straight line and moving the path
position without drawing anything.
- \sa Path, PathQuad, PathCubic, PathArc, PathCurve, PathSvg, PathLine
+ \sa Path, PathQuad, PathCubic, PathArc, PathAngleArc, PathCurve, PathSvg, PathLine
*/
/*!
@@ -1198,7 +1206,7 @@ void QQuickPathMove::addToPath(QPainterPath &path, const QQuickPathData &data)
\endqml
\endtable
- \sa Path, PathCubic, PathLine, PathArc, PathCurve, PathSvg
+ \sa Path, PathCubic, PathLine, PathArc, PathAngleArc, PathCurve, PathSvg
*/
/*!
@@ -1354,7 +1362,7 @@ void QQuickPathQuad::addToPath(QPainterPath &path, const QQuickPathData &data)
\endqml
\endtable
- \sa Path, PathQuad, PathLine, PathArc, PathCurve, PathSvg
+ \sa Path, PathQuad, PathLine, PathArc, PathAngleArc, PathCurve, PathSvg
*/
/*!
@@ -1720,7 +1728,7 @@ void QQuickPathCatmullRomCurve::addToPath(QPainterPath &path, const QQuickPathDa
Note that a single PathArc cannot be used to specify a circle. Instead, you can
use two PathArc elements, each specifying half of the circle.
- \sa Path, PathLine, PathQuad, PathCubic, PathCurve, PathSvg
+ \sa Path, PathLine, PathQuad, PathCubic, PathAngleArc, PathCurve, PathSvg
*/
/*!
@@ -1912,6 +1920,179 @@ void QQuickPathArc::addToPath(QPainterPath &path, const QQuickPathData &data)
/****************************************************************************/
/*!
+ \qmltype PathAngleArc
+ \instantiates QQuickPathAngleArc
+ \inqmlmodule QtQuick
+ \ingroup qtquick-animation-paths
+ \brief Defines an arc with the given radii and center
+
+ PathAngleArc provides a simple way of specifying an arc. While PathArc is designed
+ to work as part of a larger path (specifying start and end), PathAngleArc is designed
+ to make a path where the arc is primary (such as a circular progress indicator) more intuitive.
+
+ \sa Path, PathLine, PathQuad, PathCubic, PathCurve, PathSvg, PathArc
+*/
+
+/*!
+ \qmlproperty real QtQuick::PathAngleArc::centerX
+ \qmlproperty real QtQuick::PathAngleArc::centerY
+
+ Defines the center of the arc.
+*/
+
+qreal QQuickPathAngleArc::centerX() const
+{
+ return _centerX;
+}
+
+void QQuickPathAngleArc::setCenterX(qreal centerX)
+{
+ if (_centerX == centerX)
+ return;
+
+ _centerX = centerX;
+ emit centerXChanged();
+ emit changed();
+}
+
+qreal QQuickPathAngleArc::centerY() const
+{
+ return _centerY;
+}
+
+void QQuickPathAngleArc::setCenterY(qreal centerY)
+{
+ if (_centerY == centerY)
+ return;
+
+ _centerY = centerY;
+ emit centerXChanged();
+ emit changed();
+}
+
+/*!
+ \qmlproperty real QtQuick::PathAngleArc::radiusX
+ \qmlproperty real QtQuick::PathAngleArc::radiusY
+
+ Defines the radii of the ellipse of which the arc is part.
+*/
+
+qreal QQuickPathAngleArc::radiusX() const
+{
+ return _radiusX;
+}
+
+void QQuickPathAngleArc::setRadiusX(qreal radius)
+{
+ if (_radiusX == radius)
+ return;
+
+ _radiusX = radius;
+ emit radiusXChanged();
+ emit changed();
+}
+
+qreal QQuickPathAngleArc::radiusY() const
+{
+ return _radiusY;
+}
+
+void QQuickPathAngleArc::setRadiusY(qreal radius)
+{
+ if (_radiusY == radius)
+ return;
+
+ _radiusY = radius;
+ emit radiusYChanged();
+ emit changed();
+}
+
+/*!
+ \qmlproperty real QtQuick::PathAngleArc::startAngle
+
+ Defines the start angle of the arc.
+
+ The start angle is reported clockwise, with zero degrees at the 3 o'clock position.
+*/
+
+qreal QQuickPathAngleArc::startAngle() const
+{
+ return _startAngle;
+}
+
+void QQuickPathAngleArc::setStartAngle(qreal angle)
+{
+ if (_startAngle == angle)
+ return;
+
+ _startAngle = angle;
+ emit startAngleChanged();
+ emit changed();
+}
+
+/*!
+ \qmlproperty real QtQuick::PathAngleArc::sweepAngle
+
+ Defines the sweep angle of the arc.
+
+ The arc will begin at startAngle and continue sweepAngle degrees, with a value of 360
+ resulting in a full circle. Positive numbers are clockwise and negative numbers are counterclockwise.
+*/
+
+qreal QQuickPathAngleArc::sweepAngle() const
+{
+ return _sweepAngle;
+}
+
+void QQuickPathAngleArc::setSweepAngle(qreal angle)
+{
+ if (_sweepAngle == angle)
+ return;
+
+ _sweepAngle = angle;
+ emit sweepAngleChanged();
+ emit changed();
+}
+
+/*!
+ \qmlproperty bool QtQuick::PathAngleArc::moveToStart
+
+ Whether this element should be disconnected from the previous Path element (or startX/Y).
+
+ The default value is true. If set to false, the previous element's end-point
+ (or startX/Y if PathAngleArc is the first element) will be connected to the arc's
+ start-point with a straight line.
+*/
+
+bool QQuickPathAngleArc::moveToStart() const
+{
+ return _moveToStart;
+}
+
+void QQuickPathAngleArc::setMoveToStart(bool move)
+{
+ if (_moveToStart == move)
+ return;
+
+ _moveToStart = move;
+ emit moveToStartChanged();
+ emit changed();
+}
+
+void QQuickPathAngleArc::addToPath(QPainterPath &path, const QQuickPathData &)
+{
+ qreal x = _centerX - _radiusX;
+ qreal y = _centerY - _radiusY;
+ qreal width = _radiusX * 2;
+ qreal height = _radiusY * 2;
+ if (_moveToStart)
+ path.arcMoveTo(x, y, width, height, -_startAngle);
+ path.arcTo(x, y, width, height, -_startAngle, -_sweepAngle);
+}
+
+/****************************************************************************/
+
+/*!
\qmltype PathSvg
\instantiates QQuickPathSvg
\inqmlmodule QtQuick
@@ -1936,7 +2117,7 @@ void QQuickPathArc::addToPath(QPainterPath &path, const QQuickPathData &data)
ShapePath can contain one or more PathSvg elements, or one or more other
type of elements, but not both.
- \sa Path, PathLine, PathQuad, PathCubic, PathArc, PathCurve
+ \sa Path, PathLine, PathQuad, PathCubic, PathArc, PathAngleArc, PathCurve
*/
/*!
diff --git a/src/quick/util/qquickpath_p.h b/src/quick/util/qquickpath_p.h
index b7fde5c272..d5474e2d30 100644
--- a/src/quick/util/qquickpath_p.h
+++ b/src/quick/util/qquickpath_p.h
@@ -331,6 +331,63 @@ private:
qreal _xAxisRotation;
};
+class Q_QUICK_PRIVATE_EXPORT QQuickPathAngleArc : public QQuickCurve
+{
+ Q_OBJECT
+ Q_PROPERTY(qreal centerX READ centerX WRITE setCenterX NOTIFY centerXChanged)
+ Q_PROPERTY(qreal centerY READ centerY WRITE setCenterY NOTIFY centerYChanged)
+ Q_PROPERTY(qreal radiusX READ radiusX WRITE setRadiusX NOTIFY radiusXChanged)
+ Q_PROPERTY(qreal radiusY READ radiusY WRITE setRadiusY NOTIFY radiusYChanged)
+ Q_PROPERTY(qreal startAngle READ startAngle WRITE setStartAngle NOTIFY startAngleChanged)
+ Q_PROPERTY(qreal sweepAngle READ sweepAngle WRITE setSweepAngle NOTIFY sweepAngleChanged)
+ Q_PROPERTY(bool moveToStart READ moveToStart WRITE setMoveToStart NOTIFY moveToStartChanged)
+
+public:
+ QQuickPathAngleArc(QObject *parent=0)
+ : QQuickCurve(parent), _centerX(0), _centerY(0), _radiusX(0), _radiusY(0), _startAngle(0), _sweepAngle(0), _moveToStart(true) {}
+
+ qreal centerX() const;
+ void setCenterX(qreal);
+
+ qreal centerY() const;
+ void setCenterY(qreal);
+
+ qreal radiusX() const;
+ void setRadiusX(qreal);
+
+ qreal radiusY() const;
+ void setRadiusY(qreal);
+
+ qreal startAngle() const;
+ void setStartAngle(qreal);
+
+ qreal sweepAngle() const;
+ void setSweepAngle(qreal);
+
+ bool moveToStart() const;
+ void setMoveToStart(bool);
+
+ void addToPath(QPainterPath &path, const QQuickPathData &) override;
+
+Q_SIGNALS:
+ void centerXChanged();
+ void centerYChanged();
+ void radiusXChanged();
+ void radiusYChanged();
+ void startAngleChanged();
+ void sweepAngleChanged();
+ void moveToStartChanged();
+
+private:
+ qreal _centerX;
+ qreal _centerY;
+ qreal _radiusX;
+ qreal _radiusY;
+ qreal _startAngle;
+ qreal _sweepAngle;
+ bool _moveToStart;
+};
+
class Q_QUICK_PRIVATE_EXPORT QQuickPathSvg : public QQuickCurve
{
Q_OBJECT
@@ -479,6 +536,7 @@ QML_DECLARE_TYPE(QQuickPathQuad)
QML_DECLARE_TYPE(QQuickPathCubic)
QML_DECLARE_TYPE(QQuickPathCatmullRomCurve)
QML_DECLARE_TYPE(QQuickPathArc)
+QML_DECLARE_TYPE(QQuickPathAngleArc)
QML_DECLARE_TYPE(QQuickPathSvg)
QML_DECLARE_TYPE(QQuickPathPercent)
QML_DECLARE_TYPE(QQuickPath)
diff --git a/src/quick/util/qquickprofiler_p.h b/src/quick/util/qquickprofiler_p.h
index d2fa935ad4..38027a6abf 100644
--- a/src/quick/util/qquickprofiler_p.h
+++ b/src/quick/util/qquickprofiler_p.h
@@ -52,9 +52,12 @@
//
#include <QtCore/private/qabstractanimation_p.h>
-#include <QtQml/private/qqmlprofilerdefinitions_p.h>
#include <QtQuick/private/qtquickglobal_p.h>
+#if QT_CONFIG(qml_debug)
+#include <QtQml/private/qqmlprofilerdefinitions_p.h>
+#endif
+
#include <QtCore/qurl.h>
#include <QtCore/qsize.h>
#include <QtCore/qmutex.h>
@@ -62,7 +65,7 @@
QT_BEGIN_NAMESPACE
-#ifdef QT_NO_QML_DEBUGGER
+#if !QT_CONFIG(qml_debug)
#define Q_QUICK_PROFILE_IF_ENABLED(feature, Code)
@@ -358,7 +361,7 @@ protected:
void setTimer(const QElapsedTimer &t);
};
-#endif // QT_NO_QML_DEBUGGER
+#endif // QT_CONFIG(qml_debug)
#define Q_QUICK_PROFILE(feature, Method)\
Q_QUICK_PROFILE_IF_ENABLED(feature, QQuickProfiler::Method)
diff --git a/src/quick/util/qquickpropertychanges.cpp b/src/quick/util/qquickpropertychanges.cpp
index 61380b3ea0..4a9b4a95c1 100644
--- a/src/quick/util/qquickpropertychanges.cpp
+++ b/src/quick/util/qquickpropertychanges.cpp
@@ -180,7 +180,7 @@ public:
rewindExpression = QQmlPropertyPrivate::signalExpression(property);
}
- bool override(QQuickStateActionEvent *other) override {
+ bool mayOverride(QQuickStateActionEvent *other) override {
if (other == this)
return true;
if (other->type() != type())
diff --git a/src/quick/util/qquickshortcut_p.h b/src/quick/util/qquickshortcut_p.h
index db918058b2..c5d5501cb7 100644
--- a/src/quick/util/qquickshortcut_p.h
+++ b/src/quick/util/qquickshortcut_p.h
@@ -74,7 +74,7 @@ class QQuickShortcut : public QObject, public QQmlParserStatus
Q_PROPERTY(Qt::ShortcutContext context READ context WRITE setContext NOTIFY contextChanged FINAL)
public:
- explicit QQuickShortcut(QObject *parent = Q_NULLPTR);
+ explicit QQuickShortcut(QObject *parent = nullptr);
~QQuickShortcut();
QVariant sequence() const;
@@ -106,9 +106,9 @@ Q_SIGNALS:
void activatedAmbiguously();
protected:
- void classBegin() Q_DECL_OVERRIDE;
- void componentComplete() Q_DECL_OVERRIDE;
- bool event(QEvent *event) Q_DECL_OVERRIDE;
+ void classBegin() override;
+ void componentComplete() override;
+ bool event(QEvent *event) override;
struct Shortcut {
Shortcut() : id(0) { }
diff --git a/src/quick/util/qquickstate.cpp b/src/quick/util/qquickstate.cpp
index 0a49d41491..65e51feb81 100644
--- a/src/quick/util/qquickstate.cpp
+++ b/src/quick/util/qquickstate.cpp
@@ -106,7 +106,7 @@ void QQuickStateActionEvent::clearBindings()
{
}
-bool QQuickStateActionEvent::override(QQuickStateActionEvent *other)
+bool QQuickStateActionEvent::mayOverride(QQuickStateActionEvent *other)
{
Q_UNUSED(other);
return false;
@@ -574,7 +574,7 @@ void QQuickState::apply(QQuickTransition *trans, QQuickState *revert)
for (int jj = 0; jj < d->revertList.count(); ++jj) {
QQuickStateActionEvent *event = d->revertList.at(jj).event();
if (event && event->type() == action.event->type()) {
- if (action.event->override(event)) {
+ if (action.event->mayOverride(event)) {
found = true;
if (action.event != d->revertList.at(jj).event() && action.event->needsCopy()) {
@@ -636,7 +636,7 @@ void QQuickState::apply(QQuickTransition *trans, QQuickState *revert)
for (int jj = 0; !found && jj < applyList.count(); ++jj) {
const QQuickStateAction &action = applyList.at(jj);
if (action.event && action.event->type() == event->type()) {
- if (action.event->override(event))
+ if (action.event->mayOverride(event))
found = true;
}
}
diff --git a/src/quick/util/qquickstate_p.h b/src/quick/util/qquickstate_p.h
index 7d22ca9f8c..ac720f4189 100644
--- a/src/quick/util/qquickstate_p.h
+++ b/src/quick/util/qquickstate_p.h
@@ -115,7 +115,7 @@ public:
virtual bool changesBindings();
virtual void clearBindings();
- virtual bool override(QQuickStateActionEvent*other);
+ virtual bool mayOverride(QQuickStateActionEvent*other);
};
//### rename to QQuickStateChange?
diff --git a/src/quick/util/util.pri b/src/quick/util/util.pri
index b53b132cce..edcb268cd9 100644
--- a/src/quick/util/util.pri
+++ b/src/quick/util/util.pri
@@ -28,7 +28,7 @@ SOURCES += \
$$PWD/qquicktextmetrics.cpp \
$$PWD/qquickvalidator.cpp
-!contains(QT_CONFIG, no-qml-debug): SOURCES += $$PWD/qquickprofiler.cpp
+qtConfig(qml-debug): SOURCES += $$PWD/qquickprofiler.cpp
HEADERS += \
$$PWD/qquickapplication_p.h\