diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-08-06 15:00:45 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-08-07 11:07:03 +0200 |
commit | c273175ffec925a4164de41a79c21d785a1761a7 (patch) | |
tree | cbba975d1667eeed45eff70f67106c51b53b742f /src/qml/types | |
parent | 5f530c252b3ca0a358c3f6e46add0f83ab8ebf2e (diff) |
Fix tests in qtquickcontrols 1 and 2
This patch partially reverts the 5.15 related #ifdefs from commit
f38e071f5b353cbf9ce6c6c104bd82099ae0aa14. Those were introduced without
any test coverage and our own modules (qtquickcontrols 1 and 2) were not
tested with it or adapted. The change of behavior breaks our own
existing code.
Task-number: QTBUG-33444
Change-Id: Ie9823638c1a02281798b725f745b15e622f837c5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/types')
-rw-r--r-- | src/qml/types/qqmlbind.cpp | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/src/qml/types/qqmlbind.cpp b/src/qml/types/qqmlbind.cpp index 5067b6a02e..4b60108597 100644 --- a/src/qml/types/qqmlbind.cpp +++ b/src/qml/types/qqmlbind.cpp @@ -70,12 +70,8 @@ public: , delayed(false) , pendingEval(false) , restoreBinding(true) -#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) , restoreValue(false) , restoreModeExplicit(false) -#else - , restoreValue(true) -#endif {} ~QQmlBindPrivate() { } @@ -93,9 +89,7 @@ public: bool pendingEval:1; bool restoreBinding:1; bool restoreValue:1; -#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) bool restoreModeExplicit:1; -#endif void validate(QObject *binding) const; void clearPrev(); @@ -365,8 +359,7 @@ void QQmlBind::setDelayed(bool delayed) \li Binding.RestoreBindingOrValue The original value is always restored. \list - \warning The default value is Binding.RestoreBinding. This will change in - Qt 5.15 to Binding.RestoreBindingOrValue. + The default value is Binding.RestoreBinding. If you rely on any specific behavior regarding the restoration of plain values when bindings get disabled you should migrate to explicitly set the @@ -392,9 +385,7 @@ void QQmlBind::setRestoreMode(RestorationMode newMode) if (newMode != restoreMode()) { d->restoreValue = (newMode & RestoreValue); d->restoreBinding = (newMode & RestoreBinding); -#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) d->restoreModeExplicit = true; -#endif emit restoreModeChanged(); } } @@ -465,27 +456,11 @@ void QQmlBind::eval() Q_ASSERT(vmemo); vmemo->setVMEProperty(propPriv->core.coreIndex(), *d->v4Value.valueRef()); d->clearPrev(); -#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) - } else if (!d->restoreModeExplicit) { - qmlWarning(this) - << "Not restoring previous value because restoreMode has not been set." - << "This behavior is deprecated." - << "In Qt < 5.15 the default is Binding.RestoreBinding." - << "In Qt >= 5.15 the default is Binding.RestoreBindingOrValue."; -#endif } } else if (d->prevIsVariant) { if (d->restoreValue) { d->prop.write(d->prevValue); d->clearPrev(); -#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) - } else if (!d->restoreModeExplicit) { - qmlWarning(this) - << "Not restoring previous value because restoreMode has not been set." - << "This behavior is deprecated." - << "In Qt < 5.15 the default is Binding.RestoreBinding." - << "In Qt >= 5.15 the default is Binding.RestoreBindingOrValue."; -#endif } } return; |