diff options
Diffstat (limited to 'src/imports/xmllistmodel')
-rw-r--r-- | src/imports/xmllistmodel/qqmlxmllistmodel.cpp | 8 | ||||
-rw-r--r-- | src/imports/xmllistmodel/qqmlxmllistmodel_p.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp index 4306f477e9..61c8665a14 100644 --- a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp +++ b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp @@ -596,7 +596,7 @@ void QQuickXmlListModelPrivate::append_role(QQmlListProperty<QQuickXmlListModelR int i = _this->d_func()->roleObjects.count(); _this->d_func()->roleObjects.append(role); if (_this->d_func()->roleNames.contains(role->name())) { - qmlInfo(role) << QQuickXmlListModel::tr("\"%1\" duplicates a previous role name and will be disabled.").arg(role->name()); + qmlWarning(role) << QQuickXmlListModel::tr("\"%1\" duplicates a previous role name and will be disabled.").arg(role->name()); return; } _this->d_func()->roles.insert(i, _this->d_func()->highestRole); @@ -847,7 +847,7 @@ void QQuickXmlListModel::setQuery(const QString &query) { Q_D(QQuickXmlListModel); if (!query.startsWith(QLatin1Char('/'))) { - qmlInfo(this) << QCoreApplication::translate("QQuickXmlRoleList", "An XmlListModel query must start with '/' or \"//\""); + qmlWarning(this) << QCoreApplication::translate("QQuickXmlRoleList", "An XmlListModel query must start with '/' or \"//\""); return; } @@ -1136,11 +1136,11 @@ void QQuickXmlListModel::queryError(void* object, const QString& error) Q_D(QQuickXmlListModel); for (int i=0; i<d->roleObjects.count(); i++) { if (d->roleObjects.at(i) == static_cast<QQuickXmlListModelRole*>(object)) { - qmlInfo(d->roleObjects.at(i)) << QQuickXmlListModel::tr("invalid query: \"%1\"").arg(error); + qmlWarning(d->roleObjects.at(i)) << QQuickXmlListModel::tr("invalid query: \"%1\"").arg(error); return; } } - qmlInfo(this) << QQuickXmlListModel::tr("invalid query: \"%1\"").arg(error); + qmlWarning(this) << QQuickXmlListModel::tr("invalid query: \"%1\"").arg(error); } void QQuickXmlListModel::queryCompleted(const QQuickXmlQueryResult &result) diff --git a/src/imports/xmllistmodel/qqmlxmllistmodel_p.h b/src/imports/xmllistmodel/qqmlxmllistmodel_p.h index 3a4487a085..e6a0898bb9 100644 --- a/src/imports/xmllistmodel/qqmlxmllistmodel_p.h +++ b/src/imports/xmllistmodel/qqmlxmllistmodel_p.h @@ -79,7 +79,6 @@ class QQuickXmlListModel : public QAbstractListModel, public QQmlParserStatus { Q_OBJECT Q_INTERFACES(QQmlParserStatus) - Q_ENUMS(Status) Q_PROPERTY(Status status READ status NOTIFY statusChanged) Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged) @@ -119,6 +118,7 @@ public: Q_INVOKABLE QQmlV4Handle get(int index) const; enum Status { Null, Ready, Loading, Error }; + Q_ENUM(Status) Status status() const; qreal progress() const; @@ -177,7 +177,7 @@ public: void setQuery(const QString &query) { if (query.startsWith(QLatin1Char('/'))) { - qmlInfo(this) << tr("An XmlRole query must not start with '/'"); + qmlWarning(this) << tr("An XmlRole query must not start with '/'"); return; } if (m_query == query) |