summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/extra/qmlbehavior.cpp2
-rw-r--r--src/declarative/extra/qmlxmllistmodel.cpp4
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsanchors.cpp34
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsflipable.cpp4
-rw-r--r--src/declarative/graphicsitems/qmlgraphicstextinput.cpp6
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp2
-rw-r--r--src/declarative/qml/qmlbinding.cpp2
-rw-r--r--src/declarative/qml/qmlinfo.cpp15
-rw-r--r--src/declarative/qml/qmlinfo.h35
-rw-r--r--src/declarative/util/qmlanimation.cpp8
-rw-r--r--src/declarative/util/qmllistmodel.cpp14
-rw-r--r--src/declarative/util/qmlpropertychanges.cpp4
-rw-r--r--src/declarative/util/qmlstateoperations.cpp8
-rw-r--r--tests/auto/declarative/animations/tst_animations.cpp4
-rw-r--r--tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp2
-rw-r--r--tests/auto/declarative/qmlinfo/tst_qmlinfo.cpp16
-rw-r--r--tests/auto/declarative/qmlmetatype/tst_qmlmetatype.cpp2
-rw-r--r--tests/auto/declarative/visual/webview/embedding/data/nesting.0.pngbin0 -> 5659 bytes
-rw-r--r--tests/auto/declarative/visual/webview/embedding/data/nesting.qml363
19 files changed, 463 insertions, 62 deletions
diff --git a/src/declarative/extra/qmlbehavior.cpp b/src/declarative/extra/qmlbehavior.cpp
index e5d3d35..8364d8c 100644
--- a/src/declarative/extra/qmlbehavior.cpp
+++ b/src/declarative/extra/qmlbehavior.cpp
@@ -109,7 +109,7 @@ void QmlBehavior::setAnimation(QmlAbstractAnimation *animation)
{
Q_D(QmlBehavior);
if (d->animation) {
- qmlInfo(tr("Can't change the animation assigned to a Behavior."),this);
+ qmlInfo(this) << tr("Can't change the animation assigned to a Behavior.");
return;
}
diff --git a/src/declarative/extra/qmlxmllistmodel.cpp b/src/declarative/extra/qmlxmllistmodel.cpp
index 4243c45..4f213a8 100644
--- a/src/declarative/extra/qmlxmllistmodel.cpp
+++ b/src/declarative/extra/qmlxmllistmodel.cpp
@@ -109,7 +109,7 @@ public:
void setQuery(const QString &query)
{
if (query.startsWith(QLatin1Char('/'))) {
- qmlInfo(tr("An XmlRole query must not start with '/'"),this);
+ qmlInfo(this) << tr("An XmlRole query must not start with '/'");
return;
}
m_query = query;
@@ -550,7 +550,7 @@ void QmlXmlListModel::setQuery(const QString &query)
{
Q_D(QmlXmlListModel);
if (!query.startsWith(QLatin1Char('/'))) {
- qmlInfo(tr("An XmlListModel query must start with '/' or \"//\""),this);
+ qmlInfo(this) << tr("An XmlListModel query must start with '/' or \"//\"");
return;
}
diff --git a/src/declarative/graphicsitems/qmlgraphicsanchors.cpp b/src/declarative/graphicsitems/qmlgraphicsanchors.cpp
index f6dc5fd..655e03d 100644
--- a/src/declarative/graphicsitems/qmlgraphicsanchors.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsanchors.cpp
@@ -166,7 +166,7 @@ void QmlGraphicsAnchorsPrivate::fillChanged()
--updatingFill;
} else {
// ### Make this certain :)
- qmlInfo(QmlGraphicsAnchors::tr("Possible anchor loop detected on fill."), item);
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Possible anchor loop detected on fill.");
}
}
@@ -194,7 +194,7 @@ void QmlGraphicsAnchorsPrivate::centerInChanged()
--updatingCenterIn;
} else {
// ### Make this certain :)
- qmlInfo(QmlGraphicsAnchors::tr("Possible anchor loop detected on centerIn."), item);
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Possible anchor loop detected on centerIn.");
}
}
@@ -355,7 +355,7 @@ void QmlGraphicsAnchors::setFill(QmlGraphicsItem *f)
return;
}
if (f != d->item->parentItem() && f->parentItem() != d->item->parentItem()){
- qmlInfo(tr("Can't anchor to an item that isn't a parent or sibling."), d->item);
+ qmlInfo(d->item) << tr("Can't anchor to an item that isn't a parent or sibling.");
return;
}
d->remDepend(d->fill);
@@ -380,7 +380,7 @@ void QmlGraphicsAnchors::setCenterIn(QmlGraphicsItem* c)
return;
}
if (c != d->item->parentItem() && c->parentItem() != d->item->parentItem()){
- qmlInfo(tr("Can't anchor to an item that isn't a parent or sibling."), d->item);
+ qmlInfo(d->item) << tr("Can't anchor to an item that isn't a parent or sibling.");
return;
}
@@ -481,7 +481,7 @@ void QmlGraphicsAnchorsPrivate::updateVerticalAnchors()
--updatingVerticalAnchor;
} else {
// ### Make this certain :)
- qmlInfo(QmlGraphicsAnchors::tr("Possible anchor loop detected on vertical anchor."), item);
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Possible anchor loop detected on vertical anchor.");
}
}
@@ -540,7 +540,7 @@ void QmlGraphicsAnchorsPrivate::updateHorizontalAnchors()
--updatingHorizontalAnchor;
} else {
// ### Make this certain :)
- qmlInfo(QmlGraphicsAnchors::tr("Possible anchor loop detected on horizontal anchor."), item);
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Possible anchor loop detected on horizontal anchor.");
}
}
@@ -912,7 +912,7 @@ bool QmlGraphicsAnchorsPrivate::checkHValid() const
if (usedAnchors & QmlGraphicsAnchors::HasLeftAnchor &&
usedAnchors & QmlGraphicsAnchors::HasRightAnchor &&
usedAnchors & QmlGraphicsAnchors::HasHCenterAnchor) {
- qmlInfo(QmlGraphicsAnchors::tr("Can't specify left, right, and hcenter anchors."), item);
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Can't specify left, right, and hcenter anchors.");
return false;
}
@@ -922,16 +922,16 @@ bool QmlGraphicsAnchorsPrivate::checkHValid() const
bool QmlGraphicsAnchorsPrivate::checkHAnchorValid(QmlGraphicsAnchorLine anchor) const
{
if (!anchor.item) {
- qmlInfo(QmlGraphicsAnchors::tr("Can't anchor to a null item."), item);
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Can't anchor to a null item.");
return false;
} else if (anchor.anchorLine & QmlGraphicsAnchorLine::Vertical_Mask) {
- qmlInfo(QmlGraphicsAnchors::tr("Can't anchor a horizontal edge to a vertical edge."), item);
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Can't anchor a horizontal edge to a vertical edge.");
return false;
} else if (anchor.item != item->parentItem() && anchor.item->parentItem() != item->parentItem()){
- qmlInfo(QmlGraphicsAnchors::tr("Can't anchor to an item that isn't a parent or sibling."), item);
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Can't anchor to an item that isn't a parent or sibling.");
return false;
} else if (anchor.item == item) {
- qmlInfo(QmlGraphicsAnchors::tr("Can't anchor item to self."), item);
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Can't anchor item to self.");
return false;
}
@@ -943,13 +943,13 @@ bool QmlGraphicsAnchorsPrivate::checkVValid() const
if (usedAnchors & QmlGraphicsAnchors::HasTopAnchor &&
usedAnchors & QmlGraphicsAnchors::HasBottomAnchor &&
usedAnchors & QmlGraphicsAnchors::HasVCenterAnchor) {
- qmlInfo(QmlGraphicsAnchors::tr("Can't specify top, bottom, and vcenter anchors."), item);
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Can't specify top, bottom, and vcenter anchors.");
return false;
} else if (usedAnchors & QmlGraphicsAnchors::HasBaselineAnchor &&
(usedAnchors & QmlGraphicsAnchors::HasTopAnchor ||
usedAnchors & QmlGraphicsAnchors::HasBottomAnchor ||
usedAnchors & QmlGraphicsAnchors::HasVCenterAnchor)) {
- qmlInfo(QmlGraphicsAnchors::tr("Baseline anchor can't be used in conjunction with top, bottom, or vcenter anchors."), item);
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Baseline anchor can't be used in conjunction with top, bottom, or vcenter anchors.");
return false;
}
@@ -959,16 +959,16 @@ bool QmlGraphicsAnchorsPrivate::checkVValid() const
bool QmlGraphicsAnchorsPrivate::checkVAnchorValid(QmlGraphicsAnchorLine anchor) const
{
if (!anchor.item) {
- qmlInfo(QmlGraphicsAnchors::tr("Can't anchor to a null item."), item);
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Can't anchor to a null item.");
return false;
} else if (anchor.anchorLine & QmlGraphicsAnchorLine::Horizontal_Mask) {
- qmlInfo(QmlGraphicsAnchors::tr("Can't anchor a vertical edge to a horizontal edge."), item);
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Can't anchor a vertical edge to a horizontal edge.");
return false;
} else if (anchor.item != item->parentItem() && anchor.item->parentItem() != item->parentItem()){
- qmlInfo(QmlGraphicsAnchors::tr("Can't anchor to an item that isn't a parent or sibling."), item);
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Can't anchor to an item that isn't a parent or sibling.");
return false;
} else if (anchor.item == item){
- qmlInfo(QmlGraphicsAnchors::tr("Can't anchor item to self."), item);
+ qmlInfo(item) << QmlGraphicsAnchors::tr("Can't anchor item to self.");
return false;
}
diff --git a/src/declarative/graphicsitems/qmlgraphicsflipable.cpp b/src/declarative/graphicsitems/qmlgraphicsflipable.cpp
index 862f414..c61f996 100644
--- a/src/declarative/graphicsitems/qmlgraphicsflipable.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsflipable.cpp
@@ -133,7 +133,7 @@ void QmlGraphicsFlipable::setFront(QmlGraphicsItem *front)
{
Q_D(QmlGraphicsFlipable);
if (d->front) {
- qmlInfo(tr("front is a write-once property"),this);
+ qmlInfo(this) << tr("front is a write-once property");
return;
}
d->front = front;
@@ -152,7 +152,7 @@ void QmlGraphicsFlipable::setBack(QmlGraphicsItem *back)
{
Q_D(QmlGraphicsFlipable);
if (d->back) {
- qmlInfo(tr("back is a write-once property"),this);
+ qmlInfo(this) << tr("back is a write-once property");
return;
}
d->back = back;
diff --git a/src/declarative/graphicsitems/qmlgraphicstextinput.cpp b/src/declarative/graphicsitems/qmlgraphicstextinput.cpp
index d7612aa..56f59d8 100644
--- a/src/declarative/graphicsitems/qmlgraphicstextinput.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicstextinput.cpp
@@ -531,7 +531,7 @@ void QmlGraphicsTextInputPrivate::startCreatingCursor()
q->connect(cursorComponent, SIGNAL(statusChanged(int)),
q, SLOT(createCursor()));
}else{//isError
- qmlInfo(QmlGraphicsTextInput::tr("Could not load cursor delegate"), q);
+ qmlInfo(q) << QmlGraphicsTextInput::tr("Could not load cursor delegate");
qWarning() << cursorComponent->errors();
}
}
@@ -540,7 +540,7 @@ void QmlGraphicsTextInput::createCursor()
{
Q_D(QmlGraphicsTextInput);
if(d->cursorComponent->isError()){
- qmlInfo(tr("Could not load cursor delegate"),this);
+ qmlInfo(this) << tr("Could not load cursor delegate");
qWarning() << d->cursorComponent->errors();
return;
}
@@ -552,7 +552,7 @@ void QmlGraphicsTextInput::createCursor()
delete d->cursorItem;
d->cursorItem = qobject_cast<QmlGraphicsItem*>(d->cursorComponent->create());
if(!d->cursorItem){
- qmlInfo(tr("Could not instantiate cursor delegate"),this);
+ qmlInfo(this) << tr("Could not instantiate cursor delegate");
//The failed instantiation should print its own error messages
return;
}
diff --git a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp
index 9964de9..cf5fc5e 100644
--- a/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsvisualitemmodel.cpp
@@ -813,7 +813,7 @@ QmlGraphicsItem *QmlGraphicsVisualDataModel::item(int index, const QByteArray &v
}
if (!item) {
d->m_cache.releaseItem(nobj);
- qmlInfo(QmlGraphicsVisualDataModel::tr("Delegate component must be Item type."), d->m_delegate);
+ qmlInfo(d->m_delegate) << QmlGraphicsVisualDataModel::tr("Delegate component must be Item type.");
}
return item;
diff --git a/src/declarative/qml/qmlbinding.cpp b/src/declarative/qml/qmlbinding.cpp
index 5f7330f..b0a4d6e 100644
--- a/src/declarative/qml/qmlbinding.cpp
+++ b/src/declarative/qml/qmlbinding.cpp
@@ -205,7 +205,7 @@ void QmlBinding::update(QmlMetaProperty::WriteFlags flags)
data->updating = false;
} else {
- qmlInfo(tr("Binding loop detected for property \"%1\"").arg(data->property.name()), data->property.object());
+ qmlInfo(data->property.object()) << tr("Binding loop detected for property \"%1\"").arg(data->property.name());
}
data->release();
diff --git a/src/declarative/qml/qmlinfo.cpp b/src/declarative/qml/qmlinfo.cpp
index 5ebcd8d..9a19b80 100644
--- a/src/declarative/qml/qmlinfo.cpp
+++ b/src/declarative/qml/qmlinfo.cpp
@@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE
For example,
\code
- qmlInfo(tr("component property is a write-once property"), object);
+ qmlInfo(object) << tr("component property is a write-once property");
\endcode
prints
@@ -73,7 +73,8 @@ QT_BEGIN_NAMESPACE
\endcode
*/
-void qmlInfo(const QString& msg, const QObject* object)
+QmlInfo::QmlInfo(const QObject *object)
+: QDebug(QtWarningMsg)
{
QString pos = QLatin1String("QML");
if (object) {
@@ -95,8 +96,14 @@ void qmlInfo(const QString& msg, const QObject* object)
} else {
pos += qApp->translate("QmlInfo","unknown location");
}
- pos += QLatin1String(") ");
- qWarning((pos + msg).toLocal8Bit()); // XXX allow other processing?
+ pos += QLatin1String(")");
+ *this << pos;
+ nospace();
}
+QmlInfo::~QmlInfo()
+{
+}
+
+
QT_END_NAMESPACE
diff --git a/src/declarative/qml/qmlinfo.h b/src/declarative/qml/qmlinfo.h
index 1660aa2..fd56118 100644
--- a/src/declarative/qml/qmlinfo.h
+++ b/src/declarative/qml/qmlinfo.h
@@ -50,7 +50,40 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Declarative)
-Q_DECLARATIVE_EXPORT void qmlInfo(const QString& msg, const QObject *me=0);
+class Q_DECLARATIVE_EXPORT QmlInfo : public QDebug
+{
+public:
+ QmlInfo(const QObject *);
+ ~QmlInfo();
+
+ inline QmlInfo &operator<<(QChar t) { QDebug::operator<<(t); return *this; }
+ inline QmlInfo &operator<<(QBool t) { QDebug::operator<<(t); return *this; }
+ inline QmlInfo &operator<<(bool t) { QDebug::operator<<(t); return *this; }
+ inline QmlInfo &operator<<(char t) { QDebug::operator<<(t); return *this; }
+ inline QmlInfo &operator<<(signed short t) { QDebug::operator<<(t); return *this; }
+ inline QmlInfo &operator<<(unsigned short t) { QDebug::operator<<(t); return *this; }
+ inline QmlInfo &operator<<(signed int t) { QDebug::operator<<(t); return *this; }
+ inline QmlInfo &operator<<(unsigned int t) { QDebug::operator<<(t); return *this; }
+ inline QmlInfo &operator<<(signed long t) { QDebug::operator<<(t); return *this; }
+ inline QmlInfo &operator<<(unsigned long t) { QDebug::operator<<(t); return *this; }
+ inline QmlInfo &operator<<(qint64 t) { QDebug::operator<<(t); return *this; }
+ inline QmlInfo &operator<<(quint64 t) { QDebug::operator<<(t); return *this; }
+ inline QmlInfo &operator<<(float t) { QDebug::operator<<(t); return *this; }
+ inline QmlInfo &operator<<(double t) { QDebug::operator<<(t); return *this; }
+ inline QmlInfo &operator<<(const char* t) { QDebug::operator<<(t); return *this; }
+ inline QmlInfo &operator<<(const QString & t) { QDebug::operator<<(t.toLocal8Bit().constData()); return *this; }
+ inline QmlInfo &operator<<(const QStringRef & t) { return operator<<(t.toString()); }
+ inline QmlInfo &operator<<(const QLatin1String &t) { QDebug::operator<<(t.latin1()); return *this; }
+ inline QmlInfo &operator<<(const QByteArray & t) { QDebug::operator<<(t); return *this; }
+ inline QmlInfo &operator<<(const void * t) { QDebug::operator<<(t); return *this; }
+ inline QmlInfo &operator<<(QTextStreamFunction f) { QDebug::operator<<(f); return *this; }
+ inline QmlInfo &operator<<(QTextStreamManipulator m) { QDebug::operator<<(m); return *this; }
+};
+
+Q_DECLARATIVE_EXPORT inline QmlInfo qmlInfo(const QObject *me)
+{
+ return QmlInfo(me);
+}
QT_END_NAMESPACE
diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp
index 435ddae..62d1937 100644
--- a/src/declarative/util/qmlanimation.cpp
+++ b/src/declarative/util/qmlanimation.cpp
@@ -225,10 +225,10 @@ QmlMetaProperty QmlAbstractAnimationPrivate::createProperty(QObject *obj, const
Q_Q(QmlAbstractAnimation);
QmlMetaProperty prop = QmlMetaProperty::createProperty(obj, str);
if (!prop.isValid()) {
- qmlInfo(QmlAbstractAnimation::tr("Cannot animate non-existant property \"%1\"").arg(str), q);
+ qmlInfo(q) << QmlAbstractAnimation::tr("Cannot animate non-existant property \"%1\"").arg(str);
return QmlMetaProperty();
} else if (!prop.isWritable()) {
- qmlInfo(QmlAbstractAnimation::tr("Cannot animate read-only property \"%1\"").arg(str), q);
+ qmlInfo(q) << QmlAbstractAnimation::tr("Cannot animate read-only property \"%1\"").arg(str);
return QmlMetaProperty();
}
return prop;
@@ -1021,7 +1021,7 @@ void QmlPropertyAction::transition(QmlStateActions &actions,
bool hasTarget = !d->propertyName.isEmpty() || d->target;
if (hasSelectors && hasTarget) {
- qmlInfo(tr("matchTargets/matchProperties/exclude and target/property are mutually exclusive."), this);
+ qmlInfo(this) << tr("matchTargets/matchProperties/exclude and target/property are mutually exclusive.");
return;
}
@@ -2017,7 +2017,7 @@ void QmlPropertyAnimation::transition(QmlStateActions &actions,
bool hasTarget = !d->propertyName.isEmpty() || d->target;
if (hasSelectors && hasTarget) {
- qmlInfo(tr("matchTargets/matchProperties/exclude and target/property are mutually exclusive."), this);
+ qmlInfo(this) << tr("matchTargets/matchProperties/exclude and target/property are mutually exclusive.");
return;
}
diff --git a/src/declarative/util/qmllistmodel.cpp b/src/declarative/util/qmllistmodel.cpp
index 748dca6..19282eb 100644
--- a/src/declarative/util/qmllistmodel.cpp
+++ b/src/declarative/util/qmllistmodel.cpp
@@ -454,7 +454,7 @@ void QmlListModel::clear()
void QmlListModel::remove(int index)
{
if (!_root || index < 0 || index >= _root->values.count()) {
- qmlInfo(tr("remove: index %1 out of range").arg(index),this);
+ qmlInfo(this) << tr("remove: index %1 out of range").arg(index);
return;
}
@@ -489,7 +489,7 @@ void QmlListModel::insert(int index, const QScriptValue& valuemap)
if (index == _root->values.count())
append(valuemap);
else
- qmlInfo(tr("insert: index %1 out of range").arg(index),this);
+ qmlInfo(this) << tr("insert: index %1 out of range").arg(index);
return;
}
ModelNode *mn = new ModelNode;
@@ -518,7 +518,7 @@ void QmlListModel::move(int from, int to, int n)
if (n==0 || from==to)
return;
if (from+n > count() || to+n > count() || from < 0 || to < 0)
- qmlInfo(tr("move: out of range"),this);
+ qmlInfo(this) << tr("move: out of range");
int origfrom=from; // preserve actual move, so any animations are correct
int origto=to;
int orign=n;
@@ -565,7 +565,7 @@ void QmlListModel::move(int from, int to, int n)
void QmlListModel::append(const QScriptValue& valuemap)
{
if (!valuemap.isObject()) {
- qmlInfo(tr("append: value is not an object"),this);
+ qmlInfo(this) << tr("append: value is not an object");
return;
}
if (!_root)
@@ -604,7 +604,7 @@ void QmlListModel::append(const QScriptValue& valuemap)
QScriptValue QmlListModel::get(int index) const
{
if (index >= count()) {
- qmlInfo(tr("get: index %1 out of range").arg(index),this);
+ qmlInfo(this) << tr("get: index %1 out of range").arg(index);
return 0;
}
@@ -639,7 +639,7 @@ void QmlListModel::set(int index, const QScriptValue& valuemap)
if (!_root)
_root = new ModelNode;
if ( index > _root->values.count()) {
- qmlInfo(tr("set: index %1 out of range").arg(index),this);
+ qmlInfo(this) << tr("set: index %1 out of range").arg(index);
return;
}
if (index == _root->values.count())
@@ -680,7 +680,7 @@ void QmlListModel::set(int index, const QString& property, const QVariant& value
if (!_root)
_root = new ModelNode;
if ( index >= _root->values.count()) {
- qmlInfo(tr("set: index %1 out of range").arg(index),this);
+ qmlInfo(this) << tr("set: index %1 out of range").arg(index);
return;
}
ModelNode *node = qvariant_cast<ModelNode *>(_root->values.at(index));
diff --git a/src/declarative/util/qmlpropertychanges.cpp b/src/declarative/util/qmlpropertychanges.cpp
index 3aa3678..75c9f80 100644
--- a/src/declarative/util/qmlpropertychanges.cpp
+++ b/src/declarative/util/qmlpropertychanges.cpp
@@ -305,10 +305,10 @@ QmlPropertyChangesPrivate::property(const QByteArray &property)
Q_Q(QmlPropertyChanges);
QmlMetaProperty prop = QmlMetaProperty::createProperty(object, QString::fromUtf8(property));
if (!prop.isValid()) {
- qmlInfo(QmlPropertyChanges::tr("Cannot assign to non-existant property \"%1\"").arg(QString::fromUtf8(property)), q);
+ qmlInfo(q) << QmlPropertyChanges::tr("Cannot assign to non-existant property \"%1\"").arg(QString::fromUtf8(property));
return QmlMetaProperty();
} else if (!(prop.type() & QmlMetaProperty::SignalProperty) && !prop.isWritable()) {
- qmlInfo(QmlPropertyChanges::tr("Cannot assign to read-only property \"%1\"").arg(QString::fromUtf8(property)), q);
+ qmlInfo(q) << QmlPropertyChanges::tr("Cannot assign to read-only property \"%1\"").arg(QString::fromUtf8(property));
return QmlMetaProperty();
}
return prop;
diff --git a/src/declarative/util/qmlstateoperations.cpp b/src/declarative/util/qmlstateoperations.cpp
index 2fca002..03337cb 100644
--- a/src/declarative/util/qmlstateoperations.cpp
+++ b/src/declarative/util/qmlstateoperations.cpp
@@ -75,7 +75,7 @@ void QmlParentChangePrivate::doChange(QmlGraphicsItem *targetParent, QmlGraphics
bool ok;
const QTransform &transform = target->itemTransform(targetParent, &ok);
if (transform.type() >= QTransform::TxShear || !ok) {
- qmlInfo(QObject::tr("Unable to preserve appearance under complex transform"), q);
+ qmlInfo(q) << QObject::tr("Unable to preserve appearance under complex transform");
}
qreal scale = 1;
@@ -84,21 +84,21 @@ void QmlParentChangePrivate::doChange(QmlGraphicsItem *targetParent, QmlGraphics
if (transform.m11() == transform.m22())
scale = transform.m11();
else {
- qmlInfo(QObject::tr("Unable to preserve appearance under non-uniform scale"), q);
+ qmlInfo(q) << QObject::tr("Unable to preserve appearance under non-uniform scale");
ok = false;
}
} else if (transform.type() == QTransform::TxRotate) {
if (transform.m11() == transform.m22())
scale = qSqrt(transform.m11()*transform.m11() + transform.m12()*transform.m12());
else {
- qmlInfo(QObject::tr("Unable to preserve appearance under non-uniform scale"), q);
+ qmlInfo(q) << QObject::tr("Unable to preserve appearance under non-uniform scale");
ok = false;
}
if (scale != 0)
rotation = atan2(transform.m12()/scale, transform.m11()/scale) * 180/M_PI;
else {
- qmlInfo(QObject::tr("Unable to preserve appearance under scale of 0"), q);
+ qmlInfo(q) << QObject::tr("Unable to preserve appearance under scale of 0");
ok = false;
}
}
diff --git a/tests/auto/declarative/animations/tst_animations.cpp b/tests/auto/declarative/animations/tst_animations.cpp
index 61f0e0a..74d5f46 100644
--- a/tests/auto/declarative/animations/tst_animations.cpp
+++ b/tests/auto/declarative/animations/tst_animations.cpp
@@ -354,7 +354,7 @@ void tst_animations::propertiesTransition()
QmlGraphicsRectangle *myRect = rect->findChild<QmlGraphicsRectangle*>("TheRect");
QVERIFY(myRect);
- QTest::ignoreMessage(QtWarningMsg, "QML QmlNumberAnimation (file:///home/brasser/depot/kinetic-declarativeui/qt/tests/auto/declarative/animations/data/propertiesTransition4.qml:22:9) matchTargets/matchProperties/exclude and target/property are mutually exclusive.");
+ QTest::ignoreMessage(QtWarningMsg, "QML QmlNumberAnimation (file://" SRCDIR "/data/propertiesTransition4.qml:22:9) matchTargets/matchProperties/exclude and target/property are mutually exclusive.");
rect->setState("moved");
QCOMPARE(myRect->x(),qreal(200));
}
@@ -367,7 +367,7 @@ void tst_animations::propertiesTransition()
QmlGraphicsRectangle *myRect = rect->findChild<QmlGraphicsRectangle*>("TheRect");
QVERIFY(myRect);
- QTest::ignoreMessage(QtWarningMsg, "QML QmlNumberAnimation (file:///home/brasser/depot/kinetic-declarativeui/qt/tests/auto/declarative/animations/data/propertiesTransition5.qml:22:9) matchTargets/matchProperties/exclude and target/property are mutually exclusive.");
+ QTest::ignoreMessage(QtWarningMsg, "QML QmlNumberAnimation (file://" SRCDIR "/data/propertiesTransition5.qml:22:9) matchTargets/matchProperties/exclude and target/property are mutually exclusive.");
rect->setState("moved");
QCOMPARE(myRect->x(),qreal(200));
}
diff --git a/tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp b/tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp
index c05f8a6..44319c1 100644
--- a/tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp
+++ b/tests/auto/declarative/qmlgraphicswebview/tst_qmlgraphicswebview.cpp
@@ -134,7 +134,6 @@ void tst_qmlgraphicswebview::basicProperties()
QCOMPARE(wv->statusText(),QString("status here"));
QCOMPARE(strippedHtml(fileContents(SRCDIR "/data/basic.html")), strippedHtml(wv->html()));
QCOMPARE(wv->width(), 123.0);
- QCOMPARE(wv->webPageWidth(), 0);
QCOMPARE(wv->preferredWidth(), 0);
QCOMPARE(wv->zoomFactor(), 1.0);
QCOMPARE(wv->url(), QUrl::fromLocalFile(SRCDIR "/data/basic.html"));
@@ -170,7 +169,6 @@ void tst_qmlgraphicswebview::historyNav()
QCOMPARE(wv->statusText(),QString("status here"));
QCOMPARE(strippedHtml(fileContents(SRCDIR "/data/basic.html")), strippedHtml(wv->html()));
QCOMPARE(wv->width(), 123.0);
- QCOMPARE(wv->webPageWidth(), 0);
QCOMPARE(wv->preferredWidth(), 0);
QCOMPARE(wv->zoomFactor(), 1.0);
QCOMPARE(wv->url(), QUrl::fromLocalFile(SRCDIR "/data/basic.html"));
diff --git a/tests/auto/declarative/qmlinfo/tst_qmlinfo.cpp b/tests/auto/declarative/qmlinfo/tst_qmlinfo.cpp
index 8241045..22841e5 100644
--- a/tests/auto/declarative/qmlinfo/tst_qmlinfo.cpp
+++ b/tests/auto/declarative/qmlinfo/tst_qmlinfo.cpp
@@ -77,14 +77,14 @@ void tst_qmlinfo::qmlObject()
QString message = "QML " + QString(object->metaObject()->className()) + " (" + component.url().toString() + ":3:1) Test Message";
QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
- qmlInfo("Test Message", object);
+ qmlInfo(object) << "Test Message";
QObject *nested = qvariant_cast<QObject *>(object->property("nested"));
QVERIFY(nested != 0);
message = "QML " + QString(nested->metaObject()->className()) + " (" + component.url().toString() + ":6:13) Second Test Message";
QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
- qmlInfo("Second Test Message", nested);
+ qmlInfo(nested) << "Second Test Message";
}
void tst_qmlinfo::nestedQmlObject()
@@ -101,28 +101,28 @@ void tst_qmlinfo::nestedQmlObject()
QString message = "QML " + QString(nested->metaObject()->className()) + " (" + component.url().toString() + ":5:13) Outer Object";
QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
- qmlInfo("Outer Object", nested);
+ qmlInfo(nested) << "Outer Object";
message = "QML " + QString(nested2->metaObject()->className()) + " (" + TEST_FILE("NestedObject.qml").toString() + ":6:14) Inner Object";
QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
- qmlInfo("Inner Object", nested2);
+ qmlInfo(nested2) << "Inner Object";
}
void tst_qmlinfo::nonQmlObject()
{
QObject object;
QTest::ignoreMessage(QtWarningMsg, "QML QObject (unknown location) Test Message");
- qmlInfo("Test Message", &object);
+ qmlInfo(&object) << "Test Message";
QPushButton pbObject;
QTest::ignoreMessage(QtWarningMsg, "QML QPushButton (unknown location) Test Message");
- qmlInfo("Test Message", &pbObject);
+ qmlInfo(&pbObject) << "Test Message";
}
void tst_qmlinfo::nullObject()
{
QTest::ignoreMessage(QtWarningMsg, "QML (unknown location) Null Object Test Message");
- qmlInfo("Null Object Test Message", 0);
+ qmlInfo(0) << "Null Object Test Message";
}
void tst_qmlinfo::nonQmlContextedObject()
@@ -131,7 +131,7 @@ void tst_qmlinfo::nonQmlContextedObject()
QmlContext context(&engine);
QmlEngine::setContextForObject(&object, &context);
QTest::ignoreMessage(QtWarningMsg, "QML QObject (unknown location) Test Message");
- qmlInfo("Test Message", &object);
+ qmlInfo(&object) << "Test Message";
}
QTEST_MAIN(tst_qmlinfo)
diff --git a/tests/auto/declarative/qmlmetatype/tst_qmlmetatype.cpp b/tests/auto/declarative/qmlmetatype/tst_qmlmetatype.cpp
index b481ce4..36a7332 100644
--- a/tests/auto/declarative/qmlmetatype/tst_qmlmetatype.cpp
+++ b/tests/auto/declarative/qmlmetatype/tst_qmlmetatype.cpp
@@ -239,7 +239,7 @@ void tst_qmlmetatype::copy()
QT_COPY_TEST(QTextFormat, QTextFormat(QTextFormat::ListFormat));
QT_COPY_TEST(QMatrix, QMatrix().translate(10, 10));
QT_COPY_TEST(QTransform, QTransform().translate(10, 10));
- QT_COPY_TEST(QMatrix4x4, QMatrix4x4().translate(10, 10));
+ QT_COPY_TEST(QMatrix4x4, QMatrix4x4(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1));
QT_COPY_TEST(QVector2D, QVector2D(10.2, 1));
QT_COPY_TEST(QVector3D, QVector3D(10.2, 1, -2));
QT_COPY_TEST(QVector4D, QVector4D(10.2, 1, -2, 1.2));
diff --git a/tests/auto/declarative/visual/webview/embedding/data/nesting.0.png b/tests/auto/declarative/visual/webview/embedding/data/nesting.0.png
new file mode 100644
index 0000000..57de710
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/embedding/data/nesting.0.png
Binary files differ
diff --git a/tests/auto/declarative/visual/webview/embedding/data/nesting.qml b/tests/auto/declarative/visual/webview/embedding/data/nesting.qml
new file mode 100644
index 0000000..8d38ebe
--- /dev/null
+++ b/tests/auto/declarative/visual/webview/embedding/data/nesting.qml
@@ -0,0 +1,363 @@
+import Qt.VisualTest 4.6
+
+VisualTest {
+ Frame {
+ msec: 0
+ }
+ Frame {
+ msec: 16
+ hash: "5dc8dca7a73022fbf2116b654b709244"
+ }
+ Frame {
+ msec: 32
+ hash: "5dc8dca7a73022fbf2116b654b709244"
+ }
+ Frame {
+ msec: 48
+ hash: "34079c4076ab6aadd8b64fcba7d95e15"
+ }
+ Frame {
+ msec: 64
+ hash: "5ab5fc62b49e78d0609dcb4be6c9a157"
+ }
+ Frame {
+ msec: 80
+ hash: "063cc7438bbffae717648d98006021a8"
+ }
+ Frame {
+ msec: 96
+ hash: "c5cd16663e48639cbeade82c3bfa0403"
+ }
+ Frame {
+ msec: 112
+ hash: "ea7f8df84ddbad0f683fe97ddb0a0130"
+ }
+ Frame {
+ msec: 128
+ hash: "3c353e09bdb3a1e6ff388ad6020f55ea"
+ }
+ Frame {
+ msec: 144
+ hash: "5b6de430365d0c9824337011916b0c0b"
+ }
+ Frame {
+ msec: 160
+ hash: "48d353ac9e7ee1ce41361d0a2b47e008"
+ }
+ Frame {
+ msec: 176
+ hash: "c96e4d02d343ddd78e8d3dd6aa8e0198"
+ }
+ Frame {
+ msec: 192
+ hash: "543c63d77ec635b77672ba4c5160a3d4"
+ }
+ Frame {
+ msec: 208
+ hash: "2d56ad9c2352e555fef613d625e71151"
+ }
+ Frame {
+ msec: 224
+ hash: "18e433c3e3ee64510f875f674791d51c"
+ }
+ Frame {
+ msec: 240
+ hash: "56889122c1ddacdd8ebd88310c7410bc"
+ }
+ Frame {
+ msec: 256
+ hash: "d51c85458e0109bd5bf9528b741d98d0"
+ }
+ Frame {
+ msec: 272
+ hash: "ac54137afc29a3022c6f01df7cdf2fd6"
+ }
+ Frame {
+ msec: 288
+ hash: "c7a42b389bae3b729ba9e6cba7f54530"
+ }
+ Frame {
+ msec: 304
+ hash: "7583b55841e80891652c3472c658f989"
+ }
+ Frame {
+ msec: 320
+ hash: "95a7f8d47c3788261427727f82c9ff59"
+ }
+ Frame {
+ msec: 336
+ hash: "a87bad3e2f010680e16cd1e3f5e03e99"
+ }
+ Frame {
+ msec: 352
+ hash: "e16bc51653f21819e0eec412b99a069f"
+ }
+ Frame {
+ msec: 368
+ hash: "f1e869580ac148ae207141c5f0adc185"
+ }
+ Frame {
+ msec: 384
+ hash: "7e496e44363a16d7c62e4258af9ce087"
+ }
+ Frame {
+ msec: 400
+ hash: "19e97915c84d3554c66d5a9ad3aa6a3e"
+ }
+ Frame {
+ msec: 416
+ hash: "181181b48a1085d1850f18ca9b163549"
+ }
+ Frame {
+ msec: 432
+ hash: "4637cb04595a543867bd43b0c1c829ea"
+ }
+ Frame {
+ msec: 448
+ hash: "bd0a074fed5507f8556de6110bf56aa4"
+ }
+ Frame {
+ msec: 464
+ hash: "9547618923edac6f7f9a3ff324c4f2d8"
+ }
+ Frame {
+ msec: 480
+ hash: "a2f90c88eacb7c66878d45e33c2a787d"
+ }
+ Frame {
+ msec: 496
+ hash: "d5ffd3e35d0426887c106069310f84d8"
+ }
+ Frame {
+ msec: 512
+ hash: "6bc50a5b76e2a2ef0e6bee762abeb330"
+ }
+ Frame {
+ msec: 528
+ hash: "d4439933c842ed8432434d272fea2845"
+ }
+ Frame {
+ msec: 544
+ hash: "61699e6ec476ac3f090e4f485430421d"
+ }
+ Frame {
+ msec: 560
+ hash: "02d7fa9bcd697d2cab364d0a3ca4a0e2"
+ }
+ Frame {
+ msec: 576
+ hash: "914178cbf1f6a6822cc40f81823475e4"
+ }
+ Frame {
+ msec: 592
+ hash: "280f867ea27891ee764332998567d40d"
+ }
+ Frame {
+ msec: 608
+ hash: "ea0d00fe54a172a89c24eac781f7ae6d"
+ }
+ Frame {
+ msec: 624
+ hash: "4e910fb507964a710e26f318c62227bf"
+ }
+ Frame {
+ msec: 640
+ hash: "b0c3392eb739f270dd21f552ad999c23"
+ }
+ Frame {
+ msec: 656
+ hash: "f3698c83b0972bd66a53ad95d4fc301e"
+ }
+ Frame {
+ msec: 672
+ hash: "0d303a0d6a9b626943ac93cc6f3fb230"
+ }
+ Frame {
+ msec: 688
+ hash: "ba56d49e6f51aa6f1bd2a7500e3538fd"
+ }
+ Frame {
+ msec: 704
+ hash: "273ce89d5194168e5bfd1dcefad49be2"
+ }
+ Frame {
+ msec: 720
+ hash: "c2beef4fb7996dbccdaff4f54bdc33f1"
+ }
+ Frame {
+ msec: 736
+ hash: "1e1aa7d84f27158a8e61bd8698ddbf2a"
+ }
+ Frame {
+ msec: 752
+ hash: "24e82479802e710c673133ca0413be66"
+ }
+ Frame {
+ msec: 768
+ hash: "b77e935a690bcb396e15b942d772cf1b"
+ }
+ Frame {
+ msec: 784
+ hash: "7b729c74df1d15d6b0e8e1fc19c2d710"
+ }
+ Frame {
+ msec: 800
+ hash: "fd6cbdca3e481baaf35022dfea76e74c"
+ }
+ Frame {
+ msec: 816
+ hash: "c975f6eb592793aa81895ffcb74ca577"
+ }
+ Frame {
+ msec: 832
+ hash: "677c4039a650df53b4e885f37b049ab3"
+ }
+ Frame {
+ msec: 848
+ hash: "89563aae36552cb1749ec06567e46d9d"
+ }
+ Frame {
+ msec: 864
+ hash: "01f57402874de6608cc02937aaf91794"
+ }
+ Frame {
+ msec: 880
+ hash: "50c9c4e5eaaadee1ff230975390d34e3"
+ }
+ Frame {
+ msec: 896
+ hash: "20b7d277d398afad59afdf9e6b41a57e"
+ }
+ Frame {
+ msec: 912
+ hash: "8f9ea938a2375afeba419199de66dd52"
+ }
+ Frame {
+ msec: 928
+ hash: "b96745888ba954bcf304c0840a030f93"
+ }
+ Frame {
+ msec: 944
+ hash: "f5715e931274011123160f7ad10d6c52"
+ }
+ Frame {
+ msec: 960
+ image: "nesting.0.png"
+ }
+ Frame {
+ msec: 976
+ hash: "459fe967816c795a177a3926093fae75"
+ }
+ Frame {
+ msec: 992
+ hash: "c599a26083068b6db628c8d8416bab60"
+ }
+ Frame {
+ msec: 1008
+ hash: "e0aee7d1152c971b1beee9d36542acb7"
+ }
+ Frame {
+ msec: 1024
+ hash: "2af0facdf6412f7b06979aae25e4db26"
+ }
+ Frame {
+ msec: 1040
+ hash: "f147a92cb1826f95d4fdb7d011ba79b1"
+ }
+ Frame {
+ msec: 1056
+ hash: "12a1cb894b0fb8e44152cccacf855c1a"
+ }
+ Frame {
+ msec: 1072
+ hash: "c7500cf58b74fef2c3e9820d1de8f843"
+ }
+ Frame {
+ msec: 1088
+ hash: "3a031b2206835f8b2dc9837016df6ae6"
+ }
+ Frame {
+ msec: 1104
+ hash: "7a4796b419bbc04237764dea0b1d47d5"
+ }
+ Frame {
+ msec: 1120
+ hash: "151d350f0064e2faf0bfb9c58bc3e4f2"
+ }
+ Frame {
+ msec: 1136
+ hash: "d72c20a97e678908acc1d6c1f8114d9e"
+ }
+ Frame {
+ msec: 1152
+ hash: "22da1e645640a3c31b064ff757113197"
+ }
+ Frame {
+ msec: 1168
+ hash: "401f0bf370e2ecea5a84276fb72eb1da"
+ }
+ Frame {
+ msec: 1184
+ hash: "c6e00d7b0ac14a5c3860b6a29901c915"
+ }
+ Frame {
+ msec: 1200
+ hash: "f1f7dc55d7719fcb6e97157c0ca85fc0"
+ }
+ Frame {
+ msec: 1216
+ hash: "6a112e1d79c7128c235d093e4f1f9325"
+ }
+ Frame {
+ msec: 1232
+ hash: "14a2caf8cdca8d5147261a315059b69d"
+ }
+ Frame {
+ msec: 1248
+ hash: "5645243aa3cfd12b0b32442f063bedb2"
+ }
+ Frame {
+ msec: 1264
+ hash: "c7f72534a88e33c72a54cb8580534551"
+ }
+ Frame {
+ msec: 1280
+ hash: "6cd5e2e8e0128586a682b3c649ae0631"
+ }
+ Frame {
+ msec: 1296
+ hash: "67cefb4526b52d40a31811bc0dfaeb6a"
+ }
+ Frame {
+ msec: 1312
+ hash: "fbe2a43a27bf490719c8b9e2b094e34f"
+ }
+ Frame {
+ msec: 1328
+ hash: "e028aad6f51a47d8189efcf9c5d277ee"
+ }
+ Frame {
+ msec: 1344
+ hash: "2b4cc50c37c07289fa6f9309991d36da"
+ }
+ Frame {
+ msec: 1360
+ hash: "b67b2244cd0616d07e100d7b3b00bbe2"
+ }
+ Frame {
+ msec: 1376
+ hash: "4e4690cffc98c49e91bdb600f1e94c79"
+ }
+ Frame {
+ msec: 1392
+ hash: "e5215c727836a5547a170d42363bc5c8"
+ }
+ Frame {
+ msec: 1408
+ hash: "26868e91d1794bb3f42d51f508fef613"
+ }
+ Frame {
+ msec: 1424
+ hash: "1e5f431b125a66096ac9a4d5a211a2c4"
+ }
+}