From 3057ec0447943fe022b66a2d19e13d94f9183a7c Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Thu, 5 Jan 2017 20:27:53 +0100 Subject: 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 --- src/quick/items/context2d/qquickcanvasitem.cpp | 16 ++++++------ src/quick/items/qquickanchors.cpp | 34 +++++++++++++------------- src/quick/items/qquickanimatedimage.cpp | 2 +- src/quick/items/qquickanimatedsprite.cpp | 2 +- src/quick/items/qquickborderimage.cpp | 2 +- src/quick/items/qquickdrag.cpp | 12 ++++----- src/quick/items/qquickflipable.cpp | 4 +-- src/quick/items/qquickimagebase.cpp | 2 +- src/quick/items/qquickitem.cpp | 8 +++--- src/quick/items/qquickitemanimation.cpp | 12 ++++----- src/quick/items/qquickitemview.cpp | 4 +-- src/quick/items/qquickloader.cpp | 2 +- src/quick/items/qquickpathview.cpp | 2 +- src/quick/items/qquickpositioners.cpp | 8 +++--- src/quick/items/qquickrepeater.cpp | 2 +- src/quick/items/qquickspriteengine.cpp | 10 ++++---- src/quick/items/qquickspritesequence.cpp | 2 +- src/quick/items/qquickstateoperations.cpp | 8 +++--- src/quick/items/qquicktext.cpp | 2 +- src/quick/items/qquicktextdocument.cpp | 2 +- src/quick/items/qquicktextedit.cpp | 2 +- src/quick/items/qquicktextinput.cpp | 2 +- src/quick/items/qquicktextutil.cpp | 4 +-- 23 files changed, 72 insertions(+), 72 deletions(-) (limited to 'src/quick/items') diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp index 78db92ba8a..d376816ef9 100644 --- a/src/quick/items/context2d/qquickcanvasitem.cpp +++ b/src/quick/items/context2d/qquickcanvasitem.cpp @@ -354,7 +354,7 @@ void QQuickCanvasItem::setContextType(const QString &contextType) return; if (d->context) { - qmlInfo(this) << "Canvas already initialized with a different context type"; + qmlWarning(this) << "Canvas already initialized with a different context type"; return; } @@ -517,7 +517,7 @@ void QQuickCanvasItem::setRenderTarget(QQuickCanvasItem::RenderTarget target) Q_D(QQuickCanvasItem); if (d->renderTarget != target) { if (d->context) { - qmlInfo(this) << "Canvas:renderTarget not changeble once context is active."; + qmlWarning(this) << "Canvas:renderTarget not changeble once context is active."; return; } @@ -561,7 +561,7 @@ void QQuickCanvasItem::setRenderStrategy(QQuickCanvasItem::RenderStrategy strate Q_D(QQuickCanvasItem); if (d->renderStrategy != strategy) { if (d->context) { - qmlInfo(this) << "Canvas:renderStrategy not changeable once context is active."; + qmlWarning(this) << "Canvas:renderStrategy not changeable once context is active."; return; } d->renderStrategy = strategy; @@ -840,13 +840,13 @@ void QQuickCanvasItem::getContext(QQmlV4Function *args) QV4::Scope scope(args->v4engine()); QV4::ScopedString str(scope, (*args)[0]); if (!str) { - qmlInfo(this) << "getContext should be called with a string naming the required context type"; + qmlWarning(this) << "getContext should be called with a string naming the required context type"; args->setReturnValue(QV4::Encode::null()); return; } if (!d->available) { - qmlInfo(this) << "Unable to use getContext() at this time, please wait for available: true"; + qmlWarning(this) << "Unable to use getContext() at this time, please wait for available: true"; args->setReturnValue(QV4::Encode::null()); return; } @@ -859,7 +859,7 @@ void QQuickCanvasItem::getContext(QQmlV4Function *args) return; } - qmlInfo(this) << "Canvas already initialized with a different context type"; + qmlWarning(this) << "Canvas already initialized with a different context type"; args->setReturnValue(QV4::Encode::null()); return; } @@ -882,7 +882,7 @@ void QQuickCanvasItem::requestAnimationFrame(QQmlV4Function *args) QV4::Scope scope(args->v4engine()); QV4::ScopedFunctionObject f(scope, (*args)[0]); if (!f) { - qmlInfo(this) << "requestAnimationFrame should be called with an animation callback function"; + qmlWarning(this) << "requestAnimationFrame should be called with an animation callback function"; args->setReturnValue(QV4::Encode::null()); return; } @@ -910,7 +910,7 @@ void QQuickCanvasItem::cancelRequestAnimationFrame(QQmlV4Function *args) QV4::Scope scope(args->v4engine()); QV4::ScopedValue v(scope, (*args)[0]); if (!v->isInteger()) { - qmlInfo(this) << "cancelRequestAnimationFrame should be called with an animation callback id"; + qmlWarning(this) << "cancelRequestAnimationFrame should be called with an animation callback id"; args->setReturnValue(QV4::Encode::null()); return; } diff --git a/src/quick/items/qquickanchors.cpp b/src/quick/items/qquickanchors.cpp index 4162314cd3..c0bec7d716 100644 --- a/src/quick/items/qquickanchors.cpp +++ b/src/quick/items/qquickanchors.cpp @@ -214,7 +214,7 @@ void QQuickAnchorsPrivate::fillChanged() --updatingFill; } else { // ### Make this certain :) - qmlInfo(item) << QQuickAnchors::tr("Possible anchor loop detected on fill."); + qmlWarning(item) << QQuickAnchors::tr("Possible anchor loop detected on fill."); } } @@ -243,7 +243,7 @@ void QQuickAnchorsPrivate::centerInChanged() --updatingCenterIn; } else { // ### Make this certain :) - qmlInfo(item) << QQuickAnchors::tr("Possible anchor loop detected on centerIn."); + qmlWarning(item) << QQuickAnchors::tr("Possible anchor loop detected on centerIn."); } } @@ -529,7 +529,7 @@ void QQuickAnchors::setFill(QQuickItem *f) return; } if (f != readParentItem(d->item) && readParentItem(f) != readParentItem(d->item)){ - qmlInfo(d->item) << tr("Cannot anchor to an item that isn't a parent or sibling."); + qmlWarning(d->item) << tr("Cannot anchor to an item that isn't a parent or sibling."); return; } QQuickItem *oldFill = d->fill; @@ -565,7 +565,7 @@ void QQuickAnchors::setCenterIn(QQuickItem* c) return; } if (c != readParentItem(d->item) && readParentItem(c) != readParentItem(d->item)){ - qmlInfo(d->item) << tr("Cannot anchor to an item that isn't a parent or sibling."); + qmlWarning(d->item) << tr("Cannot anchor to an item that isn't a parent or sibling."); return; } QQuickItem *oldCI = d->centerIn; @@ -619,7 +619,7 @@ void QQuickAnchorsPrivate::updateVerticalAnchors() if (Q_UNLIKELY(updatingVerticalAnchor > 1)) { // ### Make this certain :) - qmlInfo(item) << QQuickAnchors::tr("Possible anchor loop detected on vertical anchor."); + qmlWarning(item) << QQuickAnchors::tr("Possible anchor loop detected on vertical anchor."); return; } @@ -794,7 +794,7 @@ void QQuickAnchorsPrivate::updateHorizontalAnchors() --updatingHorizontalAnchor; } else { // ### Make this certain :) - qmlInfo(item) << QQuickAnchors::tr("Possible anchor loop detected on horizontal anchor."); + qmlWarning(item) << QQuickAnchors::tr("Possible anchor loop detected on horizontal anchor."); } } @@ -1329,7 +1329,7 @@ bool QQuickAnchorsPrivate::checkHValid() const if (usedAnchors & QQuickAnchors::LeftAnchor && usedAnchors & QQuickAnchors::RightAnchor && usedAnchors & QQuickAnchors::HCenterAnchor) { - qmlInfo(item) << QQuickAnchors::tr("Cannot specify left, right, and horizontalCenter anchors at the same time."); + qmlWarning(item) << QQuickAnchors::tr("Cannot specify left, right, and horizontalCenter anchors at the same time."); return false; } @@ -1339,17 +1339,17 @@ bool QQuickAnchorsPrivate::checkHValid() const bool QQuickAnchorsPrivate::checkHAnchorValid(QQuickAnchorLine anchor) const { if (!anchor.item) { - qmlInfo(item) << QQuickAnchors::tr("Cannot anchor to a null item."); + qmlWarning(item) << QQuickAnchors::tr("Cannot anchor to a null item."); return false; } else if (anchor.anchorLine & QQuickAnchors::Vertical_Mask) { - qmlInfo(item) << QQuickAnchors::tr("Cannot anchor a horizontal edge to a vertical edge."); + qmlWarning(item) << QQuickAnchors::tr("Cannot anchor a horizontal edge to a vertical edge."); return false; } else if (anchor.item != readParentItem(item) && readParentItem(anchor.item) != readParentItem(item)) { - qmlInfo(item) << QQuickAnchors::tr("Cannot anchor to an item that isn't a parent or sibling."); + qmlWarning(item) << QQuickAnchors::tr("Cannot anchor to an item that isn't a parent or sibling."); return false; } else if (anchor.item == item) { - qmlInfo(item) << QQuickAnchors::tr("Cannot anchor item to self."); + qmlWarning(item) << QQuickAnchors::tr("Cannot anchor item to self."); return false; } @@ -1361,13 +1361,13 @@ bool QQuickAnchorsPrivate::checkVValid() const if (usedAnchors & QQuickAnchors::TopAnchor && usedAnchors & QQuickAnchors::BottomAnchor && usedAnchors & QQuickAnchors::VCenterAnchor) { - qmlInfo(item) << QQuickAnchors::tr("Cannot specify top, bottom, and verticalCenter anchors at the same time."); + qmlWarning(item) << QQuickAnchors::tr("Cannot specify top, bottom, and verticalCenter anchors at the same time."); return false; } else if (usedAnchors & QQuickAnchors::BaselineAnchor && (usedAnchors & QQuickAnchors::TopAnchor || usedAnchors & QQuickAnchors::BottomAnchor || usedAnchors & QQuickAnchors::VCenterAnchor)) { - qmlInfo(item) << QQuickAnchors::tr("Baseline anchor cannot be used in conjunction with top, bottom, or verticalCenter anchors."); + qmlWarning(item) << QQuickAnchors::tr("Baseline anchor cannot be used in conjunction with top, bottom, or verticalCenter anchors."); return false; } @@ -1377,17 +1377,17 @@ bool QQuickAnchorsPrivate::checkVValid() const bool QQuickAnchorsPrivate::checkVAnchorValid(QQuickAnchorLine anchor) const { if (!anchor.item) { - qmlInfo(item) << QQuickAnchors::tr("Cannot anchor to a null item."); + qmlWarning(item) << QQuickAnchors::tr("Cannot anchor to a null item."); return false; } else if (anchor.anchorLine & QQuickAnchors::Horizontal_Mask) { - qmlInfo(item) << QQuickAnchors::tr("Cannot anchor a vertical edge to a horizontal edge."); + qmlWarning(item) << QQuickAnchors::tr("Cannot anchor a vertical edge to a horizontal edge."); return false; } else if (anchor.item != readParentItem(item) && readParentItem(anchor.item) != readParentItem(item)) { - qmlInfo(item) << QQuickAnchors::tr("Cannot anchor to an item that isn't a parent or sibling."); + qmlWarning(item) << QQuickAnchors::tr("Cannot anchor to an item that isn't a parent or sibling."); return false; } else if (anchor.item == item){ - qmlInfo(item) << QQuickAnchors::tr("Cannot anchor item to self."); + qmlWarning(item) << QQuickAnchors::tr("Cannot anchor item to self."); return false; } diff --git a/src/quick/items/qquickanimatedimage.cpp b/src/quick/items/qquickanimatedimage.cpp index 81c649dbd5..a1833081c8 100644 --- a/src/quick/items/qquickanimatedimage.cpp +++ b/src/quick/items/qquickanimatedimage.cpp @@ -371,7 +371,7 @@ void QQuickAnimatedImage::movieRequestFinished() #endif if (!d->_movie->isValid()) { - qmlInfo(this) << "Error Reading Animated Image File " << d->url.toString(); + qmlWarning(this) << "Error Reading Animated Image File " << d->url.toString(); delete d->_movie; d->_movie = 0; d->setImage(QImage()); diff --git a/src/quick/items/qquickanimatedsprite.cpp b/src/quick/items/qquickanimatedsprite.cpp index 8aeef4ef4a..76c2146ddb 100644 --- a/src/quick/items/qquickanimatedsprite.cpp +++ b/src/quick/items/qquickanimatedsprite.cpp @@ -626,7 +626,7 @@ QSGSpriteNode* QQuickAnimatedSprite::initNode() Q_D(QQuickAnimatedSprite); if (!d->m_spriteEngine) { - qmlInfo(this) << "No sprite engine..."; + qmlWarning(this) << "No sprite engine..."; return nullptr; } else if (d->m_spriteEngine->status() == QQuickPixmap::Null) { d->m_spriteEngine->startAssemblingImage(); diff --git a/src/quick/items/qquickborderimage.cpp b/src/quick/items/qquickborderimage.cpp index 67b99bfbc6..28d834f9e2 100644 --- a/src/quick/items/qquickborderimage.cpp +++ b/src/quick/items/qquickborderimage.cpp @@ -515,7 +515,7 @@ void QQuickBorderImage::requestFinished() QSize impsize = d->pix.implicitSize(); if (d->pix.isError()) { d->status = Error; - qmlInfo(this) << d->pix.error(); + qmlWarning(this) << d->pix.error(); if (d->progress != 0) { d->progress = 0; emit progressChanged(d->progress); diff --git a/src/quick/items/qquickdrag.cpp b/src/quick/items/qquickdrag.cpp index 7a112e840a..e5969eed7f 100644 --- a/src/quick/items/qquickdrag.cpp +++ b/src/quick/items/qquickdrag.cpp @@ -307,7 +307,7 @@ void QQuickDragAttached::setActive(bool active) Q_D(QQuickDragAttached); if (d->active != active) { if (d->inEvent) - qmlInfo(this) << "active cannot be changed from within a drag event handler"; + qmlWarning(this) << "active cannot be changed from within a drag event handler"; else if (active) { if (d->dragType == QQuickDrag::Internal) { d->start(d->supportedActions); @@ -629,7 +629,7 @@ void QQuickDragAttached::start(QQmlV4Function *args) { Q_D(QQuickDragAttached); if (d->inEvent) { - qmlInfo(this) << "start() cannot be called from within a drag event handler"; + qmlWarning(this) << "start() cannot be called from within a drag event handler"; return; } @@ -675,7 +675,7 @@ int QQuickDragAttached::drop() Qt::DropAction acceptedAction = Qt::IgnoreAction; if (d->inEvent) { - qmlInfo(this) << "drop() cannot be called from within a drag event handler"; + qmlWarning(this) << "drop() cannot be called from within a drag event handler"; return acceptedAction; } @@ -722,7 +722,7 @@ void QQuickDragAttached::cancel() Q_D(QQuickDragAttached); if (d->inEvent) { - qmlInfo(this) << "cancel() cannot be called from within a drag event handler"; + qmlWarning(this) << "cancel() cannot be called from within a drag event handler"; return; } @@ -809,12 +809,12 @@ void QQuickDragAttached::startDrag(QQmlV4Function *args) Q_D(QQuickDragAttached); if (d->inEvent) { - qmlInfo(this) << "startDrag() cannot be called from within a drag event handler"; + qmlWarning(this) << "startDrag() cannot be called from within a drag event handler"; return; } if (!d->active) { - qmlInfo(this) << "startDrag() drag must be active"; + qmlWarning(this) << "startDrag() drag must be active"; return; } diff --git a/src/quick/items/qquickflipable.cpp b/src/quick/items/qquickflipable.cpp index 6a6b6c00a9..f452893528 100644 --- a/src/quick/items/qquickflipable.cpp +++ b/src/quick/items/qquickflipable.cpp @@ -153,7 +153,7 @@ void QQuickFlipable::setFront(QQuickItem *front) { Q_D(QQuickFlipable); if (d->front) { - qmlInfo(this) << tr("front is a write-once property"); + qmlWarning(this) << tr("front is a write-once property"); return; } d->front = front; @@ -175,7 +175,7 @@ void QQuickFlipable::setBack(QQuickItem *back) { Q_D(QQuickFlipable); if (d->back) { - qmlInfo(this) << tr("back is a write-once property"); + qmlWarning(this) << tr("back is a write-once property"); return; } if (back == 0) diff --git a/src/quick/items/qquickimagebase.cpp b/src/quick/items/qquickimagebase.cpp index a6bf6b4e8a..22d631e917 100644 --- a/src/quick/items/qquickimagebase.cpp +++ b/src/quick/items/qquickimagebase.cpp @@ -281,7 +281,7 @@ void QQuickImageBase::requestFinished() Q_D(QQuickImageBase); if (d->pix.isError()) { - qmlInfo(this) << d->pix.error(); + qmlWarning(this) << d->pix.error(); d->pix.clear(this); d->status = Error; if (d->progress != 0.0) { diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index 504446a8be..01737548c8 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -1566,7 +1566,7 @@ QQuickLayoutMirroringAttached::QQuickLayoutMirroringAttached(QObject *parent) : if (itemPrivate) itemPrivate->extra.value().layoutDirectionAttached = this; else - qmlInfo(parent) << tr("LayoutDirection attached property only works with Items and Windows"); + qmlWarning(parent) << tr("LayoutDirection attached property only works with Items and Windows"); } QQuickLayoutMirroringAttached * QQuickLayoutMirroringAttached::qmlAttachedProperties(QObject *object) @@ -1714,7 +1714,7 @@ QQuickEnterKeyAttached::QQuickEnterKeyAttached(QObject *parent) itemPrivate = QQuickItemPrivate::get(item); itemPrivate->extra.value().enterKeyAttached = this; } else - qmlInfo(parent) << tr("EnterKey attached property only works with Items"); + qmlWarning(parent) << tr("EnterKey attached property only works with Items"); } QQuickEnterKeyAttached *QQuickEnterKeyAttached::qmlAttachedProperties(QObject *object) @@ -4374,7 +4374,7 @@ void QQuickItem::mapFromItem(QQmlV4Function *args) const } if (!itemObj && !item->isNull()) { - qmlInfo(this) << "mapFromItem() given argument \"" << item->toQStringNoThrow() + qmlWarning(this) << "mapFromItem() given argument \"" << item->toQStringNoThrow() << "\" which is neither null nor an Item"; v4->throwTypeError(); return; @@ -4462,7 +4462,7 @@ void QQuickItem::mapToItem(QQmlV4Function *args) const } if (!itemObj && !item->isNull()) { - qmlInfo(this) << "mapToItem() given argument \"" << item->toQStringNoThrow() + qmlWarning(this) << "mapToItem() given argument \"" << item->toQStringNoThrow() << "\" which is neither null nor an Item"; v4->throwTypeError(); return; diff --git a/src/quick/items/qquickitemanimation.cpp b/src/quick/items/qquickitemanimation.cpp index fd4a7d733f..b33705e75e 100644 --- a/src/quick/items/qquickitemanimation.cpp +++ b/src/quick/items/qquickitemanimation.cpp @@ -304,7 +304,7 @@ QAbstractAnimationJob* QQuickParentAnimation::transition(QQuickStateActions &act bool ok; const QTransform &transform = targetParent->itemTransform(d->via, &ok); if (transform.type() >= QTransform::TxShear || !ok) { - qmlInfo(this) << QQuickParentAnimation::tr("Unable to preserve appearance under complex transform"); + qmlWarning(this) << QQuickParentAnimation::tr("Unable to preserve appearance under complex transform"); ok = false; } @@ -315,21 +315,21 @@ QAbstractAnimationJob* QQuickParentAnimation::transition(QQuickStateActions &act if (transform.m11() == transform.m22()) scale = transform.m11(); else { - qmlInfo(this) << QQuickParentAnimation::tr("Unable to preserve appearance under non-uniform scale"); + qmlWarning(this) << QQuickParentAnimation::tr("Unable to preserve appearance under non-uniform scale"); ok = false; } } else if (ok && isRotate) { if (transform.m11() == transform.m22()) scale = qSqrt(transform.m11()*transform.m11() + transform.m12()*transform.m12()); else { - qmlInfo(this) << QQuickParentAnimation::tr("Unable to preserve appearance under non-uniform scale"); + qmlWarning(this) << QQuickParentAnimation::tr("Unable to preserve appearance under non-uniform scale"); ok = false; } if (scale != 0) rotation = qAtan2(transform.m12()/scale, transform.m11()/scale) * 180/M_PI; else { - qmlInfo(this) << QQuickParentAnimation::tr("Unable to preserve appearance under scale of 0"); + qmlWarning(this) << QQuickParentAnimation::tr("Unable to preserve appearance under scale of 0"); ok = false; } } @@ -474,7 +474,7 @@ int QQuickAnchorAnimation::duration() const void QQuickAnchorAnimation::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; } @@ -613,7 +613,7 @@ int QQuickPathAnimation::duration() const void QQuickPathAnimation::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; } diff --git a/src/quick/items/qquickitemview.cpp b/src/quick/items/qquickitemview.cpp index 7d98cc2693..3f097d4bc8 100644 --- a/src/quick/items/qquickitemview.cpp +++ b/src/quick/items/qquickitemview.cpp @@ -487,7 +487,7 @@ void QQuickItemView::setCacheBuffer(int b) { Q_D(QQuickItemView); if (b < 0) { - qmlInfo(this) << "Cannot set a negative cache buffer"; + qmlWarning(this) << "Cannot set a negative cache buffer"; return; } @@ -2345,7 +2345,7 @@ FxViewItem *QQuickItemViewPrivate::createItem(int modelIndex, bool asynchronous) if (!delegateValidated) { delegateValidated = true; QObject* delegate = q->delegate(); - qmlInfo(delegate ? delegate : q) << QQuickItemView::tr("Delegate must be of Item type"); + qmlWarning(delegate ? delegate : q) << QQuickItemView::tr("Delegate must be of Item type"); } } inRequest = false; diff --git a/src/quick/items/qquickloader.cpp b/src/quick/items/qquickloader.cpp index eeec562e3c..5d5934bbd2 100644 --- a/src/quick/items/qquickloader.cpp +++ b/src/quick/items/qquickloader.cpp @@ -971,7 +971,7 @@ QV4::ReturnedValue QQuickLoaderPrivate::extractInitialPropertyValues(QQmlV4Funct QV4::ScopedValue v(scope, (*args)[1]); if (!v->isObject() || v->as()) { *error = true; - qmlInfo(loader) << QQuickLoader::tr("setSource: value is not an object"); + qmlWarning(loader) << QQuickLoader::tr("setSource: value is not an object"); } else { *error = false; valuemap = v; diff --git a/src/quick/items/qquickpathview.cpp b/src/quick/items/qquickpathview.cpp index 03596f13e9..53e547fe98 100644 --- a/src/quick/items/qquickpathview.cpp +++ b/src/quick/items/qquickpathview.cpp @@ -137,7 +137,7 @@ QQuickItem *QQuickPathViewPrivate::getItem(int modelIndex, qreal z, bool async) if (!delegateValidated) { delegateValidated = true; QObject* delegate = q->delegate(); - qmlInfo(delegate ? delegate : q) << QQuickPathView::tr("Delegate must be of Item type"); + qmlWarning(delegate ? delegate : q) << QQuickPathView::tr("Delegate must be of Item type"); } } } else { diff --git a/src/quick/items/qquickpositioners.cpp b/src/quick/items/qquickpositioners.cpp index e22427ca49..0287fdd45c 100644 --- a/src/quick/items/qquickpositioners.cpp +++ b/src/quick/items/qquickpositioners.cpp @@ -957,7 +957,7 @@ void QQuickColumn::reportConflictingAnchors() } } if (d->anchorConflict) { - qmlInfo(this) << "Cannot specify top, bottom, verticalCenter, fill or centerIn anchors for items inside Column." + qmlWarning(this) << "Cannot specify top, bottom, verticalCenter, fill or centerIn anchors for items inside Column." << " Column will not function."; } } @@ -1224,7 +1224,7 @@ void QQuickRow::reportConflictingAnchors() } } if (d->anchorConflict) - qmlInfo(this) << "Cannot specify left, right, horizontalCenter, fill or centerIn anchors for items inside Row." + qmlWarning(this) << "Cannot specify left, right, horizontalCenter, fill or centerIn anchors for items inside Row." << " Row will not function."; } @@ -1808,7 +1808,7 @@ void QQuickGrid::reportConflictingAnchors() } } if (d->anchorConflict) - qmlInfo(this) << "Cannot specify anchors for items inside Grid." << " Grid will not function."; + qmlWarning(this) << "Cannot specify anchors for items inside Grid." << " Grid will not function."; } /*! @@ -2121,7 +2121,7 @@ void QQuickFlow::reportConflictingAnchors() } } if (d->anchorConflict) - qmlInfo(this) << "Cannot specify anchors for items inside Flow." << " Flow will not function."; + qmlWarning(this) << "Cannot specify anchors for items inside Flow." << " Flow will not function."; } QT_END_NAMESPACE diff --git a/src/quick/items/qquickrepeater.cpp b/src/quick/items/qquickrepeater.cpp index 4f46f41b0d..a7254464ed 100644 --- a/src/quick/items/qquickrepeater.cpp +++ b/src/quick/items/qquickrepeater.cpp @@ -423,7 +423,7 @@ void QQuickRepeater::initItem(int index, QObject *object) if (!d->delegateValidated) { d->delegateValidated = true; QObject* delegate = this->delegate(); - qmlInfo(delegate ? delegate : this) << QQuickRepeater::tr("Delegate must be of Item type"); + qmlWarning(delegate ? delegate : this) << QQuickRepeater::tr("Delegate must be of Item type"); } } return; diff --git a/src/quick/items/qquickspriteengine.cpp b/src/quick/items/qquickspriteengine.cpp index f54a8911b2..d26a1f8a64 100644 --- a/src/quick/items/qquickspriteengine.cpp +++ b/src/quick/items/qquickspriteengine.cpp @@ -378,7 +378,7 @@ QImage QQuickSpriteEngine::assembledImage(int maxSize) if (!m_errorsPrinted && stat == QQuickPixmap::Error) { for (QQuickSprite* s : qAsConst(m_sprites)) if (s->m_pix.isError()) - qmlInfo(s) << s->m_pix.error(); + qmlWarning(s) << s->m_pix.error(); m_errorsPrinted = true; } @@ -399,7 +399,7 @@ QImage QQuickSpriteEngine::assembledImage(int maxSize) { const QSize frameSize(state->m_frameWidth, state->m_frameHeight); if (!(img.size() - frameSize).isValid()) { - qmlInfo(state).nospace() << "SpriteEngine: Invalid frame size " << frameSize << "." + qmlWarning(state).nospace() << "SpriteEngine: Invalid frame size " << frameSize << "." " It's bigger than image size " << img.size() << "."; return QImage(); } @@ -419,10 +419,10 @@ QImage QQuickSpriteEngine::assembledImage(int maxSize) int rowsNeeded = helper::divRoundUp(state->frames(), (maxSize / state->frameWidth())); if (h + rowsNeeded * state->frameHeight() > maxSize){ if (rowsNeeded * state->frameHeight() > maxSize) - qmlInfo(state) << "SpriteEngine: Animation too large to fit in one texture:" << state->source().toLocalFile(); + qmlWarning(state) << "SpriteEngine: Animation too large to fit in one texture:" << state->source().toLocalFile(); else - qmlInfo(state) << "SpriteEngine: Animations too large to fit in one texture, pushed over the edge by:" << state->source().toLocalFile(); - qmlInfo(state) << "SpriteEngine: Your texture max size today is " << maxSize; + qmlWarning(state) << "SpriteEngine: Animations too large to fit in one texture, pushed over the edge by:" << state->source().toLocalFile(); + qmlWarning(state) << "SpriteEngine: Your texture max size today is " << maxSize; return QImage(); } state->m_generatedCount = rowsNeeded; diff --git a/src/quick/items/qquickspritesequence.cpp b/src/quick/items/qquickspritesequence.cpp index 25a39f951a..858a3c0576 100644 --- a/src/quick/items/qquickspritesequence.cpp +++ b/src/quick/items/qquickspritesequence.cpp @@ -209,7 +209,7 @@ QSGSpriteNode *QQuickSpriteSequence::initNode() Q_D(QQuickSpriteSequence); if (!d->m_spriteEngine) { - qmlInfo(this) << "No sprite engine..."; + qmlWarning(this) << "No sprite engine..."; return nullptr; } else if (d->m_spriteEngine->status() == QQuickPixmap::Null) { d->m_spriteEngine->startAssemblingImage(); diff --git a/src/quick/items/qquickstateoperations.cpp b/src/quick/items/qquickstateoperations.cpp index 9cd3b6a5f5..b40a9e2843 100644 --- a/src/quick/items/qquickstateoperations.cpp +++ b/src/quick/items/qquickstateoperations.cpp @@ -78,7 +78,7 @@ void QQuickParentChangePrivate::doChange(QQuickItem *targetParent, QQuickItem *s bool ok; const QTransform &transform = target->parentItem()->itemTransform(targetParent, &ok); if (transform.type() >= QTransform::TxShear || !ok) { - qmlInfo(q) << QQuickParentChange::tr("Unable to preserve appearance under complex transform"); + qmlWarning(q) << QQuickParentChange::tr("Unable to preserve appearance under complex transform"); ok = false; } @@ -89,21 +89,21 @@ void QQuickParentChangePrivate::doChange(QQuickItem *targetParent, QQuickItem *s if (transform.m11() == transform.m22()) scale = transform.m11(); else { - qmlInfo(q) << QQuickParentChange::tr("Unable to preserve appearance under non-uniform scale"); + qmlWarning(q) << QQuickParentChange::tr("Unable to preserve appearance under non-uniform scale"); ok = false; } } else if (ok && isRotate) { if (transform.m11() == transform.m22()) scale = qSqrt(transform.m11()*transform.m11() + transform.m12()*transform.m12()); else { - qmlInfo(q) << QQuickParentChange::tr("Unable to preserve appearance under non-uniform scale"); + qmlWarning(q) << QQuickParentChange::tr("Unable to preserve appearance under non-uniform scale"); ok = false; } if (scale != 0) rotation = qAtan2(transform.m12()/scale, transform.m11()/scale) * 180/M_PI; else { - qmlInfo(q) << QQuickParentChange::tr("Unable to preserve appearance under scale of 0"); + qmlWarning(q) << QQuickParentChange::tr("Unable to preserve appearance under scale of 0"); ok = false; } } diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp index e37a7e6d5e..30e9c71143 100644 --- a/src/quick/items/qquicktext.cpp +++ b/src/quick/items/qquicktext.cpp @@ -1135,7 +1135,7 @@ void QQuickTextPrivate::setLineGeometry(QTextLine &line, qreal lineWidth, qreal needToUpdateLayout = true; } } else if (image->pix->isError()) { - qmlInfo(q) << image->pix->error(); + qmlWarning(q) << image->pix->error(); } } diff --git a/src/quick/items/qquicktextdocument.cpp b/src/quick/items/qquicktextdocument.cpp index 61d75fe99b..c272503480 100644 --- a/src/quick/items/qquicktextdocument.cpp +++ b/src/quick/items/qquicktextdocument.cpp @@ -211,7 +211,7 @@ QQuickPixmap *QQuickTextDocumentWithImageResources::loadPixmap( if (p->isError()) { if (!errors.contains(url)) { errors.insert(url); - qmlInfo(parent()) << p->error(); + qmlWarning(parent()) << p->error(); } } return p; diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp index 106acf57cf..8532786a8d 100644 --- a/src/quick/items/qquicktextedit.cpp +++ b/src/quick/items/qquicktextedit.cpp @@ -1741,7 +1741,7 @@ void QQuickTextEdit::select(int start, int end) bool QQuickTextEdit::isRightToLeft(int start, int end) { if (start > end) { - qmlInfo(this) << "isRightToLeft(start, end) called with the end property being smaller than the start."; + qmlWarning(this) << "isRightToLeft(start, end) called with the end property being smaller than the start."; return false; } else { return getText(start, end).isRightToLeft(); diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp index e9f88ae7f0..a023ad8a8c 100644 --- a/src/quick/items/qquicktextinput.cpp +++ b/src/quick/items/qquicktextinput.cpp @@ -2002,7 +2002,7 @@ void QQuickTextInput::selectAll() bool QQuickTextInput::isRightToLeft(int start, int end) { if (start > end) { - qmlInfo(this) << "isRightToLeft(start, end) called with the end property being smaller than the start."; + qmlWarning(this) << "isRightToLeft(start, end) called with the end property being smaller than the start."; return false; } else { return text().midRef(start, end - start).isRightToLeft(); diff --git a/src/quick/items/qquicktextutil.cpp b/src/quick/items/qquicktextutil.cpp index 8bcdb0b5f6..b07289f4a3 100644 --- a/src/quick/items/qquicktextutil.cpp +++ b/src/quick/items/qquicktextutil.cpp @@ -61,7 +61,7 @@ QQuickItem *QQuickTextUtil::createCursor( item->setPosition(rectangle.topLeft()); item->setHeight(rectangle.height()); } else { - qmlInfo(parent) << tr("%1 does not support loading non-visual cursor delegates.") + qmlWarning(parent) << tr("%1 does not support loading non-visual cursor delegates.") .arg(QString::fromUtf8(className)); } component->completeCreate(); @@ -72,7 +72,7 @@ QQuickItem *QQuickTextUtil::createCursor( parent, SLOT(createCursor()), Qt::UniqueConnection); return item; } - qmlInfo(parent, component->errors()) << tr("Could not load cursor delegate"); + qmlWarning(parent, component->errors()) << tr("Could not load cursor delegate"); return item; } -- cgit v1.2.3