aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@crimson.no>2017-01-05 21:07:35 +0100
committerRobin Burchell <robin.burchell@crimson.no>2017-01-13 20:14:07 +0000
commit0c65ffef9b021555c03081e4e60e91a268d46c98 (patch)
tree40be4ab28c3bc754105b9f8d04dfa118cc0bb00d
parent6d00ed2d5328e605bf846622a9dbe4dfe821aee4 (diff)
QtQuickControls2: Use the newly-introduced qmlWarning instead of qmlInfo
qmlInfo will shortly be returning info-level messages (as the name hints), rather than warning level messages. Change-Id: I94123464b12b30a4ba085cfb7b606bc26df9b76e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--src/imports/calendar/qquickmonthgrid.cpp4
-rw-r--r--src/imports/calendar/qquickweeknumbercolumn.cpp4
-rw-r--r--src/imports/controls/material/qquickmaterialstyle.cpp4
-rw-r--r--src/imports/controls/universal/qquickuniversalstyle.cpp4
-rw-r--r--src/imports/platform/qquickplatformmessagedialog.cpp2
-rw-r--r--src/quicktemplates2/qquickpopup.cpp2
-rw-r--r--src/quicktemplates2/qquickscrollbar.cpp2
-rw-r--r--src/quicktemplates2/qquickscrollindicator.cpp2
-rw-r--r--src/quicktemplates2/qquickspinbox.cpp4
-rw-r--r--src/quicktemplates2/qquickstackelement.cpp2
-rw-r--r--src/quicktemplates2/qquickstackview.cpp14
-rw-r--r--src/quicktemplates2/qquickswipedelegate.cpp12
-rw-r--r--src/quicktemplates2/qquickswipeview.cpp4
-rw-r--r--src/quicktemplates2/qquicktextarea.cpp2
-rw-r--r--src/quicktemplates2/qquicktooltip.cpp2
-rw-r--r--src/quicktemplates2/qquicktumbler.cpp2
16 files changed, 33 insertions, 33 deletions
diff --git a/src/imports/calendar/qquickmonthgrid.cpp b/src/imports/calendar/qquickmonthgrid.cpp
index 1b2315da..5eb0798c 100644
--- a/src/imports/calendar/qquickmonthgrid.cpp
+++ b/src/imports/calendar/qquickmonthgrid.cpp
@@ -240,7 +240,7 @@ void QQuickMonthGrid::setMonth(int month)
{
Q_D(QQuickMonthGrid);
if (month < 0 || month > 11) {
- qmlInfo(this) << "month " << month << " is out of range [0...11]";
+ qmlWarning(this) << "month " << month << " is out of range [0...11]";
return;
}
d->model->setMonth(month + 1);
@@ -264,7 +264,7 @@ void QQuickMonthGrid::setYear(int year)
{
Q_D(QQuickMonthGrid);
if (year < -271820 || year > 275759) {
- qmlInfo(this) << "year " << year << " is out of range [-271820...275759]";
+ qmlWarning(this) << "year " << year << " is out of range [-271820...275759]";
return;
}
d->model->setYear(year);
diff --git a/src/imports/calendar/qquickweeknumbercolumn.cpp b/src/imports/calendar/qquickweeknumbercolumn.cpp
index 31992412..c1179879 100644
--- a/src/imports/calendar/qquickweeknumbercolumn.cpp
+++ b/src/imports/calendar/qquickweeknumbercolumn.cpp
@@ -144,7 +144,7 @@ void QQuickWeekNumberColumn::setMonth(int month)
{
Q_D(QQuickWeekNumberColumn);
if (month < 0 || month > 11) {
- qmlInfo(this) << "month " << month << " is out of range [0...11]";
+ qmlWarning(this) << "month " << month << " is out of range [0...11]";
return;
}
d->model->setMonth(month + 1);
@@ -168,7 +168,7 @@ void QQuickWeekNumberColumn::setYear(int year)
{
Q_D(QQuickWeekNumberColumn);
if (year < -271820 || year > 275759) {
- qmlInfo(this) << "year " << year << " is out of range [-271820...275759]";
+ qmlWarning(this) << "year " << year << " is out of range [-271820...275759]";
return;
}
d->model->setYear(year);
diff --git a/src/imports/controls/material/qquickmaterialstyle.cpp b/src/imports/controls/material/qquickmaterialstyle.cpp
index e4d7e4cd..788c0cf2 100644
--- a/src/imports/controls/material/qquickmaterialstyle.cpp
+++ b/src/imports/controls/material/qquickmaterialstyle.cpp
@@ -1255,7 +1255,7 @@ bool QQuickMaterialStyle::variantToRgba(const QVariant &var, const char *name, Q
if (var.type() == QVariant::Int) {
int val = var.toInt();
if (val > BlueGrey) {
- qmlInfo(parent()) << "unknown Material." << name << " value: " << val;
+ qmlWarning(parent()) << "unknown Material." << name << " value: " << val;
return false;
}
*rgba = val;
@@ -1266,7 +1266,7 @@ bool QQuickMaterialStyle::variantToRgba(const QVariant &var, const char *name, Q
} else {
QColor color(var.toString());
if (!color.isValid()) {
- qmlInfo(parent()) << "unknown Material." << name << " value: " << var.toString();
+ qmlWarning(parent()) << "unknown Material." << name << " value: " << var.toString();
return false;
}
*custom = true;
diff --git a/src/imports/controls/universal/qquickuniversalstyle.cpp b/src/imports/controls/universal/qquickuniversalstyle.cpp
index da924ce9..a793034a 100644
--- a/src/imports/controls/universal/qquickuniversalstyle.cpp
+++ b/src/imports/controls/universal/qquickuniversalstyle.cpp
@@ -603,7 +603,7 @@ bool QQuickUniversalStyle::variantToRgba(const QVariant &var, const char *name,
if (var.type() == QVariant::Int) {
int val = var.toInt();
if (val < Lime || val > Taupe) {
- qmlInfo(parent()) << "unknown Universal." << name << " value: " << val;
+ qmlWarning(parent()) << "unknown Universal." << name << " value: " << val;
return false;
}
*rgba = qquickuniversal_accent_color(static_cast<Color>(val));
@@ -614,7 +614,7 @@ bool QQuickUniversalStyle::variantToRgba(const QVariant &var, const char *name,
} else {
QColor color(var.toString());
if (!color.isValid()) {
- qmlInfo(parent()) << "unknown Universal." << name << " value: " << var.toString();
+ qmlWarning(parent()) << "unknown Universal." << name << " value: " << var.toString();
return false;
}
*rgba = color.rgba();
diff --git a/src/imports/platform/qquickplatformmessagedialog.cpp b/src/imports/platform/qquickplatformmessagedialog.cpp
index 40a94dcb..14184447 100644
--- a/src/imports/platform/qquickplatformmessagedialog.cpp
+++ b/src/imports/platform/qquickplatformmessagedialog.cpp
@@ -376,7 +376,7 @@ void QQuickPlatformMessageDialog::handleClick(QPlatformDialogHelper::StandardBut
case QPlatformDialogHelper::Apply: emit applyClicked(); break;
case QPlatformDialogHelper::Reset: emit resetClicked(); break;
case QPlatformDialogHelper::RestoreDefaults: emit restoreDefaultsClicked(); break;
- default: qmlInfo(this) << "unknown button" << button; break;
+ default: qmlWarning(this) << "unknown button" << button; break;
}
}
diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp
index 6690fac1..06a3c34e 100644
--- a/src/quicktemplates2/qquickpopup.cpp
+++ b/src/quicktemplates2/qquickpopup.cpp
@@ -279,7 +279,7 @@ bool QQuickPopupPrivate::prepareEnterTransition()
{
Q_Q(QQuickPopup);
if (!window) {
- qmlInfo(q) << "cannot find any window to open popup in.";
+ qmlWarning(q) << "cannot find any window to open popup in.";
return false;
}
diff --git a/src/quicktemplates2/qquickscrollbar.cpp b/src/quicktemplates2/qquickscrollbar.cpp
index e8c523f2..d8729637 100644
--- a/src/quicktemplates2/qquickscrollbar.cpp
+++ b/src/quicktemplates2/qquickscrollbar.cpp
@@ -274,7 +274,7 @@ QQuickScrollBarAttached *QQuickScrollBar::qmlAttachedProperties(QObject *object)
{
QQuickFlickable *flickable = qobject_cast<QQuickFlickable *>(object);
if (!flickable)
- qmlInfo(object) << "ScrollBar must be attached to a Flickable";
+ qmlWarning(object) << "ScrollBar must be attached to a Flickable";
return new QQuickScrollBarAttached(flickable);
}
diff --git a/src/quicktemplates2/qquickscrollindicator.cpp b/src/quicktemplates2/qquickscrollindicator.cpp
index e858e7c1..e9cadcc7 100644
--- a/src/quicktemplates2/qquickscrollindicator.cpp
+++ b/src/quicktemplates2/qquickscrollindicator.cpp
@@ -173,7 +173,7 @@ QQuickScrollIndicatorAttached *QQuickScrollIndicator::qmlAttachedProperties(QObj
{
QQuickFlickable *flickable = qobject_cast<QQuickFlickable *>(object);
if (!flickable)
- qmlInfo(object) << "ScrollIndicator must be attached to a Flickable";
+ qmlWarning(object) << "ScrollIndicator must be attached to a Flickable";
return new QQuickScrollIndicatorAttached(flickable);
}
diff --git a/src/quicktemplates2/qquickspinbox.cpp b/src/quicktemplates2/qquickspinbox.cpp
index 54e2fa43..50fd778e 100644
--- a/src/quicktemplates2/qquickspinbox.cpp
+++ b/src/quicktemplates2/qquickspinbox.cpp
@@ -521,7 +521,7 @@ void QQuickSpinBox::setTextFromValue(const QJSValue &callback)
{
Q_D(QQuickSpinBox);
if (!callback.isCallable()) {
- qmlInfo(this) << "textFromValue must be a callable function";
+ qmlWarning(this) << "textFromValue must be a callable function";
return;
}
d->textFromValue = callback;
@@ -569,7 +569,7 @@ void QQuickSpinBox::setValueFromText(const QJSValue &callback)
{
Q_D(QQuickSpinBox);
if (!callback.isCallable()) {
- qmlInfo(this) << "valueFromText must be a callable function";
+ qmlWarning(this) << "valueFromText must be a callable function";
return;
}
d->valueFromText = callback;
diff --git a/src/quicktemplates2/qquickstackelement.cpp b/src/quicktemplates2/qquickstackelement.cpp
index 7bd6efc9..6dcd5e75 100644
--- a/src/quicktemplates2/qquickstackelement.cpp
+++ b/src/quicktemplates2/qquickstackelement.cpp
@@ -274,7 +274,7 @@ bool QQuickStackElement::prepareTransition(QQuickItemViewTransitioner *transitio
QQuickAnchors *anchors = QQuickItemPrivate::get(item)->_anchors;
// TODO: expose QQuickAnchorLine so we can test for other conflicting anchors
if (anchors && (anchors->fill() || anchors->centerIn()))
- qmlInfo(item) << "StackView has detected conflicting anchors. Transitions may not execute properly.";
+ qmlWarning(item) << "StackView has detected conflicting anchors. Transitions may not execute properly.";
}
// TODO: add force argument to QQuickItemViewTransitionableItem::prepareTransition()?
diff --git a/src/quicktemplates2/qquickstackview.cpp b/src/quicktemplates2/qquickstackview.cpp
index 4fb153ab..e68f2028 100644
--- a/src/quicktemplates2/qquickstackview.cpp
+++ b/src/quicktemplates2/qquickstackview.cpp
@@ -474,7 +474,7 @@ void QQuickStackView::push(QQmlV4Function *args)
{
Q_D(QQuickStackView);
if (args->length() <= 0) {
- qmlInfo(this) << "push: missing arguments";
+ qmlWarning(this) << "push: missing arguments";
args->setReturnValue(QV4::Encode::null());
return;
}
@@ -498,7 +498,7 @@ void QQuickStackView::push(QQmlV4Function *args)
}
if (elements.isEmpty()) {
- qmlInfo(this) << "push: nothing to push";
+ qmlWarning(this) << "push: nothing to push";
args->setReturnValue(QV4::Encode::null());
return;
}
@@ -559,7 +559,7 @@ void QQuickStackView::pop(QQmlV4Function *args)
int argc = args->length();
if (d->elements.count() <= 1 || argc > 2) {
if (argc > 2)
- qmlInfo(this) << "pop: too many arguments";
+ qmlWarning(this) << "pop: too many arguments";
args->setReturnValue(QV4::Encode::null());
return;
}
@@ -579,7 +579,7 @@ void QQuickStackView::pop(QQmlV4Function *args)
enter = d->findElement(item);
if (!enter) {
if (item != d->currentItem)
- qmlInfo(this) << "pop: unknown argument: " << value->toQString(); // TODO: safe?
+ qmlWarning(this) << "pop: unknown argument: " << value->toQString(); // TODO: safe?
args->setReturnValue(QV4::Encode::null());
d->elements.push(exit); // restore
return;
@@ -707,7 +707,7 @@ void QQuickStackView::replace(QQmlV4Function *args)
{
Q_D(QQuickStackView);
if (args->length() <= 0) {
- qmlInfo(this) << "replace: missing arguments";
+ qmlWarning(this) << "replace: missing arguments";
args->setReturnValue(QV4::Encode::null());
return;
}
@@ -729,7 +729,7 @@ void QQuickStackView::replace(QQmlV4Function *args)
QList<QQuickStackElement *> elements = d->parseElements(args, target ? 1 : 0);
if (elements.isEmpty()) {
- qmlInfo(this) << "replace: nothing to push";
+ qmlWarning(this) << "replace: nothing to push";
args->setReturnValue(QV4::Encode::null());
return;
}
@@ -1043,7 +1043,7 @@ QQuickStackViewAttached::QQuickStackViewAttached(QObject *parent) :
QQuickItemPrivate::get(item)->addItemChangeListener(d, QQuickItemPrivate::Parent);
d->itemParentChanged(item, item->parentItem());
} else if (parent) {
- qmlInfo(parent) << "StackView must be attached to an Item";
+ qmlWarning(parent) << "StackView must be attached to an Item";
}
}
diff --git a/src/quicktemplates2/qquickswipedelegate.cpp b/src/quicktemplates2/qquickswipedelegate.cpp
index f8b2496c..3ee08d1c 100644
--- a/src/quicktemplates2/qquickswipedelegate.cpp
+++ b/src/quicktemplates2/qquickswipedelegate.cpp
@@ -339,7 +339,7 @@ void QQuickSwipePrivate::createLeftItem()
Q_Q(QQuickSwipe);
q->setLeftItem(createDelegateItem(left));
if (!leftItem)
- qmlInfo(control) << "Failed to create left item:" << left->errors();
+ qmlWarning(control) << "Failed to create left item:" << left->errors();
}
}
@@ -349,7 +349,7 @@ void QQuickSwipePrivate::createBehindItem()
Q_Q(QQuickSwipe);
q->setBehindItem(createDelegateItem(behind));
if (!behindItem)
- qmlInfo(control) << "Failed to create behind item:" << behind->errors();
+ qmlWarning(control) << "Failed to create behind item:" << behind->errors();
}
}
@@ -359,7 +359,7 @@ void QQuickSwipePrivate::createRightItem()
Q_Q(QQuickSwipe);
q->setRightItem(createDelegateItem(right));
if (!rightItem)
- qmlInfo(control) << "Failed to create right item:" << right->errors();
+ qmlWarning(control) << "Failed to create right item:" << right->errors();
}
}
@@ -397,12 +397,12 @@ void QQuickSwipePrivate::createAndShowRightItem()
void QQuickSwipePrivate::warnAboutMixingDelegates()
{
- qmlInfo(control) << "cannot set both behind and left/right properties";
+ qmlWarning(control) << "cannot set both behind and left/right properties";
}
void QQuickSwipePrivate::warnAboutSettingDelegatesWhileVisible()
{
- qmlInfo(control) << "left/right/behind properties may only be set when swipe.position is 0";
+ qmlWarning(control) << "left/right/behind properties may only be set when swipe.position is 0";
}
bool QQuickSwipePrivate::hasDelegates() const
@@ -929,7 +929,7 @@ static void warnIfHorizontallyAnchored(QQuickItem *item, const QString &itemName
QQuickAnchors *anchors = QQuickItemPrivate::get(item)->_anchors;
if (anchors && (anchors->fill() || anchors->centerIn() || anchors->left().item || anchors->right().item)
&& !item->property("_q_QQuickSwipeDelegate_warned").toBool()) {
- qmlInfo(item) << QString::fromLatin1("SwipeDelegate: cannot use horizontal anchors with %1; unable to layout the item.").arg(itemName);
+ qmlWarning(item) << QString::fromLatin1("SwipeDelegate: cannot use horizontal anchors with %1; unable to layout the item.").arg(itemName);
item->setProperty("_q_QQuickSwipeDelegate_warned", true);
}
}
diff --git a/src/quicktemplates2/qquickswipeview.cpp b/src/quicktemplates2/qquickswipeview.cpp
index b2075e80..c447e5e0 100644
--- a/src/quicktemplates2/qquickswipeview.cpp
+++ b/src/quicktemplates2/qquickswipeview.cpp
@@ -127,7 +127,7 @@ void QQuickSwipeViewPrivate::resizeItems()
QQuickAnchors *anchors = QQuickItemPrivate::get(item)->_anchors;
// TODO: expose QQuickAnchorLine so we can test for other conflicting anchors
if (anchors && (anchors->fill() || anchors->centerIn()) && !item->property("_q_QQuickSwipeView_warned").toBool()) {
- qmlInfo(item) << "SwipeView has detected conflicting anchors. Unable to layout the item.";
+ qmlWarning(item) << "SwipeView has detected conflicting anchors. Unable to layout the item.";
item->setProperty("_q_QQuickSwipeView_warned", true);
}
@@ -439,7 +439,7 @@ QQuickSwipeViewAttached::QQuickSwipeViewAttached(QObject *parent) :
QQuickItemPrivate *p = QQuickItemPrivate::get(d->item);
p->addItemChangeListener(d, QQuickItemPrivate::Parent | QQuickItemPrivate::Destroyed);
} else if (parent) {
- qmlInfo(parent) << "SwipeView: attached properties must be accessed from within a child item";
+ qmlWarning(parent) << "SwipeView: attached properties must be accessed from within a child item";
}
}
diff --git a/src/quicktemplates2/qquicktextarea.cpp b/src/quicktemplates2/qquicktextarea.cpp
index cf6b4274..c0758876 100644
--- a/src/quicktemplates2/qquicktextarea.cpp
+++ b/src/quicktemplates2/qquicktextarea.cpp
@@ -770,7 +770,7 @@ void QQuickTextAreaAttached::setFlickable(QQuickTextArea *control)
Q_D(QQuickTextAreaAttached);
QQuickFlickable *flickable = qobject_cast<QQuickFlickable *>(parent());
if (!flickable) {
- qmlInfo(parent()) << "TextArea must be attached to a Flickable";
+ qmlWarning(parent()) << "TextArea must be attached to a Flickable";
return;
}
diff --git a/src/quicktemplates2/qquicktooltip.cpp b/src/quicktemplates2/qquicktooltip.cpp
index 7a98ea58..d638a3c2 100644
--- a/src/quicktemplates2/qquicktooltip.cpp
+++ b/src/quicktemplates2/qquicktooltip.cpp
@@ -265,7 +265,7 @@ QQuickToolTipAttached *QQuickToolTip::qmlAttachedProperties(QObject *object)
{
QQuickItem *item = qobject_cast<QQuickItem *>(object);
if (!item)
- qmlInfo(object) << "ToolTip must be attached to an Item";
+ qmlWarning(object) << "ToolTip must be attached to an Item";
return new QQuickToolTipAttached(object);
}
diff --git a/src/quicktemplates2/qquicktumbler.cpp b/src/quicktemplates2/qquicktumbler.cpp
index 7bf2c66f..d70b0932 100644
--- a/src/quicktemplates2/qquicktumbler.cpp
+++ b/src/quicktemplates2/qquicktumbler.cpp
@@ -817,7 +817,7 @@ QQuickTumblerAttached::QQuickTumblerAttached(QObject *parent) :
if (delegateItem)
d->init(delegateItem);
else if (parent)
- qmlInfo(parent) << "Tumbler: attached properties of Tumbler must be accessed through a delegate item";
+ qmlWarning(parent) << "Tumbler: attached properties of Tumbler must be accessed through a delegate item";
if (d->tumbler) {
// When the Tumbler is completed, wrapChanged() is emitted to let QQuickTumblerView