diff options
author | Robin Burchell <robin.burchell@crimson.no> | 2017-01-05 20:27:53 +0100 |
---|---|---|
committer | Robin Burchell <robin.burchell@crimson.no> | 2017-01-11 23:10:31 +0000 |
commit | 3057ec0447943fe022b66a2d19e13d94f9183a7c (patch) | |
tree | f89e26cfd6bca91f365ee123ddf705bd23871cd4 /src/quick/util | |
parent | 3294d1b291ebd52eb967c7cdb2081ce4e594ad89 (diff) |
Port existing qmlInfo callers to qmlWarning
Now that qmlInfo actually reports info messages, we want to change
existing callers to use warning-level messages to preserve the original
message level.
This was done through:
perl -p -i -e "s/qmlInfo\(/qmlWarning\(/" **/*.{cpp,h,qdoc}
.. with a little care taken to only add the hunks that should be changed.
Change-Id: I511cee11ce0a26ec1048cd2b84c7536b812a0d89
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/quick/util')
-rw-r--r-- | src/quick/util/qquickanimation.cpp | 18 | ||||
-rw-r--r-- | src/quick/util/qquickanimationcontroller.cpp | 2 | ||||
-rw-r--r-- | src/quick/util/qquickbehavior.cpp | 2 | ||||
-rw-r--r-- | src/quick/util/qquickfontloader.cpp | 2 | ||||
-rw-r--r-- | src/quick/util/qquickpropertychanges.cpp | 4 | ||||
-rw-r--r-- | src/quick/util/qquickstatechangescript.cpp | 2 | ||||
-rw-r--r-- | src/quick/util/qquickstategroup.cpp | 2 |
7 files changed, 16 insertions, 16 deletions
diff --git a/src/quick/util/qquickanimation.cpp b/src/quick/util/qquickanimation.cpp index 9de474ac36..1a2441171d 100644 --- a/src/quick/util/qquickanimation.cpp +++ b/src/quick/util/qquickanimation.cpp @@ -192,14 +192,14 @@ QQmlProperty QQuickAbstractAnimationPrivate::createProperty(QObject *obj, const if (errorMessage) *errorMessage = message; else - qmlInfo(infoObj) << message; + qmlWarning(infoObj) << message; return QQmlProperty(); } else if (!prop.isWritable()) { const QString message = QQuickAbstractAnimation::tr("Cannot animate read-only property \"%1\"").arg(str); if (errorMessage) *errorMessage = message; else - qmlInfo(infoObj) << message; + qmlWarning(infoObj) << message; return QQmlProperty(); } return prop; @@ -256,7 +256,7 @@ void QQuickAbstractAnimation::setRunning(bool r) return; if (d->group || d->disableUserControl) { - qmlInfo(this) << "setRunning() cannot be used on non-root animation nodes."; + qmlWarning(this) << "setRunning() cannot be used on non-root animation nodes."; return; } @@ -322,12 +322,12 @@ void QQuickAbstractAnimation::setPaused(bool p) return; if (!d->running) { - qmlInfo(this) << "setPaused() cannot be used when animation isn't running."; + qmlWarning(this) << "setPaused() cannot be used when animation isn't running."; return; } if (d->group || d->disableUserControl) { - qmlInfo(this) << "setPaused() cannot be used on non-root animation nodes."; + qmlWarning(this) << "setPaused() cannot be used on non-root animation nodes."; return; } @@ -709,7 +709,7 @@ int QQuickPauseAnimation::duration() const void QQuickPauseAnimation::setDuration(int duration) { if (duration < 0) { - qmlInfo(this) << tr("Cannot set a duration of < 0"); + qmlWarning(this) << tr("Cannot set a duration of < 0"); return; } @@ -1004,7 +1004,7 @@ void QQuickScriptActionPrivate::execute() QQmlExpression expr(scriptStr); expr.evaluate(); if (expr.hasError()) - qmlInfo(q) << expr.error(); + qmlWarning(q) << expr.error(); } } @@ -2077,7 +2077,7 @@ int QQuickPropertyAnimation::duration() const void QQuickPropertyAnimation::setDuration(int duration) { if (duration < 0) { - qmlInfo(this) << tr("Cannot set a duration of < 0"); + qmlWarning(this) << tr("Cannot set a duration of < 0"); return; } @@ -2644,7 +2644,7 @@ QQuickStateActions QQuickPropertyAnimation::createTransitionActions(QQuickStateA if (!successfullyCreatedDefaultProperty) { for (const QString &errorMessage : qAsConst(errorMessages)) - qmlInfo(this) << errorMessage; + qmlWarning(this) << errorMessage; } } diff --git a/src/quick/util/qquickanimationcontroller.cpp b/src/quick/util/qquickanimationcontroller.cpp index 4bc2d6319e..fa1ade50d1 100644 --- a/src/quick/util/qquickanimationcontroller.cpp +++ b/src/quick/util/qquickanimationcontroller.cpp @@ -169,7 +169,7 @@ void QQuickAnimationController::setAnimation(QQuickAbstractAnimation *animation) if (animation != d->animation) { if (animation) { if (animation->userControlDisabled()) { - qmlInfo(this) << "QQuickAnimationController::setAnimation: the animation is controlled by others, can't be used in AnimationController."; + qmlWarning(this) << "QQuickAnimationController::setAnimation: the animation is controlled by others, can't be used in AnimationController."; return; } animation->setDisableUserControl(); diff --git a/src/quick/util/qquickbehavior.cpp b/src/quick/util/qquickbehavior.cpp index 9af1d41b29..1b2d9afb7c 100644 --- a/src/quick/util/qquickbehavior.cpp +++ b/src/quick/util/qquickbehavior.cpp @@ -129,7 +129,7 @@ void QQuickBehavior::setAnimation(QQuickAbstractAnimation *animation) { Q_D(QQuickBehavior); if (d->animation) { - qmlInfo(this) << tr("Cannot change the animation assigned to a Behavior."); + qmlWarning(this) << tr("Cannot change the animation assigned to a Behavior."); return; } diff --git a/src/quick/util/qquickfontloader.cpp b/src/quick/util/qquickfontloader.cpp index d13291c30a..3761a37a6d 100644 --- a/src/quick/util/qquickfontloader.cpp +++ b/src/quick/util/qquickfontloader.cpp @@ -307,7 +307,7 @@ void QQuickFontLoader::updateFontInfo(const QString& name, QQuickFontLoader::Sta } if (status != d->status) { if (status == Error) - qmlInfo(this) << "Cannot load font: \"" << d->url.toString() << '"'; + qmlWarning(this) << "Cannot load font: \"" << d->url.toString() << '"'; d->status = status; emit statusChanged(); } diff --git a/src/quick/util/qquickpropertychanges.cpp b/src/quick/util/qquickpropertychanges.cpp index fafa2edd0b..20aa52e472 100644 --- a/src/quick/util/qquickpropertychanges.cpp +++ b/src/quick/util/qquickpropertychanges.cpp @@ -397,10 +397,10 @@ QQuickPropertyChangesPrivate::property(const QString &property) Q_Q(QQuickPropertyChanges); QQmlProperty prop(object, property, qmlContext(q)); if (!prop.isValid()) { - qmlInfo(q) << QQuickPropertyChanges::tr("Cannot assign to non-existent property \"%1\"").arg(property); + qmlWarning(q) << QQuickPropertyChanges::tr("Cannot assign to non-existent property \"%1\"").arg(property); return QQmlProperty(); } else if (!(prop.type() & QQmlProperty::SignalProperty) && !prop.isWritable()) { - qmlInfo(q) << QQuickPropertyChanges::tr("Cannot assign to read-only property \"%1\"").arg(property); + qmlWarning(q) << QQuickPropertyChanges::tr("Cannot assign to read-only property \"%1\"").arg(property); return QQmlProperty(); } return prop; diff --git a/src/quick/util/qquickstatechangescript.cpp b/src/quick/util/qquickstatechangescript.cpp index 86b70fe879..a70fa1a676 100644 --- a/src/quick/util/qquickstatechangescript.cpp +++ b/src/quick/util/qquickstatechangescript.cpp @@ -131,7 +131,7 @@ void QQuickStateChangeScript::execute() QQmlExpression expr(d->script); expr.evaluate(); if (expr.hasError()) - qmlInfo(this, expr.error()); + qmlWarning(this, expr.error()); } } diff --git a/src/quick/util/qquickstategroup.cpp b/src/quick/util/qquickstategroup.cpp index 200f243a1b..f2cd4638fc 100644 --- a/src/quick/util/qquickstategroup.cpp +++ b/src/quick/util/qquickstategroup.cpp @@ -438,7 +438,7 @@ void QQuickStateGroupPrivate::setCurrentStateInternal(const QString &state, } if (applyingState) { - qmlInfo(q) << "Can't apply a state change as part of a state definition."; + qmlWarning(q) << "Can't apply a state change as part of a state definition."; return; } |