summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unittest.py
blob: bfc3ded6f128da498ad170680264e3cef11fdc42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import unittest.test

from test import support


def test_main():
    # used by regrtest
    support.run_unittest(unittest.test.suite())
    support.reap_children()

def load_tests(*_):
    # used by unittest
    return unittest.test.suite()

if __name__ == "__main__":
    test_main()
num_read = src->device->read((char*)src->buffer, max_buf); } - src->next_input_byte = src->buffer; - int num_read = src->device->read((char*)src->buffer, max_buf); if (num_read <= 0) { // Insert a fake EOI marker - as per jpeglib recommendation + src->next_input_byte = src->buffer; src->buffer[0] = (JOCTET) 0xFF; src->buffer[1] = (JOCTET) JPEG_EOI; src->bytes_in_buffer = 2; @@ -183,13 +186,7 @@ static void qt_term_source(j_decompress_ptr cinfo) { my_jpeg_source_mgr* src = (my_jpeg_source_mgr*)cinfo->src; if (!src->device->isSequential()) - { - // read() isn't used for memDevice, so seek past everything that was used - if (src->memDevice) - src->device->seek(src->device->pos() + (src->memDevice->data().size() - src->memDevice->pos() - src->bytes_in_buffer)); - else - src->device->seek(src->device->pos() - src->bytes_in_buffer); - } + src->device->seek(src->device->pos() - src->bytes_in_buffer); } #if defined(Q_C_CALLBACKS) diff --git a/tests/auto/qimagereader/images/qtbug13653-no_eoi.jpg b/tests/auto/qimagereader/images/qtbug13653-no_eoi.jpg new file mode 100644 index 0000000..605e8a8 Binary files /dev/null and b/tests/auto/qimagereader/images/qtbug13653-no_eoi.jpg differ diff --git a/tests/auto/qimagereader/qimagereader.qrc b/tests/auto/qimagereader/qimagereader.qrc index 1acc82f..5536b38 100644 --- a/tests/auto/qimagereader/qimagereader.qrc +++ b/tests/auto/qimagereader/qimagereader.qrc @@ -63,5 +63,6 @@ images/rect.svgz images/corrupt.svg images/corrupt.svgz + images/qtbug13653-no_eoi.jpg diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index 5b30b04..3bee5d9 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -239,6 +239,7 @@ void tst_QImageReader::readImage_data() #if defined QTEST_HAVE_JPEG QTest::newRow("JPEG: beavis") << QString("beavis.jpg") << true << QByteArray("jpeg"); + QTest::newRow("JPEG: qtbug13653") << QString("qtbug13653-no_eoi.jpg") << true << QByteArray("jpeg"); #endif #if defined QTEST_HAVE_GIF QTest::newRow("GIF: earth") << QString("earth.gif") << true << QByteArray("gif"); @@ -1039,6 +1040,7 @@ void tst_QImageReader::readFromDevice_data() QTest::newRow("jpeg-1") << QString("beavis.jpg") << QByteArray("jpeg"); QTest::newRow("jpeg-2") << QString("YCbCr_cmyk.jpg") << QByteArray("jpeg"); QTest::newRow("jpeg-3") << QString("YCbCr_rgb.jpg") << QByteArray("jpeg"); + QTest::newRow("jpeg-4") << QString("qtbug13653-no_eoi.jpg") << QByteArray("jpeg"); #endif // QTEST_HAVE_JPEG #ifdef QTEST_HAVE_GIF QTest::newRow("gif-1") << QString("earth.gif") << QByteArray("gif"); @@ -1314,6 +1316,9 @@ void tst_QImageReader::readFromResources_data() QTest::newRow("YCbCr_rgb.jpg") << QString("YCbCr_rgb.jpg") << QByteArray("jpg") << QSize(75, 50) << QString(""); + QTest::newRow("qtbug13653-no_eoi.jpg") << QString("qtbug13653-no_eoi.jpg") + << QByteArray("jpg") << QSize(240, 180) + << QString(""); #endif #ifdef QTEST_HAVE_MNG QTest::newRow("corrupt.mng") << QString("corrupt.mng") -- cgit v0.12 From c13d3906af8936ab7c1f4cca16edf41822b23ac9 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Fri, 17 Sep 2010 10:31:04 +1000 Subject: Fix worker agent to emit ListModel itemsChanged() correctly when set() and setProperty() are called Task-number: QTBUG-13666 (cherry picked from commit ff075380d7ec1472fcdff06b3f39ffdc02b7f112) --- src/declarative/util/qdeclarativelistmodelworkeragent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/util/qdeclarativelistmodelworkeragent.cpp b/src/declarative/util/qdeclarativelistmodelworkeragent.cpp index d9df169..4392bed 100644 --- a/src/declarative/util/qdeclarativelistmodelworkeragent.cpp +++ b/src/declarative/util/qdeclarativelistmodelworkeragent.cpp @@ -232,7 +232,7 @@ bool QDeclarativeListModelWorkerAgent::event(QEvent *e) emit m_orig->itemsMoved(change.index, change.to, change.count); break; case Change::Changed: - emit m_orig->itemsChanged(change.index, change.to, orig->m_roles.keys()); + emit m_orig->itemsChanged(change.index, change.count, orig->m_roles.keys()); break; } } -- cgit v0.12 From 6c1f0aeeeb589280adaec940844fc2af17cf1bd1 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 17 Sep 2010 14:53:40 +1000 Subject: PathView didn't accept mouse events, preventing it from working in a Flickable. Since it didn't accept the press it didn't get a grab, so its events were always filtered away by Flickable. Use the same implementation as Flickable, i.e. create private handler functions for mouse events and accept normal events in the mouse*Event() methods. Task-number: QTBUG-13687 Reviewed-by: Michael Brasser (cherry picked from commit a4cadd1b1fd30a1989d56f6c06deb8fed4f79882) --- .../graphicsitems/qdeclarativepathview.cpp | 183 ++++++++++++--------- .../graphicsitems/qdeclarativepathview_p_p.h | 4 + 2 files changed, 112 insertions(+), 75 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index dad547f..119ac3e 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -1033,103 +1033,138 @@ QPointF QDeclarativePathViewPrivate::pointNear(const QPointF &point, qreal *near return nearPoint; } - void QDeclarativePathView::mousePressEvent(QGraphicsSceneMouseEvent *event) { Q_D(QDeclarativePathView); - if (!d->interactive || !d->items.count()) + if (d->interactive) { + d->handleMousePressEvent(event); + event->accept(); + } else { + QDeclarativeItem::mousePressEvent(event); + } +} + +void QDeclarativePathViewPrivate::handleMousePressEvent(QGraphicsSceneMouseEvent *event) +{ + Q_Q(QDeclarativePathView); + if (!interactive || !items.count()) return; - QPointF scenePoint = mapToScene(event->pos()); + QPointF scenePoint = q->mapToScene(event->pos()); int idx = 0; - for (; idx < d->items.count(); ++idx) { - QRectF rect = d->items.at(idx)->boundingRect(); - rect = d->items.at(idx)->mapToScene(rect).boundingRect(); + for (; idx < items.count(); ++idx) { + QRectF rect = items.at(idx)->boundingRect(); + rect = items.at(idx)->mapToScene(rect).boundingRect(); if (rect.contains(scenePoint)) break; } - if (idx == d->items.count() && d->dragMargin == 0.) // didn't click on an item + if (idx == items.count() && dragMargin == 0.) // didn't click on an item return; - d->startPoint = d->pointNear(event->pos(), &d->startPc); - if (idx == d->items.count()) { - qreal distance = qAbs(event->pos().x() - d->startPoint.x()) + qAbs(event->pos().y() - d->startPoint.y()); - if (distance > d->dragMargin) + startPoint = pointNear(event->pos(), &startPc); + if (idx == items.count()) { + qreal distance = qAbs(event->pos().x() - startPoint.x()) + qAbs(event->pos().y() - startPoint.y()); + if (distance > dragMargin) return; } - if (d->tl.isActive() && d->flicking) - d->stealMouse = true; // If we've been flicked then steal the click. + if (tl.isActive() && flicking) + stealMouse = true; // If we've been flicked then steal the click. else - d->stealMouse = false; + stealMouse = false; - d->lastElapsed = 0; - d->lastDist = 0; - QDeclarativeItemPrivate::start(d->lastPosTime); - d->tl.clear(); + lastElapsed = 0; + lastDist = 0; + QDeclarativeItemPrivate::start(lastPosTime); + tl.clear(); } void QDeclarativePathView::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { Q_D(QDeclarativePathView); - if (!d->interactive || !d->lastPosTime.isValid()) + if (d->interactive) { + d->handleMouseMoveEvent(event); + if (d->stealMouse) + setKeepMouseGrab(true); + event->accept(); + } else { + QDeclarativeItem::mouseMoveEvent(event); + } +} + +void QDeclarativePathViewPrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent *event) +{ + Q_Q(QDeclarativePathView); + if (!interactive || !lastPosTime.isValid()) return; - if (!d->stealMouse) { - QPointF delta = event->pos() - d->startPoint; + if (!stealMouse) { + QPointF delta = event->pos() - startPoint; if (qAbs(delta.x()) > QApplication::startDragDistance() || qAbs(delta.y()) > QApplication::startDragDistance()) - d->stealMouse = true; + stealMouse = true; } - if (d->stealMouse) { - d->moveReason = QDeclarativePathViewPrivate::Mouse; + if (stealMouse) { + moveReason = QDeclarativePathViewPrivate::Mouse; qreal newPc; - d->pointNear(event->pos(), &newPc); - qreal diff = (newPc - d->startPc)*d->modelCount*d->mappedRange; + pointNear(event->pos(), &newPc); + qreal diff = (newPc - startPc)*modelCount*mappedRange; if (diff) { - setOffset(d->offset + diff); + setOffset(offset + diff); - if (diff > d->modelCount/2) - diff -= d->modelCount; - else if (diff < -d->modelCount/2) - diff += d->modelCount; + if (diff > modelCount/2) + diff -= modelCount; + else if (diff < -modelCount/2) + diff += modelCount; - d->lastElapsed = QDeclarativeItemPrivate::restart(d->lastPosTime); - d->lastDist = diff; - d->startPc = newPc; + lastElapsed = QDeclarativeItemPrivate::restart(lastPosTime); + lastDist = diff; + startPc = newPc; } - if (!d->moving) { - d->moving = true; - emit movingChanged(); - emit movementStarted(); + if (!moving) { + moving = true; + emit q->movingChanged(); + emit q->movementStarted(); } } } -void QDeclarativePathView::mouseReleaseEvent(QGraphicsSceneMouseEvent *) +void QDeclarativePathView::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { Q_D(QDeclarativePathView); - d->stealMouse = false; - setKeepMouseGrab(false); - if (!d->interactive || !d->lastPosTime.isValid()) + if (d->interactive) { + d->handleMouseReleaseEvent(event); + event->accept(); + ungrabMouse(); + } else { + QDeclarativeItem::mouseReleaseEvent(event); + } +} + +void QDeclarativePathViewPrivate::handleMouseReleaseEvent(QGraphicsSceneMouseEvent *) +{ + Q_Q(QDeclarativePathView); + stealMouse = false; + q->setKeepMouseGrab(false); + if (!interactive || !lastPosTime.isValid()) return; - qreal elapsed = qreal(d->lastElapsed + QDeclarativeItemPrivate::elapsed(d->lastPosTime)) / 1000.; - qreal velocity = elapsed > 0. ? d->lastDist / elapsed : 0; - if (d->model && d->modelCount && qAbs(velocity) > 1.) { - qreal count = d->pathItems == -1 ? d->modelCount : d->pathItems; + qreal elapsed = qreal(lastElapsed + QDeclarativeItemPrivate::elapsed(lastPosTime)) / 1000.; + qreal velocity = elapsed > 0. ? lastDist / elapsed : 0; + if (model && modelCount && qAbs(velocity) > 1.) { + qreal count = pathItems == -1 ? modelCount : pathItems; if (qAbs(velocity) > count * 2) // limit velocity velocity = (velocity > 0 ? count : -count) * 2; // Calculate the distance to be travelled qreal v2 = velocity*velocity; - qreal accel = d->deceleration/10; + qreal accel = deceleration/10; // + 0.25 to encourage moving at least one item in the flick direction - qreal dist = qMin(qreal(d->modelCount-1), qreal(v2 / (accel * 2.0) + 0.25)); - if (d->haveHighlightRange && d->highlightRangeMode == QDeclarativePathView::StrictlyEnforceRange) { + qreal dist = qMin(qreal(modelCount-1), qreal(v2 / (accel * 2.0) + 0.25)); + if (haveHighlightRange && highlightRangeMode == QDeclarativePathView::StrictlyEnforceRange) { // round to nearest item. if (velocity > 0.) - dist = qRound(dist + d->offset) - d->offset; + dist = qRound(dist + offset) - offset; else - dist = qRound(dist - d->offset) + d->offset; + dist = qRound(dist - offset) + offset; // Calculate accel required to stop on item boundary if (dist <= 0.) { dist = 0.; @@ -1138,23 +1173,22 @@ void QDeclarativePathView::mouseReleaseEvent(QGraphicsSceneMouseEvent *) accel = v2 / (2.0f * qAbs(dist)); } } - d->offsetAdj = 0.0; - d->moveOffset.setValue(d->offset); - d->tl.accel(d->moveOffset, velocity, accel, dist); - d->tl.callback(QDeclarativeTimeLineCallback(&d->moveOffset, d->fixOffsetCallback, d)); - if (!d->flicking) { - d->flicking = true; - emit flickingChanged(); - emit flickStarted(); + offsetAdj = 0.0; + moveOffset.setValue(offset); + tl.accel(moveOffset, velocity, accel, dist); + tl.callback(QDeclarativeTimeLineCallback(&moveOffset, fixOffsetCallback, this)); + if (!flicking) { + flicking = true; + emit q->flickingChanged(); + emit q->flickStarted(); } } else { - d->fixOffset(); + fixOffset(); } - d->lastPosTime.invalidate(); - ungrabMouse(); - if (!d->tl.isActive()) - movementEnding(); + lastPosTime.invalidate(); + if (!tl.isActive()) + q->movementEnding(); } bool QDeclarativePathView::sendMouseEvent(QGraphicsSceneMouseEvent *event) @@ -1164,7 +1198,8 @@ bool QDeclarativePathView::sendMouseEvent(QGraphicsSceneMouseEvent *event) QRectF myRect = mapToScene(QRectF(0, 0, width(), height())).boundingRect(); QGraphicsScene *s = scene(); QDeclarativeItem *grabber = s ? qobject_cast(s->mouseGrabberItem()) : 0; - if ((d->stealMouse || myRect.contains(event->scenePos().toPoint())) && (!grabber || !grabber->keepMouseGrab())) { + bool stealThisEvent = d->stealMouse; + if ((stealThisEvent || myRect.contains(event->scenePos().toPoint())) && (!grabber || !grabber->keepMouseGrab())) { mouseEvent.setAccepted(false); for (int i = 0x1; i <= 0x10; i <<= 1) { if (event->buttons() & i) { @@ -1179,25 +1214,28 @@ bool QDeclarativePathView::sendMouseEvent(QGraphicsSceneMouseEvent *event) switch(mouseEvent.type()) { case QEvent::GraphicsSceneMouseMove: - mouseMoveEvent(&mouseEvent); + d->handleMouseMoveEvent(&mouseEvent); break; case QEvent::GraphicsSceneMousePress: - mousePressEvent(&mouseEvent); + d->handleMousePressEvent(&mouseEvent); + stealThisEvent = d->stealMouse; // Update stealThisEvent in case changed by function call above break; case QEvent::GraphicsSceneMouseRelease: - mouseReleaseEvent(&mouseEvent); + d->handleMouseReleaseEvent(&mouseEvent); break; default: break; } grabber = qobject_cast(s->mouseGrabberItem()); - if (grabber && d->stealMouse && !grabber->keepMouseGrab() && grabber != this) + if (grabber && stealThisEvent && !grabber->keepMouseGrab() && grabber != this) grabMouse(); return d->stealMouse; } else if (d->lastPosTime.isValid()) { d->lastPosTime.invalidate(); } + if (mouseEvent.type() == QEvent::GraphicsSceneMouseRelease) + d->stealMouse = false; return false; } @@ -1211,12 +1249,7 @@ bool QDeclarativePathView::sceneEventFilter(QGraphicsItem *i, QEvent *e) case QEvent::GraphicsSceneMousePress: case QEvent::GraphicsSceneMouseMove: case QEvent::GraphicsSceneMouseRelease: - { - bool ret = sendMouseEvent(static_cast(e)); - if (e->type() == QEvent::GraphicsSceneMouseRelease) - return ret; - break; - } + return sendMouseEvent(static_cast(e)); default: break; } diff --git a/src/declarative/graphicsitems/qdeclarativepathview_p_p.h b/src/declarative/graphicsitems/qdeclarativepathview_p_p.h index dfebe35..b217216 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativepathview_p_p.h @@ -123,6 +123,10 @@ public: return model && model->count() > 0 && model->isValid() && path; } + void handleMousePressEvent(QGraphicsSceneMouseEvent *event); + void handleMouseMoveEvent(QGraphicsSceneMouseEvent *event); + void handleMouseReleaseEvent(QGraphicsSceneMouseEvent *); + int calcCurrentIndex(); void updateCurrent(); static void fixOffsetCallback(void*); -- cgit v0.12 From e65aac1dbbeb26575554da10e2531694e8db5ac9 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 17 Sep 2010 13:46:44 +1000 Subject: Moving items in a PathView caused PathView.onPath to be set to false. Check that we no longer hold a reference to the item before setting onPath to false. Task-number: QTBUG-13689 Reviewed-by: Michael Brasser (cherry picked from commit 7e6b2b2b95bc1db77544b898ec45ea4a2683e435) --- .../graphicsitems/qdeclarativepathview.cpp | 8 +++++--- .../qdeclarativepathview/data/datamodel.qml | 1 + .../tst_qdeclarativepathview.cpp | 23 ++++++++++++++-------- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index 119ac3e..d134929 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -141,11 +141,13 @@ void QDeclarativePathViewPrivate::releaseItem(QDeclarativeItem *item) { if (!item || !model) return; - if (QDeclarativePathViewAttached *att = attached(item)) - att->setOnPath(false); QDeclarativeItemPrivate *itemPrivate = static_cast(QGraphicsItemPrivate::get(item)); itemPrivate->removeItemChangeListener(this, QDeclarativeItemPrivate::Geometry); - model->release(item); + if (model->release(item) == 0) { + // item was not destroyed, and we no longer reference it. + if (QDeclarativePathViewAttached *att = attached(item)) + att->setOnPath(false); + } } QDeclarativePathViewAttached *QDeclarativePathViewPrivate::attached(QDeclarativeItem *item) diff --git a/tests/auto/declarative/qdeclarativepathview/data/datamodel.qml b/tests/auto/declarative/qdeclarativepathview/data/datamodel.qml index a5c3772..fb3c910 100644 --- a/tests/auto/declarative/qdeclarativepathview/data/datamodel.qml +++ b/tests/auto/declarative/qdeclarativepathview/data/datamodel.qml @@ -21,6 +21,7 @@ PathView { Rectangle { id: wrapper objectName: "wrapper" + property bool onPath: PathView.onPath width: 20; height: 20; color: name Text { objectName: "myText" diff --git a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp index 74d2f0a..cbfbfbd 100644 --- a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp +++ b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp @@ -152,27 +152,27 @@ public: QString number(int index) const { return list.at(index).second; } void addItem(const QString &name, const QString &number) { - emit beginInsertRows(QModelIndex(), list.count(), list.count()); + beginInsertRows(QModelIndex(), list.count(), list.count()); list.append(QPair(name, number)); - emit endInsertRows(); + endInsertRows(); } void insertItem(int index, const QString &name, const QString &number) { - emit beginInsertRows(QModelIndex(), index, index); + beginInsertRows(QModelIndex(), index, index); list.insert(index, QPair(name, number)); - emit endInsertRows(); + endInsertRows(); } void removeItem(int index) { - emit beginRemoveRows(QModelIndex(), index, index); + beginRemoveRows(QModelIndex(), index, index); list.removeAt(index); - emit endRemoveRows(); + endRemoveRows(); } void moveItem(int from, int to) { - emit beginMoveRows(QModelIndex(), from, from, QModelIndex(), to); + beginMoveRows(QModelIndex(), from, from, QModelIndex(), to); list.move(from, to); - emit endMoveRows(); + endMoveRows(); } void modifyItem(int idx, const QString &name, const QString &number) { @@ -411,6 +411,13 @@ void tst_QDeclarativePathView::dataModel() QVERIFY(text); QCOMPARE(text->text(), model.name(3)); + model.moveItem(3, 5); + QTRY_COMPARE(findItems(pathview, "wrapper").count(), 5); + QList items = findItems(pathview, "wrapper"); + foreach (QDeclarativeItem *item, items) { + QVERIFY(item->property("onPath").toBool()); + } + delete canvas; } -- cgit v0.12 From 78f36a24500f393af53486a3cc1a63b748e982d7 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 20 Sep 2010 09:35:26 +0200 Subject: qtextcodec_symbian: Add few aliases Reviewed-by: Denis (cherry picked from commit 2b230dbc9a784e577c08fa25db3e975952849297) --- src/corelib/codecs/qtextcodec_symbian.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/codecs/qtextcodec_symbian.cpp b/src/corelib/codecs/qtextcodec_symbian.cpp index d59998f..9d7e856 100644 --- a/src/corelib/codecs/qtextcodec_symbian.cpp +++ b/src/corelib/codecs/qtextcodec_symbian.cpp @@ -122,8 +122,8 @@ static const QSymbianCodecInitData codecsData[] = { { /*271085624*/ 271085624, 114, "GB18030\0" }, { /*536929574*/ 536929574, 38, "EUC-KR\0" }, { /*536936703*/ 536936703, 0, "CP949\0" }, - { /*536936705*/ 536936705, 37, "ISO-2022-KR\0" }, - { /*536941517*/ 536941517, 36, "KS_C_5601-1987\0" } + { /*536936705*/ 536936705, 37, "ISO-2022-KR\0csISO2022KR\0" }, + { /*536941517*/ 536941517, 36, "KS_C_5601-1987\0iso-ir-149\0KS_C_5601-1989\0KSC_5601\0Korean\0csKSC56011987\0" } }; -- cgit v0.12 From c2f239dc35a01502ba6157096f4e91d7af624a5e Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 21 Sep 2010 15:22:01 +0300 Subject: Improved output of patch_capabilities.pl script More detailed output of what was patched reduces user confusion. Properly prefixed output messages can also be easily parsed by IDEs like Qt Creator. Task-number: QTBUG-13760 Reviewed-by: Janne Koskinen (cherry picked from commit 1eeec88caa45d7c3f6b8371bc84bb8d172b0b02e) --- bin/patch_capabilities.pl | 83 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 64 insertions(+), 19 deletions(-) diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl index 0c0538c..a85f073 100755 --- a/bin/patch_capabilities.pl +++ b/bin/patch_capabilities.pl @@ -46,7 +46,13 @@ # ####################################################################### +# +# Note: Please make sure to output all changes done to the pkg file in a print statements +# starting with "Patching: " to ease integration into IDEs! +# + use File::Copy; +use File::Spec; sub Usage() { print("This script can be used to set capabilities of all binaries\n"); @@ -142,39 +148,56 @@ if (@ARGV) # Parse each line. while () { - # Patch pkg UID my $line = $_; my $newLine = $line; - if ($line =~ m/^\#.*\(0x[0-9|a-f|A-F]*\).*$/) + + # Patch pkg UID if it's in protected range + if ($line =~ m/^\#.*\((0x[0-7][0-9|a-f|A-F]*)\).*$/) { - $newLine =~ s/\(0x./\(0xE/; + my $oldUID = $1; + my $newUID = $oldUID; + $newUID =~ s/0x./0xE/i; + $newLine =~ s/$oldUID/$newUID/; + print ("Patching: UID $oldUID is not compatible with self-signing! Changed to: $newUID.\n"); } - # Patch embedded sis name and UID - if ($line =~ m/^@.*\.sis.*\(0x[0-9|a-f|A-F]*\).*$/) + # Patch embedded sis name and UID if UID is in protected range + if ($line =~ m/^@\"*(.*\.sis).*\((0x[0-7][0-9|a-f|A-F]*)\).*$/) { - $newLine =~ s/\(0x./\(0xE/; - if ($line !~ m/^.*_selfsigned.sis.*$/) + my $oldSisName = $1; + my $oldUID = $2; + my $newUID = $oldUID; + $newUID =~ s/0x./0xE/i; + $newLine =~ s/$oldUID/$newUID/; + print ("Patching: Embedded sis $oldSisName UID $oldUID changed to: $newUID.\n"); + + if ($oldSisName !~ m/^.*_selfsigned.sis$/i) { - $newLine =~ s/\.sis/_selfsigned\.sis/i; + my $newSisName = $oldSisName; + $newSisName =~ s/\.sis$/_selfsigned\.sis/i; + $newLine =~ s/$oldSisName/$newSisName/i; + print ("Patching: Embedded sis $oldSisName name changed to: $newSisName.\n"); } } - # Remove dependencies to known problem packages (i.e. packages that are likely to be patched, also) + # Remove dependencies to known problem packages (i.e. packages that are likely to be patched, too) # to reduce unnecessary error messages. - if ($line =~ m/^\(0x2002af5f\).*\{.*\}$/) + if ($line =~ m/^\((0x2002af5f)\).*\{.*\}$/) { - $newLine = "\n" + $newLine = "\n"; + print ("Patching: Removed dependency to sqlite3.sis ($1) to avoid installation issues in case sqlite3.sis is also patched.\n"); } - if ($line =~ m/^\(0x2001E61C\).*\{.*\}$/) + if ($line =~ m/^\((0x2001E61C)\).*\{.*\}$/) { - $newLine = "\n" + $newLine = "\n"; + print ("Patching: Removed dependency to qt.sis ($1) to avoid installation issues in case qt.sis is also patched.\n"); } # Remove manufacturer ifdef if ($line =~ m/^.*\(MANUFACTURER\)\=\(.*\).*$/) { $newLine = "\n"; + print ("Patching: Removed manufacturer check as it is usually not desirable in self-signed packages.\n"); } if ($line =~ m/^ELSEIF.*MANUFACTURER$/) @@ -240,7 +263,9 @@ if (@ARGV) foreach my $binaryPath(@binaries) { # Create the command line for setting the capabilities. + my ($binaryVolume, $binaryDirs, $binaryBaseName) = File::Spec->splitpath($binaryPath); my $commandToExecute = $baseCommandToExecute; + my $executeNeeded = 0; if (@capabilitiesSpecified) { $commandToExecute = sprintf($baseCommandToExecute, join(" ", @capabilitiesSpecified)); @@ -250,34 +275,54 @@ if (@ARGV) my $dllCaps; open($dllCaps, "elftran -dump s $binaryPath |") or die ("Could not execute elftran"); my $capsFound = 0; + my $originalVid; my @capabilitiesToSet; my $capabilitiesToAllow = join(" ", @capabilitiesToAllow); + my @capabilitiesToDrop; while (<$dllCaps>) { + if (/^Vendor ID: (.*)$/) { + $originalVid = "$1"; + } if (!$capsFound) { $capsFound = 1 if (/Capabilities:/); } else { $_ = trim($_); if ($capabilitiesToAllow =~ /$_/) { push(@capabilitiesToSet, $_); + } else { + push(@capabilitiesToDrop, $_); } } } close($dllCaps); + if ($originalVid !~ "00000000") { + print ("Patching: Vendor ID (0x$originalVid) incompatible with self-signed packages, setting it to zero for \"$binaryBaseName\".\n"); + $executeNeeded = 1; + } + if ($#capabilitiesToDrop) { + my $capsToDropStr = join("\", \"", @capabilitiesToDrop); + $capsToDropStr =~ s/\", \"$//; + + print ("Patching: The following capabilities used in \"$binaryBaseName\" are not compatible with a self-signed package and will be removed: \"$capsToDropStr\".\n"); + $executeNeeded = 1; + } $commandToExecute = sprintf($baseCommandToExecute, join(" ", @capabilitiesToSet)); } $commandToExecute .= $binaryPath; - # Actually execute the elftran command to set the capabilities. - print ("Executing ".$commandToExecute."\n"); - system ($commandToExecute." > $nullDevice"); - + if ($executeNeeded) { + # Actually execute the elftran command to set the capabilities. + print ("\n"); + system ("$commandToExecute > $nullDevice"); + } ## Create another command line to check that the set capabilities are correct. #$commandToExecute = "elftran -dump s ".$binaryPath; } print ("\n"); - print ("NOTE: A patched package may not work as expected due to reduced capabilities.\n"); - print (" Therefore it should not be used for any kind of Symbian signing or distribution!\n"); + print ("NOTE: A patched package may not work as expected due to reduced capabilities and other modifications,\n"); + print (" so it should not be used for any kind of Symbian signing or distribution!\n"); + print (" Use a proper certificate to avoid the need to patch the package.\n"); print ("\n"); } } -- cgit v0.12 From f6d61e677db6364cb6e8214531fc442931063a91 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Fri, 17 Sep 2010 11:28:23 +1000 Subject: Doc changes (cherry picked from commit ee9c9e412fd5467e82be446603e71bee620ff04b) --- src/declarative/util/qdeclarativelistmodel.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index cf2eada..f01d9b4 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -154,10 +154,10 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM handler. You must call sync() or else the changes made to the list from the external thread will not be reflected in the list model in the main thread. - \section1 Limitations + \section1 Restrictions - If a list model is to be accessed from a WorkerScript, it \bold cannot - contain list data. So, the following model cannot be used from a WorkerScript + If a list model is to be accessed from a WorkerScript, it cannot + contain list-type data. So, the following model cannot be used from a WorkerScript because of the list contained in the "attributes" property: \code @@ -174,7 +174,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM } \endcode - In addition, the WorkerScript cannot add any list data to the model. + In addition, the WorkerScript cannot add list-type data to the model. \sa {qmlmodels}{Data Models}, {declarative/threading/threadedlistmodel}{Threaded ListModel example}, QtDeclarative */ -- cgit v0.12 From 5ef8bc9393dcd06062bd38d6761e23837d7a86c5 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Fri, 17 Sep 2010 14:16:08 +1000 Subject: Remove duplicated move() implementations (cherry picked from commit 16013f8970471f161db9fcc728a8c263e5bb84a7) --- src/declarative/util/qdeclarativelistmodel.cpp | 60 +++++++++++--------------- 1 file changed, 26 insertions(+), 34 deletions(-) diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index f01d9b4..401e400 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -58,6 +58,28 @@ Q_DECLARE_METATYPE(QListModelInterface *) QT_BEGIN_NAMESPACE +template +void qdeclarativelistmodel_move(int from, int to, int n, T *items) +{ + if (n == 1) { + items->move(from, to); + } else { + T replaced; + int i=0; + typename T::ConstIterator it=items->begin(); it += from+n; + for (; ibegin(); it += from; + for (; ibegin(); t += from; + for (; f != replaced.end(); ++f, ++t) + *t = *f; + } +} + QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListModelData::instructions() const { return (QDeclarativeListModelParser::ListInstruction *)((char *)this + sizeof(ListModelData)); @@ -947,23 +969,7 @@ void FlatListModel::setProperty(int index, const QString& property, const QVaria void FlatListModel::move(int from, int to, int n) { - if (n == 1) { - m_values.move(from, to); - } else { - QList > replaced; - int i=0; - QList >::ConstIterator it=m_values.begin(); it += from+n; - for (; i >::ConstIterator f=replaced.begin(); - QList >::Iterator t=m_values.begin(); t += from; - for (; f != replaced.end(); ++f, ++t) - *t = *f; - } + qdeclarativelistmodel_move > >(from, to, n, &m_values); } bool FlatListModel::addValue(const QScriptValue &value, QHash *row, QList *roles) @@ -1130,23 +1136,9 @@ bool NestedListModel::insert(int index, const QScriptValue& valuemap) void NestedListModel::move(int from, int to, int n) { - if (n==1) { - _root->values.move(from,to); - } else { - QList replaced; - int i=0; - QVariantList::const_iterator it=_root->values.begin(); it += from+n; - for (; ivalues.begin(); it += from; - for (; ivalues.begin(); t += from; - for (; f != replaced.end(); ++f, ++t) - *t = *f; - } + if (!_root) + return; + qdeclarativelistmodel_move(from, to, n, &_root->values); } bool NestedListModel::append(const QScriptValue& valuemap) -- cgit v0.12 From 755a82fea47402be5857edf2f882e0135e02267a Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Fri, 17 Sep 2010 14:55:52 +1000 Subject: Make it clear that private ListModel constructor is only for worker agent. Also set up the worker list copy in the ListModel implementation instead of the agent. (cherry picked from commit c298ed31f8dfa917e5428820aecd39234b4c9097) --- src/declarative/util/qdeclarativelistmodel.cpp | 37 ++++++++++++++-------- src/declarative/util/qdeclarativelistmodel_p.h | 6 ++-- src/declarative/util/qdeclarativelistmodel_p_p.h | 2 ++ .../util/qdeclarativelistmodelworkeragent.cpp | 8 ++--- 4 files changed, 33 insertions(+), 20 deletions(-) diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 401e400..0be9122 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -217,17 +217,21 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM */ QDeclarativeListModel::QDeclarativeListModel(QObject *parent) -: QListModelInterface(parent), m_agent(0), m_nested(new NestedListModel(this)), m_flat(0), m_isWorkerCopy(false) +: QListModelInterface(parent), m_agent(0), m_nested(new NestedListModel(this)), m_flat(0) { } -QDeclarativeListModel::QDeclarativeListModel(bool workerCopy, QObject *parent) -: QListModelInterface(parent), m_agent(0), m_nested(0), m_flat(0), m_isWorkerCopy(workerCopy) +QDeclarativeListModel::QDeclarativeListModel(const QDeclarativeListModel *orig, QDeclarativeListModelWorkerAgent *parent) +: QListModelInterface(parent), m_agent(0), m_nested(0), m_flat(0) { - if (workerCopy) - m_flat = new FlatListModel(this); - else - m_nested = new NestedListModel(this); + m_flat = new FlatListModel(this); + m_flat->m_parentAgent = parent; + + if (orig->m_flat) { + m_flat->m_roles = orig->m_flat->m_roles; + m_flat->m_strings = orig->m_flat->m_strings; + m_flat->m_values = orig->m_flat->m_values; + } } QDeclarativeListModel::~QDeclarativeListModel() @@ -269,6 +273,11 @@ bool QDeclarativeListModel::flatten() return true; } +bool QDeclarativeListModel::inWorkerThread() const +{ + return m_flat && m_flat->m_parentAgent; +} + QDeclarativeListModelWorkerAgent *QDeclarativeListModel::agent() { if (m_agent) @@ -333,7 +342,7 @@ void QDeclarativeListModel::clear() else m_nested->clear(); - if (!m_isWorkerCopy) { + if (!inWorkerThread()) { emit itemsRemoved(0, cleared); emit countChanged(); } @@ -358,7 +367,7 @@ void QDeclarativeListModel::remove(int index) else m_nested->remove(index); - if (!m_isWorkerCopy) { + if (!inWorkerThread()) { emit itemsRemoved(index, 1); emit countChanged(); } @@ -392,7 +401,7 @@ void QDeclarativeListModel::insert(int index, const QScriptValue& valuemap) } bool ok = m_flat ? m_flat->insert(index, valuemap) : m_nested->insert(index, valuemap); - if (ok && !m_isWorkerCopy) { + if (ok && !inWorkerThread()) { emit itemsInserted(index, 1); emit countChanged(); } @@ -438,7 +447,7 @@ void QDeclarativeListModel::move(int from, int to, int n) else m_nested->move(from, to, n); - if (!m_isWorkerCopy) + if (!inWorkerThread()) emit itemsMoved(origfrom, origto, orign); } @@ -529,7 +538,7 @@ void QDeclarativeListModel::set(int index, const QScriptValue& valuemap) else m_nested->set(index, valuemap, &roles); - if (!m_isWorkerCopy) + if (!inWorkerThread()) emit itemsChanged(index, 1, roles); } } @@ -560,7 +569,7 @@ void QDeclarativeListModel::setProperty(int index, const QString& property, cons else m_nested->setProperty(index, property, value, &roles); - if (!m_isWorkerCopy) + if (!inWorkerThread()) emit itemsChanged(index, 1, roles); } @@ -848,7 +857,7 @@ bool QDeclarativeListModelParser::definesEmptyList(const QString &s) */ FlatListModel::FlatListModel(QDeclarativeListModel *base) - : m_scriptEngine(0), m_listModel(base) + : m_scriptEngine(0), m_listModel(base), m_parentAgent(0) { } diff --git a/src/declarative/util/qdeclarativelistmodel_p.h b/src/declarative/util/qdeclarativelistmodel_p.h index 6aff9c6..0a5e3ff 100644 --- a/src/declarative/util/qdeclarativelistmodel_p.h +++ b/src/declarative/util/qdeclarativelistmodel_p.h @@ -98,14 +98,16 @@ private: friend class QDeclarativeListModelWorkerAgent; friend struct ModelNode; + // Constructs a flat list model for a worker agent + QDeclarativeListModel(const QDeclarativeListModel *orig, QDeclarativeListModelWorkerAgent *parent); + QDeclarativeListModel(bool workerCopy, QObject *parent=0); bool flatten(); - bool modifyCheck(); + bool inWorkerThread() const; QDeclarativeListModelWorkerAgent *m_agent; NestedListModel *m_nested; FlatListModel *m_flat; - bool m_isWorkerCopy; }; // ### FIXME diff --git a/src/declarative/util/qdeclarativelistmodel_p_p.h b/src/declarative/util/qdeclarativelistmodel_p_p.h index 8231414..1e9513e 100644 --- a/src/declarative/util/qdeclarativelistmodel_p_p.h +++ b/src/declarative/util/qdeclarativelistmodel_p_p.h @@ -102,6 +102,8 @@ private: QHash m_strings; QList > m_values; QDeclarativeListModel *m_listModel; + + QDeclarativeListModelWorkerAgent *m_parentAgent; }; class NestedListModel diff --git a/src/declarative/util/qdeclarativelistmodelworkeragent.cpp b/src/declarative/util/qdeclarativelistmodelworkeragent.cpp index 4392bed..658584e 100644 --- a/src/declarative/util/qdeclarativelistmodelworkeragent.cpp +++ b/src/declarative/util/qdeclarativelistmodelworkeragent.cpp @@ -83,11 +83,11 @@ void QDeclarativeListModelWorkerAgent::Data::changedChange(int index, int count) } QDeclarativeListModelWorkerAgent::QDeclarativeListModelWorkerAgent(QDeclarativeListModel *model) -: m_engine(0), m_ref(1), m_orig(model), m_copy(new QDeclarativeListModel(true, this)) + : m_engine(0), + m_ref(1), + m_orig(model), + m_copy(new QDeclarativeListModel(m_orig, this)) { - m_copy->m_flat->m_roles = m_orig->m_flat->m_roles; - m_copy->m_flat->m_strings = m_orig->m_flat->m_strings; - m_copy->m_flat->m_values = m_orig->m_flat->m_values; } QDeclarativeListModelWorkerAgent::~QDeclarativeListModelWorkerAgent() -- cgit v0.12 From ef414bc0ac9eb0feea57a578757be894abe226c0 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Fri, 17 Sep 2010 15:15:15 +1000 Subject: Changes to objects returned from get() should emit itemsChanged() so that the view is updated (currently the model data changes but the view does not). In flat-model mode, get() now returns a QScriptClass-type object so that changes to the returned object are received, and for nested-model mode, the fix adds a QDeclarativeOpenMetaObject subclass and ModelNode::listIndex so that itemsChanged() can be emitted when the node data changes. Task-number: QTBUG-12363 (cherry picked from commit c2bbef949126826f0330c69dff1a8c96919f69a5) --- src/declarative/util/qdeclarativelistmodel.cpp | 293 ++++++++++++++++++-- src/declarative/util/qdeclarativelistmodel_p.h | 6 +- src/declarative/util/qdeclarativelistmodel_p_p.h | 121 +++++++- .../util/qdeclarativelistmodelworkeragent.cpp | 25 +- .../util/qdeclarativelistmodelworkeragent_p.h | 4 + .../tst_qdeclarativelistmodel.cpp | 307 +++++++++++++++++++-- 6 files changed, 698 insertions(+), 58 deletions(-) diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 0be9122..68e97b0 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -231,6 +231,10 @@ QDeclarativeListModel::QDeclarativeListModel(const QDeclarativeListModel *orig, m_flat->m_roles = orig->m_flat->m_roles; m_flat->m_strings = orig->m_flat->m_strings; m_flat->m_values = orig->m_flat->m_values; + + m_flat->m_nodeData.reserve(m_flat->m_values.count()); + for (int i=0; im_values.count(); i++) + m_flat->m_nodeData << 0; } } @@ -267,6 +271,10 @@ bool QDeclarativeListModel::flatten() flat->m_strings.insert(s, roles[i]); } + flat->m_nodeData.reserve(flat->m_values.count()); + for (int i=0; im_values.count(); i++) + flat->m_nodeData << 0; + m_flat = flat; delete m_nested; m_nested = 0; @@ -425,7 +433,7 @@ void QDeclarativeListModel::move(int from, int to, int n) { if (n==0 || from==to) return; - if (from+n > count() || to+n > count() || from < 0 || to < 0 || n < 0) { + if (!canMove(from, to, n)) { qmlInfo(this) << tr("move: out of range"); return; } @@ -476,11 +484,15 @@ void QDeclarativeListModel::append(const QScriptValue& valuemap) /*! \qmlmethod object ListModel::get(int index) - Returns the item at \a index in the list model. + Returns the item at \a index in the list model. This allows the item + data to be accessed or modified from JavaScript: \code - fruitModel.append({"cost": 5.95, "name":"Jackfruit"}) - fruitModel.get(0).cost + Component.onCompleted: { + fruitModel.append({"cost": 5.95, "name":"Jackfruit"}); + console.log(fruitModel.get(0).cost); + fruitModel.get(0).cost = 10.95; + } \endcode The \a index must be an element in the list. @@ -495,6 +507,9 @@ void QDeclarativeListModel::append(const QScriptValue& valuemap) fruitModel.get(0).attributes.get(1).value; // == "green" \endcode + \warning The returned object is not guaranteed to remain valid. It + should not be used in \l{Property Binding}{property bindings}. + \sa append() */ QScriptValue QDeclarativeListModel::get(int index) const @@ -736,7 +751,7 @@ void QDeclarativeListModelParser::setCustomData(QObject *obj, const QByteArray & { QDeclarativeListModel *rv = static_cast(obj); - ModelNode *root = new ModelNode; + ModelNode *root = new ModelNode(rv->m_nested); rv->m_nested->_root = root; QStack nodes; nodes << root; @@ -753,7 +768,7 @@ void QDeclarativeListModelParser::setCustomData(QObject *obj, const QByteArray & case ListInstruction::Push: { ModelNode *n = nodes.top(); - ModelNode *n2 = new ModelNode; + ModelNode *n2 = new ModelNode(rv->m_nested); n->values << qVariantFromValue(n2); nodes.push(n2); if (processingSet) @@ -792,7 +807,7 @@ void QDeclarativeListModelParser::setCustomData(QObject *obj, const QByteArray & case ListInstruction::Set: { ModelNode *n = nodes.top(); - ModelNode *n2 = new ModelNode; + ModelNode *n2 = new ModelNode(rv->m_nested); n->properties.insert(QString::fromUtf8(data + instr.dataIdx), n2); nodes.push(n2); processingSet = true; @@ -800,6 +815,13 @@ void QDeclarativeListModelParser::setCustomData(QObject *obj, const QByteArray & break; } } + + ModelNode *rootNode = rv->m_nested->_root; + for (int i=0; ivalues.count(); ++i) { + ModelNode *node = qvariant_cast(rootNode->values[i]); + node->listIndex = i; + node->updateListIndexes(); + } } bool QDeclarativeListModelParser::definesEmptyList(const QString &s) @@ -814,6 +836,7 @@ bool QDeclarativeListModelParser::definesEmptyList(const QString &s) return false; } + /*! \qmlclass ListElement QDeclarativeListElement \ingroup qml-working-with-data @@ -857,12 +880,13 @@ bool QDeclarativeListModelParser::definesEmptyList(const QString &s) */ FlatListModel::FlatListModel(QDeclarativeListModel *base) - : m_scriptEngine(0), m_listModel(base), m_parentAgent(0) + : m_scriptEngine(0), m_listModel(base), m_scriptClass(0), m_parentAgent(0) { } FlatListModel::~FlatListModel() { + qDeleteAll(m_nodeData); } QHash FlatListModel::data(int index, const QList &roles) const @@ -906,11 +930,15 @@ int FlatListModel::count() const void FlatListModel::clear() { m_values.clear(); + + qDeleteAll(m_nodeData); + m_nodeData.clear(); } void FlatListModel::remove(int index) { m_values.removeAt(index); + removedNode(index); } bool FlatListModel::append(const QScriptValue &value) @@ -927,6 +955,8 @@ bool FlatListModel::insert(int index, const QScriptValue &value) return false; m_values.insert(index, row); + insertedNode(index); + return true; } @@ -940,13 +970,17 @@ QScriptValue FlatListModel::get(int index) const if (index < 0 || index >= m_values.count()) return scriptEngine->undefinedValue(); - QScriptValue rv = scriptEngine->newObject(); + FlatListModel *that = const_cast(this); + if (!m_scriptClass) + that->m_scriptClass = new FlatListScriptClass(that, scriptEngine); - QHash row = m_values.at(index); - for (QHash::ConstIterator iter = row.begin(); iter != row.end(); ++iter) - rv.setProperty(m_roles.value(iter.key()), qScriptValueFromValue(scriptEngine, iter.value())); + FlatNodeData *data = m_nodeData.value(index); + if (!data) { + data = new FlatNodeData(index); + that->m_nodeData.replace(index, data); + } - return rv; + return QScriptDeclarativeClass::newObject(scriptEngine, m_scriptClass, new FlatNodeObjectData(data)); } void FlatListModel::set(int index, const QScriptValue &value, QList *roles) @@ -979,6 +1013,7 @@ void FlatListModel::setProperty(int index, const QString& property, const QVaria void FlatListModel::move(int from, int to, int n) { qdeclarativelistmodel_move > >(from, to, n, &m_values); + moveNodes(from, to, n); } bool FlatListModel::addValue(const QScriptValue &value, QHash *row, QList *roles) @@ -1008,6 +1043,139 @@ bool FlatListModel::addValue(const QScriptValue &value, QHash *ro return true; } +void FlatListModel::insertedNode(int index) +{ + if (index >= 0 && index <= m_values.count()) { + m_nodeData.insert(index, 0); + + for (int i=index + 1; iindex = i; + } + } +} + +void FlatListModel::removedNode(int index) +{ + if (index >= 0 && index < m_nodeData.count()) { + delete m_nodeData.takeAt(index); + + for (int i=index; iindex = i; + } + } +} + +void FlatListModel::moveNodes(int from, int to, int n) +{ + if (!m_listModel->canMove(from, to, n)) + return; + + qdeclarativelistmodel_move >(from, to, n, &m_nodeData); + + for (int i=from; iindex = i; + } +} + + + +FlatNodeData::~FlatNodeData() +{ + for (QSet::Iterator iter = objects.begin(); iter != objects.end(); ++iter) { + FlatNodeObjectData *data = *iter; + data->nodeData = 0; + } +} + +void FlatNodeData::addData(FlatNodeObjectData *data) +{ + objects.insert(data); +} + +void FlatNodeData::removeData(FlatNodeObjectData *data) +{ + objects.remove(data); +} + + +FlatListScriptClass::FlatListScriptClass(FlatListModel *model, QScriptEngine *seng) + : QScriptDeclarativeClass(seng), + m_model(model) +{ +} + +QScriptDeclarativeClass::Value FlatListScriptClass::property(Object *obj, const Identifier &name) +{ + FlatNodeObjectData *objData = static_cast(obj); + if (!objData->nodeData) // item at this index has been deleted + return QScriptDeclarativeClass::Value(engine(), engine()->undefinedValue()); + + int index = objData->nodeData->index; + QString propName = toString(name); + int role = m_model->m_strings.value(propName, -1); + + if (role >= 0 && index >=0 ) { + const QHash &row = m_model->m_values[index]; + QScriptValue sv = engine()->toScriptValue(row[role]); + return QScriptDeclarativeClass::Value(engine(), sv); + } + + return QScriptDeclarativeClass::Value(engine(), engine()->undefinedValue()); +} + +void FlatListScriptClass::setProperty(Object *obj, const Identifier &name, const QScriptValue &value) +{ + if (!value.isVariant() && !value.isRegExp() && !value.isDate() && value.isObject()) { + qmlInfo(m_model->m_listModel) << "Cannot add nested list values when modifying or after modification from a worker script"; + return; + } + + FlatNodeObjectData *objData = static_cast(obj); + if (!objData->nodeData) // item at this index has been deleted + return; + + int index = objData->nodeData->index; + QString propName = toString(name); + + int role = m_model->m_strings.value(propName, -1); + if (role >= 0 && index >= 0) { + QHash &row = m_model->m_values[index]; + row[role] = value.toVariant(); + + if (m_model->m_parentAgent) { + // This is the list in the worker thread, so tell the agent to + // emit itemsChanged() later + m_model->m_parentAgent->changedData(index, 1); + } else { + // This is the list in the main thread, so emit itemsChanged() + QList roles; + roles << role; + emit m_model->m_listModel->itemsChanged(index, 1, roles); + } + } +} + +QScriptClass::QueryFlags FlatListScriptClass::queryProperty(Object *, const Identifier &, QScriptClass::QueryFlags) +{ + return (QScriptClass::HandlesReadAccess | QScriptClass::HandlesWriteAccess); +} + +bool FlatListScriptClass::compare(Object *obj1, Object *obj2) +{ + FlatNodeObjectData *data1 = static_cast(obj1); + FlatNodeObjectData *data2 = static_cast(obj2); + + if (!data1->nodeData || !data2->nodeData) + return false; + + return data1->nodeData->index == data2->nodeData->index; +} + + + NestedListModel::NestedListModel(QDeclarativeListModel *base) : _root(0), m_ownsRoot(false), m_listModel(base), _rolesOk(false) { @@ -1133,11 +1301,12 @@ void NestedListModel::remove(int index) bool NestedListModel::insert(int index, const QScriptValue& valuemap) { if (!_root) { - _root = new ModelNode; + _root = new ModelNode(this); m_ownsRoot = true; } - ModelNode *mn = new ModelNode; + ModelNode *mn = new ModelNode(this); + mn->listIndex = index; mn->setObjectValue(valuemap); _root->values.insert(index,qVariantFromValue(mn)); return true; @@ -1153,12 +1322,11 @@ void NestedListModel::move(int from, int to, int n) bool NestedListModel::append(const QScriptValue& valuemap) { if (!_root) { - _root = new ModelNode; + _root = new ModelNode(this); m_ownsRoot = true; } - ModelNode *mn = new ModelNode; - mn->setObjectValue(valuemap); - _root->values << qVariantFromValue(mn); + + insert(count(), valuemap); return true; } @@ -1253,8 +1421,8 @@ QString NestedListModel::toString(int role) const } -ModelNode::ModelNode() -: modelCache(0), objectCache(0), isArray(false) +ModelNode::ModelNode(NestedListModel *model) +: modelCache(0), objectCache(0), isArray(false), m_model(model), listIndex(-1) { } @@ -1278,18 +1446,18 @@ void ModelNode::clear() properties.clear(); } -void ModelNode::setObjectValue(const QScriptValue& valuemap) { +void ModelNode::setObjectValue(const QScriptValue& valuemap, bool writeToCache) { QScriptValueIterator it(valuemap); while (it.hasNext()) { it.next(); - ModelNode *value = new ModelNode; + ModelNode *value = new ModelNode(m_model); QScriptValue v = it.value(); if (v.isArray()) { value->isArray = true; value->setListValue(v); } else { value->values << v.toVariant(); - if (objectCache) + if (writeToCache && objectCache) objectCache->setValue(it.name().toUtf8(), value->values.last()); } if (properties.contains(it.name())) @@ -1302,14 +1470,16 @@ void ModelNode::setListValue(const QScriptValue& valuelist) { values.clear(); int size = valuelist.property(QLatin1String("length")).toInt32(); for (int i=0; iisArray = true; value->setListValue(v); } else if (v.isObject()) { + value->listIndex = i; value->setObjectValue(v); } else { + value->listIndex = i; value->values << v.toVariant(); } values.append(qVariantFromValue(value)); @@ -1321,7 +1491,7 @@ void ModelNode::setProperty(const QString& prop, const QVariant& val) { if (it != properties.end()) { (*it)->values[0] = val; } else { - ModelNode *n = new ModelNode; + ModelNode *n = new ModelNode(m_model); n->values << val; properties.insert(prop,n); } @@ -1329,6 +1499,40 @@ void ModelNode::setProperty(const QString& prop, const QVariant& val) { objectCache->setValue(prop.toUtf8(), val); } +void ModelNode::updateListIndexes() +{ + for (QHash::ConstIterator iter = properties.begin(); iter != properties.end(); ++iter) { + ModelNode *node = iter.value(); + if (node->isArray) { + for (int i=0; ivalues.count(); ++i) { + ModelNode *subNode = qvariant_cast(node->values.at(i)); + if (subNode) + subNode->listIndex = i; + } + } + node->updateListIndexes(); + } +} + +/* + Need to call this to emit itemsChanged() for modifications outside of set() + and setProperty(), i.e. if an item returned from get() is modified +*/ +void ModelNode::changedProperty(const QString &name) const +{ + if (listIndex < 0) + return; + + m_model->checkRoles(); + QList roles; + int role = m_model->roleStrings.indexOf(name); + if (role < 0) + roles = m_model->roles(); + else + roles << role; + emit m_model->m_listModel->itemsChanged(listIndex, 1, roles); +} + void ModelNode::dump(ModelNode *node, int ind) { QByteArray indentBa(ind * 4, ' '); @@ -1350,16 +1554,47 @@ void ModelNode::dump(ModelNode *node, int ind) } } -ModelObject::ModelObject() -: _mo(new QDeclarativeOpenMetaObject(this)) +ModelObject::ModelObject(ModelNode *node, NestedListModel *model, QScriptEngine *seng) + : m_model(model), + m_node(node), + m_meta(new ModelNodeMetaObject(seng, this)) { } void ModelObject::setValue(const QByteArray &name, const QVariant &val) { - _mo->setValue(name, val); + m_meta->setValue(name, val); setProperty(name.constData(), val); } +void ModelObject::setNodeUpdatesEnabled(bool enable) +{ + m_meta->m_enabled = enable; +} + + +ModelNodeMetaObject::ModelNodeMetaObject(QScriptEngine *seng, ModelObject *object) + : QDeclarativeOpenMetaObject(object), + m_enabled(false), + m_seng(seng), + m_obj(object) +{ +} + +void ModelNodeMetaObject::propertyWritten(int index) +{ + if (!m_enabled) + return; + + QString propName = QString::fromUtf8(name(index)); + QVariant value = operator[](index); + + QScriptValue sv = m_seng->newObject(); + sv.setProperty(propName, m_seng->newVariant(value)); + m_obj->m_node->setObjectValue(sv, false); + + m_obj->m_node->changedProperty(propName); +} + QT_END_NAMESPACE diff --git a/src/declarative/util/qdeclarativelistmodel_p.h b/src/declarative/util/qdeclarativelistmodel_p.h index 0a5e3ff..fe42ef6 100644 --- a/src/declarative/util/qdeclarativelistmodel_p.h +++ b/src/declarative/util/qdeclarativelistmodel_p.h @@ -63,6 +63,7 @@ class FlatListModel; class NestedListModel; class QDeclarativeListModelWorkerAgent; struct ModelNode; +class FlatListScriptClass; class Q_DECLARATIVE_EXPORT QDeclarativeListModel : public QListModelInterface { Q_OBJECT @@ -96,15 +97,18 @@ Q_SIGNALS: private: friend class QDeclarativeListModelParser; friend class QDeclarativeListModelWorkerAgent; + friend class FlatListModel; + friend class FlatListScriptClass; friend struct ModelNode; // Constructs a flat list model for a worker agent QDeclarativeListModel(const QDeclarativeListModel *orig, QDeclarativeListModelWorkerAgent *parent); - QDeclarativeListModel(bool workerCopy, QObject *parent=0); bool flatten(); bool inWorkerThread() const; + inline bool canMove(int from, int to, int n) const { return !(from+n > count() || to+n > count() || from < 0 || to < 0 || n < 0); } + QDeclarativeListModelWorkerAgent *m_agent; NestedListModel *m_nested; FlatListModel *m_flat; diff --git a/src/declarative/util/qdeclarativelistmodel_p_p.h b/src/declarative/util/qdeclarativelistmodel_p_p.h index 1e9513e..acf4f3e 100644 --- a/src/declarative/util/qdeclarativelistmodel_p_p.h +++ b/src/declarative/util/qdeclarativelistmodel_p_p.h @@ -54,9 +54,11 @@ // #include "private/qdeclarativelistmodel_p.h" - -#include "qdeclarative.h" #include "private/qdeclarativeengine_p.h" +#include "private/qdeclarativeopenmetaobject_p.h" +#include "qdeclarative.h" + +#include QT_BEGIN_HEADER @@ -68,6 +70,8 @@ class QDeclarativeOpenMetaObject; class QScriptEngine; class QDeclarativeListModelWorkerAgent; struct ModelNode; +class FlatListScriptClass; +class FlatNodeData; class FlatListModel { @@ -94,8 +98,13 @@ public: private: friend class QDeclarativeListModelWorkerAgent; friend class QDeclarativeListModel; + friend class FlatListScriptClass; + friend class FlatNodeData; bool addValue(const QScriptValue &value, QHash *row, QList *roles); + void insertedNode(int index); + void removedNode(int index); + void moveNodes(int from, int to, int n); QScriptEngine *m_scriptEngine; QHash m_roles; @@ -103,9 +112,68 @@ private: QList > m_values; QDeclarativeListModel *m_listModel; + FlatListScriptClass *m_scriptClass; + QList m_nodeData; QDeclarativeListModelWorkerAgent *m_parentAgent; }; + +/* + Created when get() is called on a FlatListModel. This allows changes to the + object returned by get() to be tracked, and passed onto the model. +*/ +class FlatListScriptClass : public QScriptDeclarativeClass +{ +public: + FlatListScriptClass(FlatListModel *model, QScriptEngine *seng); + + Value property(Object *, const Identifier &); + void setProperty(Object *, const Identifier &name, const QScriptValue &); + QScriptClass::QueryFlags queryProperty(Object *, const Identifier &, QScriptClass::QueryFlags flags); + bool compare(Object *, Object *); + +private: + FlatListModel *m_model; +}; + +/* + FlatNodeData and FlatNodeObjectData allow objects returned by get() to still + point to the correct list index if move(), insert() or remove() are called. +*/ +struct FlatNodeObjectData; +class FlatNodeData +{ +public: + FlatNodeData(int i) + : index(i) {} + + ~FlatNodeData(); + + void addData(FlatNodeObjectData *data); + void removeData(FlatNodeObjectData *data); + + int index; + +private: + QSet objects; +}; + +struct FlatNodeObjectData : public QScriptDeclarativeClass::Object +{ + FlatNodeObjectData(FlatNodeData *data) : nodeData(data) { + nodeData->addData(this); + } + + ~FlatNodeObjectData() { + if (nodeData) + nodeData->removeData(this); + } + + FlatNodeData *nodeData; +}; + + + class NestedListModel { public: @@ -136,25 +204,50 @@ public: QDeclarativeListModel *m_listModel; private: + friend struct ModelNode; mutable QStringList roleStrings; mutable bool _rolesOk; }; +class ModelNodeMetaObject; class ModelObject : public QObject { Q_OBJECT public: - ModelObject(); + ModelObject(ModelNode *node, NestedListModel *model, QScriptEngine *seng); void setValue(const QByteArray &name, const QVariant &val); + void setNodeUpdatesEnabled(bool enable); + + NestedListModel *m_model; + ModelNode *m_node; private: - QDeclarativeOpenMetaObject *_mo; + ModelNodeMetaObject *m_meta; }; +class ModelNodeMetaObject : public QDeclarativeOpenMetaObject +{ +public: + ModelNodeMetaObject(QScriptEngine *seng, ModelObject *object); + + bool m_enabled; + +protected: + void propertyWritten(int index); + +private: + QScriptEngine *m_seng; + ModelObject *m_obj; +}; + + +/* + A ModelNode is created for each item in a NestedListModel. +*/ struct ModelNode { - ModelNode(); + ModelNode(NestedListModel *model); ~ModelNode(); QList values; @@ -167,30 +260,44 @@ struct ModelNode modelCache = new QDeclarativeListModel; QDeclarativeEngine::setContextForObject(modelCache,QDeclarativeEngine::contextForObject(model->m_listModel)); modelCache->m_nested->_root = this; // ListModel defaults to nestable model + + for (int i=0; i(values.at(i)); + if (subNode) + subNode->m_model = modelCache->m_nested; + } } return modelCache; } ModelObject *object(const NestedListModel *model) { if (!objectCache) { - objectCache = new ModelObject(); + objectCache = new ModelObject(this, + const_cast(model), + QDeclarativeEnginePrivate::getScriptEngine(qmlEngine(model->m_listModel))); QHash::iterator it; for (it = properties.begin(); it != properties.end(); ++it) { objectCache->setValue(it.key().toUtf8(), model->valueForNode(*it)); } + objectCache->setNodeUpdatesEnabled(true); } return objectCache; } - void setObjectValue(const QScriptValue& valuemap); + void setObjectValue(const QScriptValue& valuemap, bool writeToCache = true); void setListValue(const QScriptValue& valuelist); void setProperty(const QString& prop, const QVariant& val); + void changedProperty(const QString &name) const; + void updateListIndexes(); static void dump(ModelNode *node, int ind); QDeclarativeListModel *modelCache; ModelObject *objectCache; bool isArray; + + NestedListModel *m_model; + int listIndex; // only used for top-level nodes within a list }; diff --git a/src/declarative/util/qdeclarativelistmodelworkeragent.cpp b/src/declarative/util/qdeclarativelistmodelworkeragent.cpp index 658584e..6804d4a 100644 --- a/src/declarative/util/qdeclarativelistmodelworkeragent.cpp +++ b/src/declarative/util/qdeclarativelistmodelworkeragent.cpp @@ -86,7 +86,7 @@ QDeclarativeListModelWorkerAgent::QDeclarativeListModelWorkerAgent(QDeclarativeL : m_engine(0), m_ref(1), m_orig(model), - m_copy(new QDeclarativeListModel(m_orig, this)) + m_copy(new QDeclarativeListModel(model, this)) { } @@ -194,6 +194,11 @@ void QDeclarativeListModelWorkerAgent::sync() mutex.unlock(); } +void QDeclarativeListModelWorkerAgent::changedData(int index, int count) +{ + data.changedChange(index, count); +} + bool QDeclarativeListModelWorkerAgent::event(QEvent *e) { if (e->type() == QEvent::User) { @@ -216,6 +221,24 @@ bool QDeclarativeListModelWorkerAgent::event(QEvent *e) orig->m_strings = copy->m_strings; orig->m_values = copy->m_values; + // update the orig->m_nodeData list + for (int ii = 0; ii < changes.count(); ++ii) { + const Change &change = changes.at(ii); + switch (change.type) { + case Change::Inserted: + orig->insertedNode(change.index); + break; + case Change::Removed: + orig->removedNode(change.index); + break; + case Change::Moved: + orig->moveNodes(change.index, change.to, change.count); + break; + case Change::Changed: + break; + } + } + syncDone.wakeAll(); locker.unlock(); diff --git a/src/declarative/util/qdeclarativelistmodelworkeragent_p.h b/src/declarative/util/qdeclarativelistmodelworkeragent_p.h index 01da374..10c3bca 100644 --- a/src/declarative/util/qdeclarativelistmodelworkeragent_p.h +++ b/src/declarative/util/qdeclarativelistmodelworkeragent_p.h @@ -67,6 +67,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QDeclarativeListModel; +class FlatListScriptClass; class QDeclarativeListModelWorkerAgent : public QObject { @@ -115,6 +116,7 @@ protected: private: friend class QDeclarativeWorkerScriptEnginePrivate; + friend class FlatListScriptClass; QScriptEngine *m_engine; struct Change { @@ -141,6 +143,8 @@ private: QDeclarativeListModel *list; }; + void changedData(int index, int count); + QAtomicInt m_ref; QDeclarativeListModel *m_orig; QDeclarativeListModel *m_copy; diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp index 10805b4..70ec416 100644 --- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp +++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp @@ -49,6 +49,7 @@ #include #include #include +#include #include "../../../shared/util.h" @@ -57,6 +58,8 @@ #define SRCDIR "." #endif +Q_DECLARE_METATYPE(QList) + class tst_qdeclarativelistmodel : public QObject { Q_OBJECT @@ -64,6 +67,7 @@ public: tst_qdeclarativelistmodel() {} private: + int roleFromName(const QDeclarativeListModel *model, const QString &roleName); QScriptValue nestedListValue(QScriptEngine *eng) const; QDeclarativeItem *createWorkerTest(QDeclarativeEngine *eng, QDeclarativeComponent *component, QDeclarativeListModel *model); void waitForWorker(QDeclarativeItem *item); @@ -78,6 +82,8 @@ private slots: void dynamic(); void dynamic_worker_data(); void dynamic_worker(); + void dynamic_worker_sync_data(); + void dynamic_worker_sync(); void convertNestedToFlat_fail(); void convertNestedToFlat_fail_data(); void convertNestedToFlat_ok(); @@ -86,7 +92,23 @@ private slots: void error_data(); void error(); void set(); + void get(); + void get_data(); + void get_worker(); + void get_worker_data(); + void get_nested(); + void get_nested_data(); }; +int tst_qdeclarativelistmodel::roleFromName(const QDeclarativeListModel *model, const QString &roleName) +{ + QList roles = model->roles(); + for (int i=0; itoString(roles[i]) == roleName) + return roles[i]; + } + Q_ASSERT(false); + return -1; +} QScriptValue tst_qdeclarativelistmodel::nestedListValue(QScriptEngine *eng) const { @@ -196,6 +218,10 @@ void tst_qdeclarativelistmodel::dynamic_data() QTest::newRow("get1") << "{get(0) === undefined}" << 1 << ""; QTest::newRow("get2") << "{get(-1) === undefined}" << 1 << ""; QTest::newRow("get3") << "{append({'foo':123});get(0) != undefined}" << 1 << ""; + QTest::newRow("get4") << "{append({'foo':123});get(0).foo}" << 123 << ""; + + QTest::newRow("get-modify1") << "{append({'foo':123,'bar':456});get(0).foo = 333;get(0).foo}" << 333 << ""; + QTest::newRow("get-modify2") << "{append({'z':1});append({'foo':123,'bar':456});get(1).bar = 999;get(1).bar}" << 999 << ""; QTest::newRow("append1") << "{append({'foo':123});count}" << 1 << ""; QTest::newRow("append2") << "{append({'foo':123,'bar':456});count}" << 1 << ""; @@ -310,8 +336,12 @@ void tst_qdeclarativelistmodel::dynamic_worker() QFETCH(int, result); QFETCH(QString, warning); + if (QByteArray(QTest::currentDataTag()).startsWith("nested")) + return; + // This is same as dynamic() except it applies the test to a ListModel called - // from a WorkerScript (i.e. testing the internal NestedListModel class) + // from a WorkerScript (i.e. testing the internal FlatListModel that is created + // by the WorkerListModelAgent) QDeclarativeListModel model; QDeclarativeEngine eng; @@ -330,27 +360,62 @@ void tst_qdeclarativelistmodel::dynamic_worker() if (!warning.isEmpty()) QTest::ignoreMessage(QtWarningMsg, warning.toLatin1()); - if (operations.count() == 1) { - // test count(), get() return the correct default values in the worker list model - QVERIFY(QMetaObject::invokeMethod(item, "evalExpressionViaWorker", - Q_ARG(QVariant, operations))); - waitForWorker(item); - QCOMPARE(QDeclarativeProperty(item, "result").read().toInt(), result); - } else { - // execute a set of commands on the worker list model, then check the - // changes are reflected in the list model in the main thread - if (QByteArray(QTest::currentDataTag()).startsWith("nested")) - QTest::ignoreMessage(QtWarningMsg, ": QML ListModel: Cannot add nested list values when modifying or after modification from a worker script"); - - QVERIFY(QMetaObject::invokeMethod(item, "evalExpressionViaWorker", - Q_ARG(QVariant, operations.mid(0, operations.length()-1)))); - waitForWorker(item); - - QDeclarativeExpression e(eng.rootContext(), &model, operations.last().toString()); - if (!QByteArray(QTest::currentDataTag()).startsWith("nested")) - QCOMPARE(e.evaluate().toInt(), result); + QVERIFY(QMetaObject::invokeMethod(item, "evalExpressionViaWorker", + Q_ARG(QVariant, operations))); + waitForWorker(item); + QCOMPARE(QDeclarativeProperty(item, "result").read().toInt(), result); + + delete item; + qApp->processEvents(); +} + + + +void tst_qdeclarativelistmodel::dynamic_worker_sync_data() +{ + dynamic_data(); +} + +void tst_qdeclarativelistmodel::dynamic_worker_sync() +{ + QFETCH(QString, script); + QFETCH(int, result); + QFETCH(QString, warning); + + // This is the same as dynamic_worker() except that it executes a set of list operations + // from the worker script, calls sync(), and tests the changes are reflected in the + // list in the main thread + + QDeclarativeListModel model; + QDeclarativeEngine eng; + QDeclarativeComponent component(&eng, QUrl::fromLocalFile(SRCDIR "/data/model.qml")); + QDeclarativeItem *item = createWorkerTest(&eng, &component, &model); + QVERIFY(item != 0); + + if (script[0] == QLatin1Char('{') && script[script.length()-1] == QLatin1Char('}')) + script = script.mid(1, script.length() - 2); + QVariantList operations; + foreach (const QString &s, script.split(';')) { + if (!s.isEmpty()) + operations << s; } + if (!warning.isEmpty()) + QTest::ignoreMessage(QtWarningMsg, warning.toLatin1()); + + // execute a set of commands on the worker list model, then check the + // changes are reflected in the list model in the main thread + if (QByteArray(QTest::currentDataTag()).startsWith("nested")) + QTest::ignoreMessage(QtWarningMsg, ": QML ListModel: Cannot add nested list values when modifying or after modification from a worker script"); + + QVERIFY(QMetaObject::invokeMethod(item, "evalExpressionViaWorker", + Q_ARG(QVariant, operations.mid(0, operations.length()-1)))); + waitForWorker(item); + + QDeclarativeExpression e(eng.rootContext(), &model, operations.last().toString()); + if (!QByteArray(QTest::currentDataTag()).startsWith("nested")) + QCOMPARE(e.evaluate().toInt(), result); + delete item; qApp->processEvents(); } @@ -595,6 +660,9 @@ void tst_qdeclarativelistmodel::error() } } +/* + Test model changes from set() are available to the view +*/ void tst_qdeclarativelistmodel::set() { QDeclarativeEngine engine; @@ -618,6 +686,205 @@ void tst_qdeclarativelistmodel::set() QCOMPARE(model.data(0, model.roles()[0]), qVariantFromValue(false)); } +/* + Test model changes on values returned by get() are available to the view +*/ +void tst_qdeclarativelistmodel::get() +{ + QFETCH(QString, expression); + QFETCH(int, index); + QFETCH(QString, roleName); + QFETCH(QVariant, roleValue); + + QDeclarativeEngine eng; + QDeclarativeComponent component(&eng); + component.setData( + "import Qt 4.7\n" + "ListModel { \n" + "ListElement { roleA: 100 }\n" + "ListElement { roleA: 200; roleB: 400 } \n" + "ListElement { roleA: 200; roleB: 400 } \n" + "}", QUrl()); + QDeclarativeListModel *model = qobject_cast(component.create()); + int role = roleFromName(model, roleName); + + QSignalSpy spy(model, SIGNAL(itemsChanged(int, int, QList))); + QDeclarativeExpression expr(eng.rootContext(), model, expression); + expr.evaluate(); + QVERIFY(!expr.hasError()); + + QCOMPARE(model->data(index, role), roleValue); + QCOMPARE(spy.count(), 1); + + QList spyResult = spy.takeFirst(); + QCOMPARE(spyResult.at(0).toInt(), index); + QCOMPARE(spyResult.at(1).toInt(), 1); // only 1 item is modified at a time + QCOMPARE(spyResult.at(2).value >(), (QList() << role)); +} + +void tst_qdeclarativelistmodel::get_data() +{ + QTest::addColumn("expression"); + QTest::addColumn("index"); + QTest::addColumn("roleName"); + QTest::addColumn("roleValue"); + + QTest::newRow("simple value") << "get(0).roleA = 500" << 0 << "roleA" << QVariant(500); + QTest::newRow("simple value 2") << "get(1).roleB = 500" << 1 << "roleB" << QVariant(500); + + QVariantMap map; + map["zzz"] = 123; + QTest::newRow("object value") << "get(1).roleB = {'zzz':123}" << 1 << "roleB" << QVariant::fromValue(map); + + QVariantList list; + map.clear(); map["a"] = 50; map["b"] = 500; + list << map; + map.clear(); map["c"] = 1000; + list << map; + QTest::newRow("list of objects") << "get(2).roleB = [{'a': 50, 'b': 500}, {'c': 1000}]" << 2 << "roleB" << QVariant::fromValue(list); +} + +void tst_qdeclarativelistmodel::get_worker() +{ + QFETCH(QString, expression); + QFETCH(int, index); + QFETCH(QString, roleName); + QFETCH(QVariant, roleValue); + + QDeclarativeListModel model; + QDeclarativeEngine eng; + QDeclarativeComponent component(&eng, QUrl::fromLocalFile(SRCDIR "/data/model.qml")); + QDeclarativeItem *item = createWorkerTest(&eng, &component, &model); + QVERIFY(item != 0); + QScriptEngine *seng = QDeclarativeEnginePrivate::getScriptEngine(&eng); + + // Add some values like get() test + QScriptValue sv = seng->newObject(); + sv.setProperty(QLatin1String("roleA"), seng->newVariant(QVariant::fromValue(100))); + model.append(sv); + sv = seng->newObject(); + sv.setProperty(QLatin1String("roleA"), seng->newVariant(QVariant::fromValue(200))); + sv.setProperty(QLatin1String("roleB"), seng->newVariant(QVariant::fromValue(400))); + model.append(sv); + model.append(sv); + int role = roleFromName(&model, roleName); + + const char *warning = ": QML ListModel: Cannot add nested list values when modifying or after modification from a worker script"; + if (roleValue.type() == QVariant::List || roleValue.type() == QVariant::Map) + QTest::ignoreMessage(QtWarningMsg, warning); + QSignalSpy spy(&model, SIGNAL(itemsChanged(int, int, QList))); + + // in the worker thread, change the model data and call sync() + QVERIFY(QMetaObject::invokeMethod(item, "evalExpressionViaWorker", + Q_ARG(QVariant, QStringList(expression)))); + waitForWorker(item); + + // see if we receive the model changes in the main thread's model + if (roleValue.type() == QVariant::List || roleValue.type() == QVariant::Map) { + QVERIFY(model.data(index, role) != roleValue); + QCOMPARE(spy.count(), 0); + } else { + QCOMPARE(model.data(index, role), roleValue); + QCOMPARE(spy.count(), 1); + + QList spyResult = spy.takeFirst(); + QCOMPARE(spyResult.at(0).toInt(), index); + QCOMPARE(spyResult.at(1).toInt(), 1); // only 1 item is modified at a time + QVERIFY(spyResult.at(2).value >().contains(role)); + } +} + +void tst_qdeclarativelistmodel::get_worker_data() +{ + get_data(); +} + +/* + Test that the tests run in get() also work for nested list data +*/ +void tst_qdeclarativelistmodel::get_nested() +{ + QFETCH(QString, expression); + QFETCH(int, index); + QFETCH(QString, roleName); + QFETCH(QVariant, roleValue); + + QDeclarativeEngine eng; + QDeclarativeComponent component(&eng); + component.setData( + "import Qt 4.7\n" + "ListModel { \n" + "ListElement {\n" + "listRoleA: [\n" + "ListElement { roleA: 100 },\n" + "ListElement { roleA: 200; roleB: 400 },\n" + "ListElement { roleA: 200; roleB: 400 } \n" + "]\n" + "}\n" + "ListElement {\n" + "listRoleA: [\n" + "ListElement { roleA: 100 },\n" + "ListElement { roleA: 200; roleB: 400 },\n" + "ListElement { roleA: 200; roleB: 400 } \n" + "]\n" + "listRoleB: [\n" + "ListElement { roleA: 100 },\n" + "ListElement { roleA: 200; roleB: 400 },\n" + "ListElement { roleA: 200; roleB: 400 } \n" + "]\n" + "listRoleC: [\n" + "ListElement { roleA: 100 },\n" + "ListElement { roleA: 200; roleB: 400 },\n" + "ListElement { roleA: 200; roleB: 400 } \n" + "]\n" + "}\n" + "}", QUrl()); + QDeclarativeListModel *model = qobject_cast(component.create()); + QVERIFY(component.errorString().isEmpty()); + QDeclarativeListModel *childModel; + + // Test setting the inner list data for: + // get(0).listRoleA + // get(1).listRoleA + // get(1).listRoleB + // get(1).listRoleC + + QList > testData; + testData << qMakePair(0, QString("listRoleA")); + testData << qMakePair(1, QString("listRoleA")); + testData << qMakePair(1, QString("listRoleB")); + testData << qMakePair(1, QString("listRoleC")); + + for (int i=0; i(model->data(outerListIndex, outerListRole).value()); + QVERIFY(childModel); + + QString extendedExpression = QString("get(%1).%2.%3").arg(outerListIndex).arg(outerListRoleName).arg(expression); + QDeclarativeExpression expr(eng.rootContext(), model, extendedExpression); + + QSignalSpy spy(childModel, SIGNAL(itemsChanged(int, int, QList))); + expr.evaluate(); + QVERIFY(!expr.hasError()); + + int role = roleFromName(childModel, roleName); + QCOMPARE(childModel->data(index, role), roleValue); + QCOMPARE(spy.count(), 1); + + QList spyResult = spy.takeFirst(); + QCOMPARE(spyResult.at(0).toInt(), index); + QCOMPARE(spyResult.at(1).toInt(), 1); // only 1 item is modified at a time + QCOMPARE(spyResult.at(2).value >(), (QList() << role)); + } +} + +void tst_qdeclarativelistmodel::get_nested_data() +{ + get_data(); +} QTEST_MAIN(tst_qdeclarativelistmodel) -- cgit v0.12 From b811afd001fb89d7815c7167bea7f7814348931f Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Fri, 17 Sep 2010 15:33:22 +1000 Subject: Improve error messages (cherry picked from commit af29c555a29ebcdb1d962176912478212c9c7e65) --- src/declarative/util/qdeclarativelistmodel.cpp | 6 +++--- .../qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 68e97b0..2d8b946 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -292,7 +292,7 @@ QDeclarativeListModelWorkerAgent *QDeclarativeListModel::agent() return m_agent; if (!flatten()) { - qmlInfo(this) << "List contains nested list values and cannot be used from a worker script"; + qmlInfo(this) << "List contains list-type data and cannot be used from a worker script"; return 0; } @@ -1023,7 +1023,7 @@ bool FlatListModel::addValue(const QScriptValue &value, QHash *ro it.next(); QScriptValue value = it.value(); if (!value.isVariant() && !value.isRegExp() && !value.isDate() && value.isObject()) { - qmlInfo(m_listModel) << "Cannot add nested list values when modifying or after modification from a worker script"; + qmlInfo(m_listModel) << "Cannot add list-type data when modifying or after modification from a worker script"; return false; } @@ -1129,7 +1129,7 @@ QScriptDeclarativeClass::Value FlatListScriptClass::property(Object *obj, const void FlatListScriptClass::setProperty(Object *obj, const Identifier &name, const QScriptValue &value) { if (!value.isVariant() && !value.isRegExp() && !value.isDate() && value.isObject()) { - qmlInfo(m_model->m_listModel) << "Cannot add nested list values when modifying or after modification from a worker script"; + qmlInfo(m_model->m_listModel) << "Cannot add list-type data when modifying or after modification from a worker script"; return; } diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp index 70ec416..f456778 100644 --- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp +++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp @@ -406,7 +406,7 @@ void tst_qdeclarativelistmodel::dynamic_worker_sync() // execute a set of commands on the worker list model, then check the // changes are reflected in the list model in the main thread if (QByteArray(QTest::currentDataTag()).startsWith("nested")) - QTest::ignoreMessage(QtWarningMsg, ": QML ListModel: Cannot add nested list values when modifying or after modification from a worker script"); + QTest::ignoreMessage(QtWarningMsg, ": QML ListModel: Cannot add list-type data when modifying or after modification from a worker script"); QVERIFY(QMetaObject::invokeMethod(item, "evalExpressionViaWorker", Q_ARG(QVariant, operations.mid(0, operations.length()-1)))); @@ -439,7 +439,7 @@ void tst_qdeclarativelistmodel::convertNestedToFlat_fail() model.append(nestedListValue(&s_eng)); QCOMPARE(model.count(), 2); - QTest::ignoreMessage(QtWarningMsg, ": QML ListModel: List contains nested list values and cannot be used from a worker script"); + QTest::ignoreMessage(QtWarningMsg, ": QML ListModel: List contains list-type data and cannot be used from a worker script"); QVERIFY(QMetaObject::invokeMethod(item, "evalExpressionViaWorker", Q_ARG(QVariant, script))); waitForWorker(item); @@ -491,7 +491,7 @@ void tst_qdeclarativelistmodel::convertNestedToFlat_ok() QCOMPARE(model.count(), count+1); QScriptValue nested = nestedListValue(&s_eng); - const char *warning = ": QML ListModel: Cannot add nested list values when modifying or after modification from a worker script"; + const char *warning = ": QML ListModel: Cannot add list-type data when modifying or after modification from a worker script"; QTest::ignoreMessage(QtWarningMsg, warning); model.append(nested); @@ -769,7 +769,7 @@ void tst_qdeclarativelistmodel::get_worker() model.append(sv); int role = roleFromName(&model, roleName); - const char *warning = ": QML ListModel: Cannot add nested list values when modifying or after modification from a worker script"; + const char *warning = ": QML ListModel: Cannot add list-type data when modifying or after modification from a worker script"; if (roleValue.type() == QVariant::List || roleValue.type() == QVariant::Map) QTest::ignoreMessage(QtWarningMsg, warning); QSignalSpy spy(&model, SIGNAL(itemsChanged(int, int, QList))); -- cgit v0.12 From e3a5505b05b257c8cf54278f4a226ce967c9ce88 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Mon, 20 Sep 2010 10:45:13 +1000 Subject: Make build on Symbian (cherry picked from commit 68281ec913e2a69682f00bf22c291b15ea4ce542) --- src/declarative/util/qdeclarativelistmodel.cpp | 31 ++++++++++++++++++++++++ src/declarative/util/qdeclarativelistmodel_p_p.h | 31 ++---------------------- 2 files changed, 33 insertions(+), 29 deletions(-) diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 2d8b946..3263238 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -356,6 +356,37 @@ void QDeclarativeListModel::clear() } } +QDeclarativeListModel *ModelNode::model(const NestedListModel *model) +{ + if (!modelCache) { + modelCache = new QDeclarativeListModel; + QDeclarativeEngine::setContextForObject(modelCache,QDeclarativeEngine::contextForObject(model->m_listModel)); + modelCache->m_nested->_root = this; // ListModel defaults to nestable model + + for (int i=0; i(values.at(i)); + if (subNode) + subNode->m_model = modelCache->m_nested; + } + } + return modelCache; +} + +ModelObject *ModelNode::object(const NestedListModel *model) +{ + if (!objectCache) { + objectCache = new ModelObject(this, + const_cast(model), + QDeclarativeEnginePrivate::getScriptEngine(qmlEngine(model->m_listModel))); + QHash::iterator it; + for (it = properties.begin(); it != properties.end(); ++it) { + objectCache->setValue(it.key().toUtf8(), model->valueForNode(*it)); + } + objectCache->setNodeUpdatesEnabled(true); + } + return objectCache; +} + /*! \qmlmethod ListModel::remove(int index) diff --git a/src/declarative/util/qdeclarativelistmodel_p_p.h b/src/declarative/util/qdeclarativelistmodel_p_p.h index acf4f3e..d2d40ee 100644 --- a/src/declarative/util/qdeclarativelistmodel_p_p.h +++ b/src/declarative/util/qdeclarativelistmodel_p_p.h @@ -255,35 +255,8 @@ struct ModelNode void clear(); - QDeclarativeListModel *model(const NestedListModel *model) { - if (!modelCache) { - modelCache = new QDeclarativeListModel; - QDeclarativeEngine::setContextForObject(modelCache,QDeclarativeEngine::contextForObject(model->m_listModel)); - modelCache->m_nested->_root = this; // ListModel defaults to nestable model - - for (int i=0; i(values.at(i)); - if (subNode) - subNode->m_model = modelCache->m_nested; - } - } - return modelCache; - } - - ModelObject *object(const NestedListModel *model) { - if (!objectCache) { - objectCache = new ModelObject(this, - const_cast(model), - QDeclarativeEnginePrivate::getScriptEngine(qmlEngine(model->m_listModel))); - QHash::iterator it; - for (it = properties.begin(); it != properties.end(); ++it) { - objectCache->setValue(it.key().toUtf8(), model->valueForNode(*it)); - } - objectCache->setNodeUpdatesEnabled(true); - } - return objectCache; - } - + QDeclarativeListModel *model(const NestedListModel *model); + ModelObject *object(const NestedListModel *model); void setObjectValue(const QScriptValue& valuemap, bool writeToCache = true); void setListValue(const QScriptValue& valuelist); -- cgit v0.12 From cac9110ce6e0b1e1825bf8a425bed61a9ac3cb39 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 21 Sep 2010 23:49:07 +1000 Subject: Bump version to 4.7.1. Reviewed-by: Trust Me (cherry picked from commit 63394650e71f23a036edbc0df29a1b6b19366269) --- src/corelib/global/qglobal.h | 4 ++-- src/plugins/qpluginbase.pri | 2 +- src/qbase.pri | 2 +- tests/auto/selftests/expected_cmptest.txt | 2 +- tests/auto/selftests/expected_crashes_3.txt | 2 +- tests/auto/selftests/expected_longstring.txt | 2 +- tests/auto/selftests/expected_maxwarnings.txt | 2 +- tests/auto/selftests/expected_skip.txt | 2 +- tools/assistant/tools/assistant/doc/assistant.qdocconf | 2 +- tools/qdoc3/doc/files/qt.qdocconf | 8 ++++---- tools/qdoc3/test/assistant.qdocconf | 4 ++-- tools/qdoc3/test/designer.qdocconf | 4 ++-- tools/qdoc3/test/linguist.qdocconf | 4 ++-- tools/qdoc3/test/qdeclarative.qdocconf | 8 ++++---- tools/qdoc3/test/qmake.qdocconf | 4 ++-- tools/qdoc3/test/qt-build-docs.qdocconf | 8 ++++---- tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf | 8 ++++---- tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf | 8 ++++---- tools/qdoc3/test/qt.qdocconf | 8 ++++---- tools/qdoc3/test/qt_ja_JP.qdocconf | 8 ++++---- tools/qdoc3/test/qt_zh_CN.qdocconf | 8 ++++---- 21 files changed, 50 insertions(+), 50 deletions(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 8f27b03..c906a1c 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -44,11 +44,11 @@ #include -#define QT_VERSION_STR "4.7.0" +#define QT_VERSION_STR "4.7.1" /* QT_VERSION is (major << 16) + (minor << 8) + patch. */ -#define QT_VERSION 0x040700 +#define QT_VERSION 0x040701 /* can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0)) */ diff --git a/src/plugins/qpluginbase.pri b/src/plugins/qpluginbase.pri index 8b119b5..84009d8 100644 --- a/src/plugins/qpluginbase.pri +++ b/src/plugins/qpluginbase.pri @@ -1,6 +1,6 @@ TEMPLATE = lib isEmpty(QT_MAJOR_VERSION) { - VERSION=4.7.0 + VERSION=4.7.1 } else { VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} } diff --git a/src/qbase.pri b/src/qbase.pri index f6af22f..680693f 100644 --- a/src/qbase.pri +++ b/src/qbase.pri @@ -4,7 +4,7 @@ INCLUDEPATH *= $$QMAKE_INCDIR_QT/$$TARGET #just for today to have some compat isEmpty(QT_ARCH):!isEmpty(ARCH):QT_ARCH=$$ARCH #another compat that will rot for change #215700 TEMPLATE = lib isEmpty(QT_MAJOR_VERSION) { - VERSION=4.7.0 + VERSION=4.7.1 } else { VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} } diff --git a/tests/auto/selftests/expected_cmptest.txt b/tests/auto/selftests/expected_cmptest.txt index fd5b486..7f3aa9a 100644 --- a/tests/auto/selftests/expected_cmptest.txt +++ b/tests/auto/selftests/expected_cmptest.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Cmptest ********* -Config: Using QTest library 4.7.0, Qt 4.7.0 +Config: Using QTest library 4.7.1, Qt 4.7.1 PASS : tst_Cmptest::initTestCase() PASS : tst_Cmptest::compare_boolfuncs() PASS : tst_Cmptest::compare_pointerfuncs() diff --git a/tests/auto/selftests/expected_crashes_3.txt b/tests/auto/selftests/expected_crashes_3.txt index 3aced25..7ded525 100644 --- a/tests/auto/selftests/expected_crashes_3.txt +++ b/tests/auto/selftests/expected_crashes_3.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Crashes ********* -Config: Using QTest library 4.7.0, Qt 4.7.0 +Config: Using QTest library 4.7.1, Qt 4.7.1 PASS : tst_Crashes::initTestCase() QFATAL : tst_Crashes::crash() Received signal 11 FAIL! : tst_Crashes::crash() Received a fatal error. diff --git a/tests/auto/selftests/expected_longstring.txt b/tests/auto/selftests/expected_longstring.txt index 1461bc6..9ad6f56 100644 --- a/tests/auto/selftests/expected_longstring.txt +++ b/tests/auto/selftests/expected_longstring.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_LongString ********* -Config: Using QTest library 4.7.0, Qt 4.7.0 +Config: Using QTest library 4.7.1, Qt 4.7.1 PASS : tst_LongString::initTestCase() FAIL! : tst_LongString::failWithLongString() Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. diff --git a/tests/auto/selftests/expected_maxwarnings.txt b/tests/auto/selftests/expected_maxwarnings.txt index 908bd5d..949da13 100644 --- a/tests/auto/selftests/expected_maxwarnings.txt +++ b/tests/auto/selftests/expected_maxwarnings.txt @@ -1,5 +1,5 @@ ********* Start testing of MaxWarnings ********* -Config: Using QTest library 4.7.0, Qt 4.7.0 +Config: Using QTest library 4.7.1, Qt 4.7.1 PASS : MaxWarnings::initTestCase() QWARN : MaxWarnings::warn() 0 QWARN : MaxWarnings::warn() 1 diff --git a/tests/auto/selftests/expected_skip.txt b/tests/auto/selftests/expected_skip.txt index e5bf1ff..1f5bf7b 100644 --- a/tests/auto/selftests/expected_skip.txt +++ b/tests/auto/selftests/expected_skip.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Skip ********* -Config: Using QTest library 4.7.0, Qt 4.7.0 +Config: Using QTest library 4.7.1, Qt 4.7.1 PASS : tst_Skip::initTestCase() SKIP : tst_Skip::test() skipping all Loc: [/home/user/depot/qt-git/mainline/tests/auto/selftests/skip/tst_skip.cpp(68)] diff --git a/tools/assistant/tools/assistant/doc/assistant.qdocconf b/tools/assistant/tools/assistant/doc/assistant.qdocconf index 3b4b5f8..26cdafb 100644 --- a/tools/assistant/tools/assistant/doc/assistant.qdocconf +++ b/tools/assistant/tools/assistant/doc/assistant.qdocconf @@ -12,5 +12,5 @@ HTML.footer = "


\n" \ "\n" \ "\n" \ "\n" \ - "\n" \ + "\n" \ "
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt 4.7.0
Qt 4.7.1
" diff --git a/tools/qdoc3/doc/files/qt.qdocconf b/tools/qdoc3/doc/files/qt.qdocconf index 09c112a..4546c7a 100644 --- a/tools/qdoc3/doc/files/qt.qdocconf +++ b/tools/qdoc3/doc/files/qt.qdocconf @@ -22,7 +22,7 @@ edition.DesktopLight.groups = -graphicsview-api qhp.projects = Qt qhp.Qt.file = qt.qhp -qhp.Qt.namespace = com.trolltech.qt.470 +qhp.Qt.namespace = com.trolltech.qt.471 qhp.Qt.virtualFolder = qdoc qhp.Qt.indexTitle = Qt Reference Documentation qhp.Qt.indexRoot = @@ -36,9 +36,9 @@ qhp.Qt.extraFiles = classic.css \ images/dynamiclayouts-example.png \ images/stylesheet-coffee-plastique.png -qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc -qhp.Qt.customFilters.Qt.name = Qt 4.7.0 -qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 +qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc +qhp.Qt.customFilters.Qt.name = Qt 4.7.1 +qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1 qhp.Qt.subprojects = classes overviews examples qhp.Qt.subprojects.classes.title = Classes qhp.Qt.subprojects.classes.indexTitle = Qt's Classes diff --git a/tools/qdoc3/test/assistant.qdocconf b/tools/qdoc3/test/assistant.qdocconf index 836c4bf..74b68df 100644 --- a/tools/qdoc3/test/assistant.qdocconf +++ b/tools/qdoc3/test/assistant.qdocconf @@ -13,7 +13,7 @@ indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index qhp.projects = Assistant qhp.Assistant.file = assistant.qhp -qhp.Assistant.namespace = com.trolltech.assistant.470 +qhp.Assistant.namespace = com.trolltech.assistant.471 qhp.Assistant.virtualFolder = qdoc qhp.Assistant.indexTitle = Qt Assistant Manual qhp.Assistant.extraFiles = images/bg_l.png \ @@ -50,7 +50,7 @@ qhp.Assistant.extraFiles = images/bg_l.png \ style/style_ie8.css \ style/style.css -qhp.Assistant.filterAttributes = qt 4.7.0 tools assistant +qhp.Assistant.filterAttributes = qt 4.7.1 tools assistant qhp.Assistant.customFilters.Assistant.name = Qt Assistant Manual qhp.Assistant.customFilters.Assistant.filterAttributes = qt tools assistant qhp.Assistant.subprojects = manual examples diff --git a/tools/qdoc3/test/designer.qdocconf b/tools/qdoc3/test/designer.qdocconf index 9136619..ab66792 100644 --- a/tools/qdoc3/test/designer.qdocconf +++ b/tools/qdoc3/test/designer.qdocconf @@ -13,7 +13,7 @@ indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index qhp.projects = Designer qhp.Designer.file = designer.qhp -qhp.Designer.namespace = com.trolltech.designer.470 +qhp.Designer.namespace = com.trolltech.designer.471 qhp.Designer.virtualFolder = qdoc qhp.Designer.indexTitle = Qt Designer Manual qhp.Designer.extraFiles = images/bg_l.png \ @@ -50,7 +50,7 @@ qhp.Designer.extraFiles = images/bg_l.png \ style/style_ie8.css \ style/style.css -qhp.Designer.filterAttributes = qt 4.7.0 tools designer +qhp.Designer.filterAttributes = qt 4.7.1 tools designer qhp.Designer.customFilters.Designer.name = Qt Designer Manual qhp.Designer.customFilters.Designer.filterAttributes = qt tools designer qhp.Designer.subprojects = manual examples diff --git a/tools/qdoc3/test/linguist.qdocconf b/tools/qdoc3/test/linguist.qdocconf index 696802a..0d920e2 100644 --- a/tools/qdoc3/test/linguist.qdocconf +++ b/tools/qdoc3/test/linguist.qdocconf @@ -13,7 +13,7 @@ indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index qhp.projects = Linguist qhp.Linguist.file = linguist.qhp -qhp.Linguist.namespace = com.trolltech.linguist.470 +qhp.Linguist.namespace = com.trolltech.linguist.471 qhp.Linguist.virtualFolder = qdoc qhp.Linguist.indexTitle = Qt Linguist Manual qhp.Linguist.extraFiles = images/bg_l.png \ @@ -50,7 +50,7 @@ qhp.Linguist.extraFiles = images/bg_l.png \ style/style_ie8.css \ style/style.css -qhp.Linguist.filterAttributes = qt 4.7.0 tools linguist +qhp.Linguist.filterAttributes = qt 4.7.1 tools linguist qhp.Linguist.customFilters.Linguist.name = Qt Linguist Manual qhp.Linguist.customFilters.Linguist.filterAttributes = qt tools linguist qhp.Linguist.subprojects = manual examples diff --git a/tools/qdoc3/test/qdeclarative.qdocconf b/tools/qdoc3/test/qdeclarative.qdocconf index 45f48a6..9aaebcb 100644 --- a/tools/qdoc3/test/qdeclarative.qdocconf +++ b/tools/qdoc3/test/qdeclarative.qdocconf @@ -21,7 +21,7 @@ edition.DesktopLight.groups = -graphicsview-api qhp.projects = Qml qhp.Qml.file = qml.qhp -qhp.Qml.namespace = com.trolltech.qml.470 +qhp.Qml.namespace = com.trolltech.qml.471 qhp.Qml.virtualFolder = qdoc qhp.Qml.indexTitle = Qml Reference @@ -61,9 +61,9 @@ qhp.Qml.extraFiles = images/bg_l.png \ style/style_ie8.css \ style/style.css -qhp.Qml.filterAttributes = qt 4.7.0 qtrefdoc -qhp.Qml.customFilters.Qt.name = Qt 4.7.0 -qhp.Qml.customFilters.Qt.filterAttributes = qt 4.7.0 +qhp.Qml.filterAttributes = qt 4.7.1 qtrefdoc +qhp.Qml.customFilters.Qt.name = Qt 4.7.1 +qhp.Qml.customFilters.Qt.filterAttributes = qt 4.7.1 qhp.Qml.subprojects = classes qhp.Qml.subprojects.classes.title = Elements qhp.Qml.subprojects.classes.indexTitle = Qml Elements diff --git a/tools/qdoc3/test/qmake.qdocconf b/tools/qdoc3/test/qmake.qdocconf index 8125166..be2e9d3 100644 --- a/tools/qdoc3/test/qmake.qdocconf +++ b/tools/qdoc3/test/qmake.qdocconf @@ -13,7 +13,7 @@ indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index qhp.projects = qmake qhp.qmake.file = qmake.qhp -qhp.qmake.namespace = com.trolltech.qmake.470 +qhp.qmake.namespace = com.trolltech.qmake.471 qhp.qmake.virtualFolder = qdoc qhp.qmake.indexTitle = QMake Manual qhp.qmake.extraFiles = images/bg_l.png \ @@ -50,7 +50,7 @@ qhp.qmake.extraFiles = images/bg_l.png \ style/style_ie8.css \ style/style.css -qhp.qmake.filterAttributes = qt 4.7.0 tools qmake +qhp.qmake.filterAttributes = qt 4.7.1 tools qmake qhp.qmake.customFilters.qmake.name = qmake Manual qhp.qmake.customFilters.qmake.filterAttributes = qt tools qmake qhp.qmake.subprojects = manual diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf index 639585c..dcabeb4 100644 --- a/tools/qdoc3/test/qt-build-docs.qdocconf +++ b/tools/qdoc3/test/qt-build-docs.qdocconf @@ -15,7 +15,7 @@ naturallanguage = en_US qhp.projects = Qt qhp.Qt.file = qt.qhp -qhp.Qt.namespace = com.trolltech.qt.470 +qhp.Qt.namespace = com.trolltech.qt.471 qhp.Qt.virtualFolder = qdoc qhp.Qt.indexTitle = Qt Reference Documentation qhp.Qt.indexRoot = @@ -59,9 +59,9 @@ qhp.Qt.extraFiles = index.html \ -qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc -qhp.Qt.customFilters.Qt.name = Qt 4.7.0 -qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 +qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc +qhp.Qt.customFilters.Qt.name = Qt 4.7.1 +qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1 qhp.Qt.subprojects = classes overviews examples qhp.Qt.subprojects.classes.title = Classes qhp.Qt.subprojects.classes.indexTitle = Qt's Classes diff --git a/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf b/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf index c24ddef..7e28fa2 100644 --- a/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf +++ b/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf @@ -17,15 +17,15 @@ indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index qhp.projects = Qt qhp.Qt.file = qt.qhp -qhp.Qt.namespace = com.trolltech.qt.470 +qhp.Qt.namespace = com.trolltech.qt.471 qhp.Qt.virtualFolder = qdoc qhp.Qt.title = Qt qhp.Qt.indexTitle = Qt qhp.Qt.selectors = fake:example -qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc ja_JP -qhp.Qt.customFilters.Qt.name = Qt 4.7.0 -qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 +qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc ja_JP +qhp.Qt.customFilters.Qt.name = Qt 4.7.1 +qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1 # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML diff --git a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf index a983faa..cfcc76d 100644 --- a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf +++ b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf @@ -17,15 +17,15 @@ indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index qhp.projects = Qt qhp.Qt.file = qt.qhp -qhp.Qt.namespace = com.trolltech.qt.470 +qhp.Qt.namespace = com.trolltech.qt.471 qhp.Qt.virtualFolder = qdoc qhp.Qt.title = 教程 qhp.Qt.indexTitle = 教程 qhp.Qt.selectors = fake:example -qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc zh_CN -qhp.Qt.customFilters.Qt.name = Qt 4.7.0 -qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 +qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc zh_CN +qhp.Qt.customFilters.Qt.name = Qt 4.7.1 +qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1 # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf index 215e0d6..ea97205 100644 --- a/tools/qdoc3/test/qt.qdocconf +++ b/tools/qdoc3/test/qt.qdocconf @@ -17,7 +17,7 @@ naturallanguage = en_US qhp.projects = Qt qhp.Qt.file = qt.qhp -qhp.Qt.namespace = com.trolltech.qt.470 +qhp.Qt.namespace = com.trolltech.qt.471 qhp.Qt.virtualFolder = qdoc qhp.Qt.indexTitle = Qt Reference Documentation qhp.Qt.indexRoot = @@ -59,9 +59,9 @@ qhp.Qt.extraFiles = index.html \ style/style_ie8.css \ style/style.css -qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc -qhp.Qt.customFilters.Qt.name = Qt 4.7.0 -qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 +qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc +qhp.Qt.customFilters.Qt.name = Qt 4.7.1 +qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1 qhp.Qt.subprojects = classes overviews examples qhp.Qt.subprojects.classes.title = Classes qhp.Qt.subprojects.classes.indexTitle = Qt's Classes diff --git a/tools/qdoc3/test/qt_ja_JP.qdocconf b/tools/qdoc3/test/qt_ja_JP.qdocconf index f9ce142..32bba06 100644 --- a/tools/qdoc3/test/qt_ja_JP.qdocconf +++ b/tools/qdoc3/test/qt_ja_JP.qdocconf @@ -19,15 +19,15 @@ indexes = $QTDIR/doc/html/qt.index qhp.projects = Qt qhp.Qt.file = qt.qhp -qhp.Qt.namespace = com.trolltech.qt.470 +qhp.Qt.namespace = com.trolltech.qt.471 qhp.Qt.virtualFolder = qdoc qhp.Qt.title = Qt qhp.Qt.indexTitle = Qt qhp.Qt.selectors = fake:example -qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc ja_JP -qhp.Qt.customFilters.Qt.name = Qt 4.7.0 -qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 +qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc ja_JP +qhp.Qt.customFilters.Qt.name = Qt 4.7.1 +qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1 # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML diff --git a/tools/qdoc3/test/qt_zh_CN.qdocconf b/tools/qdoc3/test/qt_zh_CN.qdocconf index 5bf8171..40d3d5a 100644 --- a/tools/qdoc3/test/qt_zh_CN.qdocconf +++ b/tools/qdoc3/test/qt_zh_CN.qdocconf @@ -19,15 +19,15 @@ indexes = $QTDIR/doc/html/qt.index qhp.projects = Qt qhp.Qt.file = qt.qhp -qhp.Qt.namespace = com.trolltech.qt.470 +qhp.Qt.namespace = com.trolltech.qt.471 qhp.Qt.virtualFolder = qdoc qhp.Qt.title = 教程 qhp.Qt.indexTitle = 教程 qhp.Qt.selectors = fake:example -qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc zh_CN -qhp.Qt.customFilters.Qt.name = Qt 4.7.0 -qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 +qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc zh_CN +qhp.Qt.customFilters.Qt.name = Qt 4.7.1 +qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1 # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML -- cgit v0.12 From c634f8db5872790e90205ef4f41153345b9606c2 Mon Sep 17 00:00:00 2001 From: aavit Date: Tue, 21 Sep 2010 11:54:02 +0200 Subject: Avoid creating copy of an image in memory when storing as jpeg Task-number: QT-3871 Reviewed-by: Kim (cherry picked from commit 7efe816d028876487a6a44d97ed58a807da7d4d8) --- src/gui/image/qjpeghandler.cpp | 41 +++++++++++++---------------------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/src/gui/image/qjpeghandler.cpp b/src/gui/image/qjpeghandler.cpp index e685694..b9eda05 100644 --- a/src/gui/image/qjpeghandler.cpp +++ b/src/gui/image/qjpeghandler.cpp @@ -515,29 +515,10 @@ inline my_jpeg_destination_mgr::my_jpeg_destination_mgr(QIODevice *device) free_in_buffer = max_buf; } -static bool can_write_format(QImage::Format fmt) -{ - switch (fmt) { - case QImage::Format_Mono: - case QImage::Format_MonoLSB: - case QImage::Format_Indexed8: - case QImage::Format_RGB888: - case QImage::Format_RGB32: - case QImage::Format_ARGB32: - case QImage::Format_ARGB32_Premultiplied: - return true; - break; - default: - break; - } - return false; -} -static bool write_jpeg_image(const QImage &sourceImage, QIODevice *device, int sourceQuality) +static bool write_jpeg_image(const QImage &image, QIODevice *device, int sourceQuality) { bool success = false; - const QImage image = can_write_format(sourceImage.format()) ? - sourceImage : sourceImage.convertToFormat(QImage::Format_RGB888); const QVector cmap = image.colorTable(); struct jpeg_compress_struct cinfo; @@ -614,7 +595,7 @@ static bool write_jpeg_image(const QImage &sourceImage, QIODevice *device, int s case QImage::Format_Mono: case QImage::Format_MonoLSB: if (gray) { - const uchar* data = image.scanLine(cinfo.next_scanline); + const uchar* data = image.constScanLine(cinfo.next_scanline); if (image.format() == QImage::Format_MonoLSB) { for (int i=0; i> 3)) & (1 << (i & 7))); @@ -627,7 +608,7 @@ static bool write_jpeg_image(const QImage &sourceImage, QIODevice *device, int s } } } else { - const uchar* data = image.scanLine(cinfo.next_scanline); + const uchar* data = image.constScanLine(cinfo.next_scanline); if (image.format() == QImage::Format_MonoLSB) { for (int i=0; i> 3)) & (1 << (i & 7))); @@ -647,13 +628,13 @@ static bool write_jpeg_image(const QImage &sourceImage, QIODevice *device, int s break; case QImage::Format_Indexed8: if (gray) { - const uchar* pix = image.scanLine(cinfo.next_scanline); + const uchar* pix = image.constScanLine(cinfo.next_scanline); for (int i=0; i Date: Fri, 17 Sep 2010 18:26:53 +0200 Subject: Fixed compilation of MeeGo graphics system without eglext.h We don't rely on this header, so there's no need to include it. Reviewed-by: Benjamin Poulain (cherry picked from commit a65f53a09c2a5950bd8b98fd791dc413bb11f9bf) --- src/plugins/graphicssystems/meego/qmeegoextensions.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/plugins/graphicssystems/meego/qmeegoextensions.h b/src/plugins/graphicssystems/meego/qmeegoextensions.h index 7f219de..f1a74f5 100644 --- a/src/plugins/graphicssystems/meego/qmeegoextensions.h +++ b/src/plugins/graphicssystems/meego/qmeegoextensions.h @@ -43,7 +43,6 @@ #define MEXTENSIONS_H #include -#include #include #include #include -- cgit v0.12 From 7ce308d589c7dbbe295f2cf2a2975a05dd4d1812 Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Tue, 21 Sep 2010 12:47:00 +0200 Subject: Qt headers must be included before X11 headers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X11 symbols are conflicting with some of the Qt ones. Qt headers needs to be included before the X11 ones in order to compile on Maemo. Reviewed-by: Samuel Rødal (cherry picked from commit f1f986dfe40f82fca1a8a27f5f02e1a9f7818fd0) --- src/plugins/graphicssystems/meego/qmeegoextensions.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/graphicssystems/meego/qmeegoextensions.h b/src/plugins/graphicssystems/meego/qmeegoextensions.h index f1a74f5..ee20bd8 100644 --- a/src/plugins/graphicssystems/meego/qmeegoextensions.h +++ b/src/plugins/graphicssystems/meego/qmeegoextensions.h @@ -42,12 +42,12 @@ #ifndef MEXTENSIONS_H #define MEXTENSIONS_H -#include -#include -#include #include #include #include +#include +#include +#include /* Extensions decls */ -- cgit v0.12 From c573a69b3ff4ec2f7126a86c30c8f110a974937a Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 20 Sep 2010 17:24:39 +1000 Subject: Update QtCore bwins def file (cherry picked from commit 580fbb6a48b9cc2fbd0a011449d0c3a73c939ff9) --- src/s60installs/bwins/QtCoreu.def | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/s60installs/bwins/QtCoreu.def b/src/s60installs/bwins/QtCoreu.def index 1a79f63..0f66d72 100644 --- a/src/s60installs/bwins/QtCoreu.def +++ b/src/s60installs/bwins/QtCoreu.def @@ -1440,8 +1440,8 @@ EXPORTS ?d_func@QBuffer@@ABEPBVQBufferPrivate@@XZ @ 1439 NONAME ; class QBufferPrivate const * QBuffer::d_func(void) const ?d_func@QCoreApplication@@AAEPAVQCoreApplicationPrivate@@XZ @ 1440 NONAME ; class QCoreApplicationPrivate * QCoreApplication::d_func(void) ?d_func@QCoreApplication@@ABEPBVQCoreApplicationPrivate@@XZ @ 1441 NONAME ; class QCoreApplicationPrivate const * QCoreApplication::d_func(void) const - ?d_func@QDir@@AAEPAVQDirPrivate@@XZ @ 1442 NONAME ; class QDirPrivate * QDir::d_func(void) - ?d_func@QDir@@ABEPBVQDirPrivate@@XZ @ 1443 NONAME ; class QDirPrivate const * QDir::d_func(void) const + ?d_func@QDir@@AAEPAVQDirPrivate@@XZ @ 1442 NONAME ABSENT ; class QDirPrivate * QDir::d_func(void) + ?d_func@QDir@@ABEPBVQDirPrivate@@XZ @ 1443 NONAME ABSENT ; class QDirPrivate const * QDir::d_func(void) const ?d_func@QEventDispatcherSymbian@@AAEPAVQAbstractEventDispatcherPrivate@@XZ @ 1444 NONAME ; class QAbstractEventDispatcherPrivate * QEventDispatcherSymbian::d_func(void) ?d_func@QEventDispatcherSymbian@@ABEPBVQAbstractEventDispatcherPrivate@@XZ @ 1445 NONAME ; class QAbstractEventDispatcherPrivate const * QEventDispatcherSymbian::d_func(void) const ?d_func@QEventLoop@@AAEPAVQEventLoopPrivate@@XZ @ 1446 NONAME ; class QEventLoopPrivate * QEventLoop::d_func(void) -- cgit v0.12 From c2b8b2f7a46dc25ec1a464f72fa301b1176cec8d Mon Sep 17 00:00:00 2001 From: Lasse Holmstedt Date: Fri, 17 Sep 2010 10:13:51 +0200 Subject: Make qml debugging work with command line arguments The environment variables do not work for Symbian devices, so without this change, QML debugging cannot be done on them. In addition, configure now contains an option to disable qml debugging entirely, due to it being a major security risk. Reviewed-by: kkoehne (cherry picked from commit a9e5329168cd9113bf41293c05193d8b099494c6) --- configure | 24 +++++++++++- configure.exe | Bin 1321472 -> 1402368 bytes src/corelib/kernel/qcoreapplication.cpp | 3 +- .../debugger/qdeclarativedebugservice.cpp | 41 +++++++++++++++------ src/gui/kernel/qapplication.cpp | 6 +++ src/gui/kernel/qapplication_p.h | 2 + .../qdeclarativedebug/tst_qdeclarativedebug.cpp | 16 +++++++- .../tst_qdeclarativedebugclient.cpp | 15 +++++++- .../tst_qdeclarativedebugservice.cpp | 16 +++++++- tools/configure/configureapp.cpp | 11 ++++++ 10 files changed, 114 insertions(+), 20 deletions(-) diff --git a/configure b/configure index b933ac1..da6fb0a 100755 --- a/configure +++ b/configure @@ -685,6 +685,7 @@ CFG_MULTIMEDIA=auto CFG_AUDIO_BACKEND=auto CFG_SVG=auto CFG_DECLARATIVE=auto +CFG_DECLARATIVE_DEBUG=yes CFG_WEBKIT=auto # (yes|no|auto) CFG_JAVASCRIPTCORE_JIT=auto @@ -1997,6 +1998,17 @@ while [ "$#" -gt 0 ]; do fi fi ;; + declarative-debug) + if [ "$VAL" = "yes" ]; then + CFG_DECLARATIVE_DEBUG="yes" + else + if [ "$VAL" = "no" ]; then + CFG_DECLARATIVE_DEBUG="no" + else + UNKNOWN_OPT=yes + fi + fi + ;; webkit) if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then CFG_WEBKIT="yes" @@ -3524,7 +3536,8 @@ Usage: $relconf [-h] [-prefix ] [-prefix-install] [-bindir ] [-libdir [-no-media-backend] [-media-backend] [-no-audio-backend] [-audio-backend] [-no-openssl] [-openssl] [-openssl-linked] [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-no-javascript-jit] [-javascript-jit] - [-no-script] [-script] [-no-scripttools] [-scripttools] [-no-declarative] [-declarative] + [-no-script] [-script] [-no-scripttools] [-scripttools] + [-no-declarative] [-declarative][-no-declarative-debug] [-declarative-debug] [additional platform specific options (see below)] @@ -3687,9 +3700,12 @@ fi -no-scripttools .... Do not build the QtScriptTools module. + -scripttools ....... Build the QtScriptTools module. - -no-declarative .....Do not build the declarative module. + -no-declarative ..... Do not build the declarative module. + -declarative ....... Build the declarative module. + -no-declarative-debug ..... Do not build the declarative debugging support. + + -declarative-debug ....... Build the declarative debugging support. + -platform target ... The operating system and compiler you are building on ($PLATFORM). @@ -7229,6 +7245,9 @@ fi if [ "$CFG_DECLARATIVE" = "yes" ]; then QT_CONFIG="$QT_CONFIG declarative" + if [ "$CFG_DECLARATIVE_DEBUG" = "no" ]; then + QCONFIG_FLAGS="$QCONFIG_FLAGS QDECLARATIVE_NO_DEBUG_PROTOCOL" + fi else QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DECLARATIVE" fi @@ -8197,6 +8216,7 @@ if [ "$CFG_WEBKIT" = "yes" ]; then fi fi echo "Declarative module ..... $CFG_DECLARATIVE" +echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG" echo "Support for S60 ........ $CFG_S60" echo "Symbian DEF files ...... $CFG_SYMBIAN_DEFFILES" echo "STL support ............ $CFG_STL" diff --git a/configure.exe b/configure.exe index 18c9004..e2f4331 100755 Binary files a/configure.exe and b/configure.exe differ diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 512e193..d3f399b 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -2091,7 +2091,8 @@ QStringList QCoreApplication::arguments() l1arg == "-stylesheet" || l1arg == "-widgetcount") ; - else if (l1arg.startsWith("-style=")) + else if (l1arg.startsWith("-style=") || + l1arg.startsWith("-qmljsdebugger=")) ; else if (l1arg == "-style" || l1arg == "-session" || diff --git a/src/declarative/debugger/qdeclarativedebugservice.cpp b/src/declarative/debugger/qdeclarativedebugservice.cpp index 1bbfcf4..1f2bf4f 100644 --- a/src/declarative/debugger/qdeclarativedebugservice.cpp +++ b/src/declarative/debugger/qdeclarativedebugservice.cpp @@ -49,6 +49,8 @@ #include #include +#include +#include QT_BEGIN_NAMESPACE @@ -147,24 +149,41 @@ bool QDeclarativeDebugServer::hasDebuggingClient() const QDeclarativeDebugServer *QDeclarativeDebugServer::instance() { - static bool envTested = false; + static bool commandLineTested = false; static QDeclarativeDebugServer *server = 0; - if (!envTested) { - envTested = true; - QByteArray env = qgetenv("QML_DEBUG_SERVER_PORT"); - QByteArray block = qgetenv("QML_DEBUG_SERVER_BLOCK"); + if (!commandLineTested) { + commandLineTested = true; +#ifndef QDECLARATIVE_NO_DEBUG_PROTOCOL + QApplicationPrivate *appD = static_cast(QObjectPrivate::get(qApp)); + // ### remove port definition when protocol is changed + int port = 0; + bool block = false; bool ok = false; - int port = env.toInt(&ok); - if (ok && port > 1024) { - server = new QDeclarativeDebugServer(port); - server->listen(); - if (!block.isEmpty()) { - server->waitForConnection(); + // format: qmljsdebugger=port:3768[,block] + if (!appD->qmljsDebugArguments.isEmpty()) { + + if (appD->qmljsDebugArguments.indexOf(QLatin1String("port:")) == 0) { + int separatorIndex = appD->qmljsDebugArguments.indexOf(QLatin1Char(',')); + port = appD->qmljsDebugArguments.mid(5, separatorIndex - 5).toInt(&ok); + } + block = appD->qmljsDebugArguments.contains(QLatin1String("block")); + + if (ok) { + server = new QDeclarativeDebugServer(port); + server->listen(); + if (block) { + server->waitForConnection(); + } + } else { + qWarning(QString("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " + "Format is -qmljsdebugger=port:[,block]").arg( + appD->qmljsDebugArguments).toAscii().constData()); } } +#endif } return server; diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 2fd2f46..43d5772 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -494,6 +494,7 @@ bool QApplicationPrivate::fade_tooltip = false; bool QApplicationPrivate::animate_toolbox = false; bool QApplicationPrivate::widgetCount = false; bool QApplicationPrivate::load_testability = false; +QString QApplicationPrivate::qmljsDebugArguments; #ifdef QT_KEYPAD_NAVIGATION # ifdef Q_OS_SYMBIAN Qt::NavigationMode QApplicationPrivate::navigationMode = Qt::NavigationModeKeypadDirectional; @@ -565,6 +566,8 @@ void QApplicationPrivate::process_cmdline() QString s; if (arg == "-qdevel" || arg == "-qdebug") { // obsolete argument + } else if (arg.indexOf("-qmljsdebugger=", 0) != -1) { + qmljsDebugArguments = QString::fromLocal8Bit(arg.right(arg.length() - 15)); } else if (arg.indexOf("-style=", 0) != -1) { s = QString::fromLocal8Bit(arg.right(arg.length() - 7).toLower()); } else if (arg == "-style" && i < argc-1) { @@ -670,6 +673,9 @@ void QApplicationPrivate::process_cmdline() Qt::RightToLeft \o -graphicssystem, sets the backend to be used for on-screen widgets and QPixmaps. Available options are \c{raster} and \c{opengl}. + \o -qmljsdebugger=, activates the QML/JS debugger with a specified port. + The value must be of format port:1234[,block], where block is optional + and will make the application wait until a debugger connects to it. \endlist The X11 version of Qt supports some traditional X11 command line options: diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h index 8dc16e0..aa3a6d5 100644 --- a/src/gui/kernel/qapplication_p.h +++ b/src/gui/kernel/qapplication_p.h @@ -446,6 +446,8 @@ public: static bool animate_toolbox; static bool widgetCount; // Coupled with -widgetcount switch static bool load_testability; // Coupled with -testability switch + static QString qmljsDebugArguments; // a string containing arguments for js/qml debugging. + #ifdef Q_WS_MAC static bool native_modal_dialog_active; #endif diff --git a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp index 20ccccb..adba190 100644 --- a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp +++ b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp @@ -279,7 +279,7 @@ void tst_QDeclarativeDebug::initTestCase() qRegisterMetaType(); QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 3768..."); - qputenv("QML_DEBUG_SERVER_PORT", "3768"); + m_engine = new QDeclarativeEngine(this); QList qml; @@ -891,6 +891,18 @@ void tst_QDeclarativeDebug::tst_QDeclarativeDebugPropertyReference() compareProperties(r, ref); } -QTEST_MAIN(tst_QDeclarativeDebug) +int main(int argc, char *argv[]) +{ + int _argc = argc + 1; + char **_argv = new char*[_argc]; + for (int i = 0; i < argc; ++i) + _argv[i] = argv[i]; + _argv[_argc - 1] = "-qmljsdebugger=port:3768"; + + QApplication app(_argc, _argv); + tst_QDeclarativeDebug tc; + return QTest::qExec(&tc, _argc, _argv); + delete _argv; +} #include "tst_qdeclarativedebug.moc" diff --git a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp index a19c2c2..7db0e60 100644 --- a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp +++ b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp @@ -76,7 +76,6 @@ void tst_QDeclarativeDebugClient::initTestCase() { QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 3770..."); - qputenv("QML_DEBUG_SERVER_PORT", "3770"); new QDeclarativeEngine(this); m_conn = new QDeclarativeDebugConnection(this); @@ -151,7 +150,19 @@ void tst_QDeclarativeDebugClient::sendMessage() QCOMPARE(resp, msg); } -QTEST_MAIN(tst_QDeclarativeDebugClient) +int main(int argc, char *argv[]) +{ + int _argc = argc + 1; + char **_argv = new char*[_argc]; + for (int i = 0; i < argc; ++i) + _argv[i] = argv[i]; + _argv[_argc - 1] = "-qmljsdebugger=port:3770"; + + QApplication app(_argc, _argv); + tst_QDeclarativeDebugClient tc; + return QTest::qExec(&tc, _argc, _argv); + delete _argv; +} #include "tst_qdeclarativedebugclient.moc" diff --git a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp index 9ebbbaf..4683199 100644 --- a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp +++ b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp @@ -77,7 +77,6 @@ private slots: void tst_QDeclarativeDebugService::initTestCase() { QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 3769..."); - qputenv("QML_DEBUG_SERVER_PORT", "3769"); new QDeclarativeEngine(this); m_conn = new QDeclarativeDebugConnection(this); @@ -184,6 +183,19 @@ void tst_QDeclarativeDebugService::objectToString() delete obj; } -QTEST_MAIN(tst_QDeclarativeDebugService) + +int main(int argc, char *argv[]) +{ + int _argc = argc + 1; + char **_argv = new char*[_argc]; + for (int i = 0; i < argc; ++i) + _argv[i] = argv[i]; + _argv[_argc - 1] = "-qmljsdebugger=port:3769"; + + QApplication app(_argc, _argv); + tst_QDeclarativeDebugService tc; + return QTest::qExec(&tc, _argc, _argv); + delete _argv; +} #include "tst_qdeclarativedebugservice.moc" diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 6e66742..a2c7fe9 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -279,6 +279,7 @@ Configure::Configure(int& argc, char** argv) dictionary[ "DIRECTSHOW" ] = "no"; dictionary[ "WEBKIT" ] = "auto"; dictionary[ "DECLARATIVE" ] = "auto"; + dictionary[ "DECLARATIVE_DEBUG" ]= "yes"; dictionary[ "PLUGIN_MANIFESTS" ] = "yes"; QString version; @@ -961,6 +962,10 @@ void Configure::parseCmdLine() dictionary[ "DECLARATIVE" ] = "no"; } else if (configCmdLine.at(i) == "-declarative") { dictionary[ "DECLARATIVE" ] = "yes"; + } else if (configCmdLine.at(i) == "-no-declarative-debug") { + dictionary[ "DECLARATIVE_DEBUG" ] = "no"; + } else if (configCmdLine.at(i) == "-declarative-debug") { + dictionary[ "DECLARATIVE_DEBUG" ] = "yes"; } else if (configCmdLine.at(i) == "-no-plugin-manifests") { dictionary[ "PLUGIN_MANIFESTS" ] = "no"; } else if (configCmdLine.at(i) == "-plugin-manifests") { @@ -1836,6 +1841,8 @@ bool Configure::displayHelp() desc("SCRIPTTOOLS", "yes", "-scripttools", "Build the QtScriptTools module."); desc("DECLARATIVE", "no", "-no-declarative", "Do not build the declarative module"); desc("DECLARATIVE", "yes", "-declarative", "Build the declarative module"); + desc("DECLARATIVE_DEBUG", "no", "-no-declarative-debug", "Do not build the declarative debugging support"); + desc("DECLARATIVE_DEBUG", "yes", "-declarative-debug", "Build the declarative debugging support"); desc( "-arch ", "Specify an architecture.\n" "Available values for :"); @@ -2273,6 +2280,8 @@ void Configure::autoDetection() dictionary["WEBKIT"] = checkAvailability("WEBKIT") ? "yes" : "no"; if (dictionary["DECLARATIVE"] == "auto") dictionary["DECLARATIVE"] = dictionary["SCRIPT"] == "yes" ? "yes" : "no"; + if (dictionary["DECLARATIVE_DEBUG"] == "auto") + dictionary["DECLARATIVE_DEBUG"] = dictionary["DECLARATIVE"] == "yes" ? "yes" : "no"; if (dictionary["AUDIO_BACKEND"] == "auto") dictionary["AUDIO_BACKEND"] = checkAvailability("AUDIO_BACKEND") ? "yes" : "no"; if (dictionary["WMSDK"] == "auto") @@ -3101,6 +3110,7 @@ void Configure::generateConfigfiles() if (dictionary["IPV6"] == "no") qconfigList += "QT_NO_IPV6"; if (dictionary["WEBKIT"] == "no") qconfigList += "QT_NO_WEBKIT"; if (dictionary["DECLARATIVE"] == "no") qconfigList += "QT_NO_DECLARATIVE"; + if (dictionary["DECLARATIVE_DEBUG"] == "no") qconfigList += "QDECLARATIVE_NO_DEBUG_PROTOCOL"; if (dictionary["PHONON"] == "no") qconfigList += "QT_NO_PHONON"; if (dictionary["MULTIMEDIA"] == "no") qconfigList += "QT_NO_MULTIMEDIA"; if (dictionary["XMLPATTERNS"] == "no") qconfigList += "QT_NO_XMLPATTERNS"; @@ -3398,6 +3408,7 @@ void Configure::displayConfig() cout << "QtMultimedia support........" << dictionary[ "MULTIMEDIA" ] << endl; cout << "WebKit support.............." << dictionary[ "WEBKIT" ] << endl; cout << "Declarative support........." << dictionary[ "DECLARATIVE" ] << endl; + cout << "Declarative debugging......." << dictionary[ "DECLARATIVE_DEBUG" ] << endl; cout << "QtScript support............" << dictionary[ "SCRIPT" ] << endl; cout << "QtScriptTools support......." << dictionary[ "SCRIPTTOOLS" ] << endl; cout << "Graphics System............." << dictionary[ "GRAPHICS_SYSTEM" ] << endl; -- cgit v0.12 From 5399d494eecb3286e0b3d14204607eae08937e72 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 20 Sep 2010 09:17:20 +0200 Subject: Fix Symbian def file for a9e5329168 Reviewed-by: Thomas Hartmann (cherry picked from commit a371562d870abb421682dcf83d447e5d5c9e82fa) --- src/s60installs/eabi/QtGuiu.def | 1 + 1 file changed, 1 insertion(+) diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index 47e893b..e6b2555 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -12094,4 +12094,5 @@ EXPORTS _ZN18QTapAndHoldGesture7timeoutEv @ 12093 NONAME _ZN20QGraphicsItemPrivate26childrenBoundingRectHelperEP10QTransformP6QRectFb @ 12094 NONAME ABSENT _ZN20QGraphicsItemPrivate14children_clearEP24QDeclarativeListPropertyI15QGraphicsObjectE @ 12095 NONAME + _ZN19QApplicationPrivate19qmljsDebugArgumentsE @ 12096 NONAME DATA 4 -- cgit v0.12 From 223ef193ff9d333cbd43f8c10e2e7d7612748180 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 20 Sep 2010 17:25:01 +1000 Subject: Update QtGui def files (cherry picked from commit 36705197479337ccf341a4c39a6e5f44d3fb2322) --- src/s60installs/bwins/QtGuiu.def | 10 ++++++++-- src/s60installs/eabi/QtGuiu.def | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def index f9e88d7..7805dae 100644 --- a/src/s60installs/bwins/QtGuiu.def +++ b/src/s60installs/bwins/QtGuiu.def @@ -2645,7 +2645,7 @@ EXPORTS ?childItems@QGraphicsItem@@QBE?AV?$QList@PAVQGraphicsItem@@@@XZ @ 2644 NONAME ; class QList QGraphicsItem::childItems(void) const ?children@QGraphicsItem@@QBE?AV?$QList@PAVQGraphicsItem@@@@XZ @ 2645 NONAME ; class QList QGraphicsItem::children(void) const ?childrenBoundingRect@QGraphicsItem@@QBE?AVQRectF@@XZ @ 2646 NONAME ; class QRectF QGraphicsItem::childrenBoundingRect(void) const - ?childrenBoundingRectHelper@QGraphicsItemPrivate@@QAEXPAVQTransform@@PAVQRectF@@@Z @ 2647 NONAME ; void QGraphicsItemPrivate::childrenBoundingRectHelper(class QTransform *, class QRectF *) + ?childrenBoundingRectHelper@QGraphicsItemPrivate@@QAEXPAVQTransform@@PAVQRectF@@@Z @ 2647 NONAME ABSENT ; void QGraphicsItemPrivate::childrenBoundingRectHelper(class QTransform *, class QRectF *) ?childrenCheckState@QTreeWidgetItem@@ABE?AVQVariant@@H@Z @ 2648 NONAME ; class QVariant QTreeWidgetItem::childrenCheckState(int) const ?childrenClippedToShape@QGraphicsItemPrivate@@QBE_NXZ @ 2649 NONAME ; bool QGraphicsItemPrivate::childrenClippedToShape(void) const ?childrenCollapsible@QSplitter@@QBE_NXZ @ 2650 NONAME ; bool QSplitter::childrenCollapsible(void) const @@ -4078,7 +4078,7 @@ EXPORTS ?editorEvent@QAbstractItemDelegate@@UAE_NPAVQEvent@@PAVQAbstractItemModel@@ABVQStyleOptionViewItem@@ABVQModelIndex@@@Z @ 4077 NONAME ; bool QAbstractItemDelegate::editorEvent(class QEvent *, class QAbstractItemModel *, class QStyleOptionViewItem const &, class QModelIndex const &) ?editorEvent@QItemDelegate@@MAE_NPAVQEvent@@PAVQAbstractItemModel@@ABVQStyleOptionViewItem@@ABVQModelIndex@@@Z @ 4078 NONAME ; bool QItemDelegate::editorEvent(class QEvent *, class QAbstractItemModel *, class QStyleOptionViewItem const &, class QModelIndex const &) ?editorEvent@QStyledItemDelegate@@MAE_NPAVQEvent@@PAVQAbstractItemModel@@ABVQStyleOptionViewItem@@ABVQModelIndex@@@Z @ 4079 NONAME ; bool QStyledItemDelegate::editorEvent(class QEvent *, class QAbstractItemModel *, class QStyleOptionViewItem const &, class QModelIndex const &) - ?effectiveBoundingRect@QGraphicsItemPrivate@@QBE?AVQRectF@@XZ @ 4080 NONAME ; class QRectF QGraphicsItemPrivate::effectiveBoundingRect(void) const + ?effectiveBoundingRect@QGraphicsItemPrivate@@QBE?AVQRectF@@XZ @ 4080 NONAME ABSENT ; class QRectF QGraphicsItemPrivate::effectiveBoundingRect(void) const ?effectiveOpacity@QGraphicsItem@@QBEMXZ @ 4081 NONAME ; float QGraphicsItem::effectiveOpacity(void) const ?effectiveOpacity@QGraphicsItemPrivate@@QBEMXZ @ 4082 NONAME ; float QGraphicsItemPrivate::effectiveOpacity(void) const ?effectiveRectFor@QWidgetPrivate@@QBE?AVQRect@@ABV2@@Z @ 4083 NONAME ; class QRect QWidgetPrivate::effectiveRectFor(class QRect const &) const @@ -12886,4 +12886,10 @@ EXPORTS ?flushDetachedPixmaps@QPixmapCache@@SAXXZ @ 12885 NONAME ; void QPixmapCache::flushDetachedPixmaps(void) ?replayLastMouseEvent@QGraphicsViewPrivate@@QAEXXZ @ 12886 NONAME ; void QGraphicsViewPrivate::replayLastMouseEvent(void) ?children_clear@QGraphicsItemPrivate@@SAXPAV?$QDeclarativeListProperty@VQGraphicsObject@@@@@Z @ 12887 NONAME ; void QGraphicsItemPrivate::children_clear(class QDeclarativeListProperty *) + ?timeout@QTapAndHoldGesture@@SAHXZ @ 12888 NONAME ; int QTapAndHoldGesture::timeout(void) + ?lastRightBearing@QFontEngine@@IAE?AUQFixed@@ABUQGlyphLayout@@_N@Z @ 12889 NONAME ; struct QFixed QFontEngine::lastRightBearing(struct QGlyphLayout const &, bool) + ?childrenBoundingRectHelper@QGraphicsItemPrivate@@QAEXPAVQTransform@@PAVQRectF@@PAVQGraphicsItem@@@Z @ 12890 NONAME ; void QGraphicsItemPrivate::childrenBoundingRectHelper(class QTransform *, class QRectF *, class QGraphicsItem *) + ?setTimeout@QTapAndHoldGesture@@SAXH@Z @ 12891 NONAME ; void QTapAndHoldGesture::setTimeout(int) + ?qmljsDebugArguments@QApplicationPrivate@@2VQString@@A @ 12892 NONAME ; class QString QApplicationPrivate::qmljsDebugArguments + ?effectiveBoundingRect@QGraphicsItemPrivate@@QBE?AVQRectF@@PAVQGraphicsItem@@@Z @ 12893 NONAME ; class QRectF QGraphicsItemPrivate::effectiveBoundingRect(class QGraphicsItem *) const diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index e6b2555..4442d33 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -12095,4 +12095,6 @@ EXPORTS _ZN20QGraphicsItemPrivate26childrenBoundingRectHelperEP10QTransformP6QRectFb @ 12094 NONAME ABSENT _ZN20QGraphicsItemPrivate14children_clearEP24QDeclarativeListPropertyI15QGraphicsObjectE @ 12095 NONAME _ZN19QApplicationPrivate19qmljsDebugArgumentsE @ 12096 NONAME DATA 4 + _ZN20QGraphicsItemPrivate26childrenBoundingRectHelperEP10QTransformP6QRectFP13QGraphicsItem @ 12097 NONAME + _ZNK20QGraphicsItemPrivate21effectiveBoundingRectEP13QGraphicsItem @ 12098 NONAME -- cgit v0.12 From 50ab865141b97b91ebbeeae9445a4296f378882a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Tue, 21 Sep 2010 17:08:09 +0200 Subject: Fixed drawing a large number of glyphs with the same font under GL. Our glyph caching system doesn't take GL texture size limitation into account, and assumes you can create an infinitely large texture. On top of that, the cache will never create a cache that is wider than 256, or QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH, which means we'll hit the texture size limit even faster. With this patch the entire texture is utilized. However, to fix in properly we need to support having multiple texture for each font engine. That will be fixed shortly (see task QTBUG-13784). Task-number: QT-3971 Reviewed-by: Eskil (cherry picked from commit eb2926a2f9607e985b8bca54346e6fdf91343247) --- src/gui/painting/qtextureglyphcache.cpp | 20 ++++++++++++-------- src/gui/painting/qtextureglyphcache_p.h | 6 ++++++ .../gl2paintengineex/qtextureglyphcache_gl.cpp | 11 ++++++++++- .../gl2paintengineex/qtextureglyphcache_gl_p.h | 2 ++ 4 files changed, 30 insertions(+), 9 deletions(-) diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp index 631a9cf..b609f7b 100644 --- a/src/gui/painting/qtextureglyphcache.cpp +++ b/src/gui/painting/qtextureglyphcache.cpp @@ -47,10 +47,6 @@ #include "private/qnativeimage_p.h" #include "private/qfontengine_ft_p.h" -#ifndef QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH -#define QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH 256 -#endif - QT_BEGIN_NAMESPACE // #define CACHE_DEBUG @@ -137,10 +133,18 @@ void QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const m_currentRowHeight = qMax(m_currentRowHeight, c.h + margin * 2); if (m_cx + c.w > m_w) { - // no room on the current line, start new glyph strip - m_cx = 0; - m_cy += m_currentRowHeight + paddingDoubled; - m_currentRowHeight = 0; // New row + int new_width = m_w*2; + while (new_width < m_cx + c.w) + new_width *= 2; + if (new_width <= maxTextureWidth()) { + resizeTextureData(new_width, m_h); + m_w = new_width; + } else { + // no room on the current line, start new glyph strip + m_cx = 0; + m_cy += m_currentRowHeight + paddingDoubled; + m_currentRowHeight = 0; // New row + } } if (m_cy + c.h > m_h) { int new_height = m_h*2; diff --git a/src/gui/painting/qtextureglyphcache_p.h b/src/gui/painting/qtextureglyphcache_p.h index a818978..e6d2b22 100644 --- a/src/gui/painting/qtextureglyphcache_p.h +++ b/src/gui/painting/qtextureglyphcache_p.h @@ -64,6 +64,10 @@ # undef m_type #endif +#ifndef QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH +#define QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH 256 +#endif + struct glyph_metrics_t; typedef unsigned int glyph_t; @@ -113,6 +117,8 @@ public: QHash coords; QImage textureMapForGlyph(glyph_t g) const; + virtual int maxTextureWidth() const { return QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH; } + virtual int maxTextureHeight() const { return 32768; } protected: QFontEngine *m_current_fontengine; diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp index 410cf21..f353995 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp @@ -129,7 +129,7 @@ void QGLTextureGlyphCache::resizeTextureData(int width, int height) GLuint oldTexture = m_texture; createTextureData(width, height); - + if (ctx->d_ptr->workaround_brokenFBOReadBack) { QImageTextureGlyphCache::resizeTextureData(width, height); Q_ASSERT(image().depth() == 8); @@ -281,4 +281,13 @@ int QGLTextureGlyphCache::glyphPadding() const return 1; } +int QGLTextureGlyphCache::maxTextureWidth() const +{ + return ctx->d_ptr->maxTextureSize(); +} + +int QGLTextureGlyphCache::maxTextureHeight() const +{ + return ctx->d_ptr->maxTextureSize(); +} QT_END_NAMESPACE diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h index 6bcd655..eb3693c 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h @@ -73,6 +73,8 @@ public: virtual void resizeTextureData(int width, int height); virtual void fillTexture(const Coord &c, glyph_t glyph); virtual int glyphPadding() const; + virtual int maxTextureWidth() const; + virtual int maxTextureHeight() const; inline GLuint texture() const { return m_texture; } -- cgit v0.12 From c025fda36e767a74cd50df9521819dbdbc1625d8 Mon Sep 17 00:00:00 2001 From: Misha Tyutyunik Date: Wed, 22 Sep 2010 10:06:01 +0200 Subject: QNAM: Use QFileNetworkReply for qrc:/ URL schema Resources do not need network access and can be quicker loaded with QFileNetworkReply. Reviewed-by: Markus Goetz (cherry picked from commit 5120dfec47475dd37f51df4dda9a4ef8494036ab) --- src/network/access/qfilenetworkreply.cpp | 5 ++++- src/network/access/qnetworkaccessmanager.cpp | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/network/access/qfilenetworkreply.cpp b/src/network/access/qfilenetworkreply.cpp index 4ac9a8c..00bd29e 100644 --- a/src/network/access/qfilenetworkreply.cpp +++ b/src/network/access/qfilenetworkreply.cpp @@ -97,7 +97,10 @@ QFileNetworkReply::QFileNetworkReply(QObject *parent, const QNetworkRequest &req QString fileName = url.toLocalFile(); if (fileName.isEmpty()) { - fileName = url.toString(QUrl::RemoveAuthority | QUrl::RemoveFragment | QUrl::RemoveQuery); + if (url.scheme() == QLatin1String("qrc")) + fileName = QLatin1Char(':') + url.path(); + else + fileName = url.toString(QUrl::RemoveAuthority | QUrl::RemoveFragment | QUrl::RemoveQuery); } QFileInfo fi(fileName); diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index b35c318..a637474 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -946,10 +946,10 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera // fast path for GET on file:// URLs // Also if the scheme is empty we consider it a file. - // The QNetworkAccessFileBackend will right now only be used - // for PUT or qrc:// + // The QNetworkAccessFileBackend will right now only be used for PUT if ((op == QNetworkAccessManager::GetOperation || op == QNetworkAccessManager::HeadOperation) && (req.url().scheme() == QLatin1String("file") + || req.url().scheme() == QLatin1String("qrc") || req.url().scheme().isEmpty())) { return new QFileNetworkReply(this, req, op); } -- cgit v0.12 From c4d153c5a5adb78ae577a8c9484d661e39dc6125 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 21 Sep 2010 16:51:15 +0200 Subject: qmake: fix quoting of moc calls Task-number: QTBUG-13782 Reviewed-by: ossi (cherry picked from commit 36fc9e830b828b69c4df775c68c07c25c9bab4cf) --- mkspecs/features/moc.prf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf index abda78f..15e7fd9 100644 --- a/mkspecs/features/moc.prf +++ b/mkspecs/features/moc.prf @@ -45,10 +45,10 @@ defineReplace(mocCmd) { if(contains(TEMPLATE, "vc.*")|contains(TEMPLATE_PREFIX, "vc")) { RET += $$mocinclude.commands } - RET += $$QMAKE_MOC $(DEFINES) @$$WIN_INCLUDETEMP $$join(QMAKE_COMPILER_DEFINES, " -D", -D) $$1 -o $$2 + RET += $$QMAKE_MOC $(DEFINES) @$$WIN_INCLUDETEMP $$join(QMAKE_COMPILER_DEFINES, " -D", -D) \"$$1\" -o $$2 return($$RET) } - return($$QMAKE_MOC $(DEFINES) $(INCPATH) $$join(QMAKE_COMPILER_DEFINES, " -D", -D) $$1 -o $$2) + return($$QMAKE_MOC $(DEFINES) $(INCPATH) $$join(QMAKE_COMPILER_DEFINES, " -D", -D) \"$$1\" -o $$2) } #moc headers -- cgit v0.12 From 28bd899cdcc7dd17be09feb20856b09af2639c0b Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Thu, 23 Sep 2010 12:46:33 +1000 Subject: Rebuild configure.exe. --- configure.exe | Bin 1402368 -> 1325568 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/configure.exe b/configure.exe index e2f4331..c36256e 100755 Binary files a/configure.exe and b/configure.exe differ -- cgit v0.12 From 6d524881d5f1125d7396b9a6e23ed65ce0a5c5eb Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Tue, 21 Sep 2010 16:25:48 +1000 Subject: Fix a crash in QDeclarativeVisualDataModel Task-number: QTBUG-13754 Reviewed-by: Martin Jones (cherry picked from commit 46e49547f8e4614cd504b0af0d52d4e2768b57c3) --- .../graphicsitems/qdeclarativevisualitemmodel.cpp | 6 +++--- .../qdeclarativelistmodel/data/multipleroles.qml | 25 ++++++++++++++++++++++ .../tst_qdeclarativelistmodel.cpp | 16 ++++++++++++++ 3 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativelistmodel/data/multipleroles.qml diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index a70886e..01cd652 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -621,7 +621,7 @@ QDeclarativeVisualDataModelParts::QDeclarativeVisualDataModelParts(QDeclarativeV QDeclarativeVisualDataModelPrivate::QDeclarativeVisualDataModelPrivate(QDeclarativeContext *ctxt) : m_listModelInterface(0), m_abstractItemModel(0), m_visualItemModel(0), m_delegate(0) -, m_context(ctxt), m_parts(0), m_delegateDataType(0), m_metaDataCreated(false) +, m_context(ctxt), m_modelDataPropId(-1), m_parts(0), m_delegateDataType(0), m_metaDataCreated(false) , m_metaDataCacheable(false), m_delegateValidated(false), m_completePending(false), m_listAccessor(0) { } @@ -1202,11 +1202,11 @@ void QDeclarativeVisualDataModel::_q_itemsChanged(int index, int count, qmlInfo(this) << "Changing role not present in item: " << roleName; } } - if (roles.count() == 1) { + if (d->m_roles.count() == 1) { // Handle the modelData role we add if there is just one role. int propId = data->modelDataPropertyId(); if (data->hasValue(propId)) { - int role = roles.at(0); + int role = d->m_roles.at(0); if (d->m_listModelInterface) { data->setValue(propId, d->m_listModelInterface->data(idx, QList() << role).value(role)); } else if (d->m_abstractItemModel) { diff --git a/tests/auto/declarative/qdeclarativelistmodel/data/multipleroles.qml b/tests/auto/declarative/qdeclarativelistmodel/data/multipleroles.qml new file mode 100644 index 0000000..b8f2f32 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelistmodel/data/multipleroles.qml @@ -0,0 +1,25 @@ +import Qt 4.7 +ListView { + width: 100 + height: 250 + delegate: Rectangle { + width: 100 + height: 50 + color: black ? "black": "white" + } + model: ListModel { + objectName: "listModel" + ListElement { + black: false + rounded: false + } + ListElement { + black: true + rounded: false + } + ListElement { + black: true + rounded: false + } + } +} \ No newline at end of file diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp index f456778..31cb545 100644 --- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp +++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp @@ -98,6 +98,7 @@ private slots: void get_worker_data(); void get_nested(); void get_nested_data(); + void crash_model_with_multiple_roles(); }; int tst_qdeclarativelistmodel::roleFromName(const QDeclarativeListModel *model, const QString &roleName) { @@ -886,6 +887,21 @@ void tst_qdeclarativelistmodel::get_nested_data() get_data(); } +//QTBUG-13754 +void tst_qdeclarativelistmodel::crash_model_with_multiple_roles() +{ + QDeclarativeEngine eng; + QDeclarativeComponent component(&eng, QUrl::fromLocalFile(SRCDIR "/data/multipleroles.qml")); + QObject *rootItem = component.create(); + QVERIFY(component.errorString().isEmpty()); + QVERIFY(rootItem != 0); + QDeclarativeListModel *model = rootItem->findChild("listModel"); + QVERIFY(model != 0); + + // used to cause a crash in QDeclarativeVisualDataModel + model->setProperty(0, "black", true); +} + QTEST_MAIN(tst_qdeclarativelistmodel) #include "tst_qdeclarativelistmodel.moc" -- cgit v0.12 From 30848f7eaac221e9c8a3e0c73ce268c12ae801e5 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Fri, 17 Sep 2010 15:34:44 +1000 Subject: Autotest and small fix for QDeclarativeFontLoader. (cherry picked from commit eef26bc8521da62db0dced6796eceb7c27f64160) --- src/declarative/util/qdeclarativefontloader.cpp | 6 +-- .../qdeclarativefontloader/data/daniel.ttf | Bin 0 -> 51984 bytes .../tst_qdeclarativefontloader.cpp | 42 +++++++++++++++++++++ 3 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativefontloader/data/daniel.ttf diff --git a/src/declarative/util/qdeclarativefontloader.cpp b/src/declarative/util/qdeclarativefontloader.cpp index 91588b7..6879494 100644 --- a/src/declarative/util/qdeclarativefontloader.cpp +++ b/src/declarative/util/qdeclarativefontloader.cpp @@ -210,11 +210,7 @@ void QDeclarativeFontLoader::setSource(const QUrl &url) updateFontInfo(QString(), Error); } } else { - QDeclarativeFontObject *fo = d->fonts[d->url]; - d->name = QFontDatabase::applicationFontFamilies(fo->id).at(0); - emit nameChanged(); - d->status = QDeclarativeFontLoader::Ready; - emit statusChanged(); + updateFontInfo(QFontDatabase::applicationFontFamilies(d->fonts[d->url]->id).at(0), Ready); } } else #endif diff --git a/tests/auto/declarative/qdeclarativefontloader/data/daniel.ttf b/tests/auto/declarative/qdeclarativefontloader/data/daniel.ttf new file mode 100644 index 0000000..aae50d5 Binary files /dev/null and b/tests/auto/declarative/qdeclarativefontloader/data/daniel.ttf differ diff --git a/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp b/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp index ae23017..8765426 100644 --- a/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp +++ b/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp @@ -39,8 +39,10 @@ ** ****************************************************************************/ #include +#include #include #include +#include #include #include "../../../shared/util.h" #include "../shared/testhttpserver.h" @@ -67,6 +69,7 @@ private slots: void webFont(); void redirWebFont(); void failWebFont(); + void changeFont(); private slots: @@ -181,6 +184,45 @@ void tst_qdeclarativefontloader::failWebFont() QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Error); } +void tst_qdeclarativefontloader::changeFont() +{ + QString componentStr = "import Qt 4.7\nFontLoader { source: font }"; + QDeclarativeContext *ctxt = engine.rootContext(); + ctxt->setContextProperty("font", QUrl::fromLocalFile(SRCDIR "/data/tarzeau_ocr_a.ttf")); + QDeclarativeComponent component(&engine); + component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); + QDeclarativeFontLoader *fontObject = qobject_cast(component.create()); + + QVERIFY(fontObject != 0); + + QSignalSpy nameSpy(fontObject, SIGNAL(nameChanged())); + QSignalSpy statusSpy(fontObject, SIGNAL(statusChanged())); + + QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Ready); + QCOMPARE(nameSpy.count(), 0); + QCOMPARE(statusSpy.count(), 0); + QTRY_COMPARE(fontObject->name(), QString("OCRA")); + + ctxt->setContextProperty("font", "http://localhost:14448/daniel.ttf"); + QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Loading); + QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Ready); + QCOMPARE(nameSpy.count(), 1); + QCOMPARE(statusSpy.count(), 2); + QTRY_COMPARE(fontObject->name(), QString("Daniel")); + + ctxt->setContextProperty("font", QUrl::fromLocalFile(SRCDIR "/data/tarzeau_ocr_a.ttf")); + QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Ready); + QCOMPARE(nameSpy.count(), 2); + QCOMPARE(statusSpy.count(), 2); + QTRY_COMPARE(fontObject->name(), QString("OCRA")); + + ctxt->setContextProperty("font", "http://localhost:14448/daniel.ttf"); + QTRY_VERIFY(fontObject->status() == QDeclarativeFontLoader::Ready); + QCOMPARE(nameSpy.count(), 3); + QCOMPARE(statusSpy.count(), 2); + QTRY_COMPARE(fontObject->name(), QString("Daniel")); +} + QTEST_MAIN(tst_qdeclarativefontloader) #include "tst_qdeclarativefontloader.moc" -- cgit v0.12 From 1d6298e369a96a2ed1d2af5baa6546bce9b304b6 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Fri, 17 Sep 2010 16:34:50 +1000 Subject: Fix example after changes to font.letterSpacing. (cherry picked from commit 5372b313127302d94c748732052dd62d0e38a1cd) --- examples/declarative/text/fonts/hello.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/declarative/text/fonts/hello.qml b/examples/declarative/text/fonts/hello.qml index a396ff3..60bd919 100644 --- a/examples/declarative/text/fonts/hello.qml +++ b/examples/declarative/text/fonts/hello.qml @@ -56,10 +56,11 @@ Rectangle { color: "white" text: "Hello world!" font.pixelSize: 60 + smooth: true SequentialAnimation on font.letterSpacing { loops: Animation.Infinite; - NumberAnimation { from: 100; to: 300; easing.type: Easing.InQuad; duration: 3000 } + NumberAnimation { from: 0; to: 150; easing.type: Easing.InQuad; duration: 3000 } ScriptAction { script: { container.y = (screen.height / 4) + (Math.random() * screen.height / 2) -- cgit v0.12 From 3e9fd27db4e97de6ba9b7d045ceb48c35e5cefac Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 20 Sep 2010 17:25:27 +1000 Subject: Update QtDeclarative def files (cherry picked from commit 90431a96ca0558ac82ccd588faf1b0aed55abbfe) --- src/s60installs/bwins/QtDeclarativeu.def | 5 ++++- src/s60installs/eabi/QtDeclarativeu.def | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def index 0193381..cf2f325 100644 --- a/src/s60installs/bwins/QtDeclarativeu.def +++ b/src/s60installs/bwins/QtDeclarativeu.def @@ -215,7 +215,7 @@ EXPORTS ?clear@QDeclarativeListReference@@QBE_NXZ @ 214 NONAME ; bool QDeclarativeListReference::clear(void) const ?parentChanged@QDeclarativeItem@@IAEXPAV1@@Z @ 215 NONAME ; void QDeclarativeItem::parentChanged(class QDeclarativeItem *) ?columnNumber@QDeclarativeDebugFileReference@@QBEHXZ @ 216 NONAME ; int QDeclarativeDebugFileReference::columnNumber(void) const - ??0QDeclarativeListModel@@AAE@_NPAVQObject@@@Z @ 217 NONAME ; QDeclarativeListModel::QDeclarativeListModel(bool, class QObject *) + ??0QDeclarativeListModel@@AAE@_NPAVQObject@@@Z @ 217 NONAME ABSENT ; QDeclarativeListModel::QDeclarativeListModel(bool, class QObject *) ?apply@QDeclarativeState@@QAEXPAVQDeclarativeStateGroup@@PAVQDeclarativeTransition@@PAV1@@Z @ 218 NONAME ; void QDeclarativeState::apply(class QDeclarativeStateGroup *, class QDeclarativeTransition *, class QDeclarativeState *) ?isValid@QDeclarativeDomProperty@@QBE_NXZ @ 219 NONAME ; bool QDeclarativeDomProperty::isValid(void) const ?trUtf8@QDeclarativeDebugExpressionQuery@@SA?AVQString@@PBD0@Z @ 220 NONAME ; class QString QDeclarativeDebugExpressionQuery::trUtf8(char const *, char const *) @@ -1712,4 +1712,7 @@ EXPORTS ?setScript@QDeclarativeScriptAction@@QAEXABVQDeclarativeScriptString@@@Z @ 1711 NONAME ; void QDeclarativeScriptAction::setScript(class QDeclarativeScriptString const &) ?metaObject@QDeclarativeScriptAction@@UBEPBUQMetaObject@@XZ @ 1712 NONAME ; struct QMetaObject const * QDeclarativeScriptAction::metaObject(void) const ?getPointer@QDeclarativeAbstractBinding@@SA?AV?$QWeakPointer@VQDeclarativeAbstractBinding@@@@PAV1@@Z @ 1713 NONAME ; class QWeakPointer QDeclarativeAbstractBinding::getPointer(class QDeclarativeAbstractBinding *) + ??0QDeclarativeListModel@@AAE@PBV0@PAVQDeclarativeListModelWorkerAgent@@@Z @ 1714 NONAME ; QDeclarativeListModel::QDeclarativeListModel(class QDeclarativeListModel const *, class QDeclarativeListModelWorkerAgent *) + ?inWorkerThread@QDeclarativeListModel@@ABE_NXZ @ 1715 NONAME ; bool QDeclarativeListModel::inWorkerThread(void) const + ?canMove@QDeclarativeListModel@@ABE_NHHH@Z @ 1716 NONAME ; bool QDeclarativeListModel::canMove(int, int, int) const diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def index 2016ec7..11dee4d 100644 --- a/src/s60installs/eabi/QtDeclarativeu.def +++ b/src/s60installs/eabi/QtDeclarativeu.def @@ -552,9 +552,9 @@ EXPORTS _ZN21QDeclarativeListModel6removeEi @ 551 NONAME _ZN21QDeclarativeListModel7flattenEv @ 552 NONAME _ZN21QDeclarativeListModelC1EP7QObject @ 553 NONAME - _ZN21QDeclarativeListModelC1EbP7QObject @ 554 NONAME + _ZN21QDeclarativeListModelC1EbP7QObject @ 554 NONAME ABSENT _ZN21QDeclarativeListModelC2EP7QObject @ 555 NONAME - _ZN21QDeclarativeListModelC2EbP7QObject @ 556 NONAME + _ZN21QDeclarativeListModelC2EbP7QObject @ 556 NONAME ABSENT _ZN21QDeclarativeListModelD0Ev @ 557 NONAME _ZN21QDeclarativeListModelD1Ev @ 558 NONAME _ZN21QDeclarativeListModelD2Ev @ 559 NONAME @@ -1744,4 +1744,7 @@ EXPORTS _ZThn12_N24QDeclarativeScriptActionD1Ev @ 1743 NONAME _ZThn8_N24QDeclarativeScriptActionD0Ev @ 1744 NONAME _ZThn8_N24QDeclarativeScriptActionD1Ev @ 1745 NONAME + _ZN21QDeclarativeListModelC1EPKS_P32QDeclarativeListModelWorkerAgent @ 1746 NONAME + _ZN21QDeclarativeListModelC2EPKS_P32QDeclarativeListModelWorkerAgent @ 1747 NONAME + _ZNK21QDeclarativeListModel14inWorkerThreadEv @ 1748 NONAME -- cgit v0.12 From 638face91faa7b6ff8cb85e6228faa1967cc66ac Mon Sep 17 00:00:00 2001 From: Jiang Jiang Date: Mon, 13 Sep 2010 16:48:39 +0200 Subject: Fix text direction handling in QLabel For QLabel, text direction should be determined by actual text (if it's a simple text label) or the textDirection() property of the defaultTextOption of corresponding QTextDocument. Task-number: QTBUG-13552 Reviewed-by: Lars Knoll (cherry picked from commit 9b20aac0ad83b917c46cc44b78dc90fb1d238fe8) --- src/gui/widgets/qlabel.cpp | 27 ++++++++++++++++----------- src/gui/widgets/qlabel_p.h | 1 + 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/gui/widgets/qlabel.cpp b/src/gui/widgets/qlabel.cpp index bdbd0b0..42be03b 100644 --- a/src/gui/widgets/qlabel.cpp +++ b/src/gui/widgets/qlabel.cpp @@ -635,7 +635,7 @@ QSize QLabelPrivate::sizeForWidth(int w) const br = movie->currentPixmap().rect(); #endif else if (isTextLabel) { - int align = QStyle::visualAlignment(q->layoutDirection(), QFlag(this->align)); + int align = QStyle::visualAlignment(textDirection(), QFlag(this->align)); // Add indentation int m = indent; @@ -1059,7 +1059,8 @@ void QLabel::paintEvent(QPaintEvent *) drawFrame(&painter); QRect cr = contentsRect(); cr.adjust(d->margin, d->margin, -d->margin, -d->margin); - int align = QStyle::visualAlignment(layoutDirection(), QFlag(d->align)); + int align = QStyle::visualAlignment(d->isTextLabel ? d->textDirection() + : layoutDirection(), QFlag(d->align)); #ifndef QT_NO_MOVIE if (d->movie) { @@ -1119,7 +1120,8 @@ void QLabel::paintEvent(QPaintEvent *) d->control->drawContents(&painter, QRectF(), this); painter.restore(); } else { - int flags = align; + int flags = align | (d->textDirection() == Qt::LeftToRight ? Qt::TextForceLeftToRight + : Qt::TextForceRightToLeft); if (d->hasShortcut) { flags |= Qt::TextShowMnemonic; if (!style->styleHint(QStyle::SH_UnderlineShortcut, &opt, this)) @@ -1447,10 +1449,6 @@ void QLabel::changeEvent(QEvent *ev) d->control->setPalette(palette()); } else if (ev->type() == QEvent::ContentsRectChange) { d->updateLabel(); - } else if (ev->type() == QEvent::LayoutDirectionChange) { - if (d->isTextLabel && d->control) { - d->sendControlEvent(ev); - } } QFrame::changeEvent(ev); } @@ -1486,6 +1484,15 @@ void QLabel::setScaledContents(bool enable) update(contentsRect()); } +Qt::LayoutDirection QLabelPrivate::textDirection() const +{ + if (control) { + QTextOption opt = control->document()->defaultTextOption(); + return opt.textDirection(); + } + + return text.isRightToLeft() ? Qt::RightToLeft : Qt::LeftToRight; +} /*! \fn void QLabel::setAlignment(Qt::AlignmentFlag flag) @@ -1503,7 +1510,8 @@ QRect QLabelPrivate::documentRect() const Q_ASSERT_X(isTextLabel, "documentRect", "document rect called for label that is not a text label!"); QRect cr = q->contentsRect(); cr.adjust(margin, margin, -margin, -margin); - const int align = QStyle::visualAlignment(q->layoutDirection(), QFlag(this->align)); + const int align = QStyle::visualAlignment(isTextLabel ? textDirection() + : q->layoutDirection(), QFlag(this->align)); int m = indent; if (m < 0 && q->frameWidth()) // no indent, but we do have a frame m = q->fontMetrics().width(QLatin1Char('x')) / 2 - margin; @@ -1564,7 +1572,6 @@ void QLabelPrivate::ensureTextLayouted() const if (!textLayoutDirty) return; ensureTextPopulated(); - Q_Q(const QLabel); if (control) { QTextDocument *doc = control->document(); QTextOption opt = doc->defaultTextOption(); @@ -1576,8 +1583,6 @@ void QLabelPrivate::ensureTextLayouted() const else opt.setWrapMode(QTextOption::ManualWrap); - opt.setTextDirection(q->layoutDirection()); - doc->setDefaultTextOption(opt); QTextFrameFormat fmt = doc->rootFrame()->frameFormat(); diff --git a/src/gui/widgets/qlabel_p.h b/src/gui/widgets/qlabel_p.h index fba7224..83624c7 100644 --- a/src/gui/widgets/qlabel_p.h +++ b/src/gui/widgets/qlabel_p.h @@ -132,6 +132,7 @@ public: QRectF layoutRect() const; QRect documentRect() const; QPoint layoutPoint(const QPoint& p) const; + Qt::LayoutDirection textDirection() const; #ifndef QT_NO_CONTEXTMENU QMenu *createStandardContextMenu(const QPoint &pos); #endif -- cgit v0.12 From 0c63d0ed5417c72056632fc5b4bfc29f889b1cc1 Mon Sep 17 00:00:00 2001 From: Jiang Jiang Date: Wed, 22 Sep 2010 15:10:44 +0200 Subject: Fix text direction setting in QTextBlock layout QTextControl should no longer inherit the layout direction of parent widget as its default text direction. Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: Lars Knoll (cherry picked from commit 6397e5bc49f11e20a9d1838d8d8df46dd9486263) --- src/gui/text/qtextcontrol.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp index 5fe0c0c..7f2c4e9 100644 --- a/src/gui/text/qtextcontrol.cpp +++ b/src/gui/text/qtextcontrol.cpp @@ -404,12 +404,6 @@ void QTextControlPrivate::init(Qt::TextFormat format, const QString &text, QText Q_Q(QTextControl); setContent(format, text, document); - QWidget *parentWidget = qobject_cast(parent); - if (parentWidget) { - QTextOption opt = doc->defaultTextOption(); - opt.setTextDirection(parentWidget->layoutDirection()); - doc->setDefaultTextOption(opt); - } doc->setUndoRedoEnabled(interactionFlags & Qt::TextEditable); q->setCursorWidth(-1); } -- cgit v0.12 From b255a070907cca8a7f6857e24019ea49093a4d36 Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Wed, 22 Sep 2010 10:19:59 +0200 Subject: QTreeView: do not scroll to top if last item is removed When the last item is the current item and is removed, QTreeViewPrivate::updateScrollBars() is called after QTreeViewPrivate's viewItems member is cleared. This commit makes sure that viewItems is restored by calling QTreeView::doItemsLayout() in this case, preventing that the scroll bar range is set to zero temporarily and the view is scrolled to the top unexpectedly (this was a regression in 4.7.0: QTBUG-13567). Merge-request: 2481 Reviewed-by: Olivier Goffart (cherry picked from commit 6da6b7099d4e0b49329793e4b90703ec3d868048) --- src/gui/itemviews/qtreeview.cpp | 4 ++++ tests/auto/qtreeview/tst_qtreeview.cpp | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp index b797776..40b51fe 100644 --- a/src/gui/itemviews/qtreeview.cpp +++ b/src/gui/itemviews/qtreeview.cpp @@ -3435,6 +3435,10 @@ void QTreeViewPrivate::updateScrollBars() if (!viewportSize.isValid()) viewportSize = QSize(0, 0); + if (viewItems.isEmpty()) { + q->doItemsLayout(); + } + int itemsInViewport = 0; if (uniformRowHeights) { if (defaultItemHeight <= 0) diff --git a/tests/auto/qtreeview/tst_qtreeview.cpp b/tests/auto/qtreeview/tst_qtreeview.cpp index 7e2e800..c7b53e9 100644 --- a/tests/auto/qtreeview/tst_qtreeview.cpp +++ b/tests/auto/qtreeview/tst_qtreeview.cpp @@ -240,6 +240,7 @@ private slots: void taskQTBUG_6450_selectAllWith1stColumnHidden(); void taskQTBUG_9216_setSizeAndUniformRowHeightsWrongRepaint(); void taskQTBUG_11466_keyboardNavigationRegression(); + void taskQTBUG_13567_removeLastItemRegression(); }; class QtTestModel: public QAbstractItemModel @@ -3910,5 +3911,26 @@ void tst_QTreeView::taskQTBUG_11466_keyboardNavigationRegression() QTRY_COMPARE(treeView.currentIndex(), treeView.selectionModel()->selection().indexes().first()); } +void tst_QTreeView::taskQTBUG_13567_removeLastItemRegression() +{ + QtTestModel model(200, 1); + + QTreeView view; + view.setSelectionMode(QAbstractItemView::ExtendedSelection); + view.setModel(&model); + view.show(); + QTest::qWaitForWindowShown(&view); + + view.scrollToBottom(); + QTest::qWait(10); + CHECK_VISIBLE(199, 0); + + view.setCurrentIndex(model.index(199, 0)); + model.removeLastRow(); + QTest::qWait(10); + QCOMPARE(view.currentIndex(), model.index(198, 0)); + CHECK_VISIBLE(198, 0); +} + QTEST_MAIN(tst_QTreeView) #include "tst_qtreeview.moc" -- cgit v0.12 From 6fd33c5028632d279646dcd2f6857f0602a07fe5 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Wed, 22 Sep 2010 11:35:39 +0200 Subject: Fix a crash with D&d on mingw The Drag&Drop callbacks need to be correctly aligned to not crash in the graphics SSE code. Task-number: QTBUG-13787 Reviewed-by: benjamin poulain (cherry picked from commit a7c28aa588417c0a75f82d55019814443f889340) --- src/gui/kernel/qdnd_win.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gui/kernel/qdnd_win.cpp b/src/gui/kernel/qdnd_win.cpp index a164c2a..7083886 100644 --- a/src/gui/kernel/qdnd_win.cpp +++ b/src/gui/kernel/qdnd_win.cpp @@ -515,7 +515,7 @@ static inline Qt::MouseButtons keystate_to_mousebutton(DWORD grfKeyState) //--------------------------------------------------------------------- // IDropSource Methods //--------------------------------------------------------------------- -STDMETHODIMP +QT_ENSURE_STACK_ALIGNED_FOR_SSE STDMETHODIMP QOleDropSource::QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyState) { #ifdef QDND_DEBUG @@ -545,7 +545,7 @@ QOleDropSource::QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyState) } } -STDMETHODIMP +QT_ENSURE_STACK_ALIGNED_FOR_SSE STDMETHODIMP QOleDropSource::GiveFeedback(DWORD dwEffect) { Qt::DropAction action = translateToQDragDropAction(dwEffect); @@ -626,7 +626,7 @@ QOleDropTarget::Release(void) // IDropTarget Methods //--------------------------------------------------------------------- -STDMETHODIMP +QT_ENSURE_STACK_ALIGNED_FOR_SSE STDMETHODIMP QOleDropTarget::DragEnter(LPDATAOBJECT pDataObj, DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect) { #ifdef QDND_DEBUG @@ -688,7 +688,7 @@ void QOleDropTarget::sendDragEnterEvent(QWidget *dragEnterWidget, DWORD grfKeySt } -STDMETHODIMP +QT_ENSURE_STACK_ALIGNED_FOR_SSE STDMETHODIMP QOleDropTarget::DragOver(DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect) { #ifdef QDND_DEBUG @@ -758,7 +758,7 @@ QOleDropTarget::DragOver(DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect) return NOERROR; } -STDMETHODIMP +QT_ENSURE_STACK_ALIGNED_FOR_SSE STDMETHODIMP QOleDropTarget::DragLeave() { #ifdef QDND_DEBUG @@ -785,7 +785,7 @@ QOleDropTarget::DragLeave() #define KEY_STATE_BUTTON_MASK (MK_LBUTTON | MK_MBUTTON | MK_RBUTTON) -STDMETHODIMP +QT_ENSURE_STACK_ALIGNED_FOR_SSE STDMETHODIMP QOleDropTarget::Drop(LPDATAOBJECT /*pDataObj*/, DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect) { #ifdef QDND_DEBUG -- cgit v0.12 From 3c68304a73e52a2cca5bfc0e43b379d2857bd92a Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Thu, 23 Sep 2010 13:43:26 +0200 Subject: Incorrect translations for application menu items on Mac OS X. This is a regression fron 4.6 release. Menu entries with some specific roles are automatically merged to the application menu. They are now translated based on the context "MAC_APPLICATION_MENU" instead of "QMenuBar" context. This patch eanbles the use for both contexts. Task-number: QTBUG-13878 Reviewed-by: Richard Moe Gustavsen (cherry picked from commit 7d878ba53909157cf1911c30ce973378589c2cc0) --- src/gui/kernel/qapplication.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 43d5772..185af9a 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -2397,8 +2397,13 @@ static const char *application_menu_strings[] = { }; QString qt_mac_applicationmenu_string(int type) { - return qApp->translate("MAC_APPLICATION_MENU", - application_menu_strings[type]); + QString menuString = QString::fromLatin1(application_menu_strings[type]); + QString translated = qApp->translate("QMenuBar", application_menu_strings[type]); + if (translated != menuString) + return translated; + else + return qApp->translate("MAC_APPLICATION_MENU", + application_menu_strings[type]); } #endif #endif -- cgit v0.12 From a0dc929adce57da459a27927d66c05c2f22b3560 Mon Sep 17 00:00:00 2001 From: Jason Barron Date: Wed, 22 Sep 2010 15:41:40 +0200 Subject: Avoid OpenVG rendering errors when stroking an aliased path. Stroking a path can sometimes result in inconsistent rendering especially when combined with a clip. For example, if the logical edge of a clip rect coincides with the logical edge of a path then it can happen that the edge is not painted correctly because the stroke lies outside the bounds of the clip rect. To workaround this problem, we add the 'aliasedCoordinateDelta' such that the rounding will err on the side of caution. This improves the correctness when using the raster engine as a reference. Task-number: QTBUG-13165 Reviewed-by: Samuel (cherry picked from commit 74f09c794d5fdcb8f4b547b1c55bcd512ef07b95) --- src/openvg/qpaintengine_vg.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index 3c2fd3d..74395a2 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -248,7 +248,11 @@ public: inline void ensurePathTransform() { if (!pathTransformSet) { - setTransform(VG_MATRIX_PATH_USER_TO_SURFACE, pathTransform); + QTransform aliasedTransform = pathTransform; + if (renderingQuality == VG_RENDERING_QUALITY_NONANTIALIASED && currentPen != Qt::NoPen) + aliasedTransform = aliasedTransform + * QTransform::fromTranslate(aliasedCoordinateDelta, -aliasedCoordinateDelta); + setTransform(VG_MATRIX_PATH_USER_TO_SURFACE, aliasedTransform); pathTransformSet = true; } } @@ -306,6 +310,7 @@ inline void QVGPaintEnginePrivate::setRenderingQuality(VGRenderingQuality mode) if (renderingQuality != mode) { vgSeti(VG_RENDERING_QUALITY, mode); renderingQuality = mode; + pathTransformSet = false; // need to tweak transform for aliased stroking } } -- cgit v0.12 From 31f96e8d9a90767aac385a2a9657cabe0c1f3889 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 24 Sep 2010 09:13:35 +0200 Subject: Fix dependency on the plugins rule for multimedia When configuring with -no-multimedia then the plugins rule should not be depending on multimedia, otherwise it will not try and build any plugins. Task-number: QTBUG-13912 Reviewed-by: Rohan McGovern (cherry picked from commit c52224f8010bf90732e5b2ad6cef84f9bd248787) --- src/src.pro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/src.pro b/src/src.pro index f856a0c..9a8b70fc 100644 --- a/src/src.pro +++ b/src/src.pro @@ -110,7 +110,8 @@ src_webkit_declarative.target = sub-webkitdeclarative contains(QT_CONFIG, opengl):src_multimedia.depends += src_opengl src_tools_activeqt.depends = src_tools_idc src_gui src_declarative.depends = src_gui src_script src_network - src_plugins.depends = src_gui src_sql src_svg src_multimedia + src_plugins.depends = src_gui src_sql src_svg + contains(QT_CONFIG, multimedia):src_plugins.depends += src_multimedia src_s60installs.depends = $$TOOLS_SUBDIRS $$SRC_SUBDIRS src_s60installs.depends -= src_s60installs src_imports.depends = src_gui src_declarative -- cgit v0.12 From 01de6e56c95e43fbbc8b645afbcf37e01a385740 Mon Sep 17 00:00:00 2001 From: Lasse Holmstedt Date: Fri, 24 Sep 2010 13:13:29 +0200 Subject: QML Debugging: Documentation fixes Many things have changed with QML debugging in Qt Creator. Now docs simply refer to Qt Creator documentation. Reviewed-by: Leena Miettinen (cherry picked from commit f61d2d16310aa0a87ec1ba823f903f19575aed7c) --- doc/src/declarative/qdeclarativedebugging.qdoc | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/doc/src/declarative/qdeclarativedebugging.qdoc b/doc/src/declarative/qdeclarativedebugging.qdoc index ea21852..64c312c 100644 --- a/doc/src/declarative/qdeclarativedebugging.qdoc +++ b/doc/src/declarative/qdeclarativedebugging.qdoc @@ -79,20 +79,8 @@ QDeclarativeImportDatabase::resolveType "Rectangle" = "QDeclarativeRectangle" \section1 Debugging with Qt Creator \l{http://qt.nokia.com/products/developer-tools}{Qt Creator} provides built-in -support for QML debugging. Open a QML project in Creator and enter Debug mode, -or click the "Start Debugging" option from the menu, and Creator will -show QML debugging information and options for your application, including -object inspection, property monitoring and application frame-rate analysis. - -Creator can be used to debug both local and remote QML applications. To -enable remote debugging, start the \l {QML Viewer} -on the remote device with a debugging port defined, like this: - -\code - QML_DEBUG_SERVER_PORT=3768 qmlviewer myqmlfile.qml -\endcode - -In Creator, open the project settings pane and set the server and port -details for the remote device, then start debugging. +support for QML debugging. QML projects and standalone C++ applications that +utilize QML can be debugged on desktops as well as on remote devices. +For more information, see the Qt Creator Manual. */ -- cgit v0.12 From 6529e1df5279e44e93c7f18333103658257c92d7 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Sun, 26 Sep 2010 18:38:55 +0200 Subject: QHostInfo: Fix a crash when a new request is pushed while resolving. The loop looking for posponedLookup in the lookup thread wasn't locking the mutex before trying to access/modify the list. Reviewed-by: Andreas Kling (cherry picked from commit 45c2ac4f1e1218f595b1d21691c8dec4eaa1a021) --- src/network/kernel/qhostinfo.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp index 348b0d2..41a9512 100644 --- a/src/network/kernel/qhostinfo.cpp +++ b/src/network/kernel/qhostinfo.cpp @@ -468,14 +468,17 @@ void QHostInfoRunnable::run() resultEmitter.emitResultsReady(hostInfo); // now also iterate through the postponed ones - QMutableListIterator iterator(manager->postponedLookups); - while (iterator.hasNext()) { - QHostInfoRunnable* postponed = iterator.next(); - if (toBeLookedUp == postponed->toBeLookedUp) { - // we can now emit - iterator.remove(); - hostInfo.setLookupId(postponed->id); - postponed->resultEmitter.emitResultsReady(hostInfo); + { + QMutexLocker locker(&manager->mutex); + QMutableListIterator iterator(manager->postponedLookups); + while (iterator.hasNext()) { + QHostInfoRunnable* postponed = iterator.next(); + if (toBeLookedUp == postponed->toBeLookedUp) { + // we can now emit + iterator.remove(); + hostInfo.setLookupId(postponed->id); + postponed->resultEmitter.emitResultsReady(hostInfo); + } } } -- cgit v0.12 From f8b96e9bdc488b20aa9ba0a8eec3a7b6edc5b2dd Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Wed, 22 Sep 2010 16:32:31 +0300 Subject: Improved Symbian4 platform detection Now returns correct value for Symbian4 platforms with QSysInfo::symbianVersion(). SYMBIAN_VERSION .pro file variable should also return correct value even if it doesn't get set in environment.prf. Task-number: QTBUG-13802 Reviewed-by: Shane Kearns Reviewed-by: Janne Anttila (cherry picked from commit 0aad0d2043e061469b7139483c489dc6f823490b) --- mkspecs/common/symbian/symbian.conf | 62 ++++++++++++++++------------ src/corelib/global/global.pri | 3 ++ src/corelib/global/qglobal.cpp | 81 ++++++++++++++++++++++++------------- src/corelib/global/qglobal.h | 4 +- 4 files changed, 93 insertions(+), 57 deletions(-) diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index 679731f..cc5b788 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -132,39 +132,49 @@ exists($${EPOCROOT}epoc32/tools/qt/mkspecs/features/environment.prf) { } # Try to detect SDK version if it wasn't set by environment.prf -isEmpty(S60_VERSION) { - # The Symbian^3 PDK does not necessarily contain the required sis files. - # However, libstdcppv5 first appeared in Symbian^3 (S60 5.2), so check for that too. - exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.2.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.2.sis)|exists($${EPOCROOT}epoc32/release/armv5/lib/libstdcppv5.dso) { - S60_VERSION = 5.2 +isEmpty(SYMBIAN_VERSION) { + exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/Symbianv4.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/Symbianv4.sis) { + SYMBIAN_VERSION = Symbian4 } else { - exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.1.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.1.sis) { - S60_VERSION = 5.1 + # The Symbian^3 PDK does not necessarily contain the required sis files. + # However, libstdcppv5 first appeared in Symbian^3 (S60 5.2), so check for that too. + exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.2.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.2.sis)|exists($${EPOCROOT}epoc32/release/armv5/lib/libstdcppv5.dso) { + SYMBIAN_VERSION = Symbian3 } else { - exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.0.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.0.sis) { - S60_VERSION = 5.0 + exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.1.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.1.sis) { + SYMBIAN_VERSION = Symbian2 } else { - exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v3.2.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v3.2.sis) { - S60_VERSION = 3.2 + exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.0.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.0.sis) { + SYMBIAN_VERSION = 9.4 } else { - S60_VERSION = 3.1 + exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v3.2.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v3.2.sis) { + SYMBIAN_VERSION = 9.3 + } else { + exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v3.1.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v3.1.sis) { + SYMBIAN_VERSION = 9.2 + } else { + SYMBIAN_VERSION = Unknown + } + } } } } } } -isEmpty(SYMBIAN_VERSION) { - contains(S60_VERSION, "3\\.1") { - SYMBIAN_VERSION = 9.2 - } else:contains(S60_VERSION, "3\\.2") { - SYMBIAN_VERSION = 9.3 - } else:contains(S60_VERSION, "5\\.0") { - SYMBIAN_VERSION = 9.4 - } else:contains(S60_VERSION, "5\\.1") { - SYMBIAN_VERSION = Symbian2 - } else:contains(S60_VERSION, "5\\.2") { - SYMBIAN_VERSION = Symbian3 +isEmpty(S60_VERSION) { + contains(SYMBIAN_VERSION, "9\\.2") { + S60_VERSION = 3.1 + } else:contains(SYMBIAN_VERSION, "9\\.3") { + S60_VERSION = 3.2 + } else:contains(SYMBIAN_VERSION, "9\\.4") { + S60_VERSION = 5.0 + } else:contains(SYMBIAN_VERSION, "Symbian2") { + S60_VERSION = 5.1 + } else:contains(SYMBIAN_VERSION, "Symbian3") { + S60_VERSION = 5.2 + } else { + S60_VERSION = Unknown } } @@ -174,14 +184,14 @@ isEmpty(SYMBIAN_VERSION) { default_deployment.pkg_prerules += pkg_depends_webkit pkg_depends_qt pkg_platform_dependencies -# Supports S60 3.0, 3.1, 3.2, 5.0 and Symbian^3 by default +# Supports S60 3.1, 3.2, 5.0, Symbian^3, and Symbian^4 by default pkg_platform_dependencies = \ "; Default HW/platform dependencies" \ - "[0x101F7961],0,0,0,{\"S60ProductID\"}" \ "[0x102032BE],0,0,0,{\"S60ProductID\"}" \ "[0x102752AE],0,0,0,{\"S60ProductID\"}" \ "[0x1028315F],0,0,0,{\"S60ProductID\"}" \ - "[0x20022e6d],0,0,0,{\"S60ProductID\"}" \ + "[0x20022E6D],0,0,0,{\"S60ProductID\"}" \ + "[0x20032DE7],0,0,0,{\"S60ProductID\"}" \ " " DEPLOYMENT += default_deployment diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri index 260ed59..4800716 100644 --- a/src/corelib/global/global.pri +++ b/src/corelib/global/global.pri @@ -24,3 +24,6 @@ linux*:!static:!linux-armcc:!linux-gcce { prog=$$quote(if (/program interpreter: (.*)]/) { print $1; }) DEFINES += ELF_INTERPRETER=\\\"$$system(readelf -l /bin/ls | perl -n -e \'$$prog\')\\\" } + +# Compensate for lack of platform defines in Symbian3 and Symbian4 +symbian: DEFINES += SYMBIAN_VERSION_$$upper($$replace(SYMBIAN_VERSION,\\.,_)) diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 401af85..3291fe7 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -86,7 +86,8 @@ # include "private/qcore_symbian_p.h" _LIT(qt_S60Filter, "Series60v?.*.sis"); -_LIT(qt_S60SystemInstallDir, "z:\\system\\install\\"); +_LIT(qt_symbianFilter, "Symbianv*.sis"); +_LIT(qt_symbianSystemInstallDir, "z:\\system\\install\\"); #endif QT_BEGIN_NAMESPACE @@ -1813,12 +1814,12 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion() #endif #ifdef Q_OS_SYMBIAN -static QSysInfo::S60Version cachedS60Version = QSysInfo::S60Version(-1); +static QSysInfo::SymbianVersion cachedSymbianVersion = QSysInfo::SymbianVersion(-1); -QSysInfo::S60Version QSysInfo::s60Version() +QSysInfo::SymbianVersion QSysInfo::symbianVersion() { - if (cachedS60Version != -1) - return cachedS60Version; + if (cachedSymbianVersion != -1) + return cachedSymbianVersion; // Use pure Symbian code, because if done using QDir, there will be a call back // to this method, resulting doing this expensive operation twice before the cache kicks in. @@ -1826,7 +1827,22 @@ QSysInfo::S60Version QSysInfo::s60Version() RFs rfs = qt_s60GetRFs(); TFindFile fileFinder(rfs); CDir* contents; - TInt err = fileFinder.FindWildByDir(qt_S60Filter, qt_S60SystemInstallDir, contents); + + // Check for Symbian4 + TInt err = fileFinder.FindWildByDir(qt_symbianFilter, qt_symbianSystemInstallDir, contents); + if (err == KErrNone) { + QScopedPointer contentsDeleter(contents); + err = contents->Sort(EDescending|ESortByName); + if (err == KErrNone && contents->Count() > 0 && (*contents)[0].iName.Length() >= 9) { + TInt major = (*contents)[0].iName[8] - '0'; + if (major == 4) { + return cachedSymbianVersion = SV_SF_4; + } + } + } + + // Check for S60 and Symbian3 platforms, which use older .sis naming scheme + err = fileFinder.FindWildByDir(qt_S60Filter, qt_symbianSystemInstallDir, contents); if (err == KErrNone) { QScopedPointer contentsDeleter(contents); err = contents->Sort(EDescending|ESortByName); @@ -1835,19 +1851,19 @@ QSysInfo::S60Version QSysInfo::s60Version() TInt minor = (*contents)[0].iName[11] - '0'; if (major == 3) { if (minor == 1) { - return cachedS60Version = SV_S60_3_1; + return cachedSymbianVersion = SV_9_2; } else if (minor == 2) { - return cachedS60Version = SV_S60_3_2; + return cachedSymbianVersion = SV_9_3; } } else if (major == 5) { if (minor == 0) { - return cachedS60Version = SV_S60_5_0; + return cachedSymbianVersion = SV_9_4; } else if (minor == 1) { - return cachedS60Version = SV_S60_5_1; + return cachedSymbianVersion = SV_SF_2; } else if (minor == 2) { - return cachedS60Version = SV_S60_5_2; + return cachedSymbianVersion = SV_SF_3; } } } @@ -1855,33 +1871,40 @@ QSysInfo::S60Version QSysInfo::s60Version() # ifdef Q_CC_NOKIAX86 // Some emulator environments may not contain the version specific .sis files, so - // simply hardcode the version on those environments. + // simply hardcode the version on those environments. Note that can't use + // SYMBIAN_VERSION_* defines for S60 3.x/5.0 platforms, as they do not define them + // right anyway in case .sis files are not found. # if defined(__SERIES60_31__) - return cachedS60Version = SV_S60_3_1; + return cachedSymbianVersion = SV_9_2; # elif defined(__S60_32__) - return cachedS60Version = SV_S60_3_2; + return cachedSymbianVersion = SV_9_3; # elif defined(__S60_50__) - return cachedS60Version = SV_S60_5_0; + return cachedSymbianVersion = SV_9_4; +# elif defined(SYMBIAN_VERSION_SYMBIAN3) + return cachedSymbianVersion = SV_SF_3; +# elif defined(SYMBIAN_VERSION_SYMBIAN4) + return cachedSymbianVersion = SV_SF_4; # endif # endif //If reaching here, it was not possible to determine the version - return cachedS60Version = SV_S60_Unknown; + return cachedSymbianVersion = SV_Unknown; } -QSysInfo::SymbianVersion QSysInfo::symbianVersion() + +QSysInfo::S60Version QSysInfo::s60Version() { - switch (s60Version()) { - case SV_S60_3_1: - return SV_9_2; - case SV_S60_3_2: - return SV_9_3; - case SV_S60_5_0: - return SV_9_4; - case SV_S60_5_1: - return SV_SF_2; - case SV_S60_5_2: - return SV_SF_3; + switch (symbianVersion()) { + case SV_9_2: + return SV_S60_3_1; + case SV_9_3: + return SV_S60_3_2; + case SV_9_4: + return SV_S60_5_0; + case SV_SF_2: + return SV_S60_5_1; + case SV_SF_3: + return SV_S60_5_2; default: - return SV_Unknown; + return SV_S60_Unknown; } } #endif // ifdef Q_OS_SYMBIAN diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index c906a1c..3a35aa3 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1515,7 +1515,7 @@ public: #endif #ifdef Q_OS_SYMBIAN enum SymbianVersion { - SV_Unknown = 0x0000, + SV_Unknown = 1000000, // Assume unknown is something newer than what is supported //These are the Symbian Ltd versions 9.2-9.4 SV_9_2 = 10, SV_9_3 = 20, @@ -1529,7 +1529,7 @@ public: static SymbianVersion symbianVersion(); enum S60Version { SV_S60_None = 0, - SV_S60_Unknown = 1, + SV_S60_Unknown = SV_Unknown, SV_S60_3_1 = SV_9_2, SV_S60_3_2 = SV_9_3, SV_S60_5_0 = SV_9_4, -- cgit v0.12 From 7ad71b986fd9e8854a6eef049eea56cd5569e5fc Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Fri, 24 Sep 2010 11:47:36 +0200 Subject: fix RSS listing example ... by handling HTTP 30X responses and using QNetworkAccessManager instead of QHttp. The server now sends back a HTTP 302 instead of a 200. Reviewed-by: Markus Goetz Task-number: QTBUG-13892 (cherry picked from commit 15ddcea2d15b7d7731e24151b0a30990e77efe74) --- examples/xml/rsslisting/main.cpp | 1 - examples/xml/rsslisting/rsslisting.cpp | 89 +++++++++++++++++++--------------- examples/xml/rsslisting/rsslisting.h | 16 +++--- 3 files changed, 59 insertions(+), 47 deletions(-) diff --git a/examples/xml/rsslisting/main.cpp b/examples/xml/rsslisting/main.cpp index 95c8a89..71ae0eb 100644 --- a/examples/xml/rsslisting/main.cpp +++ b/examples/xml/rsslisting/main.cpp @@ -57,7 +57,6 @@ Provides the main function for the RSS news reader example. int main(int argc, char **argv) { QApplication app(argc, argv); - qWarning("The usage of QHttp is not recommended anymore, please use QNetworkAccessManager."); RSSListing *rsslisting = new RSSListing; rsslisting->show(); return app.exec(); diff --git a/examples/xml/rsslisting/rsslisting.cpp b/examples/xml/rsslisting/rsslisting.cpp index b7c9eb0..48c3062 100644 --- a/examples/xml/rsslisting/rsslisting.cpp +++ b/examples/xml/rsslisting/rsslisting.cpp @@ -65,21 +65,19 @@ its operation, and also allows very large data sources to be read. Constructs an RSSListing widget with a simple user interface, and sets up the XML reader to use a custom handler class. - The user interface consists of a line edit, two push buttons, and a + The user interface consists of a line edit, a push button, and a list view widget. The line edit is used for entering the URLs of news - sources; the push buttons start and abort the process of reading the + sources; the push button starts the process of reading the news. */ RSSListing::RSSListing(QWidget *parent) - : QWidget(parent) + : QWidget(parent), currentReply(0) { lineEdit = new QLineEdit(this); lineEdit->setText("http://labs.qt.nokia.com/blogs/feed"); fetchButton = new QPushButton(tr("Fetch"), this); - abortButton = new QPushButton(tr("Abort"), this); - abortButton->setEnabled(false); treeWidget = new QTreeWidget(this); connect(treeWidget, SIGNAL(itemActivated(QTreeWidgetItem*,int)), @@ -89,15 +87,11 @@ RSSListing::RSSListing(QWidget *parent) treeWidget->setHeaderLabels(headerLabels); treeWidget->header()->setResizeMode(QHeaderView::ResizeToContents); - connect(&http, SIGNAL(readyRead(QHttpResponseHeader)), - this, SLOT(readData(QHttpResponseHeader))); - - connect(&http, SIGNAL(requestFinished(int,bool)), - this, SLOT(finished(int,bool))); + connect(&manager, SIGNAL(finished(QNetworkReply*)), + this, SLOT(finished(QNetworkReply*))); connect(lineEdit, SIGNAL(returnPressed()), this, SLOT(fetch())); connect(fetchButton, SIGNAL(clicked()), this, SLOT(fetch())); - connect(abortButton, SIGNAL(clicked()), &http, SLOT(abort())); QVBoxLayout *layout = new QVBoxLayout(this); @@ -105,7 +99,6 @@ RSSListing::RSSListing(QWidget *parent) hboxLayout->addWidget(lineEdit); hboxLayout->addWidget(fetchButton); - hboxLayout->addWidget(abortButton); layout->addLayout(hboxLayout); layout->addWidget(treeWidget); @@ -115,34 +108,53 @@ RSSListing::RSSListing(QWidget *parent) } /* + Starts the network request and connects the needed signals +*/ +void RSSListing::get(const QUrl &url) +{ + QNetworkRequest request(url); + if (currentReply) { + currentReply->disconnect(this); + currentReply->deleteLater(); + } + currentReply = manager.get(request); + connect(currentReply, SIGNAL(readyRead()), this, SLOT(readyRead())); + connect(currentReply, SIGNAL(metaDataChanged()), this, SLOT(metaDataChanged())); + connect(currentReply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(error(QNetworkReply::NetworkError))); +} + +/* Starts fetching data from a news source specified in the line edit widget. The line edit is made read only to prevent the user from modifying its contents during the fetch; this is only for cosmetic purposes. - The fetch button is disabled, and the abort button is enabled to allow - the user to interrupt processing. The list view is cleared, and we + The fetch button is disabled, the list view is cleared, and we define the last list view item to be 0, meaning that there are no existing items in the list. - The HTTP handler is supplied with the raw contents of the line edit and - a fetch is initiated. We keep the ID value returned by the HTTP handler - for future reference. + A URL is created with the raw contents of the line edit and + a get is initiated. */ void RSSListing::fetch() { lineEdit->setReadOnly(true); fetchButton->setEnabled(false); - abortButton->setEnabled(true); treeWidget->clear(); xml.clear(); QUrl url(lineEdit->text()); + get(url); +} - http.setHost(url.host()); - connectionId = http.get(url.path()); +void RSSListing::metaDataChanged() +{ + QUrl redirectionTarget = currentReply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl(); + if (redirectionTarget.isValid()) { + get(redirectionTarget); + } } /* @@ -150,16 +162,14 @@ void RSSListing::fetch() We read all the available data, and pass it to the XML stream reader. Then we call the XML parsing function. - - If parsing fails for any reason, we abort the fetch. */ -void RSSListing::readData(const QHttpResponseHeader &resp) +void RSSListing::readyRead() { - if (resp.statusCode() != 200) - http.abort(); - else { - xml.addData(http.readAll()); + int statusCode = currentReply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); + if (statusCode >= 200 && statusCode < 300) { + QByteArray data = currentReply->readAll(); + xml.addData(data); parseXml(); } } @@ -177,19 +187,11 @@ void RSSListing::readData(const QHttpResponseHeader &resp) user interface available to the user for further input. */ -void RSSListing::finished(int id, bool error) +void RSSListing::finished(QNetworkReply *reply) { - if (error) { - qWarning("Received error during HTTP fetch."); - lineEdit->setReadOnly(false); - abortButton->setEnabled(false); - fetchButton->setEnabled(true); - } - else if (id == connectionId) { - lineEdit->setReadOnly(false); - abortButton->setEnabled(false); - fetchButton->setEnabled(true); - } + Q_UNUSED(reply); + lineEdit->setReadOnly(false); + fetchButton->setEnabled(true); } @@ -225,7 +227,6 @@ void RSSListing::parseXml() } if (xml.error() && xml.error() != QXmlStreamReader::PrematureEndOfDocumentError) { qWarning() << "XML ERROR:" << xml.lineNumber() << ": " << xml.errorString(); - http.abort(); } } @@ -236,3 +237,11 @@ void RSSListing::itemActivated(QTreeWidgetItem * item) { QDesktopServices::openUrl(QUrl(item->text(1))); } + +void RSSListing::error(QNetworkReply::NetworkError) +{ + qWarning("error retrieving RSS feed"); + currentReply->disconnect(this); + currentReply->deleteLater(); + currentReply = 0; +} diff --git a/examples/xml/rsslisting/rsslisting.h b/examples/xml/rsslisting/rsslisting.h index 8939dfd..9387222 100644 --- a/examples/xml/rsslisting/rsslisting.h +++ b/examples/xml/rsslisting/rsslisting.h @@ -41,10 +41,12 @@ #ifndef RSSLISTING_H #define RSSLISTING_H -#include +#include +#include #include #include #include +#include QT_BEGIN_NAMESPACE class QLineEdit; @@ -61,24 +63,26 @@ public: public slots: void fetch(); - void finished(int id, bool error); - void readData(const QHttpResponseHeader &); + void finished(QNetworkReply *reply); + void readyRead(); + void metaDataChanged(); void itemActivated(QTreeWidgetItem * item); + void error(QNetworkReply::NetworkError); private: void parseXml(); + void get(const QUrl &url); QXmlStreamReader xml; QString currentTag; QString linkString; QString titleString; - QHttp http; - int connectionId; + QNetworkAccessManager manager; + QNetworkReply *currentReply; QLineEdit *lineEdit; QTreeWidget *treeWidget; - QPushButton *abortButton; QPushButton *fetchButton; }; -- cgit v0.12 From 645e0a5c1beea5049e72e095ad3b6b126ad4941a Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 22 Sep 2010 09:16:42 +0200 Subject: Mitigate private header problems in QtCreator by adding semi-private API Add a semi-private API to get QScriptEngine for a QDeclarativeEngine. So far the qmljsdebugger lib in QtCreator accessed the script engine via QDeclarativeEnginePrivate. Replace this by a minimal API that is still in a private header, where we nevertheless can make some BC checks/guarantees. Aaron Kennedy agreed with the idea. Task-number: QTCREATORBUG-2179 (cherry picked from commit 63c4c0449361ced03838e51d18e1113740f27fa9) --- src/declarative/debugger/debugger.pri | 6 +- src/declarative/debugger/qdeclarativedebug_p.h | 1 - .../debugger/qdeclarativedebughelper.cpp | 13 +++++ .../debugger/qdeclarativedebughelper_p.h | 25 ++++++++ .../private_headers/qdeclarativedebughelper_p.h | 25 ++++++++ .../qdeclarativedebughelper.pro | 5 ++ .../tst_qdeclarativedebughelper.cpp | 68 ++++++++++++++++++++++ 7 files changed, 140 insertions(+), 3 deletions(-) create mode 100644 src/declarative/debugger/qdeclarativedebughelper.cpp create mode 100644 src/declarative/debugger/qdeclarativedebughelper_p.h create mode 100644 tests/auto/declarative/qdeclarativedebughelper/private_headers/qdeclarativedebughelper_p.h create mode 100644 tests/auto/declarative/qdeclarativedebughelper/qdeclarativedebughelper.pro create mode 100644 tests/auto/declarative/qdeclarativedebughelper/tst_qdeclarativedebughelper.cpp diff --git a/src/declarative/debugger/debugger.pri b/src/declarative/debugger/debugger.pri index 33d0843..25f7687 100644 --- a/src/declarative/debugger/debugger.pri +++ b/src/declarative/debugger/debugger.pri @@ -6,7 +6,8 @@ SOURCES += \ $$PWD/qdeclarativedebugservice.cpp \ $$PWD/qdeclarativedebugclient.cpp \ $$PWD/qdeclarativedebug.cpp \ - $$PWD/qdeclarativedebugtrace.cpp + $$PWD/qdeclarativedebugtrace.cpp \ + $$PWD/qdeclarativedebughelper.cpp HEADERS += \ $$PWD/qdeclarativedebuggerstatus_p.h \ @@ -14,4 +15,5 @@ HEADERS += \ $$PWD/qdeclarativedebugservice_p.h \ $$PWD/qdeclarativedebugclient_p.h \ $$PWD/qdeclarativedebug_p.h \ - $$PWD/qdeclarativedebugtrace_p.h + $$PWD/qdeclarativedebugtrace_p.h \ + $$PWD/qdeclarativedebughelper_p.h diff --git a/src/declarative/debugger/qdeclarativedebug_p.h b/src/declarative/debugger/qdeclarativedebug_p.h index f0fc488..2b1a115 100644 --- a/src/declarative/debugger/qdeclarativedebug_p.h +++ b/src/declarative/debugger/qdeclarativedebug_p.h @@ -365,7 +365,6 @@ private: int m_queryId; QVariant m_expr; QVariant m_result; - }; QT_END_NAMESPACE diff --git a/src/declarative/debugger/qdeclarativedebughelper.cpp b/src/declarative/debugger/qdeclarativedebughelper.cpp new file mode 100644 index 0000000..99feff4 --- /dev/null +++ b/src/declarative/debugger/qdeclarativedebughelper.cpp @@ -0,0 +1,13 @@ +#include "private/qdeclarativedebughelper_p.h" +#include "private/qdeclarativeengine_p.h" + +#include + +QT_BEGIN_NAMESPACE + +QScriptEngine *QDeclarativeDebugHelper::getScriptEngine(QDeclarativeEngine *engine) +{ + return QDeclarativeEnginePrivate::getScriptEngine(engine); +} + +QT_END_NAMESPACE diff --git a/src/declarative/debugger/qdeclarativedebughelper_p.h b/src/declarative/debugger/qdeclarativedebughelper_p.h new file mode 100644 index 0000000..a403c45 --- /dev/null +++ b/src/declarative/debugger/qdeclarativedebughelper_p.h @@ -0,0 +1,25 @@ +#ifndef QDECLARATIVEDEBUGHELPER_P_H +#define QDECLARATIVEDEBUGHELPER_P_H + +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QScriptEngine; +class QDeclarativeEngine; + +// Helper methods to access private API through a stable interface +// This is used in the qmljsdebugger library of QtCreator. +class Q_DECLARATIVE_EXPORT QDeclarativeDebugHelper +{ +public: + static QScriptEngine *getScriptEngine(QDeclarativeEngine *engine); +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QDECLARATIVEDEBUGHELPER_P_H diff --git a/tests/auto/declarative/qdeclarativedebughelper/private_headers/qdeclarativedebughelper_p.h b/tests/auto/declarative/qdeclarativedebughelper/private_headers/qdeclarativedebughelper_p.h new file mode 100644 index 0000000..a403c45 --- /dev/null +++ b/tests/auto/declarative/qdeclarativedebughelper/private_headers/qdeclarativedebughelper_p.h @@ -0,0 +1,25 @@ +#ifndef QDECLARATIVEDEBUGHELPER_P_H +#define QDECLARATIVEDEBUGHELPER_P_H + +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +class QScriptEngine; +class QDeclarativeEngine; + +// Helper methods to access private API through a stable interface +// This is used in the qmljsdebugger library of QtCreator. +class Q_DECLARATIVE_EXPORT QDeclarativeDebugHelper +{ +public: + static QScriptEngine *getScriptEngine(QDeclarativeEngine *engine); +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QDECLARATIVEDEBUGHELPER_P_H diff --git a/tests/auto/declarative/qdeclarativedebughelper/qdeclarativedebughelper.pro b/tests/auto/declarative/qdeclarativedebughelper/qdeclarativedebughelper.pro new file mode 100644 index 0000000..c52c652 --- /dev/null +++ b/tests/auto/declarative/qdeclarativedebughelper/qdeclarativedebughelper.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +contains(QT_CONFIG,declarative): QT += network declarative script +macx:CONFIG -= app_bundle + +SOURCES += tst_qdeclarativedebughelper.cpp diff --git a/tests/auto/declarative/qdeclarativedebughelper/tst_qdeclarativedebughelper.cpp b/tests/auto/declarative/qdeclarativedebughelper/tst_qdeclarativedebughelper.cpp new file mode 100644 index 0000000..db62455 --- /dev/null +++ b/tests/auto/declarative/qdeclarativedebughelper/tst_qdeclarativedebughelper.cpp @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include + +#include +#include + +// We have copied the header which is used in the qmljsdebugger (part of QtCreator) +// to catch BC changes. Don't update it unless you know what you are doing! +#include "private_headers/qdeclarativedebughelper_p.h" + +class tst_qdeclarativedebughelper : public QObject { + Q_OBJECT +private slots: + void getScriptEngine(); +}; + +void tst_qdeclarativedebughelper::getScriptEngine() +{ + QDeclarativeEngine engine; + + QScriptEngine *scriptEngine = QDeclarativeDebugHelper::getScriptEngine(&engine); + QVERIFY(scriptEngine); + QCOMPARE(scriptEngine, QDeclarativeEnginePrivate::getScriptEngine(&engine)); +} + +QTEST_MAIN(tst_qdeclarativedebughelper) + +#include "tst_qdeclarativedebughelper.moc" + -- cgit v0.12 From 29dbafd9b4aba15c0e5c7a6f14368c53311edce2 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 22 Sep 2010 09:16:42 +0200 Subject: Mitigate private header problems in QtCreator by adding semi-private API Add a semi-private API to get QScriptEngine for a QDeclarativeEngine. So far the qmljsdebugger lib in QtCreator accessed the script engine via QDeclarativeEnginePrivate. Replace this by a minimal API that is still in a private header, where we nevertheless can make some BC checks/guarantees. Aaron Kennedy agreed with the idea. Task-number: QTCREATORBUG-2179 (cherry picked from commit c1a7deedf1628e0dd3a5fbf92d97c4151d17fb5a) --- .../debugger/qdeclarativedebughelper.cpp | 56 ++++++++++++++++++++++ .../debugger/qdeclarativedebughelper_p.h | 42 ++++++++++++++++ .../private_headers/qdeclarativedebughelper_p.h | 42 ++++++++++++++++ .../tst_qdeclarativedebughelper.cpp | 47 ++++++++++++++++++ 4 files changed, 187 insertions(+) diff --git a/src/declarative/debugger/qdeclarativedebughelper.cpp b/src/declarative/debugger/qdeclarativedebughelper.cpp index 99feff4..ea621bf 100644 --- a/src/declarative/debugger/qdeclarativedebughelper.cpp +++ b/src/declarative/debugger/qdeclarativedebughelper.cpp @@ -3,6 +3,55 @@ #include +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "private/qdeclarativedebughelper_p.h" + +#include +#include + +#include +#include + QT_BEGIN_NAMESPACE QScriptEngine *QDeclarativeDebugHelper::getScriptEngine(QDeclarativeEngine *engine) @@ -10,4 +59,11 @@ QScriptEngine *QDeclarativeDebugHelper::getScriptEngine(QDeclarativeEngine *engi return QDeclarativeEnginePrivate::getScriptEngine(engine); } +void QDeclarativeDebugHelper::setAnimationSlowDownFactor(qreal factor) +{ + QUnifiedTimer *timer = QUnifiedTimer::instance(); + timer->setSlowModeEnabled(factor != 1.0); + timer->setSlowdownFactor(factor); +} + QT_END_NAMESPACE diff --git a/src/declarative/debugger/qdeclarativedebughelper_p.h b/src/declarative/debugger/qdeclarativedebughelper_p.h index a403c45..c9cb839 100644 --- a/src/declarative/debugger/qdeclarativedebughelper_p.h +++ b/src/declarative/debugger/qdeclarativedebughelper_p.h @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + #ifndef QDECLARATIVEDEBUGHELPER_P_H #define QDECLARATIVEDEBUGHELPER_P_H @@ -16,6 +57,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeDebugHelper { public: static QScriptEngine *getScriptEngine(QDeclarativeEngine *engine); + static void setAnimationSlowDownFactor(qreal factor); }; QT_END_NAMESPACE diff --git a/tests/auto/declarative/qdeclarativedebughelper/private_headers/qdeclarativedebughelper_p.h b/tests/auto/declarative/qdeclarativedebughelper/private_headers/qdeclarativedebughelper_p.h index a403c45..c9cb839 100644 --- a/tests/auto/declarative/qdeclarativedebughelper/private_headers/qdeclarativedebughelper_p.h +++ b/tests/auto/declarative/qdeclarativedebughelper/private_headers/qdeclarativedebughelper_p.h @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + #ifndef QDECLARATIVEDEBUGHELPER_P_H #define QDECLARATIVEDEBUGHELPER_P_H @@ -16,6 +57,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeDebugHelper { public: static QScriptEngine *getScriptEngine(QDeclarativeEngine *engine); + static void setAnimationSlowDownFactor(qreal factor); }; QT_END_NAMESPACE diff --git a/tests/auto/declarative/qdeclarativedebughelper/tst_qdeclarativedebughelper.cpp b/tests/auto/declarative/qdeclarativedebughelper/tst_qdeclarativedebughelper.cpp index db62455..36f2222 100644 --- a/tests/auto/declarative/qdeclarativedebughelper/tst_qdeclarativedebughelper.cpp +++ b/tests/auto/declarative/qdeclarativedebughelper/tst_qdeclarativedebughelper.cpp @@ -42,6 +42,8 @@ #include #include +#include +#include // We have copied the header which is used in the qmljsdebugger (part of QtCreator) // to catch BC changes. Don't update it unless you know what you are doing! @@ -51,6 +53,21 @@ class tst_qdeclarativedebughelper : public QObject { Q_OBJECT private slots: void getScriptEngine(); + void setAnimationSlowDownFactor(); +}; + +class TestAnimation : public QAbstractAnimation { +public: + int updateCalled; + + TestAnimation() : updateCalled(0) {} + + virtual void updateCurrentTime(int /*currentTime*/) { + updateCalled++; + } + virtual int duration() const { + return 100; + } }; void tst_qdeclarativedebughelper::getScriptEngine() @@ -62,6 +79,36 @@ void tst_qdeclarativedebughelper::getScriptEngine() QCOMPARE(scriptEngine, QDeclarativeEnginePrivate::getScriptEngine(&engine)); } +void tst_qdeclarativedebughelper::setAnimationSlowDownFactor() +{ + TestAnimation animation; + + // first check whether setup works + QCOMPARE(animation.updateCalled, 0); + animation.start(); + QTest::qWait(animation.totalDuration() + 50); +#ifdef Q_OS_WIN + if (animation.state() != QAbstractAnimation::Stopped) + QEXPECT_FAIL("", "On windows, consistent timing is not working properly due to bad timer resolution", Abort); +#endif + QCOMPARE(animation.state(), QAbstractAnimation::Stopped); + QVERIFY(animation.updateCalled > 1); + + // check if we can pause all animations + animation.updateCalled = 0; + QDeclarativeDebugHelper::setAnimationSlowDownFactor(0.0); + animation.start(); + QTest::qWait(animation.totalDuration() + 50); + QVERIFY(animation.updateCalled <= 1); // updateCurrentTime seems to be called at least once + + // now run them again + animation.updateCalled = 0; + QDeclarativeDebugHelper::setAnimationSlowDownFactor(2.0); + animation.start(); + QTest::qWait(animation.totalDuration() + 50); + QVERIFY(animation.updateCalled > 1); +} + QTEST_MAIN(tst_qdeclarativedebughelper) #include "tst_qdeclarativedebughelper.moc" -- cgit v0.12 From a8d85de1d10a9cbe74d7b9a509229ee2e7570bde Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 23 Sep 2010 08:50:21 +1000 Subject: Move includes after copyright block (cherry picked from commit b750bb085029117497d26a24dcd590fbe34fe281) --- src/declarative/debugger/qdeclarativedebughelper.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/declarative/debugger/qdeclarativedebughelper.cpp b/src/declarative/debugger/qdeclarativedebughelper.cpp index ea621bf..207ad2b 100644 --- a/src/declarative/debugger/qdeclarativedebughelper.cpp +++ b/src/declarative/debugger/qdeclarativedebughelper.cpp @@ -1,8 +1,3 @@ -#include "private/qdeclarativedebughelper_p.h" -#include "private/qdeclarativeengine_p.h" - -#include - /**************************************************************************** ** ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). @@ -44,6 +39,8 @@ ** ****************************************************************************/ +#include + #include "private/qdeclarativedebughelper_p.h" #include -- cgit v0.12 From 4cc98be8a3623ec899837e3e424910671c9f9920 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Mon, 27 Sep 2010 19:56:07 +1000 Subject: Update QtDeclarative .def files. --- src/s60installs/bwins/QtDeclarativeu.def | 2 ++ src/s60installs/eabi/QtDeclarativeu.def | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def index cf2f325..bd2026d 100644 --- a/src/s60installs/bwins/QtDeclarativeu.def +++ b/src/s60installs/bwins/QtDeclarativeu.def @@ -1715,4 +1715,6 @@ EXPORTS ??0QDeclarativeListModel@@AAE@PBV0@PAVQDeclarativeListModelWorkerAgent@@@Z @ 1714 NONAME ; QDeclarativeListModel::QDeclarativeListModel(class QDeclarativeListModel const *, class QDeclarativeListModelWorkerAgent *) ?inWorkerThread@QDeclarativeListModel@@ABE_NXZ @ 1715 NONAME ; bool QDeclarativeListModel::inWorkerThread(void) const ?canMove@QDeclarativeListModel@@ABE_NHHH@Z @ 1716 NONAME ; bool QDeclarativeListModel::canMove(int, int, int) const + ?getScriptEngine@QDeclarativeDebugHelper@@SAPAVQScriptEngine@@PAVQDeclarativeEngine@@@Z @ 1717 NONAME ; class QScriptEngine * QDeclarativeDebugHelper::getScriptEngine(class QDeclarativeEngine *) + ?setAnimationSlowDownFactor@QDeclarativeDebugHelper@@SAXM@Z @ 1718 NONAME ; void QDeclarativeDebugHelper::setAnimationSlowDownFactor(float) diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def index 11dee4d..9762c55 100644 --- a/src/s60installs/eabi/QtDeclarativeu.def +++ b/src/s60installs/eabi/QtDeclarativeu.def @@ -1747,4 +1747,6 @@ EXPORTS _ZN21QDeclarativeListModelC1EPKS_P32QDeclarativeListModelWorkerAgent @ 1746 NONAME _ZN21QDeclarativeListModelC2EPKS_P32QDeclarativeListModelWorkerAgent @ 1747 NONAME _ZNK21QDeclarativeListModel14inWorkerThreadEv @ 1748 NONAME + _ZN23QDeclarativeDebugHelper15getScriptEngineEP18QDeclarativeEngine @ 1749 NONAME + _ZN23QDeclarativeDebugHelper26setAnimationSlowDownFactorEf @ 1750 NONAME -- cgit v0.12 From bcdc043e357d6168663a6fbb4bf2d596d12cab77 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 24 Sep 2010 16:29:46 +0200 Subject: Updated WebKit to 6e15c3404d15a8ab72242152ec966e5e388161a2 Includes Jay's fix for the JSC memory consumption on Symbian https://bugs.webkit.org/show_bug.cgi?id=34349 See also commit 03b7a3cffba609df56b4ccadacae6b6f985e96e9 (cherry picked from commit dbf1d0339a0cfbe60e6b3e45f39e6c02aa3de0a8) --- src/3rdparty/webkit/.tag | 2 +- src/3rdparty/webkit/ChangeLog | 8 ++ src/3rdparty/webkit/JavaScriptCore/ChangeLog | 36 +++++++ .../webkit/JavaScriptCore/JavaScriptCore.pro | 1 + .../JavaScriptCore/interpreter/RegisterFile.cpp | 2 + .../JavaScriptCore/interpreter/RegisterFile.h | 33 +++++- .../wtf/symbian/RegisterFileAllocatorSymbian.cpp | 111 +++++++++++++++++++++ .../wtf/symbian/RegisterFileAllocatorSymbian.h | 69 +++++++++++++ .../JavaScriptCore/wtf/symbian/SymbianDefines.h | 42 ++++++++ src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebCore/ChangeLog | 31 ++++++ 11 files changed, 332 insertions(+), 5 deletions(-) create mode 100644 src/3rdparty/webkit/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp create mode 100644 src/3rdparty/webkit/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h create mode 100644 src/3rdparty/webkit/JavaScriptCore/wtf/symbian/SymbianDefines.h diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag index ae33228..fff71f4 100644 --- a/src/3rdparty/webkit/.tag +++ b/src/3rdparty/webkit/.tag @@ -1 +1 @@ -715b53069911a31a559aa0b3d94ffc6a5ac20988 +6e15c3404d15a8ab72242152ec966e5e388161a2 diff --git a/src/3rdparty/webkit/ChangeLog b/src/3rdparty/webkit/ChangeLog index 14d6da3..f438655 100644 --- a/src/3rdparty/webkit/ChangeLog +++ b/src/3rdparty/webkit/ChangeLog @@ -1,3 +1,11 @@ +2010-09-24 Romain Pokrzywka + + Reviewed by Simon Hausmann. + + [Qt] Fix the Wince build. + + * WebKit.pri: Apply msvc flags to wince, too. + 2010-07-01 Simon Hausmann Rubber-stamped by Laszlo Gombos. diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog index 9922da6..c7e0fc2 100644 --- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog +++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog @@ -1,3 +1,39 @@ +2010-06-18 Tucker Jay + + Reviewed by NOBODY (OOPS!). + + [Symbian] Lazy commit of memory required in JSC register file + https://bugs.webkit.org/show_bug.cgi?id=34349 + + * JavaScriptCore.pro: Added 1 new Symbian source file + * interpreter/RegisterFile.cpp: + (JSC::RegisterFile::~RegisterFile): + * interpreter/RegisterFile.h: + (JSC::RegisterFile::): + (JSC::RegisterFile::start): + (JSC::RegisterFile::end): + (JSC::RegisterFile::size): + (JSC::RegisterFile::setNumGlobals): + (JSC::RegisterFile::numGlobals): + (JSC::RegisterFile::maxGlobals): + (JSC::RegisterFile::lastGlobal): + (JSC::RegisterFile::markGlobals): + (JSC::RegisterFile::markCallFrames): + (JSC::isPageAligned): + (JSC::RegisterFile::RegisterFile): + (JSC::RegisterFile::shrink): + (JSC::RegisterFile::grow): + * wtf/symbian/RegisterFileAllocatorSymbian.cpp: Added. + (WTF::RegisterFileAllocator::RegisterFileAllocator): + Helper class to allocate memory required by RegisterFile + more efficiently. + (WTF::RegisterFileAllocator::~RegisterFileAllocator): + (WTF::RegisterFileAllocator::buffer): + (WTF::RegisterFileAllocator::grow): + (WTF::RegisterFileAllocator::shrink): + * wtf/symbian/RegisterFileAllocatorSymbian.h: Added. + * wtf/symbian/SymbianDefines.h: Added. + 2010-06-16 Thiago Macieira Reviewed by NOBODY (OOPS!). diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro index 3f1ac86..a805170 100644 --- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro +++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro @@ -208,6 +208,7 @@ SOURCES += \ wtf/qt/ThreadingQt.cpp \ wtf/RandomNumber.cpp \ wtf/RefCountedLeakCounter.cpp \ + wtf/symbian/RegisterFileAllocatorSymbian.cpp \ wtf/symbian/BlockAllocatorSymbian.cpp \ wtf/ThreadingNone.cpp \ wtf/Threading.cpp \ diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp index 510effe..4a33c62 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp @@ -40,6 +40,8 @@ RegisterFile::~RegisterFile() VirtualFree(m_buffer, DWORD(m_commitEnd) - DWORD(m_buffer), MEM_DECOMMIT); #endif VirtualFree(m_buffer, 0, MEM_RELEASE); +#elif OS(SYMBIAN) + delete m_registerFileAllocator; #else fastFree(m_buffer); #endif diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h index 1fc4f82..80cf991 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h @@ -41,6 +41,10 @@ #include #endif +#if OS(SYMBIAN) +#include +#endif + namespace JSC { /* @@ -152,12 +156,21 @@ namespace JSC { #if HAVE(VIRTUALALLOC) Register* m_commitEnd; #endif +#if OS(SYMBIAN) + // Commits and frees a continguous chunk of memory as required + WTF::RegisterFileAllocator* m_registerFileAllocator; +#endif JSGlobalObject* m_globalObject; // The global object whose vars are currently stored in the register file. }; // FIXME: Add a generic getpagesize() to WTF, then move this function to WTF as well. - inline bool isPageAligned(size_t size) { return size != 0 && size % (8 * 1024) == 0; } + // This is still a hack that should be fixed later. We know that a Symbian page size is 4K. + #if OS(SYMBIAN) + inline bool isPageAligned(size_t size) { return size && !(size % (4 * 1024)); } + #else + inline bool isPageAligned(size_t size) { return size && !(size % (8 * 1024)); } + #endif inline RegisterFile::RegisterFile(size_t capacity, size_t maxGlobals) : m_numGlobals(0) @@ -204,7 +217,13 @@ namespace JSC { CRASH(); } m_commitEnd = reinterpret_cast(reinterpret_cast(m_buffer) + committedSize); - #else + #elif OS(SYMBIAN) + m_registerFileAllocator = new WTF::RegisterFileAllocator(bufferLength); + m_buffer = (Register*)(m_registerFileAllocator->buffer()); + // start by committing enough space to hold maxGlobals + void* newEnd = (void*)((int)m_buffer + (maxGlobals * sizeof(Register))); + m_registerFileAllocator->grow(newEnd); + #else /* * If neither MMAP nor VIRTUALALLOC are available - use fastMalloc instead. * @@ -226,8 +245,13 @@ namespace JSC { if (newEnd >= m_end) return; m_end = newEnd; - if (m_end == m_start && (m_maxUsed - m_start) > maxExcessCapacity) + if (m_end == m_start && (m_maxUsed - m_start) > maxExcessCapacity) { +#if OS(SYMBIAN) + m_registerFileAllocator->shrink(newEnd); +#endif + releaseExcessCapacity(); + } } inline bool RegisterFile::grow(Register* newEnd) @@ -252,6 +276,9 @@ namespace JSC { m_commitEnd = reinterpret_cast(reinterpret_cast(m_commitEnd) + size); } #endif +#if OS(SYMBIAN) + m_registerFileAllocator->grow((void*)newEnd); +#endif if (newEnd > m_maxUsed) m_maxUsed = newEnd; diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp new file mode 100644 index 0000000..baa7841 --- /dev/null +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp @@ -0,0 +1,111 @@ +/* + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" + +#if OS(SYMBIAN) + +#include "RegisterFileAllocatorSymbian.h" + +namespace WTF { + +/** Efficiently allocates memory pools of size poolSize. + * Primarily designed for JSC RegisterFile's needs. + * Not thread-safe. + */ +RegisterFileAllocator::RegisterFileAllocator(TUint32 reservationSize, TUint32 poolSize) : + m_reserved(reservationSize), m_poolSize(poolSize) +{ + // Get system's page size value. + SYMBIAN_PAGESIZE(m_pageSize); + + // We only accept multiples of system page size for both initial reservation + // and the alignment/pool size + m_reserved = SYMBIAN_ROUNDUPTOMULTIPLE(m_reserved, m_pageSize); + __ASSERT_ALWAYS(SYMBIAN_ROUNDUPTOMULTIPLE(m_poolSize, m_pageSize), + User::Panic(_L("RegisterFileAllocator1"), KErrArgument)); + + // Open a Symbian RChunk, and reserve requested virtual address range + // Any thread in this process can operate this RChunk due to EOwnerProcess access rights. + TInt ret = m_chunk.CreateDisconnectedLocal(0 , 0, (TInt)m_reserved , EOwnerProcess); + if (ret != KErrNone) + User::Panic(_L("RegisterFileAllocator2"), ret); + + m_buffer = (void*)m_chunk.Base(); + m_resEnd = (void*)(m_chunk.Base() + m_chunk.MaxSize()); + m_comEnd = m_buffer; +} + +RegisterFileAllocator::~RegisterFileAllocator() +{ + // release everything! + m_chunk.Decommit(0, m_chunk.MaxSize()); + m_chunk.Close(); +} + +void* RegisterFileAllocator::buffer() const +{ + return m_buffer; +} + +void RegisterFileAllocator::grow(void* newEnd) +{ + // trying to commit more memory than reserved! + if (newEnd > m_resEnd) + return; + + if (newEnd > m_comEnd) { + TInt nBytes = (TInt)(newEnd) - (TInt)(m_comEnd); + nBytes = SYMBIAN_ROUNDUPTOMULTIPLE(nBytes, m_poolSize); + TInt offset = (TInt)m_comEnd - (TInt)m_buffer; + + TInt ret = m_chunk.Commit(offset, nBytes); + if (ret == KErrNone) + m_comEnd = (void*)(m_chunk.Base() + m_chunk.Size()); + } +} + +void RegisterFileAllocator::shrink(void* newEnd) +{ + if (newEnd < m_comEnd) { + TInt nBytes = (TInt)newEnd - (TInt)m_comEnd; + if (nBytes >= m_poolSize) { + TInt offset = SYMBIAN_ROUNDUPTOMULTIPLE((TUint)newEnd, m_poolSize) - (TInt)m_buffer; + nBytes = (TInt)m_comEnd - offset - (TInt)m_buffer; + if (nBytes > 0) { + TInt ret = m_chunk.Decommit(offset, nBytes); + if (ret == KErrNone) + m_comEnd = (void*)(m_chunk.Base() + m_chunk.Size()); + } + } + } +} + +} // end of namespace + +#endif // SYMBIAN diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h b/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h new file mode 100644 index 0000000..4cfc8c5 --- /dev/null +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.h @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef RegisterFileAllocatorSymbian_h +#define RegisterFileAllocatorSymbian_h + +#include "SymbianDefines.h" + +namespace WTF { + +/** + * Allocates contiguous regions of size poolSize. + * poolSize must be a multiple of system page size (typically 4K on Symbian/ARM) + * + * @param reservationSize Virtual address range to be reserved upon creation of chunk (bytes). + * @param poolSize Size of a single allocation. + */ +class RegisterFileAllocator { + +public: + RegisterFileAllocator( + TUint32 reservationSize, TUint32 poolSize = SYMBIAN_REGFILEALLOC_DEFAULTPOOLSIZE); + ~RegisterFileAllocator(); + void* buffer() const; + void grow(void* newEnd); + void shrink(void* newEnd); + +private: + RChunk m_chunk; // Symbian chunk that lets us reserve/commit/decommit + + // all following values are in numbers of bytes + TInt m_pageSize; // cached value of system page size, typically 4K on Symbian + TUint32 m_reserved; // total number of reserved bytes in virtual memory + TUint32 m_poolSize; // size of one memory pool, set by default to 64K in wtf/symbian/SymbianDefines.h + + void* m_buffer; // pointer to base of the chunk + void* m_comEnd; // pointer to end of currently committed memory + void* m_resEnd; // pointer to end of reserved memory + +}; + +} // end of namespace + +#endif // RegisterFileAllocatorSymbian_h diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/SymbianDefines.h b/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/SymbianDefines.h new file mode 100644 index 0000000..43e22b3 --- /dev/null +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/symbian/SymbianDefines.h @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef SymbianDefines_h +#define SymbianDefines_h + +#include +#include +#include + +#define SYMBIAN_PAGESIZE(x) (HAL::Get(HALData::EMemoryPageSize, x)); +#define SYMBIAN_FREERAM(x) (HAL::Get(HALData::EMemoryRAMFree, x)); +#define SYMBIAN_ROUNDUPTOMULTIPLE(x, multipleof) ( (x + multipleof - 1) & ~(multipleof - 1) ) + +#define SYMBIAN_REGFILEALLOC_DEFAULTPOOLSIZE 65536 // 64K + +#endif // SymbianDefines_h diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index f919bdf..a270d56 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -4,4 +4,4 @@ This is a snapshot of the Qt port of WebKit from and has the sha1 checksum - 715b53069911a31a559aa0b3d94ffc6a5ac20988 + 6e15c3404d15a8ab72242152ec966e5e388161a2 diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 2d20cbd..ac698e3 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,34 @@ +2010-09-24 Romain Pokrzywka + + Reviewed by Simon Hausmann. + + [Qt] Fix the Wince build. + + * WebCore.pro: Apply msvc flags to wince, too. + +2010-09-24 Anders Bakken + + Reviewed by Simon Hausmann. + + [Qt] Enable building Qt/Webkit with debug symbols + + With this patch one can configure with -webkit-debug to build Webkit + with debug symbols without having to manually edit WebCore.pro. + + * WebCore.pro: + +2010-09-16 Thomas Zander + + Reviewed by Andreas Kling. + + https://bugs.webkit.org/show_bug.cgi?id=45878 + + [Qt] Fixed incorrect Symbian scoping. + + The missing install functionality is only true for mmp based systems. + + * WebCore.pro: limit functionality to mmp systems. + 2010-09-09 Kristian Amlie Reviewed by Andreas Kling. -- cgit v0.12 From d6da3caf5692efbf3b927c902888ea679a0ef8f1 Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Mon, 27 Sep 2010 17:05:25 +1000 Subject: Connect/Disconnect requests needs to use the same dbus connection to ICD for the refcounting to work in ICD. Fixes NB#188145 - Network interface doesn't go down after last client disconnects (cherry picked from commit 4acbb418b1ad093ad848143218a10ee2957db282) --- src/plugins/bearer/icd/qnetworksession_impl.cpp | 6 ++---- src/plugins/bearer/icd/qnetworksession_impl.h | 5 ++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/plugins/bearer/icd/qnetworksession_impl.cpp b/src/plugins/bearer/icd/qnetworksession_impl.cpp index 8013d30..787cc55 100644 --- a/src/plugins/bearer/icd/qnetworksession_impl.cpp +++ b/src/plugins/bearer/icd/qnetworksession_impl.cpp @@ -881,7 +881,6 @@ void QNetworkSessionPrivateImpl::close() } else if (isOpen) { if ((activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) { // We will not wait any disconnect from icd as it might never come - Maemo::Icd icd; #ifdef BEARER_MANAGEMENT_DEBUG qDebug() << "closing session" << publicConfig.identifier(); #endif @@ -894,7 +893,7 @@ void QNetworkSessionPrivateImpl::close() opened = false; isOpen = false; - icd.disconnect(ICD_CONNECTION_FLAG_APPLICATION_EVENT); + m_dbusInterface->call(ICD_DBUS_API_DISCONNECT_REQ, ICD_CONNECTION_FLAG_APPLICATION_EVENT); startTime = QDateTime(); } else { opened = false; @@ -915,7 +914,6 @@ void QNetworkSessionPrivateImpl::stop() emit QNetworkSessionPrivate::error(lastError); } else { if ((activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) { - Maemo::Icd icd; #ifdef BEARER_MANAGEMENT_DEBUG qDebug() << "stopping session" << publicConfig.identifier(); #endif @@ -928,7 +926,7 @@ void QNetworkSessionPrivateImpl::stop() opened = false; isOpen = false; - icd.disconnect(ICD_CONNECTION_FLAG_APPLICATION_EVENT); + m_dbusInterface->call(ICD_DBUS_API_DISCONNECT_REQ, ICD_CONNECTION_FLAG_APPLICATION_EVENT); startTime = QDateTime(); } else { opened = false; diff --git a/src/plugins/bearer/icd/qnetworksession_impl.h b/src/plugins/bearer/icd/qnetworksession_impl.h index 390e508..a879971 100644 --- a/src/plugins/bearer/icd/qnetworksession_impl.h +++ b/src/plugins/bearer/icd/qnetworksession_impl.h @@ -58,6 +58,7 @@ #include #include +#include #include #include @@ -98,7 +99,9 @@ public: m_stopTimer.setSingleShot(true); connect(&m_stopTimer, SIGNAL(timeout()), this, SLOT(finishStopBySendingClosedSignal())); - QDBusConnection systemBus = QDBusConnection::systemBus(); + QDBusConnection systemBus = QDBusConnection::connectToBus( + QDBusConnection::SystemBus, + QUuid::createUuid().toString()); m_dbusInterface = new QDBusInterface(ICD_DBUS_API_INTERFACE, ICD_DBUS_API_PATH, -- cgit v0.12 From 45f05e32294680f15257990122ba42ef6049f13b Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Mon, 27 Sep 2010 17:07:55 +1000 Subject: Closes properly the dbus connection in icd backend (cherry picked from commit 2ff0dee1b97348a750532223f0a318596c93d412) --- src/plugins/bearer/icd/qnetworksession_impl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/bearer/icd/qnetworksession_impl.h b/src/plugins/bearer/icd/qnetworksession_impl.h index a879971..9ef9dc3 100644 --- a/src/plugins/bearer/icd/qnetworksession_impl.h +++ b/src/plugins/bearer/icd/qnetworksession_impl.h @@ -126,6 +126,8 @@ public: ~QNetworkSessionPrivateImpl() { cleanupSession(); + + QDBusConnection::disconnectFromBus(m_dbusInterface->connection().name()); } //called by QNetworkSession constructor and ensures -- cgit v0.12 From 131327ffc04d9888ce2b820833867d5a18a6f109 Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Mon, 27 Sep 2010 17:12:02 +1000 Subject: Removing libconninet 3rdparty component. The use of libconninet caused Qt to have a cyclic build dependency. Which was solved by embedding a copy as a 3rd party library. Maemo has since donated the libconninet code to Qt because (1) it was a private Maemo API and (2) the Qt ICD plugin is the only user of the library. This commit moves the relevent code from src/3rdparty/libconninet to src/plugins/bearer/icd and deletes the rest. Task-number: QT-3893 (cherry picked from commit f532d8fcd236be9933e4186a95561e1c264de277) --- src/3rdparty/libconninet.pri | 18 - src/3rdparty/libconninet/AUTHORS | 0 src/3rdparty/libconninet/COPYING | 510 -------- src/3rdparty/libconninet/ChangeLog | 0 src/3rdparty/libconninet/INSTALL | 229 ---- src/3rdparty/libconninet/NEWS | 0 src/3rdparty/libconninet/README | 0 src/3rdparty/libconninet/autogen.sh | 3 - src/3rdparty/libconninet/configure.ac | 86 -- src/3rdparty/libconninet/conninet.pc.in | 11 - src/3rdparty/libconninet/debian/changelog | 305 ----- src/3rdparty/libconninet/debian/compat | 1 - src/3rdparty/libconninet/debian/control | 39 - src/3rdparty/libconninet/debian/copyright | 19 - .../libconninet/debian/libconninet0-dev.dirs | 2 - .../libconninet/debian/libconninet0-dev.files | 4 - src/3rdparty/libconninet/debian/libconninet0.dirs | 1 - src/3rdparty/libconninet/debian/libconninet0.files | 1 - src/3rdparty/libconninet/debian/rules | 123 -- src/3rdparty/libconninet/doxygen.cfg.in | 1147 ----------------- src/3rdparty/libconninet/src/dbusdispatcher.cpp | 611 --------- src/3rdparty/libconninet/src/dbusdispatcher.h | 91 -- src/3rdparty/libconninet/src/iapconf.cpp | 299 ----- src/3rdparty/libconninet/src/iapconf.h | 84 -- src/3rdparty/libconninet/src/iapmonitor.cpp | 110 -- src/3rdparty/libconninet/src/iapmonitor.h | 48 - src/3rdparty/libconninet/src/maemo_icd.cpp | 1316 -------------------- src/3rdparty/libconninet/src/maemo_icd.h | 182 --- src/3rdparty/libconninet/src/proxyconf.cpp | 392 ------ src/3rdparty/libconninet/src/proxyconf.h | 53 - .../libconninet/tests/ut_dbusdispatcher.cpp | 191 --- src/3rdparty/libconninet/tests/ut_iapconf.cpp | 186 --- src/3rdparty/libconninet/tests/ut_iapmonitor.cpp | 118 -- src/3rdparty/libconninet/tests/ut_maemo_icd.cpp | 274 ---- src/3rdparty/libconninet/tests/ut_proxyconf.cpp | 400 ------ src/plugins/bearer/icd/dbusdispatcher.cpp | 631 ++++++++++ src/plugins/bearer/icd/dbusdispatcher.h | 111 ++ src/plugins/bearer/icd/iapconf.cpp | 245 ++++ src/plugins/bearer/icd/iapconf.h | 74 ++ src/plugins/bearer/icd/iapmonitor.cpp | 130 ++ src/plugins/bearer/icd/iapmonitor.h | 68 + src/plugins/bearer/icd/icd.pro | 16 +- src/plugins/bearer/icd/maemo_icd.cpp | 849 +++++++++++++ src/plugins/bearer/icd/maemo_icd.h | 174 +++ src/plugins/bearer/icd/proxyconf.cpp | 412 ++++++ src/plugins/bearer/icd/proxyconf.h | 73 ++ src/plugins/bearer/icd/qicdengine.cpp | 14 +- src/plugins/bearer/icd/qicdengine.h | 2 +- src/plugins/bearer/icd/qnetworksession_impl.cpp | 12 +- src/plugins/bearer/icd/wlan-utils.h | 110 ++ 50 files changed, 2915 insertions(+), 6860 deletions(-) delete mode 100644 src/3rdparty/libconninet.pri delete mode 100644 src/3rdparty/libconninet/AUTHORS delete mode 100644 src/3rdparty/libconninet/COPYING delete mode 100644 src/3rdparty/libconninet/ChangeLog delete mode 100644 src/3rdparty/libconninet/INSTALL delete mode 100644 src/3rdparty/libconninet/NEWS delete mode 100644 src/3rdparty/libconninet/README delete mode 100755 src/3rdparty/libconninet/autogen.sh delete mode 100644 src/3rdparty/libconninet/configure.ac delete mode 100644 src/3rdparty/libconninet/conninet.pc.in delete mode 100644 src/3rdparty/libconninet/debian/changelog delete mode 100644 src/3rdparty/libconninet/debian/compat delete mode 100644 src/3rdparty/libconninet/debian/control delete mode 100644 src/3rdparty/libconninet/debian/copyright delete mode 100644 src/3rdparty/libconninet/debian/libconninet0-dev.dirs delete mode 100644 src/3rdparty/libconninet/debian/libconninet0-dev.files delete mode 100644 src/3rdparty/libconninet/debian/libconninet0.dirs delete mode 100644 src/3rdparty/libconninet/debian/libconninet0.files delete mode 100755 src/3rdparty/libconninet/debian/rules delete mode 100644 src/3rdparty/libconninet/doxygen.cfg.in delete mode 100644 src/3rdparty/libconninet/src/dbusdispatcher.cpp delete mode 100644 src/3rdparty/libconninet/src/dbusdispatcher.h delete mode 100644 src/3rdparty/libconninet/src/iapconf.cpp delete mode 100644 src/3rdparty/libconninet/src/iapconf.h delete mode 100644 src/3rdparty/libconninet/src/iapmonitor.cpp delete mode 100644 src/3rdparty/libconninet/src/iapmonitor.h delete mode 100644 src/3rdparty/libconninet/src/maemo_icd.cpp delete mode 100644 src/3rdparty/libconninet/src/maemo_icd.h delete mode 100644 src/3rdparty/libconninet/src/proxyconf.cpp delete mode 100644 src/3rdparty/libconninet/src/proxyconf.h delete mode 100644 src/3rdparty/libconninet/tests/ut_dbusdispatcher.cpp delete mode 100644 src/3rdparty/libconninet/tests/ut_iapconf.cpp delete mode 100644 src/3rdparty/libconninet/tests/ut_iapmonitor.cpp delete mode 100644 src/3rdparty/libconninet/tests/ut_maemo_icd.cpp delete mode 100644 src/3rdparty/libconninet/tests/ut_proxyconf.cpp create mode 100644 src/plugins/bearer/icd/dbusdispatcher.cpp create mode 100644 src/plugins/bearer/icd/dbusdispatcher.h create mode 100644 src/plugins/bearer/icd/iapconf.cpp create mode 100644 src/plugins/bearer/icd/iapconf.h create mode 100644 src/plugins/bearer/icd/iapmonitor.cpp create mode 100644 src/plugins/bearer/icd/iapmonitor.h create mode 100644 src/plugins/bearer/icd/maemo_icd.cpp create mode 100644 src/plugins/bearer/icd/maemo_icd.h create mode 100644 src/plugins/bearer/icd/proxyconf.cpp create mode 100644 src/plugins/bearer/icd/proxyconf.h create mode 100644 src/plugins/bearer/icd/wlan-utils.h diff --git a/src/3rdparty/libconninet.pri b/src/3rdparty/libconninet.pri deleted file mode 100644 index e041e2b..0000000 --- a/src/3rdparty/libconninet.pri +++ /dev/null @@ -1,18 +0,0 @@ -INCLUDEPATH += $$PWD/libconninet/src - -QMAKE_CXXFLAGS += $$QT_CFLAGS_GLIB - -HEADERS += \ - $$PWD/libconninet/src/dbusdispatcher.h \ - $$PWD/libconninet/src/iapconf.h \ - $$PWD/libconninet/src/iapmonitor.h \ - $$PWD/libconninet/src/maemo_icd.h \ - $$PWD/libconninet/src/proxyconf.h - -SOURCES += \ - $$PWD/libconninet/src/dbusdispatcher.cpp \ - $$PWD/libconninet/src/iapconf.cpp \ - $$PWD/libconninet/src/iapmonitor.cpp \ - $$PWD/libconninet/src/maemo_icd.cpp \ - $$PWD/libconninet/src/proxyconf.cpp - diff --git a/src/3rdparty/libconninet/AUTHORS b/src/3rdparty/libconninet/AUTHORS deleted file mode 100644 index e69de29..0000000 diff --git a/src/3rdparty/libconninet/COPYING b/src/3rdparty/libconninet/COPYING deleted file mode 100644 index b124cf5..0000000 --- a/src/3rdparty/libconninet/COPYING +++ /dev/null @@ -1,510 +0,0 @@ - - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations -below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it -becomes a de-facto standard. To achieve this, non-free programs must -be allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control -compilation and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at least - three years, to give the same user the materials specified in - Subsection 6a, above, for a charge no more than the cost of - performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply, and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License -may add an explicit geographical distribution limitation excluding those -countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms -of the ordinary General Public License). - - To apply these terms, attach the following notices to the library. -It is safest to attach them to the start of each source file to most -effectively convey the exclusion of warranty; and each file should -have at least the "copyright" line and a pointer to where the full -notice is found. - - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or -your school, if any, to sign a "copyright disclaimer" for the library, -if necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James - Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/src/3rdparty/libconninet/ChangeLog b/src/3rdparty/libconninet/ChangeLog deleted file mode 100644 index e69de29..0000000 diff --git a/src/3rdparty/libconninet/INSTALL b/src/3rdparty/libconninet/INSTALL deleted file mode 100644 index 54caf7c..0000000 --- a/src/3rdparty/libconninet/INSTALL +++ /dev/null @@ -1,229 +0,0 @@ -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software -Foundation, Inc. - - This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. - -Basic Installation -================== - - These are generic installation instructions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is -disabled by default to prevent problems with accidental use of stale -cache files.) - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' -for details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. - -Installation Names -================== - - By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=PATH' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - - There may be some features `configure' cannot figure out -automatically, but needs to determine by the type of machine the package -will run on. Usually, assuming the package is built to be run on the -_same_ architectures, `configure' can figure that out, but if it prints -a message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the `--target=TYPE' option to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - - Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -will cause the specified gcc to be used as the C compiler (unless it is -overridden in the site shell script). - -`configure' Invocation -====================== - - `configure' recognizes the following options to control how it -operates. - -`--help' -`-h' - Print a summary of the options to `configure', and exit. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/src/3rdparty/libconninet/NEWS b/src/3rdparty/libconninet/NEWS deleted file mode 100644 index e69de29..0000000 diff --git a/src/3rdparty/libconninet/README b/src/3rdparty/libconninet/README deleted file mode 100644 index e69de29..0000000 diff --git a/src/3rdparty/libconninet/autogen.sh b/src/3rdparty/libconninet/autogen.sh deleted file mode 100755 index a8fd885..0000000 --- a/src/3rdparty/libconninet/autogen.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -autoreconf --verbose --install --force diff --git a/src/3rdparty/libconninet/configure.ac b/src/3rdparty/libconninet/configure.ac deleted file mode 100644 index 72fa98b..0000000 --- a/src/3rdparty/libconninet/configure.ac +++ /dev/null @@ -1,86 +0,0 @@ -AC_INIT([libconninet], patsubst(esyscmd([dpkg-parsechangelog | sed -n '/^Version: \(.*\)$/ {s//\1/;p}']), [ -]), [jukka.rissanen@nokia.com]) -AM_INIT_AUTOMAKE([foreign]) - -AC_PROG_CXX -AC_PROG_LIBTOOL - -AC_ARG_ENABLE(docs, [ --enable-docs Build DOXYGEN documentation (requires Doxygen)],enable_docs=$enableval,enable_docs=auto) - -AC_PATH_PROG(DOXYGEN, doxygen, no) -AC_MSG_CHECKING([whether to build Doxygen documentation]) - -if test x$DOXYGEN = xno ; then - have_doxygen=no -else - have_doxygen=yes -fi -if test x$enable_docs = xauto ; then - if test x$have_doxygen = xno ; then - enable_docs=no - else - enable_docs=yes - fi -fi -if test x$enable_docs = xyes; then - if test x$have_doxygen = xno; then - AC_MSG_ERROR([Building Doxygen docs explicitly required, but Doxygen not found]) - else - AC_MSG_RESULT(yes) - fi -else - AC_MSG_RESULT(no) -fi - -AM_CONDITIONAL(DOXYGEN_DOCS_ENABLED, test x$enable_docs = xyes) -AC_SUBST(DOXYGEN) - -PKG_CHECK_MODULES(GLIB, glib-2.0) -AC_SUBST(GLIB_CFLAGS) -AC_SUBST(GLIB_LIBS) - -PKG_CHECK_MODULES(QTCORE, QtCore) -AC_SUBST(QTCORE_CFLAGS) -AC_SUBST(QTCORE_LIBS) - -PKG_CHECK_MODULES(QTNETWORK, QtNetwork) -AC_SUBST(QTNETWORK_CFLAGS) -AC_SUBST(QTNETWORK_LIBS) - -PKG_CHECK_MODULES(QTDBUS, QtDBus) -AC_SUBST(QTDBUS_CFLAGS) -AC_SUBST(QTDBUS_LIBS) - -PKG_CHECK_MODULES(QTTEST, QtTest) -AC_SUBST(QTTEST_CFLAGS) -AC_SUBST(QTTEST_LIBS) - -PKG_CHECK_MODULES(DBUS, dbus-glib-1) -AC_SUBST(DBUS_CFLAGS) -AC_SUBST(DBUS_LIBS) - -PKG_CHECK_MODULES(CONNSETTINGS, connsettings) -AC_SUBST(CONNSETTINGS_CFLAGS) -AC_SUBST(CONNSETTINGS_LIBS) - -PKG_CHECK_MODULES(OSSO_IC, osso-ic) -AC_SUBST(OSSO_IC_CFLAGS) -AC_SUBST(OSSO_IC_LIBS) - -PKG_CHECK_MODULES(ICD_DEV, icd2) -AC_SUBST(ICD_DEV_CFLAGS) -AC_SUBST(ICD_DEV_LIBS) - -PKG_CHECK_MODULES(GCONF, gconf-2.0) -AC_SUBST(GCONF_CFLAGS) -AC_SUBST(GCONF_LIBS) - -CONCFLAGS="-Wall -Werror -Wmissing-prototypes" -AC_SUBST(CONCFLAGS) - -AC_CONFIG_FILES([Makefile \ - src/Makefile \ - tests/Makefile \ - conninet.pc \ - doxygen.cfg]) -AC_OUTPUT diff --git a/src/3rdparty/libconninet/conninet.pc.in b/src/3rdparty/libconninet/conninet.pc.in deleted file mode 100644 index 68cdee0..0000000 --- a/src/3rdparty/libconninet/conninet.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: libconninet -Description: Internet Connectivity support library -Version: @VERSION@ -Requires: dbus-1 >= 0.60 glib-2.0 QtCore QtDBus QtGui -Libs: -lconninet -Cflags: -I${includedir}/conninet diff --git a/src/3rdparty/libconninet/debian/changelog b/src/3rdparty/libconninet/debian/changelog deleted file mode 100644 index 10e9dec..0000000 --- a/src/3rdparty/libconninet/debian/changelog +++ /dev/null @@ -1,305 +0,0 @@ -libconninet (0.45) unstable; urgency=low - - * Fixes: NB#187470 - libconninet: add automake to build-deps - - -- Markus Silvan Wed, 25 Aug 2010 09:02:55 +0300 - -libconninet (0.44) unstable; urgency=low - - * Added autoconf to build dependencies - - -- Markus Silvan Wed, 25 Aug 2010 09:02:55 +0300 - -libconninet (0.43) unstable; urgency=low - - * Fixes: NB#184824 - Getting all proxy variables from gconf in one go - which will speedup the HTTP requests done by Qt4.7 webkit - - -- Jukka Rissanen Thu, 12 Aug 2010 10:15:20 +0300 - -libconninet (0.42) unstable; urgency=low - - * Fixes: NB#180536 - Uploads to online services are not working. - This is a regression caused by fix to bug 175098, the timeout was never - expiring when waiting reply from icd. - - -- Jukka Rissanen Mon, 19 Jul 2010 12:23:30 +0300 - -libconninet (0.41) unstable; urgency=low - - * Fixes: NB#175098 - Qt4.7 Webkit crashes when bearer API QNetworkSession - constructor calls QNetworkSession::syncStateWithInterface() which in turn - calls Maemo::state() and Maemo::addrinfo() and webkit expects that event - loop is not run but those function process main loop events. - Now Maemo::state() and Maemo::addrinfo() are changed to be synchronous - and fully blocking functions. The old non-blocking versions are called - Maemo::state_non_blocking() and Maemo::addrinfo_non_blocking(). - - -- Jukka Rissanen Wed, 14 Jul 2010 10:12:47 +0300 - -libconninet (0.40) unstable; urgency=low - - * Fixes: NB#167465 - Unable to open network connection using libbearer - - -- Jukka Rissanen Tue, 11 May 2010 10:47:10 +0300 - -libconninet (0.39) unstable; urgency=low - - * Fixes: NB#167982 - initialize DBus vtable in DBusDispatcher. - - -- Aapo Makela Mon, 10 May 2010 14:42:39 +0300 - -libconninet (0.38) unstable; urgency=low - - * Changing icd2 connect_req to be synchronous as the check for - returned connect signal did not work correctly, this caused a - long timeout when connect() was called. - * Scan sometimes missed results and did not return them to caller. - * HTTP proxy settings were not set correctly. - - -- Jukka Rissanen Thu, 15 Apr 2010 11:25:06 +0300 - -libconninet (0.37) unstable; urgency=low - - * Make proxy config reference counting atomic. - - -- Jukka Rissanen Wed, 3 Mar 2010 13:23:08 +0200 - -libconninet (0.36) unstable; urgency=low - - * Fixes: NB#157586 - Cleanup dbus listener when WLAN scanning object is - deleted. - - -- Jukka Rissanen Fri, 26 Feb 2010 13:30:41 +0200 - -libconninet (0.35) unstable; urgency=low - - * Fixes: NB#156883 - libconninet fails to build under the Platform SDK (SB2) - - -- Jukka Rissanen Thu, 18 Feb 2010 12:14:40 +0200 - -libconninet (0.34) unstable; urgency=low - - * Coverity fix - - -- Jukka Rissanen Tue, 16 Feb 2010 16:38:00 +0200 - -libconninet (0.33) unstable; urgency=low - - * Added API to update Qt proxy config. - - -- Jukka Rissanen Tue, 26 Jan 2010 15:48:36 +0200 - -libconninet (0.32) unstable; urgency=low - - * Fixed IAPConf to unset value when set value is invalid. - * Updated IAPMonitor to use libconnsettings. - - -- Aapo Makela Wed, 03 Feb 2010 07:32:45 +0200 - -libconninet (0.31) unstable; urgency=low - - * Fixes: NB#154892 - Check nulls in IAPConf. - - -- Aapo Makela Mon, 01 Feb 2010 09:32:06 +0200 - -libconninet (0.30) unstable; urgency=low - - * Updated IAPConf to use libconnsettings. - - -- Aapo Makela Fri, 29 Jan 2010 12:58:03 +0200 - -libconninet (0.29) unstable; urgency=low - - * Fixed dependencies - - -- Jukka Rissanen Fri, 15 Jan 2010 10:16:07 +0200 - -libconninet (0.28) unstable; urgency=low - - * Get rid of libdui dependency - - -- Jukka Rissanen Wed, 13 Jan 2010 09:56:26 +0200 - -libconninet (0.27) unstable; urgency=low - - * Insert new pending calls to the list in DBusDispatcher. - - -- Aapo Makela Tue, 22 Dec 2009 14:27:32 +0200 - -libconninet (0.26) unstable; urgency=low - - * Added possibility to specify different signal path for DBusDispatcher. - - -- Aapo Makela Wed, 25 Nov 2009 14:27:34 +0200 - -libconninet (0.25) unstable; urgency=low - - * Fixes: NB#146450 - All scan results were not returned to the caller. - - -- Jukka Rissanen Mon, 16 Nov 2009 17:23:15 +0200 - -libconninet (0.24) unstable; urgency=low - - * Wait all scan results for all network types in Maemo::Icd::scan() - - -- Jukka Rissanen Fri, 6 Nov 2009 14:45:23 +0200 - -libconninet (0.23) unstable; urgency=low - - * Fixes: NB#143361 - Assert failure in session class for GPRS IAP. - - -- Jukka Rissanen Mon, 19 Oct 2009 16:00:14 +0300 - -libconninet (0.22) unstable; urgency=low - - * Fixed the error checking if scan returns 0 results. - - -- Jukka Rissanen Wed, 7 Oct 2009 13:50:27 +0300 - -libconninet (0.21) unstable; urgency=low - - * Support multiple DBusDispatcher classes at the same time. This is - required by Maemo::Icd class so that multiple instances of it can - be used the same time. - - -- Jukka Rissanen Mon, 5 Oct 2009 16:33:43 +0300 - -libconninet (0.20) unstable; urgency=low - - * Fixed memory leak in IAPConf::setValue() - - -- Jukka Rissanen Fri, 2 Oct 2009 13:02:21 +0300 - -libconninet (0.19) unstable; urgency=low - - * Fixed connect_req to one specific IAP in Icd class. - - -- Jukka Rissanen Tue, 29 Sep 2009 17:02:46 +0300 - -libconninet (0.18) unstable; urgency=low - - * Make sure the library will not abort in Icd class if scan does - not return any results. - - -- Jukka Rissanen Tue, 22 Sep 2009 17:00:12 +0300 - -libconninet (0.17) unstable; urgency=low - - * Added IAP monitoring support. - - -- Jukka Rissanen Mon, 21 Sep 2009 16:29:31 +0300 - -libconninet (0.16) unstable; urgency=low - - * Disabled the old osso-ic dbus interface as it is currently not used. - * Fixed the addrinfo request, now addresses are returned correctly to - the caller. - - -- Jukka Rissanen Thu, 17 Sep 2009 15:56:13 +0300 - -libconninet (0.15) unstable; urgency=low - - * Enabling state_req, statistics_req and addrinfo_req support - functions in Maemo::Icd as the corresponding DBUS API functions are - fixed in icd2 v0.89 - - -- Jukka Rissanen Fri, 24 Jul 2009 15:23:02 +0300 - -libconninet (0.14) unstable; urgency=low - - * Icd statistics support added. - * Icd address information support added. - * Icd scan method does not return the final (and empty) result any more. - * Added initial unit test implementation for Icd class. - * Some of the status functions in Icd class disabled because of issues - in icd2 and the dbus api. - - -- Jukka Rissanen Thu, 23 Jul 2009 11:03:05 +0300 - -libconninet (0.13) unstable; urgency=low - - * Added API to get all the configured IAPs. - - -- Jukka Rissanen Tue, 21 Jul 2009 09:47:18 +0300 - -libconninet (0.12) unstable; urgency=low - - * Replaced duivaluespace by Dui in pkg-config file because the - duivaluespace is deprecated. - - -- Jukka Rissanen Mon, 20 Jul 2009 16:00:10 +0300 - -libconninet (0.11) unstable; urgency=low - - * Using libdui instead of libduivaluespace because it is deprecated. - * The IAPConf::clear() uses native gconf API instead of launching gconftool - * Check that state_req call returned list and the list contains entries - before trying to access it. - - -- Jukka Rissanen Mon, 20 Jul 2009 14:55:15 +0300 - -libconninet (0.10) unstable; urgency=low - - * connect() did not return ok when connection succeeded. - - -- Jukka Rissanen Thu, 25 Jun 2009 09:31:21 +0300 - -libconninet (0.9) unstable; urgency=low - - * Connection timeout set to 2.5min, same as in fremantle. - - -- Jukka Rissanen Wed, 17 Jun 2009 13:36:40 +0300 - -libconninet (0.8) unstable; urgency=low - - * Fix state_req signal received from Icd - - -- Jukka Rissanen Thu, 11 Jun 2009 17:19:33 +0300 - -libconninet (0.7) unstable; urgency=low - - * Icd disconnect and select reqs are made synchronous as we do not - wait the return status. The previous async version was causing core - dumps if Icd class was destroyed too early. - - -- Jukka Rissanen Thu, 11 Jun 2009 11:52:36 +0300 - -libconninet (0.6) unstable; urgency=low - - * Fixed the libconninet0-dev dependencies. - - -- Jukka Rissanen Mon, 8 Jun 2009 10:47:56 +0300 - -libconninet (0.5) unstable; urgency=low - - * Fixed missing QObject connect functions. - * Fixed IAPConf to return invalid QVariant if the value does not exist. - - -- Jukka Rissanen Mon, 01 Jun 2009 13:58:53 +0300 - -libconninet (0.4) unstable; urgency=low - - * Fixed QObject signal setting for Maemo::Icd - - -- Jukka Rissanen Wed, 20 May 2009 13:51:11 +0300 - -libconninet (0.3) unstable; urgency=low - - * Refactoring classes - * Added IAPConf class. - - -- Jukka Rissanen Thu, 14 May 2009 13:24:11 +0300 - -libconninet (0.2) unstable; urgency=low - - * Fixed pkgconfig file which had wrong dependency - * Added DBus array and struct support to DBusDispatcher. - - -- Jukka Rissanen Wed, 13 May 2009 12:11:00 +0300 - -libconninet (0.1) unstable; urgency=low - - * Initial Release. - - -- Jukka Rissanen Tue, 12 May 2009 16:10:27 +0200 diff --git a/src/3rdparty/libconninet/debian/compat b/src/3rdparty/libconninet/debian/compat deleted file mode 100644 index b8626c4..0000000 --- a/src/3rdparty/libconninet/debian/compat +++ /dev/null @@ -1 +0,0 @@ -4 diff --git a/src/3rdparty/libconninet/debian/control b/src/3rdparty/libconninet/debian/control deleted file mode 100644 index a2343a0..0000000 --- a/src/3rdparty/libconninet/debian/control +++ /dev/null @@ -1,39 +0,0 @@ -Source: libconninet -Priority: optional -Maintainer: Jukka Rissanen -Build-Depends: debhelper (>= 4.0.0), autotools-dev, libglib2.0-dev (>= 2.8), - libdbus-1-dev (>= 0.60), libconnsettings0-dev (>= 0.4), icd2-osso-ic-dev, - icd2-dev, libqt4-dev, libgconf2-dev (>> 2.6.4), autoconf, automake -Standards-Version: 3.6.2 -Section: libs - -Package: libconninet0-dev -Section: libdevel -Architecture: any -Depends: libconninet0 (= ${Source-Version}), libdbus-1-dev (>= 0.60), - libglib2.0-dev (>= 2.8), libconnsettings0-dev (>= 0.4), libqt4-dev, - icd2-osso-ic-dev, icd2-dev, libgconf2-dev (>> 2.6.4) -Description: Internet Connectivity support library development files - Internet Connectivity support library (libconninet) provides common - support functions for connecting to icd2 and accessing configuration - data. - . - This package contains the header files. - -Package: libconninet0 -Section: libs -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: Internet Connectivity support library - Internet Connectivity support library (libconninet) provides common - support functions for connecting to icd2 and accessing configuration - data. - . - This package contains the shared libraries. - -Package: libconninet0-dbg -Section: libs -Architecture: any -Depends: libconninet0 (= ${Source-Version}), ${shlibs:Depends}, ${misc:Depends} -Description: Debug symbols for the Internet Connectivity support library - Internet Connectivity support library (libconninet) debug symbols. diff --git a/src/3rdparty/libconninet/debian/copyright b/src/3rdparty/libconninet/debian/copyright deleted file mode 100644 index 97e8e68..0000000 --- a/src/3rdparty/libconninet/debian/copyright +++ /dev/null @@ -1,19 +0,0 @@ -libconninet - Internet Connectivity support library - -Copyright (C) 2009 Nokia Corporation. All rights reserved. - -Contact: Jukka Rissanen - -This library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License version 2.1 -as published by the Free Software Foundation. - -This library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with this library; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -02110-1301 USA diff --git a/src/3rdparty/libconninet/debian/libconninet0-dev.dirs b/src/3rdparty/libconninet/debian/libconninet0-dev.dirs deleted file mode 100644 index 4418816..0000000 --- a/src/3rdparty/libconninet/debian/libconninet0-dev.dirs +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib -usr/include diff --git a/src/3rdparty/libconninet/debian/libconninet0-dev.files b/src/3rdparty/libconninet/debian/libconninet0-dev.files deleted file mode 100644 index 78bbac8..0000000 --- a/src/3rdparty/libconninet/debian/libconninet0-dev.files +++ /dev/null @@ -1,4 +0,0 @@ -usr/include/* -usr/lib/lib*.so -usr/lib/pkgconfig/* -usr/share/pkgconfig/* diff --git a/src/3rdparty/libconninet/debian/libconninet0.dirs b/src/3rdparty/libconninet/debian/libconninet0.dirs deleted file mode 100644 index 6845771..0000000 --- a/src/3rdparty/libconninet/debian/libconninet0.dirs +++ /dev/null @@ -1 +0,0 @@ -usr/lib diff --git a/src/3rdparty/libconninet/debian/libconninet0.files b/src/3rdparty/libconninet/debian/libconninet0.files deleted file mode 100644 index d0dbfd1..0000000 --- a/src/3rdparty/libconninet/debian/libconninet0.files +++ /dev/null @@ -1 +0,0 @@ -usr/lib/lib*.so.* diff --git a/src/3rdparty/libconninet/debian/rules b/src/3rdparty/libconninet/debian/rules deleted file mode 100755 index 2a3d395..0000000 --- a/src/3rdparty/libconninet/debian/rules +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - - -# These are used for cross-compiling and for saving the configure script -# from having to guess our platform (since we know it already) -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) - - -CFLAGS = -Wall -g - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif - -# shared library versions, option 1 -#version=2.0.5 -#major=2 -# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so -version=`ls src/.libs/lib*.so.* | \ - awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'` -major=`ls src/.libs/lib*.so.* | \ - awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'` - -configure: configure.ac debian/changelog - -./autogen.sh - -config.status: configure - dh_testdir - # Add here commands to configure the package. - CFLAGS="$(CFLAGS)" ./configure \ - --host=$(DEB_HOST_GNU_TYPE) \ - --build=$(DEB_BUILD_GNU_TYPE) \ - --prefix=/usr \ - --mandir=\$${prefix}/share/man \ - --infodir=\$${prefix}/share/info - - -build: build-stamp -build-stamp: config.status - dh_testdir - - # Add here commands to compile the package. - $(MAKE) - - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp - - # Add here commands to clean up after the build process. - -$(MAKE) distclean -ifneq "$(wildcard /usr/share/misc/config.sub)" "" - cp -f /usr/share/misc/config.sub config.sub -endif -ifneq "$(wildcard /usr/share/misc/config.guess)" "" - cp -f /usr/share/misc/config.guess config.guess -endif - - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Add here commands to install the package into debian/tmp - $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp - - -# Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot - dh_movefiles - dh_installchangelogs ChangeLog - dh_installdocs - dh_installexamples -# dh_install -# dh_installmenu -# dh_installdebconf -# dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime -# dh_installinit -# dh_installcron -# dh_installinfo - dh_installman - dh_link - dh_strip --dbg-package=libconninet0 - dh_compress - dh_fixperms -# dh_perl -# dh_python - dh_makeshlibs - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install diff --git a/src/3rdparty/libconninet/doxygen.cfg.in b/src/3rdparty/libconninet/doxygen.cfg.in deleted file mode 100644 index 80a4c8d..0000000 --- a/src/3rdparty/libconninet/doxygen.cfg.in +++ /dev/null @@ -1,1147 +0,0 @@ -# Doxyfile 1.3.7 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = "Internet Connectivity Support Library" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = @VERSION@ - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = doc - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 2 levels of 10 sub-directories under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of source -# files, where putting all generated files in the same directory would otherwise -# cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, -# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en -# (Japanese with English messages), Korean, Korean-en, Norwegian, Polish, Portuguese, -# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is used -# as the annotated text. Otherwise, the brief description is used as-is. If left -# blank, the following values are used ("$name" is automatically replaced with the -# name of the entity): "The $name class" "The $name widget" "The $name file" -# "is" "provides" "specifies" "contains" "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited -# members of a class in the documentation of that class as if those members were -# ordinary class members. Constructors, destructors and assignment operators of -# the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. - -JAVADOC_AUTOBRIEF = YES - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = YES - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = YES - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = conic/conic.h \ - conic/conicconnection.h \ - conic/conicconnectionevent.h \ - conic/conicevent.h \ - conic/coniciap.h \ - conic/conicstatisticsevent.h - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp -# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories -# that are symbolic links (a Unix filesystem feature) are excluded from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. - -EXCLUDE_PATTERNS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. - -INPUT_FILTER = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = NO - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = YES - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = YES - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = YES - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse the -# parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or -# super classes. Setting the tag to NO turns the diagrams off. Note that this -# option is superseded by the HAVE_DOT option below. This is only a fallback. It is -# recommended to install and use dot, since it yields more powerful graphs. - -CLASS_DIAGRAMS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found on the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes that -# lay further from the root node will be omitted. Note that setting this option to -# 1 or 2 may greatly reduce the computation time needed for large code bases. Also -# note that a graph may be further truncated if the graph's image dimensions are -# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). -# If 0 is used for the depth value (the default), the graph is not depth-constrained. - -MAX_DOT_GRAPH_DEPTH = 0 - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/src/3rdparty/libconninet/src/dbusdispatcher.cpp b/src/3rdparty/libconninet/src/dbusdispatcher.cpp deleted file mode 100644 index 7581982..0000000 --- a/src/3rdparty/libconninet/src/dbusdispatcher.cpp +++ /dev/null @@ -1,611 +0,0 @@ -/* * This file is part of conninet * - * - * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * - * Contact: Aapo Makela - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * version 2.1 as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA - */ - -#include -#include -#include -#include -#include -#include -#include "dbusdispatcher.h" - -namespace Maemo { - -/*! - \class DBusDispatcher - - \brief DBusDispatcher is a class, which is able to send DBUS method call - messages and receive unicast signals from DBUS object. -*/ - -class DBusDispatcherPrivate -{ -public: - DBusDispatcherPrivate(const QString& service, - const QString& path, - const QString& interface, - const QString& signalPath) - : service(service), path(path), interface(interface), - signalPath(signalPath), connection(0) - { - memset(&signal_vtable, 0, sizeof(signal_vtable)); - } - - ~DBusDispatcherPrivate() - { - foreach(DBusPendingCall *call, pending_calls) { - dbus_pending_call_cancel(call); - dbus_pending_call_unref(call); - } - } - - QString service; - QString path; - QString interface; - QString signalPath; - struct DBusConnection *connection; - QList pending_calls; - struct DBusObjectPathVTable signal_vtable; -}; - -static bool constantVariantList(const QVariantList& variantList) { - // Special case, empty list == empty struct - if (variantList.isEmpty()) { - return false; - } else { - QVariant::Type type = variantList[0].type(); - // Iterate items in the list and check if they are same type - foreach(QVariant variant, variantList) { - if (variant.type() != type) { - return false; - } - } - } - return true; -} - -static QString variantToSignature(const QVariant& argument, - bool constantList = true) { - switch (argument.type()) { - case QVariant::Bool: - return "b"; - case QVariant::ByteArray: - return "ay"; - case QVariant::Char: - return "y"; - case QVariant::Int: - return "i"; - case QVariant::UInt: - return "u"; - case QVariant::StringList: - return "as"; - case QVariant::String: - return "s"; - case QVariant::LongLong: - return "x"; - case QVariant::ULongLong: - return "t"; - case QVariant::List: - { - QString signature; - QVariantList variantList = argument.toList(); - if (!constantList) { - signature += DBUS_STRUCT_BEGIN_CHAR_AS_STRING; - foreach(QVariant listItem, variantList) { - signature += variantToSignature(listItem); - } - signature += DBUS_STRUCT_END_CHAR_AS_STRING; - } else { - if (variantList.isEmpty()) - return ""; - signature = "a" + variantToSignature(variantList[0]); - } - - return signature; - } - default: - qDebug() << "Unsupported variant type: " << argument.type(); - break; - } - - return ""; -} - -static bool appendVariantToDBusMessage(const QVariant& argument, - DBusMessageIter *dbus_iter) { - int idx = 0; - DBusMessageIter array_iter; - QStringList str_list; - dbus_bool_t bool_data; - dbus_int32_t int32_data; - dbus_uint32_t uint32_data; - dbus_int64_t int64_data; - dbus_uint64_t uint64_data; - char *str_data; - char char_data; - - switch (argument.type()) { - - case QVariant::Bool: - bool_data = argument.toBool(); - dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_BOOLEAN, - &bool_data); - break; - - case QVariant::ByteArray: - str_data = argument.toByteArray().data(); - dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY, - DBUS_TYPE_BYTE_AS_STRING, &array_iter); - dbus_message_iter_append_fixed_array(&array_iter, - DBUS_TYPE_BYTE, - &str_data, - argument.toByteArray().size()); - dbus_message_iter_close_container(dbus_iter, &array_iter); - break; - - case QVariant::Char: - char_data = argument.toChar().toAscii(); - dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_BYTE, - &char_data); - break; - - case QVariant::Int: - int32_data = argument.toInt(); - dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_INT32, - &int32_data); - break; - - case QVariant::String: - str_data = argument.toString().toLatin1().data(); - dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_STRING, - &str_data); - break; - - case QVariant::StringList: - str_list = argument.toStringList(); - dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY, - "s", &array_iter); - for (idx = 0; idx < str_list.size(); idx++) { - str_data = str_list.at(idx).toLatin1().data(); - dbus_message_iter_append_basic(&array_iter, - DBUS_TYPE_STRING, - &str_data); - } - dbus_message_iter_close_container(dbus_iter, &array_iter); - break; - - case QVariant::UInt: - uint32_data = argument.toUInt(); - dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_UINT32, - &uint32_data); - break; - - case QVariant::ULongLong: - uint64_data = argument.toULongLong(); - dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_UINT64, - &uint64_data); - break; - - case QVariant::LongLong: - int64_data = argument.toLongLong(); - dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_INT64, - &int64_data); - break; - - case QVariant::List: - { - QVariantList variantList = argument.toList(); - bool constantList = constantVariantList(variantList); - DBusMessageIter array_iter; - - // List is mapped either as an DBUS array (all items same type) - // DBUS struct (variable types) depending on constantList - if (constantList) { - // Resolve the signature for the first item - QString signature = ""; - if (!variantList.isEmpty()) { - signature = variantToSignature( - variantList[0], - constantVariantList(variantList[0].toList())); - } - - // Mapped as DBUS array - dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY, - signature.toAscii(), - &array_iter); - - foreach(QVariant listItem, variantList) { - appendVariantToDBusMessage(listItem, &array_iter); - } - - dbus_message_iter_close_container(dbus_iter, &array_iter); - } else { - // Mapped as DBUS struct - dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_STRUCT, - NULL, - &array_iter); - - foreach(QVariant listItem, variantList) { - appendVariantToDBusMessage(listItem, &array_iter); - } - - dbus_message_iter_close_container(dbus_iter, &array_iter); - } - - break; - } - default: - qDebug() << "Unsupported variant type: " << argument.type(); - break; - } - - return true; -} - -static QVariant getVariantFromDBusMessage(DBusMessageIter *iter) { - dbus_bool_t bool_data; - dbus_int32_t int32_data; - dbus_uint32_t uint32_data; - dbus_int64_t int64_data; - dbus_uint64_t uint64_data; - char *str_data; - char char_data; - int argtype = dbus_message_iter_get_arg_type(iter); - - switch (argtype) { - - case DBUS_TYPE_BOOLEAN: - { - dbus_message_iter_get_basic(iter, &bool_data); - QVariant variant((bool)bool_data); - return variant; - } - - case DBUS_TYPE_ARRAY: - { - // Handle all arrays here - int elem_type = dbus_message_iter_get_element_type(iter); - DBusMessageIter array_iter; - - dbus_message_iter_recurse(iter, &array_iter); - - if (elem_type == DBUS_TYPE_BYTE) { - QByteArray byte_array; - do { - dbus_message_iter_get_basic(&array_iter, &char_data); - byte_array.append(char_data); - } while (dbus_message_iter_next(&array_iter)); - QVariant variant(byte_array); - return variant; - } else if (elem_type == DBUS_TYPE_STRING) { - QStringList str_list; - do { - dbus_message_iter_get_basic(&array_iter, &str_data); - str_list.append(str_data); - } while (dbus_message_iter_next(&array_iter)); - QVariant variant(str_list); - return variant; - } else { - QVariantList variantList; - do { - variantList << getVariantFromDBusMessage(&array_iter); - } while (dbus_message_iter_next(&array_iter)); - QVariant variant(variantList); - return variant; - } - break; - } - - case DBUS_TYPE_BYTE: - { - dbus_message_iter_get_basic(iter, &char_data); - QChar ch(char_data); - QVariant variant(ch); - return variant; - } - - case DBUS_TYPE_INT32: - { - dbus_message_iter_get_basic(iter, &int32_data); - QVariant variant((int)int32_data); - return variant; - } - - case DBUS_TYPE_UINT32: - { - dbus_message_iter_get_basic(iter, &uint32_data); - QVariant variant((uint)uint32_data); - return variant; - } - - case DBUS_TYPE_STRING: - { - dbus_message_iter_get_basic(iter, &str_data); - QString str(str_data); - QVariant variant(str); - return variant; - } - - case DBUS_TYPE_INT64: - { - dbus_message_iter_get_basic(iter, &int64_data); - QVariant variant((qlonglong)int64_data); - return variant; - } - - case DBUS_TYPE_UINT64: - { - dbus_message_iter_get_basic(iter, &uint64_data); - QVariant variant((qulonglong)uint64_data); - return variant; - } - - case DBUS_TYPE_STRUCT: - { - // Handle all structs here - DBusMessageIter struct_iter; - dbus_message_iter_recurse(iter, &struct_iter); - - QVariantList variantList; - do { - variantList << getVariantFromDBusMessage(&struct_iter); - } while (dbus_message_iter_next(&struct_iter)); - QVariant variant(variantList); - return variant; - } - - default: - qDebug() << "Unsupported DBUS type: " << argtype; - } - - return QVariant(); -} - -static DBusHandlerResult signalHandler (DBusConnection *connection, - DBusMessage *message, - void *object_ref) { - (void)connection; - QString interface; - QString signal; - DBusDispatcher *dispatcher = (DBusDispatcher *)object_ref; - - if (dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_SIGNAL) { - interface = dbus_message_get_interface(message); - signal = dbus_message_get_member(message); - - QList arglist; - DBusMessageIter dbus_iter; - - if (dbus_message_iter_init(message, &dbus_iter)) { - // Read return arguments - while (dbus_message_iter_get_arg_type (&dbus_iter) != DBUS_TYPE_INVALID) { - arglist << getVariantFromDBusMessage(&dbus_iter); - dbus_message_iter_next(&dbus_iter); - } - } - - dispatcher->emitSignalReceived(interface, signal, arglist); - return DBUS_HANDLER_RESULT_HANDLED; - } - (void)message; - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -} - -DBusDispatcher::DBusDispatcher(const QString& service, - const QString& path, - const QString& interface, - QObject *parent) - : QObject(parent), - d_ptr(new DBusDispatcherPrivate(service, path, interface, path)) { - setupDBus(); -} - -DBusDispatcher::DBusDispatcher(const QString& service, - const QString& path, - const QString& interface, - const QString& signalPath, - QObject *parent) - : QObject(parent), - d_ptr(new DBusDispatcherPrivate(service, path, interface, signalPath)) { - setupDBus(); -} - -DBusDispatcher::~DBusDispatcher() -{ - if (d_ptr->connection) { - dbus_connection_close(d_ptr->connection); - dbus_connection_unref(d_ptr->connection); - } - delete d_ptr; -} - -void DBusDispatcher::setupDBus() -{ - d_ptr->connection = dbus_bus_get_private(DBUS_BUS_SYSTEM, NULL); - - if (d_ptr->connection == NULL) - qDebug() << "Unable to get DBUS connection!"; - else { - d_ptr->signal_vtable.message_function = signalHandler; - - dbus_connection_set_exit_on_disconnect(d_ptr->connection, FALSE); - dbus_connection_setup_with_g_main(d_ptr->connection, NULL); - dbus_connection_register_object_path(d_ptr->connection, - d_ptr->signalPath.toLatin1(), - &d_ptr->signal_vtable, - this); - } -} - -static DBusMessage *prepareDBusCall(const QString& service, - const QString& path, - const QString& interface, - const QString& method, - const QVariant& arg1 = QVariant(), - const QVariant& arg2 = QVariant(), - const QVariant& arg3 = QVariant(), - const QVariant& arg4 = QVariant(), - const QVariant& arg5 = QVariant(), - const QVariant& arg6 = QVariant(), - const QVariant& arg7 = QVariant(), - const QVariant& arg8 = QVariant()) -{ - DBusMessage *message = dbus_message_new_method_call(service.toLatin1(), - path.toLatin1(), - interface.toLatin1(), - method.toLatin1()); - DBusMessageIter dbus_iter; - - // Append variants to DBUS message - QList arglist; - if (arg1.isValid()) arglist << arg1; - if (arg2.isValid()) arglist << arg2; - if (arg3.isValid()) arglist << arg3; - if (arg4.isValid()) arglist << arg4; - if (arg5.isValid()) arglist << arg5; - if (arg6.isValid()) arglist << arg6; - if (arg7.isValid()) arglist << arg7; - if (arg8.isValid()) arglist << arg8; - - dbus_message_iter_init_append (message, &dbus_iter); - - while (!arglist.isEmpty()) { - QVariant argument = arglist.takeFirst(); - appendVariantToDBusMessage(argument, &dbus_iter); - } - - return message; -} - -QList DBusDispatcher::call(const QString& method, - const QVariant& arg1, - const QVariant& arg2, - const QVariant& arg3, - const QVariant& arg4, - const QVariant& arg5, - const QVariant& arg6, - const QVariant& arg7, - const QVariant& arg8) { - DBusMessageIter dbus_iter; - DBusMessage *message = prepareDBusCall(d_ptr->service, d_ptr->path, - d_ptr->interface, method, - arg1, arg2, arg3, arg4, arg5, - arg6, arg7, arg8); - DBusMessage *reply = dbus_connection_send_with_reply_and_block( - d_ptr->connection, - message, -1, NULL); - dbus_message_unref(message); - - QList replylist; - if (reply != NULL && dbus_message_iter_init(reply, &dbus_iter)) { - // Read return arguments - while (dbus_message_iter_get_arg_type (&dbus_iter) != DBUS_TYPE_INVALID) { - replylist << getVariantFromDBusMessage(&dbus_iter); - dbus_message_iter_next(&dbus_iter); - } - } - if (reply != NULL) dbus_message_unref(reply); - return replylist; -} - -class PendingCallInfo { -public: - QString method; - DBusDispatcher *dispatcher; - DBusDispatcherPrivate *priv; -}; - -static void freePendingCallInfo(void *memory) { - PendingCallInfo *info = (PendingCallInfo *)memory; - delete info; -} - -static void pendingCallFunction (DBusPendingCall *pending, - void *memory) { - PendingCallInfo *info = (PendingCallInfo *)memory; - QString errorStr; - QList replyList; - DBusMessage *reply = dbus_pending_call_steal_reply (pending); - - Q_ASSERT(reply != NULL); - - if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR) { - errorStr = dbus_message_get_error_name (reply); - } else { - DBusMessageIter dbus_iter; - dbus_message_iter_init(reply, &dbus_iter); - // Read return arguments - while (dbus_message_iter_get_arg_type (&dbus_iter) != DBUS_TYPE_INVALID) { - replyList << getVariantFromDBusMessage(&dbus_iter); - dbus_message_iter_next(&dbus_iter); - } - } - - info->priv->pending_calls.removeOne(pending); - info->dispatcher->emitCallReply(info->method, replyList, errorStr); - dbus_message_unref(reply); - dbus_pending_call_unref(pending); -} - -bool DBusDispatcher::callAsynchronous(const QString& method, - const QVariant& arg1, - const QVariant& arg2, - const QVariant& arg3, - const QVariant& arg4, - const QVariant& arg5, - const QVariant& arg6, - const QVariant& arg7, - const QVariant& arg8) { - DBusMessage *message = prepareDBusCall(d_ptr->service, d_ptr->path, - d_ptr->interface, method, - arg1, arg2, arg3, arg4, arg5, - arg6, arg7, arg8); - DBusPendingCall *call = NULL; - dbus_bool_t ret = dbus_connection_send_with_reply(d_ptr->connection, - message, &call, -1); - PendingCallInfo *info = new PendingCallInfo; - info->method = method; - info->dispatcher = this; - info->priv = d_ptr; - - dbus_pending_call_set_notify(call, pendingCallFunction, info, freePendingCallInfo); - d_ptr->pending_calls.append(call); - return (bool)ret; -} - -void DBusDispatcher::emitSignalReceived(const QString& interface, - const QString& signal, - const QList& args) { - emit signalReceived(interface, signal, args); } - -void DBusDispatcher::emitCallReply(const QString& method, - const QList& args, - const QString& error) { - emit callReply(method, args, error); } - -void DBusDispatcher::synchronousDispatch(int timeout_ms) -{ - dbus_connection_read_write_dispatch(d_ptr->connection, timeout_ms); -} - -} // Maemo namespace - diff --git a/src/3rdparty/libconninet/src/dbusdispatcher.h b/src/3rdparty/libconninet/src/dbusdispatcher.h deleted file mode 100644 index 2f71b6f..0000000 --- a/src/3rdparty/libconninet/src/dbusdispatcher.h +++ /dev/null @@ -1,91 +0,0 @@ -/* * This file is part of conn-dui-settings-inet * - * - * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * - * Contact: Aapo Makela - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * version 2.1 as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA - */ - -#ifndef DBUSDISPATCHER_H -#define DBUSDISPATCHER_H - -#include -#include - -namespace Maemo { - -class DBusDispatcherPrivate; -class DBusDispatcher : public QObject -{ - Q_OBJECT - -public: - DBusDispatcher(const QString& service, - const QString& path, - const QString& interface, - QObject *parent = 0); - DBusDispatcher(const QString& service, - const QString& path, - const QString& interface, - const QString& signalPath, - QObject *parent = 0); - ~DBusDispatcher(); - - QList call(const QString& method, - const QVariant& arg1 = QVariant(), - const QVariant& arg2 = QVariant(), - const QVariant& arg3 = QVariant(), - const QVariant& arg4 = QVariant(), - const QVariant& arg5 = QVariant(), - const QVariant& arg6 = QVariant(), - const QVariant& arg7 = QVariant(), - const QVariant& arg8 = QVariant()); - bool callAsynchronous(const QString& method, - const QVariant& arg1 = QVariant(), - const QVariant& arg2 = QVariant(), - const QVariant& arg3 = QVariant(), - const QVariant& arg4 = QVariant(), - const QVariant& arg5 = QVariant(), - const QVariant& arg6 = QVariant(), - const QVariant& arg7 = QVariant(), - const QVariant& arg8 = QVariant()); - void emitSignalReceived(const QString& interface, - const QString& signal, - const QList& args); - void emitCallReply(const QString& method, - const QList& args, - const QString& error = ""); - void synchronousDispatch(int timeout_ms); - -Q_SIGNALS: - void signalReceived(const QString& interface, - const QString& signal, - const QList& args); - void callReply(const QString& method, - const QList& args, - const QString& error); - -protected: - void setupDBus(); - -private: - DBusDispatcherPrivate *d_ptr; -}; - -} // Maemo namespace - -#endif diff --git a/src/3rdparty/libconninet/src/iapconf.cpp b/src/3rdparty/libconninet/src/iapconf.cpp deleted file mode 100644 index 2e77fa5..0000000 --- a/src/3rdparty/libconninet/src/iapconf.cpp +++ /dev/null @@ -1,299 +0,0 @@ -/* - libconninet - Internet Connectivity support library - - Copyright (C) 2009-2010 Nokia Corporation. All rights reserved. - - Contact: Aapo Makela - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 2.1 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - -#include -#include -#include - -#include "iapconf.h" - -#define QSTRING_TO_CONST_CSTR(str) \ - str.toUtf8().constData() - -namespace Maemo { - -class IAPConfPrivate { -public: - ConnSettings *settings; - - ConnSettingsValue *variantToValue(const QVariant &variant); - QVariant valueToVariant(ConnSettingsValue *value); -}; - -ConnSettingsValue *IAPConfPrivate::variantToValue(const QVariant &variant) -{ - // Convert variant to ConnSettingsValue - ConnSettingsValue *value = conn_settings_value_new(); - if (value == 0) { - qWarning("IAPConf: Unable to create new ConnSettingsValue"); - return 0; - } - - switch(variant.type()) { - - case QVariant::Invalid: - value->type = CONN_SETTINGS_VALUE_INVALID; - break; - - case QVariant::String: { - char *valueStr = strdup(QSTRING_TO_CONST_CSTR(variant.toString())); - value->type = CONN_SETTINGS_VALUE_STRING; - value->value.string_val = valueStr; - break; - } - - case QVariant::Int: - value->type = CONN_SETTINGS_VALUE_INT; - value->value.int_val = variant.toInt(); - break; - - case QMetaType::Float: - case QVariant::Double: - value->type = CONN_SETTINGS_VALUE_DOUBLE; - value->value.double_val = variant.toDouble(); - break; - - case QVariant::Bool: - value->type = CONN_SETTINGS_VALUE_BOOL; - value->value.bool_val = variant.toBool() ? 1 : 0; - break; - - case QVariant::ByteArray: { - QByteArray array = variant.toByteArray(); - value->type = CONN_SETTINGS_VALUE_BYTE_ARRAY; - value->value.byte_array.len = array.size(); - value->value.byte_array.val = (unsigned char *)malloc(array.size()); - memcpy(value->value.byte_array.val, array.constData(), array.size()); - break; - } - - case QVariant::List: { - QVariantList list = variant.toList(); - ConnSettingsValue **list_val = (ConnSettingsValue **)malloc( - (list.size() + 1) * sizeof(ConnSettingsValue *)); - - for (int idx = 0; idx < list.size(); idx++) { - list_val[idx] = variantToValue(list.at(idx)); - } - list_val[list.size()] = 0; - - value->type = CONN_SETTINGS_VALUE_LIST; - value->value.list_val = list_val; - break; - } - - default: - qWarning("IAPConf: Can not handle QVariant of type %d", - variant.type()); - conn_settings_value_destroy(value); - return 0; - } - - return value; -} - -QVariant IAPConfPrivate::valueToVariant(ConnSettingsValue *value) -{ - if (value == 0 || value->type == CONN_SETTINGS_VALUE_INVALID) { - return QVariant(); - } - - switch(value->type) { - - case CONN_SETTINGS_VALUE_BOOL: - return QVariant(value->value.bool_val ? true : false); - - case CONN_SETTINGS_VALUE_STRING: - return QVariant(QString(value->value.string_val)); - - case CONN_SETTINGS_VALUE_DOUBLE: - return QVariant(value->value.double_val); - - case CONN_SETTINGS_VALUE_INT: - return QVariant(value->value.int_val); - - case CONN_SETTINGS_VALUE_LIST: { - // At least with GConf backend connsettings returns byte array as list - // of ints, first check for that case - if (value->value.list_val && value->value.list_val[0]) { - bool canBeConvertedToByteArray = true; - for (int idx = 0; value->value.list_val[idx]; idx++) { - ConnSettingsValue *val = value->value.list_val[idx]; - if (val->type != CONN_SETTINGS_VALUE_INT - || val->value.int_val > 255 - || val->value.int_val < 0) { - canBeConvertedToByteArray = false; - break; - } - } - - if (canBeConvertedToByteArray) { - QByteArray array; - for (int idx = 0; value->value.list_val[idx]; idx++) { - array.append(value->value.list_val[idx]->value.int_val); - } - return array; - } - - // Create normal list - QVariantList list; - for (int idx = 0; value->value.list_val[idx]; idx++) { - list.append(valueToVariant(value->value.list_val[idx])); - } - return list; - } - } - - case CONN_SETTINGS_VALUE_BYTE_ARRAY: - return QByteArray::fromRawData((char *)value->value.byte_array.val, - value->value.byte_array.len); - - default: - return QVariant(); - } -} - -// Public class implementation - -IAPConf::IAPConf(const QString &iap_id) - : d_ptr(new IAPConfPrivate) -{ - d_ptr->settings = conn_settings_open(CONN_SETTINGS_CONNECTION, - QSTRING_TO_CONST_CSTR(iap_id)); - if (d_ptr->settings == 0) { - qWarning("IAPConf: Unable to open ConnSettings for %s", - QSTRING_TO_CONST_CSTR(iap_id)); - } -} - -IAPConf::~IAPConf() -{ - conn_settings_close(d_ptr->settings); - delete d_ptr; -} - -void IAPConf::setValue(const QString& key, const QVariant& value) -{ - // Invalid value means unsetting the given key - if (!value.isValid()) { - int err = conn_settings_unset(d_ptr->settings, - QSTRING_TO_CONST_CSTR(key)); - if (err != CONN_SETTINGS_E_NO_ERROR) { - qWarning("IAPConf: unable to unset key %s: %s", - QSTRING_TO_CONST_CSTR(key), - conn_settings_error_text((ConnSettingsError)err)); - } - return; - } - - // Convert value to ConnSettingsValue - ConnSettingsValue *val = d_ptr->variantToValue(value); - if (val == 0) return; - - // Set value and handle errors - int error = conn_settings_set(d_ptr->settings, - QSTRING_TO_CONST_CSTR(key), - val); - if (error != CONN_SETTINGS_E_NO_ERROR) { - qWarning("IAPConf: error in setting key %s: %s", - QSTRING_TO_CONST_CSTR(key), - conn_settings_error_text((ConnSettingsError)error)); - } - - // Destroy value - conn_settings_value_destroy(val); - return; -} - -void IAPConf::set(const QString& key1, const QVariant& value1, - const QString& key2, const QVariant& value2, - const QString& key3, const QVariant& value3, - const QString& key4, const QVariant& value4, - const QString& key5, const QVariant& value5, - const QString& key6, const QVariant& value6, - const QString& key7, const QVariant& value7, - const QString& key8, const QVariant& value8, - const QString& key9, const QVariant& value9, - const QString& key10, const QVariant& value10) -{ - if (!key1.isEmpty()) setValue(key1, value1); - if (!key2.isEmpty()) setValue(key2, value2); - if (!key3.isEmpty()) setValue(key3, value3); - if (!key4.isEmpty()) setValue(key4, value4); - if (!key5.isEmpty()) setValue(key5, value5); - if (!key6.isEmpty()) setValue(key6, value6); - if (!key7.isEmpty()) setValue(key7, value7); - if (!key8.isEmpty()) setValue(key8, value8); - if (!key9.isEmpty()) setValue(key9, value9); - if (!key10.isEmpty()) setValue(key10, value10); -} - -QVariant IAPConf::value(const QString& key) const -{ - ConnSettingsValue *val = conn_settings_get(d_ptr->settings, - QSTRING_TO_CONST_CSTR(key)); - - QVariant variant = d_ptr->valueToVariant(val); - conn_settings_value_destroy(val); - return variant; -} - -void IAPConf::clear(const char *default_path) -{ - Q_UNUSED(default_path); // default path is unused - - int error = conn_settings_remove(d_ptr->settings); - if (error != CONN_SETTINGS_E_NO_ERROR) { - qWarning("IAPConf: Error when removing IAP: %s", - conn_settings_error_text((ConnSettingsError)error)); - } -} - -void IAPConf::clearAll() -{ - ConnSettings *settings = conn_settings_open(CONN_SETTINGS_CONNECTION, - NULL); - conn_settings_remove(settings); - conn_settings_close(settings); -} - - -void IAPConf::getAll(QList &all_iaps, bool return_path) -{ - Q_UNUSED(return_path); // We don't use return path currently - - // Go through all available connections and add them to the list - char **ids = conn_settings_list_ids(CONN_SETTINGS_CONNECTION); - if (ids == 0) { - // No ids found - nothing to do - return; - } - - for (int idx = 0; ids[idx]; idx++) { - all_iaps.append(QString(ids[idx])); - free(ids[idx]); - } - free(ids); -} - - -} // namespace Maemo diff --git a/src/3rdparty/libconninet/src/iapconf.h b/src/3rdparty/libconninet/src/iapconf.h deleted file mode 100644 index 57c0856..0000000 --- a/src/3rdparty/libconninet/src/iapconf.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - libconninet - Internet Connectivity support library - - Copyright (C) 2009 Nokia Corporation. All rights reserved. - - Contact: Aapo Makela - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 2.1 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - -#ifndef IAPCONF_H -#define IAPCONF_H - -#include -#include - -namespace Maemo { - -class IAPConfPrivate; -class IAPConf { -public: - IAPConf(const QString &iap_id); - virtual ~IAPConf(); - - /** - Convenience method for setting multiple IAP values with one call. - */ - void set(const QString& key1, const QVariant& value1, - const QString& key2 = "", const QVariant& value2 = QVariant(), - const QString& key3 = "", const QVariant& value3 = QVariant(), - const QString& key4 = "", const QVariant& value4 = QVariant(), - const QString& key5 = "", const QVariant& value5 = QVariant(), - const QString& key6 = "", const QVariant& value6 = QVariant(), - const QString& key7 = "", const QVariant& value7 = QVariant(), - const QString& key8 = "", const QVariant& value8 = QVariant(), - const QString& key9 = "", const QVariant& value9 = QVariant(), - const QString& key10 = "", const QVariant& value10 = QVariant()); - - /** - Set one IAP value. - */ - void setValue(const QString& key, const QVariant& value); - - /** - Get one IAP value. - */ - QVariant value(const QString& key) const; - - /** - Clear this IAP from GConf - */ - void clear(const char *default_path=0); - - /** - Clear all IAP specific information from GConf (including all IAPs). - DO NOT USE THIS FUNCTION IN ANYWHERE ELSE EXCEPT IN TEST CODE! - */ - void clearAll(); - - /** - Return all the IAPs found in the system. If return_path is true, - then do not strip the IAP path away. - */ - static void getAll(QList &all_iaps, bool return_path=false); - -private: - IAPConfPrivate *d_ptr; -}; - -} // namespace Maemo - -#endif diff --git a/src/3rdparty/libconninet/src/iapmonitor.cpp b/src/3rdparty/libconninet/src/iapmonitor.cpp deleted file mode 100644 index c44cbc8..0000000 --- a/src/3rdparty/libconninet/src/iapmonitor.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - libconninet - Internet Connectivity support library - - Copyright (C) 2009-2010 Nokia Corporation. All rights reserved. - - Contact: Jukka Rissanen - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 2.1 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - -#include - -#include -#include "iapmonitor.h" - -namespace Maemo { - - -void conn_settings_notify_func (ConnSettingsType type, - const char *id, - const char *key, - ConnSettingsValue *value, - void *user_data); - -class IAPMonitorPrivate { -private: - IAPMonitor *monitor; - ConnSettings *settings; - -public: - - IAPMonitorPrivate(IAPMonitor *monitor) - : monitor(monitor) - { - settings = conn_settings_open(CONN_SETTINGS_CONNECTION, NULL); - conn_settings_add_notify( - settings, - (ConnSettingsNotifyFunc *)conn_settings_notify_func, - this); - } - - ~IAPMonitorPrivate() - { - conn_settings_del_notify(settings); - conn_settings_close(settings); - } - - void iapAdded(const QString &iap) - { - monitor->iapAdded(iap); - } - - void iapRemoved(const QString &iap) - { - monitor->iapRemoved(iap); - } -}; - -void conn_settings_notify_func (ConnSettingsType type, - const char *id, - const char *key, - ConnSettingsValue *value, - void *user_data) -{ - if (type != CONN_SETTINGS_CONNECTION) return; - IAPMonitorPrivate *priv = (IAPMonitorPrivate *)user_data; - - QString iapId(key); - iapId = iapId.split("/")[0]; - if (value != 0) { - priv->iapAdded(iapId); - } else if (iapId == QString(key)) { - // IAP is removed only when the directory gets removed - priv->iapRemoved(iapId); - } -} - -IAPMonitor::IAPMonitor() - : d_ptr(new IAPMonitorPrivate(this)) -{ -} - -IAPMonitor::~IAPMonitor() -{ - delete d_ptr; -} - -void IAPMonitor::iapAdded(const QString &id) -{ - // By default do nothing -} - -void IAPMonitor::iapRemoved(const QString &id) -{ - // By default do nothing -} - -} // namespace Maemo diff --git a/src/3rdparty/libconninet/src/iapmonitor.h b/src/3rdparty/libconninet/src/iapmonitor.h deleted file mode 100644 index 558f23e..0000000 --- a/src/3rdparty/libconninet/src/iapmonitor.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - libconninet - Internet Connectivity support library - - Copyright (C) 2009-2010 Nokia Corporation. All rights reserved. - - Contact: Jukka Rissanen - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 2.1 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - -#ifndef IAPMONITOR_H -#define IAPMONITOR_H - -#include - -namespace Maemo { - -class IAPMonitorPrivate; -class IAPMonitor { -public: - IAPMonitor(); - ~IAPMonitor(); - -protected: - virtual void iapAdded(const QString &id); - virtual void iapRemoved(const QString &id); - -private: - IAPMonitorPrivate *d_ptr; - Q_DECLARE_PRIVATE(IAPMonitor); -}; - -} // namespace Maemo - -#endif // IAPMONITOR_H - diff --git a/src/3rdparty/libconninet/src/maemo_icd.cpp b/src/3rdparty/libconninet/src/maemo_icd.cpp deleted file mode 100644 index 026241c..0000000 --- a/src/3rdparty/libconninet/src/maemo_icd.cpp +++ /dev/null @@ -1,1316 +0,0 @@ -/* - libconninet - Internet Connectivity support library - - Copyright (C) 2009 Nokia Corporation. All rights reserved. - - Contact: Jukka Rissanen - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 2.1 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - -#include -#include "maemo_icd.h" -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -namespace Maemo { - -#undef PRINT_DEBUGINFO -#ifdef PRINT_DEBUGINFO - static FILE *fdebug = NULL; -#define PDEBUG(fmt, args...) \ - do { \ - struct timeval tv; \ - gettimeofday(&tv, 0); \ - fprintf(fdebug, "DEBUG[%d]:%ld.%ld:%s:%s():%d: " fmt, \ - getpid(), \ - tv.tv_sec, tv.tv_usec, \ - __FILE__, __FUNCTION__, __LINE__, args); \ - fflush(fdebug); \ - } while(0) -#else -#define PDEBUG(fmt...) -#endif - - -/* Reference counting singleton class that creates a single connection - * to icd so that icd reference counting works as expected. This is - * needed because DBusDispatcher uses private dbus connections - * which come and go and icd cannot use that information to - * determine whether application quit or not. So we create one - * persistent connection that is only teared down when application - * quits or calls disconnect() - */ -class IcdRefCounting -{ -public: - IcdRefCounting() : first_call(true) { } - void setup(enum icd_connection_flags flag); - void cleanup(); - -private: - bool first_call; - struct DBusConnection *connection; -}; - -Q_GLOBAL_STATIC(IcdRefCounting, icdRefCounting); - - -void IcdRefCounting::setup(enum icd_connection_flags flag) -{ - if (first_call) { - DBusMessage *msg = NULL; - - connection = dbus_bus_get_private(DBUS_BUS_SYSTEM, NULL); - dbus_connection_set_exit_on_disconnect(connection, FALSE); - dbus_connection_setup_with_g_main(connection, NULL); - - msg = dbus_message_new_method_call(ICD_DBUS_API_INTERFACE, - ICD_DBUS_API_PATH, - ICD_DBUS_API_INTERFACE, - ICD_DBUS_API_CONNECT_REQ); - if (msg == NULL) - goto out; - - if (!dbus_message_append_args(msg, - DBUS_TYPE_UINT32, &flag, - DBUS_TYPE_INVALID)) - goto out; - - if (!dbus_connection_send_with_reply(connection, msg, - NULL, 60*1000)) - goto out; - - first_call = false; - return; - - out: - dbus_connection_close(connection); - dbus_connection_unref(connection); - } -} - -void IcdRefCounting::cleanup() -{ - if (!first_call) { - dbus_connection_close(connection); - dbus_connection_unref(connection); - first_call = true; - } -} - - -class IcdPrivate -{ -public: - IcdPrivate(Icd *myfriend) - { - init(10000, IcdNewDbusInterface, myfriend); - } - - IcdPrivate(unsigned int timeout, Icd *myfriend) - { - init(timeout, IcdNewDbusInterface, myfriend); - } - - IcdPrivate(unsigned int timeout, IcdDbusInterfaceVer ver, Icd *myfriend) - { - /* Note that the old Icd interface is currently disabled and - * the new one is always used. - */ - init(timeout, IcdNewDbusInterface, myfriend); - } - - ~IcdPrivate() - { - QObject::disconnect(mDBus, - SIGNAL(signalReceived(const QString&, - const QString&, - const QList&)), - icd, - SLOT(icdSignalReceived(const QString&, - const QString&, - const QList&))); - - QObject::disconnect(mDBus, - SIGNAL(callReply(const QString&, - const QList&, - const QString&)), - icd, - SLOT(icdCallReply(const QString&, - const QList&, - const QString&))); - - delete mDBus; - mDBus = 0; - } - - /* Icd2 dbus API functions */ - QStringList scan(icd_scan_request_flags flags, - QStringList &network_types, - QList& scan_results, - QString& error); - void scanCancel(); - bool connect(icd_connection_flags flags, IcdConnectResult& result); - bool connect(icd_connection_flags flags, QList& params, - IcdConnectResult& result); - bool connect(icd_connection_flags flags, QString& iap, QString& result); - void select(uint flags); - void disconnect(uint connect_flags, QString& service_type, - uint service_attrs, QString& service_id, - QString& network_type, uint network_attrs, - QByteArray& network_id); - void disconnect(uint connect_flags); - - uint state(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdStateResult &state_result); - uint statistics(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdStatisticsResult& stats_result); - uint addrinfo(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdAddressInfoResult& addr_result); - - uint state(QList& state_results); - uint state_non_blocking(QList& state_results); - uint statistics(QList& stats_results); - uint addrinfo(QList& addr_results); - uint addrinfo_non_blocking(QList& addr_results); - - void signalReceived(const QString& interface, - const QString& signal, - const QList& args); - void callReply(const QString& method, - const QList& args, - const QString& error); - - QString error() { return mError; } - -public: - DBusDispatcher *mDBus; - QString mMethod; - QString mInterface; - QString mSignal; - QString mError; - QList mArgs; - QList receivedSignals; - unsigned int timeout; - IcdDbusInterfaceVer icd_dbus_version; - Icd *icd; - - void init(unsigned int dbus_timeout, IcdDbusInterfaceVer ver, - Icd *myfriend) - { - if (ver == IcdNewDbusInterface) { - mDBus = new DBusDispatcher(ICD_DBUS_API_INTERFACE, - ICD_DBUS_API_PATH, - ICD_DBUS_API_INTERFACE); - } else { - mDBus = new DBusDispatcher(ICD_DBUS_SERVICE, - ICD_DBUS_PATH, - ICD_DBUS_INTERFACE); - } - icd_dbus_version = ver; - - /* This connect has a side effect as it means that only one - * Icd object can exists in one time. This should be fixed! - */ - QObject::connect(mDBus, - SIGNAL(signalReceived(const QString&, - const QString&, - const QList&)), - myfriend, - SLOT(icdSignalReceived(const QString&, - const QString&, - const QList&))); - - QObject::connect(mDBus, - SIGNAL(callReply(const QString&, - const QList&, - const QString&)), - myfriend, - SLOT(icdCallReply(const QString&, - const QList&, - const QString&))); - - icd = myfriend; - timeout = dbus_timeout; - -#ifdef PRINT_DEBUGINFO - if (!fdebug) { - fdebug = fopen("/tmp/maemoicd.log", "a+"); - } - PDEBUG("created %s\n", "IcdPrivate"); -#endif - } - - void clearState() - { - mMethod.clear(); - mInterface.clear(); - mSignal.clear(); - mError.clear(); - mArgs.clear(); - receivedSignals.clear(); - } - - bool doConnect(IcdConnectResult& result); - bool doConnect(QString& result); - bool doState(); -}; - - -void IcdPrivate::signalReceived(const QString& interface, - const QString& signal, - const QList& args) -{ - // Signal handler, which simply records what has been signalled - mInterface = interface; - mSignal = signal; - mArgs = args; - - //qDebug() << "signal" << signal << "received:" << args; - receivedSignals << QVariant(interface) << QVariant(signal) << QVariant(args); -} - - -void IcdPrivate::callReply(const QString& method, - const QList& /*args*/, - const QString& error) -{ - mMethod = method; - mError = error; -} - - -static void get_scan_result(QList& args, - IcdScanResult& ret) -{ - int i=0; - - if (args.isEmpty()) - return; - - ret.status = args[i++].toUInt(); - ret.timestamp = args[i++].toUInt(); - ret.scan.service_type = args[i++].toString(); - ret.service_name = args[i++].toString(); - ret.scan.service_attrs = args[i++].toUInt(); - ret.scan.service_id = args[i++].toString(); - ret.service_priority = args[i++].toInt(); - ret.scan.network_type = args[i++].toString(); - ret.network_name = args[i++].toString(); - ret.scan.network_attrs = args[i++].toUInt(); - ret.scan.network_id = args[i++].toByteArray(); - ret.network_priority = args[i++].toInt(); - ret.signal_strength = args[i++].toInt(); - ret.station_id = args[i++].toString(); - ret.signal_dB = args[i++].toInt(); -} - - -static void get_connect_result(QList& args, - IcdConnectResult& ret) -{ - int i=0; - - if (args.isEmpty()) - return; - - ret.connect.service_type = args[i++].toString(); - ret.connect.service_attrs = args[i++].toInt(); - ret.connect.service_id = args[i++].toString(); - ret.connect.network_type = args[i++].toString(); - ret.connect.network_attrs = args[i++].toInt(); - ret.connect.network_id = args[i++].toByteArray(); - ret.status = args[i++].toInt(); -} - - -QStringList IcdPrivate::scan(icd_scan_request_flags flags, - QStringList &network_types, - QList& scan_results, - QString& error) -{ - QStringList scanned_types; - QTimer timer; - QVariant reply; - QVariantList vl; - bool last_result = false; - IcdScanResult result; - int all_waited; - - clearState(); - reply = mDBus->call(ICD_DBUS_API_SCAN_REQ, (uint)flags); - if (reply.type() != QVariant::List) - return scanned_types; - vl = reply.toList(); - if (vl.isEmpty()) { - error = "Scan did not return anything."; - return scanned_types; - } - reply = vl.first(); - scanned_types = reply.toStringList(); - //qDebug() << "Scanning:" << scanned_types; - all_waited = scanned_types.size(); - - timer.setSingleShot(true); - timer.start(timeout); - - scan_results.clear(); - while (!last_result) { - while (timer.isActive() && mInterface.isEmpty() && mError.isEmpty()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - } - - if (!timer.isActive()) { - //qDebug() << "Timeout happened"; - break; - } - - if (mSignal != ICD_DBUS_API_SCAN_SIG) { - //qDebug() << "Received" << mSignal << "while waiting" << ICD_DBUS_API_SCAN_SIG << ", ignoring"; - mInterface.clear(); - continue; - } - - if (mError.isEmpty()) { - QString msgInterface = receivedSignals.takeFirst().toString(); - QString msgSignal = receivedSignals.takeFirst().toString(); - QList msgArgs = receivedSignals.takeFirst().toList(); - //qDebug() << "Signal" << msgSignal << "received."; - //qDebug() << "Params:" << msgArgs; - - while (!msgSignal.isEmpty()) { - get_scan_result(msgArgs, result); - -#if 0 - qDebug() << "Received: " << - "status =" << result.status << - ", timestamp =" << result.timestamp << - ", service_type =" << result.scan.service_type << - ", service_name =" << result.service_name << - ", service_attrs =" << result.scan.service_attrs << - ", service_id =" << result.scan.service_id << - ", service_priority =" << result.service_priority << - ", network_type =" << result.scan.network_type << - ", network_name =" << result.network_name << - ", network_attrs =" << result.scan.network_attrs << - ", network_id =" << "-" << - ", network_priority =" << result.network_priority << - ", signal_strength =" << result.signal_strength << - ", station_id =" << result.station_id << - ", signal_dB =" << result.signal_dB; -#endif - - if (result.status == ICD_SCAN_COMPLETE) { - //qDebug() << "waited =" << all_waited; - if (--all_waited == 0) { - last_result = true; - break; - } - } else - scan_results << result; - - if (receivedSignals.isEmpty()) - break; - - msgInterface = receivedSignals.takeFirst().toString(); - msgSignal = receivedSignals.takeFirst().toString(); - msgArgs = receivedSignals.takeFirst().toList(); - } - mInterface.clear(); - - } else { - qWarning() << "Error while scanning:" << mError; - break; - } - } - timer.stop(); - - error = mError; - return scanned_types; -} - - -void IcdPrivate::scanCancel() -{ - mDBus->call(ICD_DBUS_API_SCAN_CANCEL); -} - - -bool IcdPrivate::doConnect(IcdConnectResult& result) -{ - QTimer timer; - bool status = false; - - timer.setSingleShot(true); - timer.start(timeout); - - //qDebug() << "Waiting" << ICD_DBUS_API_CONNECT_SIG << "signal"; - - while (timer.isActive() && mInterface.isEmpty() && - mSignal != ICD_DBUS_API_CONNECT_SIG && - mError.isEmpty()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - } - - timer.stop(); - - if (mError.isEmpty()) { - if (!mArgs.isEmpty()) { - get_connect_result(mArgs, result); - status = true; - } else - status = false; - } else - status = false; - - return status; -} - - -bool IcdPrivate::connect(icd_connection_flags flags, IcdConnectResult& result) -{ - clearState(); - //mDBus->callAsynchronous(ICD_DBUS_API_CONNECT_REQ, (uint)flags); - mDBus->call(ICD_DBUS_API_CONNECT_REQ, (uint)flags); - icdRefCounting()->setup(flags); - return doConnect(result); -} - - -bool IcdPrivate::connect(icd_connection_flags flags, QList& params, - IcdConnectResult& result) -{ - QVariantList varlist; - QVariantList varlist2; - - foreach (ConnectParams param, params) { - QVariantList items; - - items.append(QVariant(param.connect.service_type)); - items.append(QVariant(param.connect.service_attrs)); - items.append(QVariant(param.connect.service_id)); - items.append(QVariant(param.connect.network_type)); - items.append(QVariant(param.connect.network_attrs)); - items.append(QVariant(param.connect.network_id)); - - varlist.append(items); - } - - varlist2.append(QVariant(varlist)); - - clearState(); - //mDBus->callAsynchronous(ICD_DBUS_API_CONNECT_REQ, (uint)flags, varlist2); - mDBus->call(ICD_DBUS_API_CONNECT_REQ, (uint)flags, varlist2); - icdRefCounting()->setup(flags); - return doConnect(result); -} - - -bool IcdPrivate::doConnect(QString& ret) -{ - QTimer timer; - bool status = false; - - timer.setSingleShot(true); - timer.start(timeout); - - while (timer.isActive() && mInterface.isEmpty() && - mError.isEmpty()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - } - - timer.stop(); - - if (mError.isEmpty()) { - if (!mArgs.isEmpty()) { - status = true; - //ret = mArgs[0]; // TODO correctly - } else - status = false; - } else - status = false; - - return status; -} - - -bool IcdPrivate::connect(icd_connection_flags flags, QString& iap, QString& result) -{ - clearState(); - //mDBus->callAsynchronous(ICD_CONNECT_REQ, iap, (uint)flags); - mDBus->call(ICD_CONNECT_REQ, iap, (uint)flags); - icdRefCounting()->setup(flags); - return doConnect(result); -} - - -void IcdPrivate::select(uint flags) -{ - mDBus->call(ICD_DBUS_API_SELECT_REQ, flags); -} - - -void IcdPrivate::disconnect(uint flags, QString& service_type, - uint service_attrs, QString& service_id, - QString& network_type, uint network_attrs, - QByteArray& network_id) -{ - clearState(); - mDBus->call(ICD_DBUS_API_DISCONNECT_REQ, flags, - service_type, service_attrs, service_id, - network_type, network_attrs, network_id); - icdRefCounting()->cleanup(); -} - - -void IcdPrivate::disconnect(uint flags) -{ - clearState(); - mDBus->call(ICD_DBUS_API_DISCONNECT_REQ, flags); - icdRefCounting()->cleanup(); -} - - -static void get_state_all_result(QList& args, - IcdStateResult& ret) -{ - int i=0; - - ret.params.service_type = args[i++].toString(); - ret.params.service_attrs = args[i++].toUInt(); - ret.params.service_id = args[i++].toString(); - ret.params.network_type = args[i++].toString(); - ret.params.network_attrs = args[i++].toUInt(); - ret.params.network_id = args[i++].toByteArray(); - ret.error = args[i++].toString(); - ret.state = args[i++].toInt(); -} - - -static void get_state_all_result2(QList& args, - IcdStateResult& ret) -{ - int i=0; - - ret.params.network_type = args[i++].toString(); - ret.state = args[i++].toInt(); - - // Initialize the other values so that the caller can - // notice we only returned partial status - ret.params.service_type = QString(); - ret.params.service_attrs = 0; - ret.params.service_id = QString(); - ret.params.network_attrs = 0; - ret.params.network_id = QByteArray(); - ret.error = QString(); -} - - -uint IcdPrivate::state(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdStateResult& state_result) -{ - QTimer timer; - QVariant reply; - uint total_signals; - QVariantList vl; - - clearState(); - - reply = mDBus->call(ICD_DBUS_API_STATE_REQ, - service_type, service_attrs, service_id, - network_type, network_attrs, network_id); - if (reply.type() != QVariant::List) - return 0; - vl = reply.toList(); - if (vl.isEmpty()) - return 0; - reply = vl.first(); - total_signals = reply.toUInt(); - if (!total_signals) - return 0; - - timer.setSingleShot(true); - timer.start(timeout); - - mInterface.clear(); - while (timer.isActive() && mInterface.isEmpty()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - - if (mSignal != ICD_DBUS_API_STATE_SIG) { - mInterface.clear(); - continue; - } - } - - timer.stop(); - - if (mError.isEmpty()) { - if (!mArgs.isEmpty()) { - if (mArgs.size()>2) - get_state_all_result(mArgs, state_result); - else { - // We are not connected as we did not get the status we asked - return 0; - } - } - } else { - qWarning() << "Error:" << mError; - } - - // The returned value should be one because we asked for one state - return total_signals; -} - - -uint IcdPrivate::state_non_blocking(QList& state_results) -{ - QTimer timer; - QVariant reply; - QVariantList vl; - uint signals_left, total_signals; - IcdStateResult result; - - PDEBUG("%s\n", "non blocking state"); - - clearState(); - reply = mDBus->call(ICD_DBUS_API_STATE_REQ); - if (reply.type() != QVariant::List) - return 0; - vl = reply.toList(); - if (vl.isEmpty()) - return 0; - reply = vl.first(); - signals_left = total_signals = reply.toUInt(); - if (!signals_left) - return 0; - - timer.setSingleShot(true); - timer.start(timeout); - state_results.clear(); - mError.clear(); - while (signals_left) { - mInterface.clear(); - while (timer.isActive() && mInterface.isEmpty()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - } - - if (!timer.isActive()) { - total_signals = 0; - break; - } - - if (mSignal != ICD_DBUS_API_STATE_SIG) { - continue; - } - - if (mError.isEmpty()) { - if (!mArgs.isEmpty()) { - if (mArgs.size()==2) - get_state_all_result2(mArgs, result); - else - get_state_all_result(mArgs, result); - state_results << result; - } - signals_left--; - } else { - qWarning() << "Error:" << mError; - break; - } - } - timer.stop(); - - PDEBUG("total_signals=%d\n", total_signals); - return total_signals; -} - - -/* Special version of the state() call which does not call event loop. - * Needed in order to fix NB#175098 where Qt4.7 webkit crashes because event - * loop is run when webkit does not expect it. This function is called from - * bearer management API syncStateWithInterface() in QNetworkSession - * constructor. - */ -uint IcdPrivate::state(QList& state_results) -{ - QVariant reply; - QVariantList vl; - uint signals_left, total_signals; - IcdStateResult result; - time_t started; - int timeout_secs = timeout / 1000; - - PDEBUG("%s\n", "state_results"); - - clearState(); - reply = mDBus->call(ICD_DBUS_API_STATE_REQ); - if (reply.type() != QVariant::List) - return 0; - vl = reply.toList(); - if (vl.isEmpty()) - return 0; - reply = vl.first(); - signals_left = total_signals = reply.toUInt(); - if (!signals_left) - return 0; - - started = time(0); - state_results.clear(); - mError.clear(); - while (signals_left) { - mInterface.clear(); - while ((time(0)<=(started+timeout_secs)) && mInterface.isEmpty()) { - mDBus->synchronousDispatch(1000); - } - - if (time(0)>(started+timeout_secs)) { - total_signals = 0; - break; - } - - if (mSignal != ICD_DBUS_API_STATE_SIG) { - continue; - } - - if (mError.isEmpty()) { - if (!mArgs.isEmpty()) { - if (mArgs.size()==2) - get_state_all_result2(mArgs, result); - else - get_state_all_result(mArgs, result); - state_results << result; - } - signals_left--; - } else { - qWarning() << "Error:" << mError; - break; - } - } - - PDEBUG("total_signals=%d\n", total_signals); - return total_signals; -} - - -static void get_statistics_all_result(QList& args, - IcdStatisticsResult& ret) -{ - int i=0; - - if (args.isEmpty()) - return; - - ret.params.service_type = args[i++].toString(); - ret.params.service_attrs = args[i++].toUInt(); - ret.params.service_id = args[i++].toString(); - ret.params.network_type = args[i++].toString(); - ret.params.network_attrs = args[i++].toUInt(); - ret.params.network_id = args[i++].toByteArray(); - ret.time_active = args[i++].toUInt(); - ret.signal_strength = (enum icd_nw_levels)args[i++].toUInt(); - ret.bytes_sent = args[i++].toUInt(); - ret.bytes_received = args[i++].toUInt(); -} - - -uint IcdPrivate::statistics(QList& stats_results) -{ - QTimer timer; - QVariant reply; - QVariantList vl; - uint signals_left, total_signals; - IcdStatisticsResult result; - - clearState(); - reply = mDBus->call(ICD_DBUS_API_STATISTICS_REQ); - if (reply.type() != QVariant::List) - return 0; - vl = reply.toList(); - if (vl.isEmpty()) - return 0; - reply = vl.first(); - if (reply.type() != QVariant::UInt) - return 0; - signals_left = total_signals = reply.toUInt(); - - if (!signals_left) - return 0; - - timer.setSingleShot(true); - timer.start(timeout); - stats_results.clear(); - while (signals_left) { - mInterface.clear(); - while (timer.isActive() && mInterface.isEmpty()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - } - - if (!timer.isActive()) { - total_signals = 0; - break; - } - - if (mSignal != ICD_DBUS_API_STATISTICS_SIG) { - continue; - } - - if (mError.isEmpty()) { - get_statistics_all_result(mArgs, result); - stats_results << result; - signals_left--; - } else { - qWarning() << "Error:" << mError; - break; - } - } - timer.stop(); - - return total_signals; -} - - -uint IcdPrivate::statistics(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdStatisticsResult& stats_result) -{ - QTimer timer; - QVariant reply; - uint total_signals; - QVariantList vl; - - clearState(); - - reply = mDBus->call(ICD_DBUS_API_STATISTICS_REQ, - service_type, service_attrs, service_id, - network_type, network_attrs, network_id); - if (reply.type() != QVariant::List) - return 0; - vl = reply.toList(); - if (vl.isEmpty()) - return 0; - reply = vl.first(); - total_signals = reply.toUInt(); - if (!total_signals) - return 0; - - timer.setSingleShot(true); - timer.start(timeout); - - mInterface.clear(); - while (timer.isActive() && mInterface.isEmpty()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - - if (mSignal != ICD_DBUS_API_STATISTICS_SIG) { - mInterface.clear(); - continue; - } - } - - timer.stop(); - - if (mError.isEmpty()) { - get_statistics_all_result(mArgs, stats_result); - } else { - qWarning() << "Error:" << mError; - } - - // The returned value should be one because we asked for one statistics - return total_signals; -} - - -static void get_addrinfo_all_result(QList& args, - IcdAddressInfoResult& ret) -{ - int i=0; - - if (args.isEmpty()) - return; - - ret.params.service_type = args[i++].toString(); - ret.params.service_attrs = args[i++].toUInt(); - ret.params.service_id = args[i++].toString(); - ret.params.network_type = args[i++].toString(); - ret.params.network_attrs = args[i++].toUInt(); - ret.params.network_id = args[i++].toByteArray(); - - QVariantList vl = args[i].toList(); - QVariant reply = vl.first(); - QList lst = reply.toList(); - for (int k=0; k& addr_results) -{ - QVariant reply; - QVariantList vl; - uint signals_left, total_signals; - IcdAddressInfoResult result; - time_t started; - int timeout_secs = timeout / 1000; - - PDEBUG("%s\n", "addr_results"); - - clearState(); - reply = mDBus->call(ICD_DBUS_API_ADDRINFO_REQ); - if (reply.type() != QVariant::List) - return 0; - vl = reply.toList(); - if (vl.isEmpty()) - return 0; - reply = vl.first(); - if (reply.type() != QVariant::UInt) - return 0; - signals_left = total_signals = reply.toUInt(); - if (!signals_left) - return 0; - - started = time(0); - addr_results.clear(); - while (signals_left) { - mInterface.clear(); - while ((time(0)<=(started+timeout_secs)) && mInterface.isEmpty()) { - mDBus->synchronousDispatch(1000); - } - - if (time(0)>(started+timeout_secs)) { - total_signals = 0; - break; - } - - if (mSignal != ICD_DBUS_API_ADDRINFO_SIG) { - continue; - } - - if (mError.isEmpty()) { - get_addrinfo_all_result(mArgs, result); - addr_results << result; - signals_left--; - } else { - qWarning() << "Error:" << mError; - break; - } - } - - PDEBUG("total_signals=%d\n", total_signals); - return total_signals; -} - -uint IcdPrivate::addrinfo_non_blocking(QList& addr_results) -{ - QTimer timer; - QVariant reply; - QVariantList vl; - uint signals_left, total_signals; - IcdAddressInfoResult result; - - PDEBUG("%s\n", "non blocking addrinfo"); - - clearState(); - reply = mDBus->call(ICD_DBUS_API_ADDRINFO_REQ); - if (reply.type() != QVariant::List) - return 0; - vl = reply.toList(); - if (vl.isEmpty()) - return 0; - reply = vl.first(); - if (reply.type() != QVariant::UInt) - return 0; - signals_left = total_signals = reply.toUInt(); - if (!signals_left) - return 0; - - timer.setSingleShot(true); - timer.start(timeout); - addr_results.clear(); - while (signals_left) { - mInterface.clear(); - while (timer.isActive() && mInterface.isEmpty()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - } - - if (!timer.isActive()) { - total_signals = 0; - break; - } - - if (mSignal != ICD_DBUS_API_ADDRINFO_SIG) { - continue; - } - - if (mError.isEmpty()) { - get_addrinfo_all_result(mArgs, result); - addr_results << result; - signals_left--; - } else { - qWarning() << "Error:" << mError; - break; - } - } - timer.stop(); - PDEBUG("total_signals=%d\n", total_signals); - return total_signals; -} - - -uint IcdPrivate::addrinfo(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdAddressInfoResult& addr_result) -{ - QTimer timer; - QVariant reply; - uint total_signals; - QVariantList vl; - - clearState(); - - reply = mDBus->call(ICD_DBUS_API_ADDRINFO_REQ, - service_type, service_attrs, service_id, - network_type, network_attrs, network_id); - if (reply.type() != QVariant::List) - return 0; - vl = reply.toList(); - if (vl.isEmpty()) - return 0; - reply = vl.first(); - total_signals = reply.toUInt(); - - if (!total_signals) - return 0; - - timer.setSingleShot(true); - timer.start(timeout); - - mInterface.clear(); - while (timer.isActive() && mInterface.isEmpty()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - - if (mSignal != ICD_DBUS_API_ADDRINFO_SIG) { - mInterface.clear(); - continue; - } - } - - timer.stop(); - - if (mError.isEmpty()) { - get_addrinfo_all_result(mArgs, addr_result); - } else { - qWarning() << "Error:" << mError; - } - - // The returned value should be one because we asked for one addrinfo - return total_signals; -} - - -Icd::Icd(QObject *parent) - : QObject(parent), d(new IcdPrivate(this)) -{ -} - -Icd::Icd(unsigned int timeout, QObject *parent) - : QObject(parent), d(new IcdPrivate(timeout, this)) -{ -} - -Icd::Icd(unsigned int timeout, IcdDbusInterfaceVer ver, QObject *parent) - : QObject(parent), d(new IcdPrivate(timeout, ver, this)) -{ -} - -Icd::~Icd() -{ - delete d; -} - - -QStringList Icd::scan(icd_scan_request_flags flags, - QStringList &network_types, - QList& scan_results, - QString& error) -{ - return d->scan(flags, network_types, scan_results, error); -} - - -void Icd::scanCancel() -{ - d->scanCancel(); -} - - -bool Icd::connect(icd_connection_flags flags, IcdConnectResult& result) -{ - return d->connect(flags, result); -} - - -bool Icd::connect(icd_connection_flags flags, QList& params, - IcdConnectResult& result) -{ - return d->connect(flags, params, result); -} - - -bool Icd::connect(icd_connection_flags flags, QString& iap, QString& result) -{ - return d->connect(flags, iap, result); -} - - -void Icd::select(uint flags) -{ - d->select(flags); -} - - -void Icd::disconnect(uint connect_flags, QString& service_type, - uint service_attrs, QString& service_id, - QString& network_type, uint network_attrs, - QByteArray& network_id) -{ - d->disconnect(connect_flags, service_type, - service_attrs, service_id, - network_type, network_attrs, - network_id); -} - - -void Icd::disconnect(uint connect_flags) -{ - d->disconnect(connect_flags); -} - - -uint Icd::state(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdStateResult &state_result) -{ - return d->state(service_type, service_attrs, service_id, - network_type, network_attrs, network_id, - state_result); -} - - -uint Icd::statistics(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdStatisticsResult& stats_result) -{ - return d->statistics(service_type, service_attrs, service_id, - network_type, network_attrs, network_id, - stats_result); -} - - -uint Icd::addrinfo(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdAddressInfoResult& addr_result) -{ - return d->addrinfo(service_type, service_attrs, service_id, - network_type, network_attrs, network_id, - addr_result); -} - - -uint Icd::state(QList& state_results) -{ - return d->state(state_results); -} - -uint Icd::state_non_blocking(QList& state_results) -{ - return d->state_non_blocking(state_results); -} - -uint Icd::statistics(QList& stats_results) -{ - return d->statistics(stats_results); -} - - -uint Icd::addrinfo(QList& addr_results) -{ - return d->addrinfo(addr_results); -} - -uint Icd::addrinfo_non_blocking(QList& addr_results) -{ - return d->addrinfo_non_blocking(addr_results); -} - -void Icd::icdSignalReceived(const QString& interface, - const QString& signal, - const QList& args) -{ - d->signalReceived(interface, signal, args); -} - - -void Icd::icdCallReply(const QString& method, - const QList& args, - const QString& error) -{ - d->callReply(method, args, error); -} - - -QString Icd::error() -{ - return d->error(); -} - -} // Maemo namespace - - diff --git a/src/3rdparty/libconninet/src/maemo_icd.h b/src/3rdparty/libconninet/src/maemo_icd.h deleted file mode 100644 index d7a8d5b..0000000 --- a/src/3rdparty/libconninet/src/maemo_icd.h +++ /dev/null @@ -1,182 +0,0 @@ -/* - libconninet - Internet Connectivity support library - - Copyright (C) 2009 Nokia Corporation. All rights reserved. - - Contact: Jukka Rissanen - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 2.1 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - -#ifndef MAEMO_ICD_H -#define MAEMO_ICD_H - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "dbusdispatcher.h" -#include - -#define ICD_LONG_SCAN_TIMEOUT (30*1000) /* 30sec */ -#define ICD_SHORT_SCAN_TIMEOUT (10*1000) /* 10sec */ -#define ICD_SHORT_CONNECT_TIMEOUT (10*1000) /* 10sec */ -#define ICD_LONG_CONNECT_TIMEOUT (150*1000) /* 2.5min */ - -namespace Maemo { - -struct CommonParams { - QString service_type; - uint service_attrs; - QString service_id; - QString network_type; - uint network_attrs; - QByteArray network_id; -}; - -struct ConnectParams { - struct CommonParams connect; -}; - -struct IcdScanResult { - uint status; // see #icd_scan_status - uint timestamp; // when last seen - QString service_name; - uint service_priority; // within a service type - QString network_name; - uint network_priority; - struct CommonParams scan; - uint signal_strength; // quality, 0 (none) - 10 (good) - QString station_id; // e.g. MAC address or similar id - uint signal_dB; // use signal strength above unless you know what you are doing - - IcdScanResult() { - status = timestamp = scan.service_attrs = service_priority = - scan.network_attrs = network_priority = signal_strength = - signal_dB = 0; - } -}; - -struct IcdConnectResult { - struct CommonParams connect; - uint status; -}; - -struct IcdStateResult { - struct CommonParams params; - QString error; - uint state; -}; - -struct IcdStatisticsResult { - struct CommonParams params; - uint time_active; // in seconds - enum icd_nw_levels signal_strength; // see network_api_defines.h in icd2-dev package - uint bytes_sent; - uint bytes_received; -}; - -struct IcdIPInformation { - QString address; - QString netmask; - QString default_gateway; - QString dns1; - QString dns2; - QString dns3; -}; - -struct IcdAddressInfoResult { - struct CommonParams params; - QList ip_info; -}; - -enum IcdDbusInterfaceVer { - IcdOldDbusInterface = 0, // use the old OSSO-IC interface - IcdNewDbusInterface // use the new Icd2 interface (default) -}; - - -class IcdPrivate; -class Icd : public QObject -{ - Q_OBJECT - -public: - Icd(QObject *parent = 0); - Icd(unsigned int timeout, QObject *parent = 0); - Icd(unsigned int timeout, IcdDbusInterfaceVer ver, QObject *parent = 0); - ~Icd(); - QString error(); // returns last error string - - /* Icd2 dbus API functions */ - QStringList scan(icd_scan_request_flags flags, - QStringList &network_types, - QList& scan_results, - QString& error); - void scanCancel(); - bool connect(icd_connection_flags flags, IcdConnectResult& result); - bool connect(icd_connection_flags flags, QList& params, - IcdConnectResult& result); - bool connect(icd_connection_flags flags, QString& iap, QString& result); - void select(uint flags); - void disconnect(uint connect_flags, QString& service_type, - uint service_attrs, QString& service_id, - QString& network_type, uint network_attrs, - QByteArray& network_id); - void disconnect(uint connect_flags); - - uint state(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdStateResult &state_result); - uint statistics(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdStatisticsResult& stats_result); - uint addrinfo(QString& service_type, uint service_attrs, - QString& service_id, QString& network_type, - uint network_attrs, QByteArray& network_id, - IcdAddressInfoResult& addr_result); - - uint state(QList& state_results); - uint state_non_blocking(QList& state_results); - uint statistics(QList& stats_results); - uint addrinfo(QList& addr_results); - uint addrinfo_non_blocking(QList& addr_results); - -private Q_SLOTS: - void icdSignalReceived(const QString& interface, - const QString& signal, - const QList& args); - void icdCallReply(const QString& method, - const QList& args, - const QString& error); - -private: - IcdPrivate *d; - friend class IcdPrivate; -}; - -} // Maemo namespace - -#endif diff --git a/src/3rdparty/libconninet/src/proxyconf.cpp b/src/3rdparty/libconninet/src/proxyconf.cpp deleted file mode 100644 index d377a31..0000000 --- a/src/3rdparty/libconninet/src/proxyconf.cpp +++ /dev/null @@ -1,392 +0,0 @@ -/* - libconninet - Internet Connectivity support library - - Copyright (C) 2010 Nokia Corporation. All rights reserved. - - Contact: Jukka Rissanen - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 2.1 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "proxyconf.h" - -#define CONF_PROXY "/system/proxy" -#define HTTP_PROXY "/system/http_proxy" - - -namespace Maemo { - -static QString convertKey(const char *key) -{ - return QString::fromUtf8(key); -} - -static QVariant convertValue(GConfValue *src) -{ - if (!src) { - return QVariant(); - } else { - switch (src->type) { - case GCONF_VALUE_INVALID: - return QVariant(QVariant::Invalid); - case GCONF_VALUE_BOOL: - return QVariant((bool)gconf_value_get_bool(src)); - case GCONF_VALUE_INT: - return QVariant(gconf_value_get_int(src)); - case GCONF_VALUE_FLOAT: - return QVariant(gconf_value_get_float(src)); - case GCONF_VALUE_STRING: - return QVariant(QString::fromUtf8(gconf_value_get_string(src))); - case GCONF_VALUE_LIST: - switch (gconf_value_get_list_type(src)) { - case GCONF_VALUE_STRING: - { - QStringList result; - for (GSList *elts = gconf_value_get_list(src); elts; elts = elts->next) - result.append(QString::fromUtf8(gconf_value_get_string((GConfValue *)elts->data))); - return QVariant(result); - } - default: - { - QList result; - for (GSList *elts = gconf_value_get_list(src); elts; elts = elts->next) - result.append(convertValue((GConfValue *)elts->data)); - return QVariant(result); - } - } - case GCONF_VALUE_SCHEMA: - default: - return QVariant(); - } - } -} - - -/* Fast version of GConfItem, allows reading subtree at a time */ -class GConfItemFast { -public: - GConfItemFast(const QString &k) : key(k) {} - QHash getEntries() const; - -private: - QString key; -}; - -#define withClient(c) for (GConfClient *c = gconf_client_get_default(); c; c=0) - - -QHash GConfItemFast::getEntries() const -{ - QHash children; - - withClient(client) { - QByteArray k = key.toUtf8(); - GSList *entries = gconf_client_all_entries(client, k.data(), NULL); - for (GSList *e = entries; e; e = e->next) { - char *key_name = strrchr(((GConfEntry *)e->data)->key, '/'); - if (!key_name) - key_name = ((GConfEntry *)e->data)->key; - else - key_name++; - QString key(convertKey(key_name)); - QVariant value = convertValue(((GConfEntry *)e->data)->value); - gconf_entry_unref((GConfEntry *)e->data); - //qDebug()<<"key="< queryProxy(const QNetworkProxyQuery &query = QNetworkProxyQuery()); -}; - - -QList NetworkProxyFactory::queryProxy(const QNetworkProxyQuery &query) -{ - ProxyConf proxy_conf; - - QList result = proxy_conf.flush(query); - if (result.isEmpty()) - result << QNetworkProxy::NoProxy; - - return result; -} - - -class ProxyConfPrivate { -private: - // proxy values from gconf - QString mode; - bool use_http_host; - QString autoconfig_url; - QString http_proxy; - quint16 http_port; - QList ignore_hosts; - QString secure_host; - quint16 secure_port; - QString ftp_host; - quint16 ftp_port; - QString socks_host; - quint16 socks_port; - QString rtsp_host; - quint16 rtsp_port; - - bool isHostExcluded(const QString &host); - -public: - QString prefix; - QString http_prefix; - - void readProxyData(); - QList flush(const QNetworkProxyQuery &query); -}; - - -static QHash getValues(const QString& prefix) -{ - GConfItemFast item(prefix); - return item.getEntries(); -} - -static QHash getHttpValues(const QString& prefix) -{ - GConfItemFast item(prefix); - return item.getEntries(); -} - -#define GET(var, type) \ - do { \ - QVariant v = values.value(#var); \ - if (v.isValid()) \ - var = v.to##type (); \ - } while(0) - -#define GET_HTTP(var, name, type) \ - do { \ - QVariant v = httpValues.value(#name); \ - if (v.isValid()) \ - var = v.to##type (); \ - } while(0) - - -void ProxyConfPrivate::readProxyData() -{ - QHash values = getValues(prefix); - QHash httpValues = getHttpValues(http_prefix); - - //qDebug()<<"values="< ProxyConfPrivate::flush(const QNetworkProxyQuery &query) -{ - QList result; - -#if 0 - qDebug()<<"http_proxy" << http_proxy; - qDebug()<<"http_port" << http_port; - qDebug()<<"ignore_hosts" << ignore_hosts; - qDebug()<<"use_http_host" << use_http_host; - qDebug()<<"mode" << mode; - qDebug()<<"autoconfig_url" << autoconfig_url; - qDebug()<<"secure_host" << secure_host; - qDebug()<<"secure_port" << secure_port; - qDebug()<<"ftp_host" << ftp_host; - qDebug()<<"ftp_port" << ftp_port; - qDebug()<<"socks_host" << socks_host; - qDebug()<<"socks_port" << socks_port; - qDebug()<<"rtsp_host" << rtsp_host; - qDebug()<<"rtsp_port" << rtsp_port; -#endif - - if (isHostExcluded(query.peerHostName())) - return result; // no proxy for this host - - if (mode == "auto") { - // TODO: pac currently not supported, fix me - return result; - } - - if (mode == "manual") { - bool isHttps = false; - QString protocol = query.protocolTag().toLower(); - - // try the protocol-specific proxy - QNetworkProxy protocolSpecificProxy; - - if (protocol == QLatin1String("ftp")) { - if (!ftp_host.isEmpty()) { - protocolSpecificProxy.setType(QNetworkProxy::FtpCachingProxy); - protocolSpecificProxy.setHostName(ftp_host); - protocolSpecificProxy.setPort(ftp_port); - } - } else if (protocol == QLatin1String("http")) { - if (!http_proxy.isEmpty()) { - protocolSpecificProxy.setType(QNetworkProxy::HttpProxy); - protocolSpecificProxy.setHostName(http_proxy); - protocolSpecificProxy.setPort(http_port); - } - } else if (protocol == QLatin1String("https")) { - isHttps = true; - if (!secure_host.isEmpty()) { - protocolSpecificProxy.setType(QNetworkProxy::HttpProxy); - protocolSpecificProxy.setHostName(secure_host); - protocolSpecificProxy.setPort(secure_port); - } - } - - if (protocolSpecificProxy.type() != QNetworkProxy::DefaultProxy) - result << protocolSpecificProxy; - - - if (!socks_host.isEmpty()) { - QNetworkProxy proxy; - proxy.setType(QNetworkProxy::Socks5Proxy); - proxy.setHostName(socks_host); - proxy.setPort(socks_port); - result << proxy; - } - - - // Add the HTTPS proxy if present (and if we haven't added yet) - if (!isHttps) { - QNetworkProxy https; - if (!secure_host.isEmpty()) { - https.setType(QNetworkProxy::HttpProxy); - https.setHostName(secure_host); - https.setPort(secure_port); - } - - if (https.type() != QNetworkProxy::DefaultProxy && - https != protocolSpecificProxy) - result << https; - } - } - - return result; -} - - -ProxyConf::ProxyConf() - : d_ptr(new ProxyConfPrivate) -{ - g_type_init(); - d_ptr->prefix = CONF_PROXY; - d_ptr->http_prefix = HTTP_PROXY; -} - -ProxyConf::~ProxyConf() -{ - delete d_ptr; -} - - -QList ProxyConf::flush(const QNetworkProxyQuery &query) -{ - d_ptr->readProxyData(); - return d_ptr->flush(query); -} - - -static int refcount = 0; -static QReadWriteLock lock; - -void ProxyConf::update() -{ - QWriteLocker locker(&lock); - NetworkProxyFactory *factory = new NetworkProxyFactory(); - QNetworkProxyFactory::setApplicationProxyFactory((QNetworkProxyFactory*)factory); - refcount++; -} - - -void ProxyConf::clear(void) -{ - QWriteLocker locker(&lock); - refcount--; - if (refcount == 0) - QNetworkProxyFactory::setApplicationProxyFactory(NULL); - - if (refcount<0) - refcount = 0; -} - - -} // namespace Maemo diff --git a/src/3rdparty/libconninet/src/proxyconf.h b/src/3rdparty/libconninet/src/proxyconf.h deleted file mode 100644 index 7711c49..0000000 --- a/src/3rdparty/libconninet/src/proxyconf.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - libconninet - Internet Connectivity support library - - Copyright (C) 2010 Nokia Corporation. All rights reserved. - - Contact: Jukka Rissanen - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 2.1 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - -#ifndef PROXYCONF_H -#define PROXYCONF_H - -#include -#include - -namespace Maemo { - -class ProxyConfPrivate; -class ProxyConf { -private: - ProxyConfPrivate *d_ptr; - -public: - ProxyConf(); - virtual ~ProxyConf(); - - QList flush(const QNetworkProxyQuery &query = QNetworkProxyQuery()); // read the proxies from db - - /* Note that for each update() call there should be corresponding - * clear() call because the ProxyConf class implements a reference - * counting mechanism. The factory is removed only when there is - * no one using the factory any more. - */ - static void update(void); // this builds QNetworkProxy factory - static void clear(void); // this removes QNetworkProxy factory -}; - -} // namespace Maemo - -#endif diff --git a/src/3rdparty/libconninet/tests/ut_dbusdispatcher.cpp b/src/3rdparty/libconninet/tests/ut_dbusdispatcher.cpp deleted file mode 100644 index 70deb3f..0000000 --- a/src/3rdparty/libconninet/tests/ut_dbusdispatcher.cpp +++ /dev/null @@ -1,191 +0,0 @@ -/* * This file is part of conn-dui-settings-inet * - * - * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * - * Contact: Aapo Makela - * - * This software, including documentation, is protected by copyright - * controlled by Nokia Corporation. All rights are reserved. Copying, - * including reproducing, storing, adapting or translating, any or all of - * this material requires the prior written consent of Nokia Corporation. - * This material also contains confidential information which may not be - * disclosed to others without the prior written consent of Nokia. - */ - -#include -#include -#include -#include -#include - -#include - -class Ut_DBusDispatcher : public QObject -{ - Q_OBJECT - -private Q_SLOTS: - void init(); - void cleanup(); - void initTestCase(); - void cleanupTestCase(); - - void simpleSignalReceived(const QString& interface, - const QString& signal, - const QList& args); - void simpleCallReply(const QString& method, - const QList& args, - const QString& error); - void simpleCall(); - - void complexCallReply(const QString& method, - const QList& args, - const QString& error); - void complexCall(); - -private: - Maemo::DBusDispatcher *mSubject; - QProcess *icd_stub; - - QString mMethod; - QString mInterface; - QString mSignal; - QList mArgs; -}; - -void Ut_DBusDispatcher::init() -{ - mSubject = new Maemo::DBusDispatcher("com.nokia.icd2", "/com/nokia/icd2", - "com.nokia.icd2"); - - // Start icd2 stub - icd_stub = new QProcess(this); - icd_stub->start("/usr/bin/icd2_stub.py"); - QTest::qWait(1000); -} - -void Ut_DBusDispatcher::cleanup() -{ - // Terminate icd2 stub - icd_stub->terminate(); - icd_stub->waitForFinished(); - - delete mSubject; - mSubject = 0; -} - -void Ut_DBusDispatcher::initTestCase() -{ -} - -void Ut_DBusDispatcher::cleanupTestCase() -{ -} - -void Ut_DBusDispatcher::simpleSignalReceived(const QString& interface, - const QString& signal, - const QList& args) -{ - // Signal handler, which simply records what has been signalled - mInterface = interface; - mSignal = signal; - mArgs = args; -} - -void Ut_DBusDispatcher::simpleCallReply(const QString& method, - const QList& args, - const QString& error) -{ - mMethod = method; - - // Check that method matches and at least WLAN_INFRA is returned - QVERIFY(error.isEmpty()); - QVERIFY(args[0].toStringList().contains("WLAN_INFRA")); -} - -void Ut_DBusDispatcher::simpleCall() -{ - uint flags = 0; - QList reply; - int idx = 0; - QTimer timer; - - // Connect signals - connect(mSubject, SIGNAL(signalReceived(const QString&, - const QString&, - const QList&)), - this, SLOT(simpleSignalReceived(const QString&, - const QString&, - const QList&))); - connect(mSubject, SIGNAL(callReply(const QString&, - const QList&, - const QString&)), - this, SLOT(simpleCallReply(const QString&, - const QList&, - const QString&))); - - // Request scan and verify the call starts succesfully - QVERIFY(mSubject->callAsynchronous("scan_req", flags)); - - // Wait 1st scan signal for 10 secs - timer.setSingleShot(true); - timer.start(10000); - while (timer.isActive() && mInterface.isEmpty()) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - idx++; - } - timer.stop(); - - // Sanity checks for the scan result - QVERIFY(mInterface == "com.nokia.icd2"); // interface is icd2 - QVERIFY(mMethod == "scan_req"); // method is scan_req - QVERIFY(mSignal == "scan_result_sig"); // signal is scan result - QVERIFY(mArgs[0] == QVariant(0) || - mArgs[0] == QVariant(4)); // First argument is status - // (0 == NEW, 4 == COMPLETED) - //QVERIFY(mArgs.contains(QVariant("WLAN_INFRA"))); // WLAN scan result -} - -void Ut_DBusDispatcher::complexCallReply(const QString& method, - const QList& args, - const QString& error) -{ - mMethod = method; - - // Check that method has not return arguments and error is not set - QVERIFY(error.isEmpty()); - QVERIFY(args.isEmpty()); -} - -void Ut_DBusDispatcher::complexCall() -{ - uint flags = ICD_CONNECTION_FLAG_UI_EVENT; - QList reply; - QVariantList networks; - QVariantList network1; - - network1 << "" << (uint)0 << "" << "WLAN_INFRA" << (uint)0x05000011 << QByteArray("osso@46@net"); - networks << QVariant(network1); - - // Connect signal - connect(mSubject, SIGNAL(callReply(const QString&, - const QList&, - const QString&)), - this, SLOT(complexCallReply(const QString&, - const QList&, - const QString&))); - - // Request connect and verify the call starts succesfully - QVERIFY(mSubject->callAsynchronous("connect_req", flags, networks)); - - QTest::qWait(1000); - - // Sanity checks for the scan result - QVERIFY(mInterface == "com.nokia.icd2"); // interface is icd2 - QVERIFY(mMethod == "connect_req"); // method connect_req -} - -QTEST_MAIN(Ut_DBusDispatcher) - -#include "ut_dbusdispatcher.moc" diff --git a/src/3rdparty/libconninet/tests/ut_iapconf.cpp b/src/3rdparty/libconninet/tests/ut_iapconf.cpp deleted file mode 100644 index 6a91d61..0000000 --- a/src/3rdparty/libconninet/tests/ut_iapconf.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/* - libconninet - Internet Connectivity support library - - Copyright (C) 2009 Nokia Corporation. All rights reserved. - - Contact: Aapo Makela - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 2.1 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - - -#include -#include - -#include - -class Ut_IAPConf : public QObject -{ - Q_OBJECT - -private Q_SLOTS: - void init(); - void cleanup(); - void initTestCase(); - void cleanupTestCase(); - - void setupIAP(); - void setupIAPContainingDot(); - void unsetIAPValueIsNotValid(); - void verifyAllIAPs(); - void allForEmptyConfReturnsEmptyList(); - void settingInvalidValueUnsetsKey(); - -private: - Maemo::IAPConf *mSubject; -}; - -void Ut_IAPConf::init() -{ - mSubject = new Maemo::IAPConf("test_iap"); -} - -void Ut_IAPConf::cleanup() -{ - // Clear made settings - mSubject->clear(); - - delete mSubject; - mSubject = 0; -} - -void Ut_IAPConf::initTestCase() -{ -} - -void Ut_IAPConf::cleanupTestCase() -{ -} - -void Ut_IAPConf::setupIAP() -{ - // Set bunch of values - mSubject->set("ipv4_type", "AUTO", - "wlan_wepkey1", "connt", - "wlan_wepdefkey", 1, - "wlan_ssid", QByteArray("CONNTEST-1")); - - // Set one value - mSubject->setValue("type", "WLAN_INFRA"); - - // Check all values that they were set correctly - QVERIFY(mSubject->value("ipv4_type").toString() == "AUTO"); - QVERIFY(mSubject->value("wlan_wepkey1").toString() == "connt"); - QVERIFY(mSubject->value("wlan_wepdefkey").toInt() == 1); - QVERIFY(mSubject->value("wlan_ssid").toByteArray() == QByteArray("CONNTEST-1")); - QVERIFY(mSubject->value("type").toString() == "WLAN_INFRA"); -} - -void Ut_IAPConf::setupIAPContainingDot() -{ - delete mSubject; - mSubject = new Maemo::IAPConf("test.iap"); - - // Set and check one value - mSubject->setValue("type", "DUMMY"); - QVERIFY(mSubject->value("type").toString() == "DUMMY"); -} - -void Ut_IAPConf::unsetIAPValueIsNotValid() -{ - QVariant invalidValue = mSubject->value("this_value_does_not_exist"); - QVERIFY(invalidValue.isValid() == false); -} - -void Ut_IAPConf::verifyAllIAPs() -{ - int count = 0, extras = 0; - QRegExp regexp("iap[1-3]"); - Maemo::IAPConf iap1("iap1"); - Maemo::IAPConf iap2("iap2"); - Maemo::IAPConf iap3("iap3"); - - iap1.clear(); - iap2.clear(); - iap3.clear(); - - iap1.setValue("name", "iap1"); - iap2.setValue("name", "iap2"); - iap3.setValue("name", "iap3"); - - count = extras = 0; - QList iaps; - Maemo::IAPConf::getAll(iaps, true); - foreach (QString iap_path, iaps) { - QString iap_id = iap_path.section('/', 5); /* This is the IAP id */ - if (!iap_id.contains(regexp)) { - extras++; - continue; - } - Maemo::IAPConf iap(iap_id); - QString name = iap.value("name").toString(); - QVERIFY(name == iap_id); - count++; - } - QCOMPARE(count, iaps.size()-extras); - - iap1.clear(); - iap2.clear(); - iap3.clear(); - - iap1.setValue("name", "iap1"); - iap2.setValue("name", "iap2"); - iap3.setValue("name", "iap3"); - - count = extras = 0; - Maemo::IAPConf::getAll(iaps); - foreach (QString iap_id, iaps) { - if (!iap_id.contains(regexp)) { - extras++; - continue; - } - Maemo::IAPConf iap(iap_id); - QString name = iap.value("name").toString(); - QVERIFY(name == iap_id); - count++; - } - QCOMPARE(count, iaps.size()-extras); -} - -void Ut_IAPConf::allForEmptyConfReturnsEmptyList() -{ - // Clear everything in configuration - mSubject->clearAll(); - - // Get all for a list and check that it is empty - QStringList iaps; - mSubject->getAll(iaps); - QVERIFY(iaps.isEmpty()); -} - -void Ut_IAPConf::settingInvalidValueUnsetsKey() -{ - // Setup some IAP - setupIAP(); - - // Set invalid value to unset "wlan_wepdefkey" key and verify that the - // value is unset - mSubject->setValue("wlan_wepdefkey", QVariant()); - QVERIFY(!mSubject->value("wlan_wepdefkey").isValid()); -} - -QTEST_MAIN(Ut_IAPConf) - -#include "ut_iapconf.moc" diff --git a/src/3rdparty/libconninet/tests/ut_iapmonitor.cpp b/src/3rdparty/libconninet/tests/ut_iapmonitor.cpp deleted file mode 100644 index f14f623..0000000 --- a/src/3rdparty/libconninet/tests/ut_iapmonitor.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* - libconninet - Internet Connectivity support library - - Copyright (C) 2009-2010 Nokia Corporation. All rights reserved. - - Contact: Jukka Rissanen - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 2.1 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - - -#include -#include - -#include -#include - -static const char *iap_id = "test_monitor_1"; - -class TestIAPMonitor : public Maemo::IAPMonitor -{ -public: - QString addedIap; - QString removedIap; - -protected: - virtual void iapAdded(const QString &id) - { - addedIap = id; - } - - virtual void iapRemoved(const QString &id) - { - removedIap = id; - } -}; - -class Ut_IAPMonitor : public QObject -{ - Q_OBJECT - -private Q_SLOTS: - void init(); - void cleanup(); - void initTestCase(); - void cleanupTestCase(); - - void check(); - -private: - TestIAPMonitor *mon; - Maemo::IAPConf *iap; -}; - -void Ut_IAPMonitor::init() -{ - mon = new TestIAPMonitor; -} - -void Ut_IAPMonitor::cleanup() -{ - delete mon; - mon = 0; -} - -void Ut_IAPMonitor::initTestCase() -{ -} - -void Ut_IAPMonitor::cleanupTestCase() -{ -} - -void Ut_IAPMonitor::check() -{ - QVERIFY(mon->addedIap.isEmpty()); - - iap = new Maemo::IAPConf(iap_id); - iap->set("ipv4_type", "AUTO", - "wlan_wepkey1", "connt", - "wlan_wepdefkey", 1, - "wlan_ssid", QByteArray(iap_id)); - - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - QVERIFY(mon->addedIap == iap_id); - mon->addedIap.clear(); - - QVERIFY(mon->removedIap.isEmpty()); - - // Unset only one value and verify that IAP is not removed - iap->set("ipv4_type", QVariant()); - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - QVERIFY(mon->removedIap.isEmpty()); - - // Clear the whole IAP and check that it is removed - iap->clear(); - delete iap; - - QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); - - QVERIFY(mon->removedIap == iap_id); -} - -QTEST_MAIN(Ut_IAPMonitor) - -#include "ut_iapmonitor.moc" diff --git a/src/3rdparty/libconninet/tests/ut_maemo_icd.cpp b/src/3rdparty/libconninet/tests/ut_maemo_icd.cpp deleted file mode 100644 index 494829d..0000000 --- a/src/3rdparty/libconninet/tests/ut_maemo_icd.cpp +++ /dev/null @@ -1,274 +0,0 @@ -/* - * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * - * Contact: Jukka Rissanen - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * version 2.1 as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA - */ - - -// !!!! -// !!!! NOTE: THESE TEST DO NOT REALLY WORK YET BECAUSE OF MISSING -// !!!! FUNCTIONALITY IN ICD2 STUB. YOU HAVE BEEN WARNED. -// !!!! - - -#include -#include -#include -#include -#include - -#include "maemo_icd.h" - -class Ut_MaemoIcd : public QObject -{ - Q_OBJECT - -private Q_SLOTS: - void init(); - void cleanup(); - void initTestCase(); - void cleanupTestCase(); - - void scan_req(); - void scan_cancel_req(); - void connect_req_default(); - void state_req_all(); - void state_req(); - void statistics_req_all(); - void statistics_req(); - void addrinfo_req_all(); - void addrinfo_req(); - -private: - void disconnect_req_default(); // this is currently not run - void connect_req_specific(); // this is currently not run - QProcess *icd_stub; - bool connect_iap(Maemo::IcdConnectResult &connect_result, - QString &result, - QString &error, - QString iap=QString()); -}; - - -QString create_error_str(Maemo::Icd &icd) -{ - return icd.error(); -} - - -void Ut_MaemoIcd::init() -{ - icd_stub = new QProcess(this); - icd_stub->setStandardOutputFile("/tmp/ut_maemo_icd.log"); - icd_stub->start("/usr/bin/icd2_stub.py"); - QTest::qWait(1000); - - // Set the statistics - QProcess dbus_send; - dbus_send.start("dbus-send --type=method_call --system " - "--dest=com.nokia.icd2 /com/nokia/icd2 " - "com.nokia.icd2.testing.set_statistics " - "uint32:1024 uint32:256"); - dbus_send.waitForFinished(); - -} - -void Ut_MaemoIcd::cleanup() -{ - icd_stub->terminate(); - icd_stub->waitForFinished(); -} - -void Ut_MaemoIcd::initTestCase() -{ -} - -void Ut_MaemoIcd::cleanupTestCase() -{ -} - -void Ut_MaemoIcd::scan_req() -{ - QList scanned; - QStringList scannedNetworkTypes; - QStringList networkTypesToScan; - QString error; - Maemo::Icd icd(ICD_SHORT_SCAN_TIMEOUT); - - scannedNetworkTypes = icd.scan(ICD_SCAN_REQUEST_ACTIVE, - networkTypesToScan, - scanned, - error); - QVERIFY(error.isEmpty()); - QCOMPARE(scanned.size(), 3); - QVERIFY(scannedNetworkTypes[0] == "WLAN_INFRA"); - QVERIFY(scannedNetworkTypes[1] == "DUN_GSM_PS"); -} - -void Ut_MaemoIcd::scan_cancel_req() -{ - Maemo::Icd icd; - icd.scanCancel(); - // Not much to verify here -} - -bool Ut_MaemoIcd::connect_iap(Maemo::IcdConnectResult &connect_result, - QString &result, - QString &error, - QString iap) -{ - icd_connection_flags flags = ICD_CONNECTION_FLAG_USER_EVENT; - bool st; - Maemo::Icd icd(ICD_SHORT_CONNECT_TIMEOUT); - - if (iap.isEmpty()) { - qDebug() << "connecting to default IAP"; - st = icd.connect(flags, connect_result); - } else { - qDebug() << "connecting to" << iap; - st = icd.connect(flags, iap, result); - } - - error = create_error_str(icd); - return st; -} - -void Ut_MaemoIcd::connect_req_default() -{ - Maemo::IcdConnectResult connect_result; - QString result, error; - bool st; - st = connect_iap(connect_result, result, error); - QVERIFY2(st, error.toAscii().data()); - result = connect_result.connect.network_id.data(); - qDebug() << result; -} - - -void Ut_MaemoIcd::disconnect_req_default() -{ - icd_connection_flags flags = ICD_CONNECTION_FLAG_USER_EVENT; - bool st; - Maemo::Icd icd(ICD_SHORT_CONNECT_TIMEOUT); - icd.disconnect(flags); -} - - -void Ut_MaemoIcd::connect_req_specific() -{ - Maemo::IcdConnectResult connect_result; - QString result; - QString error; - bool st; - st = connect_iap(connect_result, result, error, "wpa2gx2.osso.net"); - QVERIFY2(st, error.toAscii().data()); - qDebug() << result; -} - - -void Ut_MaemoIcd::state_req_all() -{ - QList state_results; - Maemo::Icd icd; - int sig; - sig = icd.state(state_results); - QVERIFY2(sig==1, create_error_str(icd).toAscii().data()); -} - - -void Ut_MaemoIcd::state_req() -{ - Maemo::IcdStateResult state_result; - Maemo::Icd icd; - int sig; - QString service_type, service_id; - QString network_type("WLAN_INFRA"); - QByteArray network_id("wpa2gx2.osso.net"); - sig = icd.state(service_type, 0, service_id, - network_type, (uint)0x17a1, network_id, - state_result); - QVERIFY2(sig==1, create_error_str(icd).toAscii().data()); -} - - -void Ut_MaemoIcd::statistics_req_all() -{ - QList stats_results; - Maemo::Icd icd; - int sig; - QString err; - sig = icd.statistics(stats_results); - err = create_error_str(icd); - if (!err.isEmpty()) - QVERIFY2(sig==1, err.toAscii().data()); - else - QCOMPARE(sig, 1); - - for(int i=0; i addr_results; - Maemo::Icd icd; - int sig; - sig = icd.addrinfo(addr_results); - QVERIFY2(sig==1, create_error_str(icd).toAscii().data()); -} - - -void Ut_MaemoIcd::addrinfo_req() -{ - Maemo::IcdAddressInfoResult addr_result; - Maemo::Icd icd; - int sig; - QString service_type, service_id; - QString network_type("WLAN_INFRA"); - QByteArray network_id("wpa2gx2.osso.net"); - sig = icd.addrinfo(service_type, 0, service_id, - network_type, (uint)0x17a1, network_id, - addr_result); - QVERIFY2(sig==1, create_error_str(icd).toAscii().data()); -} - - -QTEST_MAIN(Ut_MaemoIcd) - -#include "ut_maemo_icd.moc" diff --git a/src/3rdparty/libconninet/tests/ut_proxyconf.cpp b/src/3rdparty/libconninet/tests/ut_proxyconf.cpp deleted file mode 100644 index 1f407f0..0000000 --- a/src/3rdparty/libconninet/tests/ut_proxyconf.cpp +++ /dev/null @@ -1,400 +0,0 @@ -/* - libconninet - Internet Connectivity support library - - Copyright (C) 2010 Nokia Corporation. All rights reserved. - - Contact: Jukka Rissanen - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - version 2.1 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA -*/ - - -#include -#include -#include -#include - -#include "../src/proxyconf.h" - -class Ut_ProxyConf : public QObject -{ - Q_OBJECT - -private Q_SLOTS: - void init(); - void cleanup(); - void initTestCase(); - void cleanupTestCase(); - - // tests without the factory - void proxy_ftp_no_factory_ok_auto(); - void proxy_ftp_no_factory_ok_manual(); - void proxy_http_no_factory_ok_manual(); - void proxy_https_no_factory_ok_manual(); - void proxy_socks_no_factory_ok_manual(); - void proxy_default_no_factory_ok_manual(); - - // tests using the factory - void proxy_ftp_factory_ok_auto(); - void proxy_ftp_factory_ok_manual(); - void proxy_http_factory_ok_manual(); - void proxy_https_factory_ok_manual(); - void proxy_socks_factory_ok_manual(); - void proxy_http_factory_ok_manual_clear(); - void proxy_default_factory_ok_manual(); - void proxy_http_factory_ok_manual_ignore_list(); - void proxy_default_factory_ok_manual_system(); - -private: - Maemo::ProxyConf *pc; -}; - - -void put(QString var, QString type, QString value) -{ - QProcess gconf; - if (value.isEmpty()) - gconf.start(QString("gconftool-2 -u /system/proxy/"+var)); - else - gconf.start(QString("gconftool-2 -s /system/proxy/"+var+" -t "+type+" "+value)); - gconf.waitForFinished(); -} - -void put_http(QString var, QString type, QString value) -{ - QProcess gconf; - if (value.isEmpty()) - gconf.start(QString("gconftool-2 -u /system/http_proxy/"+var)); - else - gconf.start(QString("gconftool-2 -s /system/http_proxy/"+var+" -t "+type+" "+value)); - gconf.waitForFinished(); -} - -void put_list(QString var, QString type, QList value) -{ - QProcess gconf; - QString values = "["; - foreach (QString str, value) - values = values + str + ","; - values.chop(1); - values = values + "]"; - - gconf.start(QString("gconftool-2 -s /system/http_proxy/"+var+" -t list --list-type="+type+" "+values)); - gconf.waitForFinished(); -} - - -void Ut_ProxyConf::init() -{ - put_http("host", "string", "my.proxy.com"); - put_http("port", "int", "8080"); - - QList list; - list.append("foo.bar.com"); - list.append("192.168.19.69"); - list.append("192.168.20.0/24"); - list.append("bar.foo.com"); - put_list("ignore_hosts", "string", list); - put_http("use_http_host", "boolean", "true"); - - put("mode", "string", "auto"); - put("autoconfig_url", "string", "http://foo.bar.com/autoconf"); - put("secure_host", "string", "secure_host.com"); - put("secure_port", "int", "112"); - - put("ftp_host", "string", "ftp.nuukia.com"); - put("ftp_port", "int", "2000"); - put("socks_host", "string", "socks.host.com"); - put("socks_port", "int", "10080"); - put("rtsp_host", "string", "rtsp.voice.com"); - put("rtsp_port", "int", "1554"); - - pc = new Maemo::ProxyConf(); -} - -void Ut_ProxyConf::cleanup() -{ - delete pc; - pc = 0; -} - -void Ut_ProxyConf::initTestCase() -{ -} - -void Ut_ProxyConf::cleanupTestCase() -{ -} - - -void Ut_ProxyConf::proxy_ftp_no_factory_ok_auto() -{ - QList nplist; - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("ftp://maps.google.com/")); - - nplist = pc->flush(query); - QVERIFY(nplist.length()==0); -} - - -void Ut_ProxyConf::proxy_ftp_no_factory_ok_manual() -{ - QList nplist; - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("ftp://maps.google.com/")); - - put("mode", "string", "manual"); - - nplist = pc->flush(query); - foreach (QNetworkProxy proxy, nplist) { - qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); - } - QVERIFY(nplist.length()==3); - QVERIFY(nplist.first().type() == QNetworkProxy::FtpCachingProxy); -} - - -void Ut_ProxyConf::proxy_http_no_factory_ok_manual() -{ - QList nplist; - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/")); - - put("mode", "string", "manual"); - - nplist = pc->flush(query); - foreach (QNetworkProxy proxy, nplist) { - qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); - } - QVERIFY(nplist.length()==3); - QVERIFY(nplist.first().type() == QNetworkProxy::HttpProxy); -} - - -void Ut_ProxyConf::proxy_https_no_factory_ok_manual() -{ - QList nplist; - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("https://maps.google.com/")); - - put("mode", "string", "manual"); - - nplist = pc->flush(query); - foreach (QNetworkProxy proxy, nplist) { - qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); - } - QVERIFY(nplist.length()==2); - QVERIFY(nplist.first().type() == QNetworkProxy::HttpProxy); -} - - -void Ut_ProxyConf::proxy_socks_no_factory_ok_manual() -{ - QList nplist; - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/")); - - put("mode", "string", "manual"); - put_http("host", "string", ""); - - nplist = pc->flush(query); - foreach (QNetworkProxy proxy, nplist) { - qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); - } - QVERIFY(nplist.length()==2); - QVERIFY(nplist.first().type() == QNetworkProxy::Socks5Proxy); -} - - -void Ut_ProxyConf::proxy_default_no_factory_ok_manual() -{ - QList nplist; - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("foobar://maps.google.com/")); - - put("mode", "string", "manual"); - put("socks_host", "string", ""); - put("secure_host", "string", ""); - - nplist = pc->flush(query); - foreach (QNetworkProxy proxy, nplist) { - qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); - } - QVERIFY(nplist.length()==0); -} - - -void Ut_ProxyConf::proxy_ftp_factory_ok_auto() -{ - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("ftp://maps.google.com/")); - Maemo::ProxyConf::update(); - QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); - QVERIFY(listOfProxies.length()==1); - QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy); - Maemo::ProxyConf::clear(); -} - - -void Ut_ProxyConf::proxy_ftp_factory_ok_manual() -{ - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("ftp://maps.google.com/")); - Maemo::ProxyConf::update(); - - put("mode", "string", "manual"); - - QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); - - foreach (QNetworkProxy proxy, listOfProxies) { - qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); - } - QVERIFY(listOfProxies.length()==3); - QVERIFY(listOfProxies.first().type() == QNetworkProxy::FtpCachingProxy); - Maemo::ProxyConf::clear(); -} - - -void Ut_ProxyConf::proxy_http_factory_ok_manual() -{ - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/")); - Maemo::ProxyConf::update(); - - put("mode", "string", "manual"); - - QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); - - foreach (QNetworkProxy proxy, listOfProxies) { - qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); - } - QVERIFY(listOfProxies.length()==3); - QVERIFY(listOfProxies.first().type() == QNetworkProxy::HttpProxy); - Maemo::ProxyConf::clear(); -} - - -void Ut_ProxyConf::proxy_https_factory_ok_manual() -{ - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("https://maps.google.com/")); - Maemo::ProxyConf::update(); - - put("mode", "string", "manual"); - - QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); - - foreach (QNetworkProxy proxy, listOfProxies) { - qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); - } - QVERIFY(listOfProxies.length()==2); - QVERIFY(listOfProxies.first().type() == QNetworkProxy::HttpProxy); - Maemo::ProxyConf::clear(); -} - - -void Ut_ProxyConf::proxy_socks_factory_ok_manual() -{ - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/")); - Maemo::ProxyConf::update(); - - put("mode", "string", "manual"); - put_http("host", "string", ""); - - QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); - - foreach (QNetworkProxy proxy, listOfProxies) { - qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); - } - QVERIFY(listOfProxies.length()==2); - QVERIFY(listOfProxies.first().type() == QNetworkProxy::Socks5Proxy); - Maemo::ProxyConf::clear(); -} - - -void Ut_ProxyConf::proxy_http_factory_ok_manual_clear() -{ - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/")); - Maemo::ProxyConf::update(); - - put("mode", "string", "manual"); - put_http("host", "string", "192.168.1.1"); - - QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); - - foreach (QNetworkProxy proxy, listOfProxies) { - qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); - } - QVERIFY(listOfProxies.length()==3); - QVERIFY(listOfProxies.first().type() == QNetworkProxy::HttpProxy); - - Maemo::ProxyConf::clear(); - listOfProxies = QNetworkProxyFactory::proxyForQuery(query); - QVERIFY(listOfProxies.length()==1); - QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy); -} - - -void Ut_ProxyConf::proxy_default_factory_ok_manual() -{ - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("foobar://maps.google.com/")); - Maemo::ProxyConf::update(); - - put("mode", "string", "manual"); - put("socks_host", "string", ""); - put("secure_host", "string", ""); - - QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); - - QVERIFY(listOfProxies.length()==1); - QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy); - Maemo::ProxyConf::clear(); -} - - -void Ut_ProxyConf::proxy_http_factory_ok_manual_ignore_list() -{ - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://192.168.19.70/")); - Maemo::ProxyConf::update(); - - put("mode", "string", "manual"); - - QList listOfProxies = QNetworkProxyFactory::proxyForQuery(query); - - foreach (QNetworkProxy proxy, listOfProxies) { - qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port(); - } - QVERIFY(listOfProxies.length()==3); - QVERIFY(listOfProxies.first().type() == QNetworkProxy::HttpProxy); - - query = QNetworkProxyQuery(QUrl("http://192.168.20.10/")); - listOfProxies = QNetworkProxyFactory::proxyForQuery(query); - QVERIFY(listOfProxies.length()==1); - QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy); - Maemo::ProxyConf::clear(); -} - - -void Ut_ProxyConf::proxy_default_factory_ok_manual_system() -{ - QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/")); - Maemo::ProxyConf::update(); - - put("mode", "string", "manual"); - - QList listOfProxies = QNetworkProxyFactory::systemProxyForQuery(query); - - QVERIFY(listOfProxies.length()==1); - QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy); - Maemo::ProxyConf::clear(); -} - - - - -QTEST_MAIN(Ut_ProxyConf) - -#include "ut_proxyconf.moc" diff --git a/src/plugins/bearer/icd/dbusdispatcher.cpp b/src/plugins/bearer/icd/dbusdispatcher.cpp new file mode 100644 index 0000000..3d588dc --- /dev/null +++ b/src/plugins/bearer/icd/dbusdispatcher.cpp @@ -0,0 +1,631 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include +#include +#include +#include +#include +#include +#include "dbusdispatcher.h" + +namespace Maemo { + +/*! + \class DBusDispatcher + + \brief DBusDispatcher is a class, which is able to send DBUS method call + messages and receive unicast signals from DBUS object. +*/ + +class DBusDispatcherPrivate +{ +public: + DBusDispatcherPrivate(const QString& service, + const QString& path, + const QString& interface, + const QString& signalPath) + : service(service), path(path), interface(interface), + signalPath(signalPath), connection(0) + { + memset(&signal_vtable, 0, sizeof(signal_vtable)); + } + + ~DBusDispatcherPrivate() + { + foreach(DBusPendingCall *call, pending_calls) { + dbus_pending_call_cancel(call); + dbus_pending_call_unref(call); + } + } + + QString service; + QString path; + QString interface; + QString signalPath; + struct DBusConnection *connection; + QList pending_calls; + struct DBusObjectPathVTable signal_vtable; +}; + +static bool constantVariantList(const QVariantList& variantList) { + // Special case, empty list == empty struct + if (variantList.isEmpty()) { + return false; + } else { + QVariant::Type type = variantList[0].type(); + // Iterate items in the list and check if they are same type + foreach(QVariant variant, variantList) { + if (variant.type() != type) { + return false; + } + } + } + return true; +} + +static QString variantToSignature(const QVariant& argument, + bool constantList = true) { + switch (argument.type()) { + case QVariant::Bool: + return "b"; + case QVariant::ByteArray: + return "ay"; + case QVariant::Char: + return "y"; + case QVariant::Int: + return "i"; + case QVariant::UInt: + return "u"; + case QVariant::StringList: + return "as"; + case QVariant::String: + return "s"; + case QVariant::LongLong: + return "x"; + case QVariant::ULongLong: + return "t"; + case QVariant::List: + { + QString signature; + QVariantList variantList = argument.toList(); + if (!constantList) { + signature += DBUS_STRUCT_BEGIN_CHAR_AS_STRING; + foreach(QVariant listItem, variantList) { + signature += variantToSignature(listItem); + } + signature += DBUS_STRUCT_END_CHAR_AS_STRING; + } else { + if (variantList.isEmpty()) + return ""; + signature = "a" + variantToSignature(variantList[0]); + } + + return signature; + } + default: + qDebug() << "Unsupported variant type: " << argument.type(); + break; + } + + return ""; +} + +static bool appendVariantToDBusMessage(const QVariant& argument, + DBusMessageIter *dbus_iter) { + int idx = 0; + DBusMessageIter array_iter; + QStringList str_list; + dbus_bool_t bool_data; + dbus_int32_t int32_data; + dbus_uint32_t uint32_data; + dbus_int64_t int64_data; + dbus_uint64_t uint64_data; + char *str_data; + char char_data; + + switch (argument.type()) { + + case QVariant::Bool: + bool_data = argument.toBool(); + dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_BOOLEAN, + &bool_data); + break; + + case QVariant::ByteArray: + str_data = argument.toByteArray().data(); + dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY, + DBUS_TYPE_BYTE_AS_STRING, &array_iter); + dbus_message_iter_append_fixed_array(&array_iter, + DBUS_TYPE_BYTE, + &str_data, + argument.toByteArray().size()); + dbus_message_iter_close_container(dbus_iter, &array_iter); + break; + + case QVariant::Char: + char_data = argument.toChar().toAscii(); + dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_BYTE, + &char_data); + break; + + case QVariant::Int: + int32_data = argument.toInt(); + dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_INT32, + &int32_data); + break; + + case QVariant::String: + str_data = argument.toString().toLatin1().data(); + dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_STRING, + &str_data); + break; + + case QVariant::StringList: + str_list = argument.toStringList(); + dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY, + "s", &array_iter); + for (idx = 0; idx < str_list.size(); idx++) { + str_data = str_list.at(idx).toLatin1().data(); + dbus_message_iter_append_basic(&array_iter, + DBUS_TYPE_STRING, + &str_data); + } + dbus_message_iter_close_container(dbus_iter, &array_iter); + break; + + case QVariant::UInt: + uint32_data = argument.toUInt(); + dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_UINT32, + &uint32_data); + break; + + case QVariant::ULongLong: + uint64_data = argument.toULongLong(); + dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_UINT64, + &uint64_data); + break; + + case QVariant::LongLong: + int64_data = argument.toLongLong(); + dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_INT64, + &int64_data); + break; + + case QVariant::List: + { + QVariantList variantList = argument.toList(); + bool constantList = constantVariantList(variantList); + DBusMessageIter array_iter; + + // List is mapped either as an DBUS array (all items same type) + // DBUS struct (variable types) depending on constantList + if (constantList) { + // Resolve the signature for the first item + QString signature = ""; + if (!variantList.isEmpty()) { + signature = variantToSignature( + variantList[0], + constantVariantList(variantList[0].toList())); + } + + // Mapped as DBUS array + dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY, + signature.toAscii(), + &array_iter); + + foreach(QVariant listItem, variantList) { + appendVariantToDBusMessage(listItem, &array_iter); + } + + dbus_message_iter_close_container(dbus_iter, &array_iter); + } else { + // Mapped as DBUS struct + dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_STRUCT, + NULL, + &array_iter); + + foreach(QVariant listItem, variantList) { + appendVariantToDBusMessage(listItem, &array_iter); + } + + dbus_message_iter_close_container(dbus_iter, &array_iter); + } + + break; + } + default: + qDebug() << "Unsupported variant type: " << argument.type(); + break; + } + + return true; +} + +static QVariant getVariantFromDBusMessage(DBusMessageIter *iter) { + dbus_bool_t bool_data; + dbus_int32_t int32_data; + dbus_uint32_t uint32_data; + dbus_int64_t int64_data; + dbus_uint64_t uint64_data; + char *str_data; + char char_data; + int argtype = dbus_message_iter_get_arg_type(iter); + + switch (argtype) { + + case DBUS_TYPE_BOOLEAN: + { + dbus_message_iter_get_basic(iter, &bool_data); + QVariant variant((bool)bool_data); + return variant; + } + + case DBUS_TYPE_ARRAY: + { + // Handle all arrays here + int elem_type = dbus_message_iter_get_element_type(iter); + DBusMessageIter array_iter; + + dbus_message_iter_recurse(iter, &array_iter); + + if (elem_type == DBUS_TYPE_BYTE) { + QByteArray byte_array; + do { + dbus_message_iter_get_basic(&array_iter, &char_data); + byte_array.append(char_data); + } while (dbus_message_iter_next(&array_iter)); + QVariant variant(byte_array); + return variant; + } else if (elem_type == DBUS_TYPE_STRING) { + QStringList str_list; + do { + dbus_message_iter_get_basic(&array_iter, &str_data); + str_list.append(str_data); + } while (dbus_message_iter_next(&array_iter)); + QVariant variant(str_list); + return variant; + } else { + QVariantList variantList; + do { + variantList << getVariantFromDBusMessage(&array_iter); + } while (dbus_message_iter_next(&array_iter)); + QVariant variant(variantList); + return variant; + } + break; + } + + case DBUS_TYPE_BYTE: + { + dbus_message_iter_get_basic(iter, &char_data); + QChar ch(char_data); + QVariant variant(ch); + return variant; + } + + case DBUS_TYPE_INT32: + { + dbus_message_iter_get_basic(iter, &int32_data); + QVariant variant((int)int32_data); + return variant; + } + + case DBUS_TYPE_UINT32: + { + dbus_message_iter_get_basic(iter, &uint32_data); + QVariant variant((uint)uint32_data); + return variant; + } + + case DBUS_TYPE_STRING: + { + dbus_message_iter_get_basic(iter, &str_data); + QString str(str_data); + QVariant variant(str); + return variant; + } + + case DBUS_TYPE_INT64: + { + dbus_message_iter_get_basic(iter, &int64_data); + QVariant variant((qlonglong)int64_data); + return variant; + } + + case DBUS_TYPE_UINT64: + { + dbus_message_iter_get_basic(iter, &uint64_data); + QVariant variant((qulonglong)uint64_data); + return variant; + } + + case DBUS_TYPE_STRUCT: + { + // Handle all structs here + DBusMessageIter struct_iter; + dbus_message_iter_recurse(iter, &struct_iter); + + QVariantList variantList; + do { + variantList << getVariantFromDBusMessage(&struct_iter); + } while (dbus_message_iter_next(&struct_iter)); + QVariant variant(variantList); + return variant; + } + + default: + qDebug() << "Unsupported DBUS type: " << argtype; + } + + return QVariant(); +} + +static DBusHandlerResult signalHandler (DBusConnection *connection, + DBusMessage *message, + void *object_ref) { + (void)connection; + QString interface; + QString signal; + DBusDispatcher *dispatcher = (DBusDispatcher *)object_ref; + + if (dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_SIGNAL) { + interface = dbus_message_get_interface(message); + signal = dbus_message_get_member(message); + + QList arglist; + DBusMessageIter dbus_iter; + + if (dbus_message_iter_init(message, &dbus_iter)) { + // Read return arguments + while (dbus_message_iter_get_arg_type (&dbus_iter) != DBUS_TYPE_INVALID) { + arglist << getVariantFromDBusMessage(&dbus_iter); + dbus_message_iter_next(&dbus_iter); + } + } + + dispatcher->emitSignalReceived(interface, signal, arglist); + return DBUS_HANDLER_RESULT_HANDLED; + } + (void)message; + return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; +} + +DBusDispatcher::DBusDispatcher(const QString& service, + const QString& path, + const QString& interface, + QObject *parent) + : QObject(parent), + d_ptr(new DBusDispatcherPrivate(service, path, interface, path)) { + setupDBus(); +} + +DBusDispatcher::DBusDispatcher(const QString& service, + const QString& path, + const QString& interface, + const QString& signalPath, + QObject *parent) + : QObject(parent), + d_ptr(new DBusDispatcherPrivate(service, path, interface, signalPath)) { + setupDBus(); +} + +DBusDispatcher::~DBusDispatcher() +{ + if (d_ptr->connection) { + dbus_connection_close(d_ptr->connection); + dbus_connection_unref(d_ptr->connection); + } + delete d_ptr; +} + +void DBusDispatcher::setupDBus() +{ + d_ptr->connection = dbus_bus_get_private(DBUS_BUS_SYSTEM, NULL); + + if (d_ptr->connection == NULL) + qDebug() << "Unable to get DBUS connection!"; + else { + d_ptr->signal_vtable.message_function = signalHandler; + + dbus_connection_set_exit_on_disconnect(d_ptr->connection, FALSE); + dbus_connection_setup_with_g_main(d_ptr->connection, NULL); + dbus_connection_register_object_path(d_ptr->connection, + d_ptr->signalPath.toLatin1(), + &d_ptr->signal_vtable, + this); + } +} + +static DBusMessage *prepareDBusCall(const QString& service, + const QString& path, + const QString& interface, + const QString& method, + const QVariant& arg1 = QVariant(), + const QVariant& arg2 = QVariant(), + const QVariant& arg3 = QVariant(), + const QVariant& arg4 = QVariant(), + const QVariant& arg5 = QVariant(), + const QVariant& arg6 = QVariant(), + const QVariant& arg7 = QVariant(), + const QVariant& arg8 = QVariant()) +{ + DBusMessage *message = dbus_message_new_method_call(service.toLatin1(), + path.toLatin1(), + interface.toLatin1(), + method.toLatin1()); + DBusMessageIter dbus_iter; + + // Append variants to DBUS message + QList arglist; + if (arg1.isValid()) arglist << arg1; + if (arg2.isValid()) arglist << arg2; + if (arg3.isValid()) arglist << arg3; + if (arg4.isValid()) arglist << arg4; + if (arg5.isValid()) arglist << arg5; + if (arg6.isValid()) arglist << arg6; + if (arg7.isValid()) arglist << arg7; + if (arg8.isValid()) arglist << arg8; + + dbus_message_iter_init_append (message, &dbus_iter); + + while (!arglist.isEmpty()) { + QVariant argument = arglist.takeFirst(); + appendVariantToDBusMessage(argument, &dbus_iter); + } + + return message; +} + +QList DBusDispatcher::call(const QString& method, + const QVariant& arg1, + const QVariant& arg2, + const QVariant& arg3, + const QVariant& arg4, + const QVariant& arg5, + const QVariant& arg6, + const QVariant& arg7, + const QVariant& arg8) { + DBusMessageIter dbus_iter; + DBusMessage *message = prepareDBusCall(d_ptr->service, d_ptr->path, + d_ptr->interface, method, + arg1, arg2, arg3, arg4, arg5, + arg6, arg7, arg8); + DBusMessage *reply = dbus_connection_send_with_reply_and_block( + d_ptr->connection, + message, -1, NULL); + dbus_message_unref(message); + + QList replylist; + if (reply != NULL && dbus_message_iter_init(reply, &dbus_iter)) { + // Read return arguments + while (dbus_message_iter_get_arg_type (&dbus_iter) != DBUS_TYPE_INVALID) { + replylist << getVariantFromDBusMessage(&dbus_iter); + dbus_message_iter_next(&dbus_iter); + } + } + if (reply != NULL) dbus_message_unref(reply); + return replylist; +} + +class PendingCallInfo { +public: + QString method; + DBusDispatcher *dispatcher; + DBusDispatcherPrivate *priv; +}; + +static void freePendingCallInfo(void *memory) { + PendingCallInfo *info = (PendingCallInfo *)memory; + delete info; +} + +static void pendingCallFunction (DBusPendingCall *pending, + void *memory) { + PendingCallInfo *info = (PendingCallInfo *)memory; + QString errorStr; + QList replyList; + DBusMessage *reply = dbus_pending_call_steal_reply (pending); + + Q_ASSERT(reply != NULL); + + if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR) { + errorStr = dbus_message_get_error_name (reply); + } else { + DBusMessageIter dbus_iter; + dbus_message_iter_init(reply, &dbus_iter); + // Read return arguments + while (dbus_message_iter_get_arg_type (&dbus_iter) != DBUS_TYPE_INVALID) { + replyList << getVariantFromDBusMessage(&dbus_iter); + dbus_message_iter_next(&dbus_iter); + } + } + + info->priv->pending_calls.removeOne(pending); + info->dispatcher->emitCallReply(info->method, replyList, errorStr); + dbus_message_unref(reply); + dbus_pending_call_unref(pending); +} + +bool DBusDispatcher::callAsynchronous(const QString& method, + const QVariant& arg1, + const QVariant& arg2, + const QVariant& arg3, + const QVariant& arg4, + const QVariant& arg5, + const QVariant& arg6, + const QVariant& arg7, + const QVariant& arg8) { + DBusMessage *message = prepareDBusCall(d_ptr->service, d_ptr->path, + d_ptr->interface, method, + arg1, arg2, arg3, arg4, arg5, + arg6, arg7, arg8); + DBusPendingCall *call = NULL; + dbus_bool_t ret = dbus_connection_send_with_reply(d_ptr->connection, + message, &call, -1); + PendingCallInfo *info = new PendingCallInfo; + info->method = method; + info->dispatcher = this; + info->priv = d_ptr; + + dbus_pending_call_set_notify(call, pendingCallFunction, info, freePendingCallInfo); + d_ptr->pending_calls.append(call); + return (bool)ret; +} + +void DBusDispatcher::emitSignalReceived(const QString& interface, + const QString& signal, + const QList& args) { + emit signalReceived(interface, signal, args); } + +void DBusDispatcher::emitCallReply(const QString& method, + const QList& args, + const QString& error) { + emit callReply(method, args, error); } + +void DBusDispatcher::synchronousDispatch(int timeout_ms) +{ + dbus_connection_read_write_dispatch(d_ptr->connection, timeout_ms); +} + +} // Maemo namespace + diff --git a/src/plugins/bearer/icd/dbusdispatcher.h b/src/plugins/bearer/icd/dbusdispatcher.h new file mode 100644 index 0000000..6f2f347 --- /dev/null +++ b/src/plugins/bearer/icd/dbusdispatcher.h @@ -0,0 +1,111 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef DBUSDISPATCHER_H +#define DBUSDISPATCHER_H + +#include +#include + +namespace Maemo { + +class DBusDispatcherPrivate; +class DBusDispatcher : public QObject +{ + Q_OBJECT + +public: + DBusDispatcher(const QString& service, + const QString& path, + const QString& interface, + QObject *parent = 0); + DBusDispatcher(const QString& service, + const QString& path, + const QString& interface, + const QString& signalPath, + QObject *parent = 0); + ~DBusDispatcher(); + + QList call(const QString& method, + const QVariant& arg1 = QVariant(), + const QVariant& arg2 = QVariant(), + const QVariant& arg3 = QVariant(), + const QVariant& arg4 = QVariant(), + const QVariant& arg5 = QVariant(), + const QVariant& arg6 = QVariant(), + const QVariant& arg7 = QVariant(), + const QVariant& arg8 = QVariant()); + bool callAsynchronous(const QString& method, + const QVariant& arg1 = QVariant(), + const QVariant& arg2 = QVariant(), + const QVariant& arg3 = QVariant(), + const QVariant& arg4 = QVariant(), + const QVariant& arg5 = QVariant(), + const QVariant& arg6 = QVariant(), + const QVariant& arg7 = QVariant(), + const QVariant& arg8 = QVariant()); + void emitSignalReceived(const QString& interface, + const QString& signal, + const QList& args); + void emitCallReply(const QString& method, + const QList& args, + const QString& error = ""); + void synchronousDispatch(int timeout_ms); + +Q_SIGNALS: + void signalReceived(const QString& interface, + const QString& signal, + const QList& args); + void callReply(const QString& method, + const QList& args, + const QString& error); + +protected: + void setupDBus(); + +private: + DBusDispatcherPrivate *d_ptr; +}; + +} // Maemo namespace + +#endif diff --git a/src/plugins/bearer/icd/iapconf.cpp b/src/plugins/bearer/icd/iapconf.cpp new file mode 100644 index 0000000..ddd9fc2 --- /dev/null +++ b/src/plugins/bearer/icd/iapconf.cpp @@ -0,0 +1,245 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include +#include +#include + +#include "iapconf.h" + +#define QSTRING_TO_CONST_CSTR(str) \ + str.toUtf8().constData() + +namespace Maemo { + +class IAPConfPrivate { +public: + ConnSettings *settings; + + ConnSettingsValue *variantToValue(const QVariant &variant); + QVariant valueToVariant(ConnSettingsValue *value); +}; + +ConnSettingsValue *IAPConfPrivate::variantToValue(const QVariant &variant) +{ + // Convert variant to ConnSettingsValue + ConnSettingsValue *value = conn_settings_value_new(); + if (value == 0) { + qWarning("IAPConf: Unable to create new ConnSettingsValue"); + return 0; + } + + switch(variant.type()) { + + case QVariant::Invalid: + value->type = CONN_SETTINGS_VALUE_INVALID; + break; + + case QVariant::String: { + char *valueStr = strdup(QSTRING_TO_CONST_CSTR(variant.toString())); + value->type = CONN_SETTINGS_VALUE_STRING; + value->value.string_val = valueStr; + break; + } + + case QVariant::Int: + value->type = CONN_SETTINGS_VALUE_INT; + value->value.int_val = variant.toInt(); + break; + + case QMetaType::Float: + case QVariant::Double: + value->type = CONN_SETTINGS_VALUE_DOUBLE; + value->value.double_val = variant.toDouble(); + break; + + case QVariant::Bool: + value->type = CONN_SETTINGS_VALUE_BOOL; + value->value.bool_val = variant.toBool() ? 1 : 0; + break; + + case QVariant::ByteArray: { + QByteArray array = variant.toByteArray(); + value->type = CONN_SETTINGS_VALUE_BYTE_ARRAY; + value->value.byte_array.len = array.size(); + value->value.byte_array.val = (unsigned char *)malloc(array.size()); + memcpy(value->value.byte_array.val, array.constData(), array.size()); + break; + } + + case QVariant::List: { + QVariantList list = variant.toList(); + ConnSettingsValue **list_val = (ConnSettingsValue **)malloc( + (list.size() + 1) * sizeof(ConnSettingsValue *)); + + for (int idx = 0; idx < list.size(); idx++) { + list_val[idx] = variantToValue(list.at(idx)); + } + list_val[list.size()] = 0; + + value->type = CONN_SETTINGS_VALUE_LIST; + value->value.list_val = list_val; + break; + } + + default: + qWarning("IAPConf: Can not handle QVariant of type %d", + variant.type()); + conn_settings_value_destroy(value); + return 0; + } + + return value; +} + +QVariant IAPConfPrivate::valueToVariant(ConnSettingsValue *value) +{ + if (value == 0 || value->type == CONN_SETTINGS_VALUE_INVALID) { + return QVariant(); + } + + switch(value->type) { + + case CONN_SETTINGS_VALUE_BOOL: + return QVariant(value->value.bool_val ? true : false); + + case CONN_SETTINGS_VALUE_STRING: + return QVariant(QString(value->value.string_val)); + + case CONN_SETTINGS_VALUE_DOUBLE: + return QVariant(value->value.double_val); + + case CONN_SETTINGS_VALUE_INT: + return QVariant(value->value.int_val); + + case CONN_SETTINGS_VALUE_LIST: { + // At least with GConf backend connsettings returns byte array as list + // of ints, first check for that case + if (value->value.list_val && value->value.list_val[0]) { + bool canBeConvertedToByteArray = true; + for (int idx = 0; value->value.list_val[idx]; idx++) { + ConnSettingsValue *val = value->value.list_val[idx]; + if (val->type != CONN_SETTINGS_VALUE_INT + || val->value.int_val > 255 + || val->value.int_val < 0) { + canBeConvertedToByteArray = false; + break; + } + } + + if (canBeConvertedToByteArray) { + QByteArray array; + for (int idx = 0; value->value.list_val[idx]; idx++) { + array.append(value->value.list_val[idx]->value.int_val); + } + return array; + } + + // Create normal list + QVariantList list; + for (int idx = 0; value->value.list_val[idx]; idx++) { + list.append(valueToVariant(value->value.list_val[idx])); + } + return list; + } + } + + case CONN_SETTINGS_VALUE_BYTE_ARRAY: + return QByteArray::fromRawData((char *)value->value.byte_array.val, + value->value.byte_array.len); + + default: + return QVariant(); + } +} + +// Public class implementation + +IAPConf::IAPConf(const QString &iap_id) + : d_ptr(new IAPConfPrivate) +{ + d_ptr->settings = conn_settings_open(CONN_SETTINGS_CONNECTION, + QSTRING_TO_CONST_CSTR(iap_id)); + if (d_ptr->settings == 0) { + qWarning("IAPConf: Unable to open ConnSettings for %s", + QSTRING_TO_CONST_CSTR(iap_id)); + } +} + +IAPConf::~IAPConf() +{ + conn_settings_close(d_ptr->settings); + delete d_ptr; +} + + +QVariant IAPConf::value(const QString& key) const +{ + ConnSettingsValue *val = conn_settings_get(d_ptr->settings, + QSTRING_TO_CONST_CSTR(key)); + + QVariant variant = d_ptr->valueToVariant(val); + conn_settings_value_destroy(val); + return variant; +} + + +void IAPConf::getAll(QList &all_iaps, bool return_path) +{ + Q_UNUSED(return_path); // We don't use return path currently + + // Go through all available connections and add them to the list + char **ids = conn_settings_list_ids(CONN_SETTINGS_CONNECTION); + if (ids == 0) { + // No ids found - nothing to do + return; + } + + for (int idx = 0; ids[idx]; idx++) { + all_iaps.append(QString(ids[idx])); + free(ids[idx]); + } + free(ids); +} + + +} // namespace Maemo diff --git a/src/plugins/bearer/icd/iapconf.h b/src/plugins/bearer/icd/iapconf.h new file mode 100644 index 0000000..9c4ddcb --- /dev/null +++ b/src/plugins/bearer/icd/iapconf.h @@ -0,0 +1,74 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef IAPCONF_H +#define IAPCONF_H + +#include +#include + +namespace Maemo { + +class IAPConfPrivate; +class IAPConf { +public: + IAPConf(const QString &iap_id); + virtual ~IAPConf(); + + /** + Get one IAP value. + */ + QVariant value(const QString& key) const; + + /** + Return all the IAPs found in the system. If return_path is true, + then do not strip the IAP path away. + */ + static void getAll(QList &all_iaps, bool return_path=false); + +private: + IAPConfPrivate *d_ptr; +}; + +} // namespace Maemo + +#endif diff --git a/src/plugins/bearer/icd/iapmonitor.cpp b/src/plugins/bearer/icd/iapmonitor.cpp new file mode 100644 index 0000000..6138e7b --- /dev/null +++ b/src/plugins/bearer/icd/iapmonitor.cpp @@ -0,0 +1,130 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include + +#include +#include "iapmonitor.h" + +namespace Maemo { + + +void conn_settings_notify_func (ConnSettingsType type, + const char *id, + const char *key, + ConnSettingsValue *value, + void *user_data); + +class IAPMonitorPrivate { +private: + IAPMonitor *monitor; + ConnSettings *settings; + +public: + + IAPMonitorPrivate(IAPMonitor *monitor) + : monitor(monitor) + { + settings = conn_settings_open(CONN_SETTINGS_CONNECTION, NULL); + conn_settings_add_notify( + settings, + (ConnSettingsNotifyFunc *)conn_settings_notify_func, + this); + } + + ~IAPMonitorPrivate() + { + conn_settings_del_notify(settings); + conn_settings_close(settings); + } + + void iapAdded(const QString &iap) + { + monitor->iapAdded(iap); + } + + void iapRemoved(const QString &iap) + { + monitor->iapRemoved(iap); + } +}; + +void conn_settings_notify_func (ConnSettingsType type, + const char *id, + const char *key, + ConnSettingsValue *value, + void *user_data) +{ + if (type != CONN_SETTINGS_CONNECTION) return; + IAPMonitorPrivate *priv = (IAPMonitorPrivate *)user_data; + + QString iapId(key); + iapId = iapId.split("/")[0]; + if (value != 0) { + priv->iapAdded(iapId); + } else if (iapId == QString(key)) { + // IAP is removed only when the directory gets removed + priv->iapRemoved(iapId); + } +} + +IAPMonitor::IAPMonitor() + : d_ptr(new IAPMonitorPrivate(this)) +{ +} + +IAPMonitor::~IAPMonitor() +{ + delete d_ptr; +} + +void IAPMonitor::iapAdded(const QString &id) +{ + // By default do nothing +} + +void IAPMonitor::iapRemoved(const QString &id) +{ + // By default do nothing +} + +} // namespace Maemo diff --git a/src/plugins/bearer/icd/iapmonitor.h b/src/plugins/bearer/icd/iapmonitor.h new file mode 100644 index 0000000..21ad3bc --- /dev/null +++ b/src/plugins/bearer/icd/iapmonitor.h @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef IAPMONITOR_H +#define IAPMONITOR_H + +#include + +namespace Maemo { + +class IAPMonitorPrivate; +class IAPMonitor { +public: + IAPMonitor(); + ~IAPMonitor(); + +protected: + virtual void iapAdded(const QString &id); + virtual void iapRemoved(const QString &id); + +private: + IAPMonitorPrivate *d_ptr; + Q_DECLARE_PRIVATE(IAPMonitor); +}; + +} // namespace Maemo + +#endif // IAPMONITOR_H + diff --git a/src/plugins/bearer/icd/icd.pro b/src/plugins/bearer/icd/icd.pro index b2c58e9..464cc1c 100644 --- a/src/plugins/bearer/icd/icd.pro +++ b/src/plugins/bearer/icd/icd.pro @@ -7,15 +7,25 @@ QMAKE_CXXFLAGS *= $$QT_CFLAGS_DBUS $$QT_CFLAGS_CONNSETTINGS LIBS += $$QT_LIBS_CONNSETTINGS HEADERS += qicdengine.h \ - qnetworksession_impl.h + qnetworksession_impl.h \ + dbusdispatcher.h \ + iapconf.h \ + iapmonitor.h \ + maemo_icd.h \ + proxyconf.h \ + wlan-utils.h SOURCES += main.cpp \ qicdengine.cpp \ - qnetworksession_impl.cpp + qnetworksession_impl.cpp \ + dbusdispatcher.cpp \ + iapmonitor.cpp \ + iapconf.cpp \ + maemo_icd.cpp \ + proxyconf.cpp #DEFINES += BEARER_MANAGEMENT_DEBUG -include(../../../3rdparty/libconninet.pri) include(../../../3rdparty/libgq.pri) QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/bearer diff --git a/src/plugins/bearer/icd/maemo_icd.cpp b/src/plugins/bearer/icd/maemo_icd.cpp new file mode 100644 index 0000000..eb093fe --- /dev/null +++ b/src/plugins/bearer/icd/maemo_icd.cpp @@ -0,0 +1,849 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include "maemo_icd.h" +#include "dbusdispatcher.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +namespace Maemo { + +#undef PRINT_DEBUGINFO +#ifdef PRINT_DEBUGINFO + static FILE *fdebug = NULL; +#define PDEBUG(fmt, args...) \ + do { \ + struct timeval tv; \ + gettimeofday(&tv, 0); \ + fprintf(fdebug, "DEBUG[%d]:%ld.%ld:%s:%s():%d: " fmt, \ + getpid(), \ + tv.tv_sec, tv.tv_usec, \ + __FILE__, __FUNCTION__, __LINE__, args); \ + fflush(fdebug); \ + } while(0) +#else +#define PDEBUG(fmt...) +#endif + + +class IcdPrivate +{ +public: + IcdPrivate(Icd *myfriend) + { + init(10000, IcdNewDbusInterface, myfriend); + } + + IcdPrivate(unsigned int timeout, Icd *myfriend) + { + init(timeout, IcdNewDbusInterface, myfriend); + } + + IcdPrivate(unsigned int timeout, IcdDbusInterfaceVer ver, Icd *myfriend) + { + /* Note that the old Icd interface is currently disabled and + * the new one is always used. + */ + init(timeout, IcdNewDbusInterface, myfriend); + } + + ~IcdPrivate() + { + QObject::disconnect(mDBus, + SIGNAL(signalReceived(const QString&, + const QString&, + const QList&)), + icd, + SLOT(icdSignalReceived(const QString&, + const QString&, + const QList&))); + + QObject::disconnect(mDBus, + SIGNAL(callReply(const QString&, + const QList&, + const QString&)), + icd, + SLOT(icdCallReply(const QString&, + const QList&, + const QString&))); + + delete mDBus; + mDBus = 0; + } + + /* Icd2 dbus API functions */ + QStringList scan(icd_scan_request_flags flags, + QStringList &network_types, + QList& scan_results, + QString& error); + + uint state(QString& service_type, uint service_attrs, + QString& service_id, QString& network_type, + uint network_attrs, QByteArray& network_id, + IcdStateResult &state_result); + + uint addrinfo(QString& service_type, uint service_attrs, + QString& service_id, QString& network_type, + uint network_attrs, QByteArray& network_id, + IcdAddressInfoResult& addr_result); + + uint state(QList& state_results); + uint statistics(QList& stats_results); + uint addrinfo(QList& addr_results); + + void signalReceived(const QString& interface, + const QString& signal, + const QList& args); + void callReply(const QString& method, + const QList& args, + const QString& error); + +public: + DBusDispatcher *mDBus; + QString mMethod; + QString mInterface; + QString mSignal; + QString mError; + QList mArgs; + QList receivedSignals; + unsigned int timeout; + IcdDbusInterfaceVer icd_dbus_version; + Icd *icd; + + void init(unsigned int dbus_timeout, IcdDbusInterfaceVer ver, + Icd *myfriend) + { + if (ver == IcdNewDbusInterface) { + mDBus = new DBusDispatcher(ICD_DBUS_API_INTERFACE, + ICD_DBUS_API_PATH, + ICD_DBUS_API_INTERFACE); + } else { + mDBus = new DBusDispatcher(ICD_DBUS_SERVICE, + ICD_DBUS_PATH, + ICD_DBUS_INTERFACE); + } + icd_dbus_version = ver; + + /* This connect has a side effect as it means that only one + * Icd object can exists in one time. This should be fixed! + */ + QObject::connect(mDBus, + SIGNAL(signalReceived(const QString&, + const QString&, + const QList&)), + myfriend, + SLOT(icdSignalReceived(const QString&, + const QString&, + const QList&))); + + QObject::connect(mDBus, + SIGNAL(callReply(const QString&, + const QList&, + const QString&)), + myfriend, + SLOT(icdCallReply(const QString&, + const QList&, + const QString&))); + + icd = myfriend; + timeout = dbus_timeout; + +#ifdef PRINT_DEBUGINFO + if (!fdebug) { + fdebug = fopen("/tmp/maemoicd.log", "a+"); + } + PDEBUG("created %s\n", "IcdPrivate"); +#endif + } + + void clearState() + { + mMethod.clear(); + mInterface.clear(); + mSignal.clear(); + mError.clear(); + mArgs.clear(); + receivedSignals.clear(); + } + + bool doState(); +}; + + +void IcdPrivate::signalReceived(const QString& interface, + const QString& signal, + const QList& args) +{ + // Signal handler, which simply records what has been signalled + mInterface = interface; + mSignal = signal; + mArgs = args; + + //qDebug() << "signal" << signal << "received:" << args; + receivedSignals << QVariant(interface) << QVariant(signal) << QVariant(args); +} + + +void IcdPrivate::callReply(const QString& method, + const QList& /*args*/, + const QString& error) +{ + mMethod = method; + mError = error; +} + + +static void get_scan_result(QList& args, + IcdScanResult& ret) +{ + int i=0; + + if (args.isEmpty()) + return; + + ret.status = args[i++].toUInt(); + ret.timestamp = args[i++].toUInt(); + ret.scan.service_type = args[i++].toString(); + ret.service_name = args[i++].toString(); + ret.scan.service_attrs = args[i++].toUInt(); + ret.scan.service_id = args[i++].toString(); + ret.service_priority = args[i++].toInt(); + ret.scan.network_type = args[i++].toString(); + ret.network_name = args[i++].toString(); + ret.scan.network_attrs = args[i++].toUInt(); + ret.scan.network_id = args[i++].toByteArray(); + ret.network_priority = args[i++].toInt(); + ret.signal_strength = args[i++].toInt(); + ret.station_id = args[i++].toString(); + ret.signal_dB = args[i++].toInt(); +} + + +QStringList IcdPrivate::scan(icd_scan_request_flags flags, + QStringList &network_types, + QList& scan_results, + QString& error) +{ + QStringList scanned_types; + QTimer timer; + QVariant reply; + QVariantList vl; + bool last_result = false; + IcdScanResult result; + int all_waited; + + clearState(); + reply = mDBus->call(ICD_DBUS_API_SCAN_REQ, (uint)flags); + if (reply.type() != QVariant::List) + return scanned_types; + vl = reply.toList(); + if (vl.isEmpty()) { + error = "Scan did not return anything."; + return scanned_types; + } + reply = vl.first(); + scanned_types = reply.toStringList(); + //qDebug() << "Scanning:" << scanned_types; + all_waited = scanned_types.size(); + + timer.setSingleShot(true); + timer.start(timeout); + + scan_results.clear(); + while (!last_result) { + while (timer.isActive() && mInterface.isEmpty() && mError.isEmpty()) { + QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); + } + + if (!timer.isActive()) { + //qDebug() << "Timeout happened"; + break; + } + + if (mSignal != ICD_DBUS_API_SCAN_SIG) { + //qDebug() << "Received" << mSignal << "while waiting" << ICD_DBUS_API_SCAN_SIG << ", ignoring"; + mInterface.clear(); + continue; + } + + if (mError.isEmpty()) { + QString msgInterface = receivedSignals.takeFirst().toString(); + QString msgSignal = receivedSignals.takeFirst().toString(); + QList msgArgs = receivedSignals.takeFirst().toList(); + //qDebug() << "Signal" << msgSignal << "received."; + //qDebug() << "Params:" << msgArgs; + + while (!msgSignal.isEmpty()) { + get_scan_result(msgArgs, result); + +#if 0 + qDebug() << "Received: " << + "status =" << result.status << + ", timestamp =" << result.timestamp << + ", service_type =" << result.scan.service_type << + ", service_name =" << result.service_name << + ", service_attrs =" << result.scan.service_attrs << + ", service_id =" << result.scan.service_id << + ", service_priority =" << result.service_priority << + ", network_type =" << result.scan.network_type << + ", network_name =" << result.network_name << + ", network_attrs =" << result.scan.network_attrs << + ", network_id =" << "-" << + ", network_priority =" << result.network_priority << + ", signal_strength =" << result.signal_strength << + ", station_id =" << result.station_id << + ", signal_dB =" << result.signal_dB; +#endif + + if (result.status == ICD_SCAN_COMPLETE) { + //qDebug() << "waited =" << all_waited; + if (--all_waited == 0) { + last_result = true; + break; + } + } else + scan_results << result; + + if (receivedSignals.isEmpty()) + break; + + msgInterface = receivedSignals.takeFirst().toString(); + msgSignal = receivedSignals.takeFirst().toString(); + msgArgs = receivedSignals.takeFirst().toList(); + } + mInterface.clear(); + + } else { + qWarning() << "Error while scanning:" << mError; + break; + } + } + timer.stop(); + + error = mError; + return scanned_types; +} + + +static void get_state_all_result(QList& args, + IcdStateResult& ret) +{ + int i=0; + + ret.params.service_type = args[i++].toString(); + ret.params.service_attrs = args[i++].toUInt(); + ret.params.service_id = args[i++].toString(); + ret.params.network_type = args[i++].toString(); + ret.params.network_attrs = args[i++].toUInt(); + ret.params.network_id = args[i++].toByteArray(); + ret.error = args[i++].toString(); + ret.state = args[i++].toInt(); +} + + +static void get_state_all_result2(QList& args, + IcdStateResult& ret) +{ + int i=0; + + ret.params.network_type = args[i++].toString(); + ret.state = args[i++].toInt(); + + // Initialize the other values so that the caller can + // notice we only returned partial status + ret.params.service_type = QString(); + ret.params.service_attrs = 0; + ret.params.service_id = QString(); + ret.params.network_attrs = 0; + ret.params.network_id = QByteArray(); + ret.error = QString(); +} + + +uint IcdPrivate::state(QString& service_type, uint service_attrs, + QString& service_id, QString& network_type, + uint network_attrs, QByteArray& network_id, + IcdStateResult& state_result) +{ + QTimer timer; + QVariant reply; + uint total_signals; + QVariantList vl; + + clearState(); + + reply = mDBus->call(ICD_DBUS_API_STATE_REQ, + service_type, service_attrs, service_id, + network_type, network_attrs, network_id); + if (reply.type() != QVariant::List) + return 0; + vl = reply.toList(); + if (vl.isEmpty()) + return 0; + reply = vl.first(); + total_signals = reply.toUInt(); + if (!total_signals) + return 0; + + timer.setSingleShot(true); + timer.start(timeout); + + mInterface.clear(); + while (timer.isActive() && mInterface.isEmpty()) { + QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); + + if (mSignal != ICD_DBUS_API_STATE_SIG) { + mInterface.clear(); + continue; + } + } + + timer.stop(); + + if (mError.isEmpty()) { + if (!mArgs.isEmpty()) { + if (mArgs.size()>2) + get_state_all_result(mArgs, state_result); + else { + // We are not connected as we did not get the status we asked + return 0; + } + } + } else { + qWarning() << "Error:" << mError; + } + + // The returned value should be one because we asked for one state + return total_signals; +} + + +/* Special version of the state() call which does not call event loop. + * Needed in order to fix NB#175098 where Qt4.7 webkit crashes because event + * loop is run when webkit does not expect it. This function is called from + * bearer management API syncStateWithInterface() in QNetworkSession + * constructor. + */ +uint IcdPrivate::state(QList& state_results) +{ + QVariant reply; + QVariantList vl; + uint signals_left, total_signals; + IcdStateResult result; + time_t started; + int timeout_secs = timeout / 1000; + + PDEBUG("%s\n", "state_results"); + + clearState(); + reply = mDBus->call(ICD_DBUS_API_STATE_REQ); + if (reply.type() != QVariant::List) + return 0; + vl = reply.toList(); + if (vl.isEmpty()) + return 0; + reply = vl.first(); + signals_left = total_signals = reply.toUInt(); + if (!signals_left) + return 0; + + started = time(0); + state_results.clear(); + mError.clear(); + while (signals_left) { + mInterface.clear(); + while ((time(0)<=(started+timeout_secs)) && mInterface.isEmpty()) { + mDBus->synchronousDispatch(1000); + } + + if (time(0)>(started+timeout_secs)) { + total_signals = 0; + break; + } + + if (mSignal != ICD_DBUS_API_STATE_SIG) { + continue; + } + + if (mError.isEmpty()) { + if (!mArgs.isEmpty()) { + if (mArgs.size()==2) + get_state_all_result2(mArgs, result); + else + get_state_all_result(mArgs, result); + state_results << result; + } + signals_left--; + } else { + qWarning() << "Error:" << mError; + break; + } + } + + PDEBUG("total_signals=%d\n", total_signals); + return total_signals; +} + + +static void get_statistics_all_result(QList& args, + IcdStatisticsResult& ret) +{ + int i=0; + + if (args.isEmpty()) + return; + + ret.params.service_type = args[i++].toString(); + ret.params.service_attrs = args[i++].toUInt(); + ret.params.service_id = args[i++].toString(); + ret.params.network_type = args[i++].toString(); + ret.params.network_attrs = args[i++].toUInt(); + ret.params.network_id = args[i++].toByteArray(); + ret.time_active = args[i++].toUInt(); + ret.signal_strength = (enum icd_nw_levels)args[i++].toUInt(); + ret.bytes_sent = args[i++].toUInt(); + ret.bytes_received = args[i++].toUInt(); +} + + +uint IcdPrivate::statistics(QList& stats_results) +{ + QTimer timer; + QVariant reply; + QVariantList vl; + uint signals_left, total_signals; + IcdStatisticsResult result; + + clearState(); + reply = mDBus->call(ICD_DBUS_API_STATISTICS_REQ); + if (reply.type() != QVariant::List) + return 0; + vl = reply.toList(); + if (vl.isEmpty()) + return 0; + reply = vl.first(); + if (reply.type() != QVariant::UInt) + return 0; + signals_left = total_signals = reply.toUInt(); + + if (!signals_left) + return 0; + + timer.setSingleShot(true); + timer.start(timeout); + stats_results.clear(); + while (signals_left) { + mInterface.clear(); + while (timer.isActive() && mInterface.isEmpty()) { + QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); + } + + if (!timer.isActive()) { + total_signals = 0; + break; + } + + if (mSignal != ICD_DBUS_API_STATISTICS_SIG) { + continue; + } + + if (mError.isEmpty()) { + get_statistics_all_result(mArgs, result); + stats_results << result; + signals_left--; + } else { + qWarning() << "Error:" << mError; + break; + } + } + timer.stop(); + + return total_signals; +} + + +static void get_addrinfo_all_result(QList& args, + IcdAddressInfoResult& ret) +{ + int i=0; + + if (args.isEmpty()) + return; + + ret.params.service_type = args[i++].toString(); + ret.params.service_attrs = args[i++].toUInt(); + ret.params.service_id = args[i++].toString(); + ret.params.network_type = args[i++].toString(); + ret.params.network_attrs = args[i++].toUInt(); + ret.params.network_id = args[i++].toByteArray(); + + QVariantList vl = args[i].toList(); + QVariant reply = vl.first(); + QList lst = reply.toList(); + for (int k=0; k& addr_results) +{ + QVariant reply; + QVariantList vl; + uint signals_left, total_signals; + IcdAddressInfoResult result; + time_t started; + int timeout_secs = timeout / 1000; + + PDEBUG("%s\n", "addr_results"); + + clearState(); + reply = mDBus->call(ICD_DBUS_API_ADDRINFO_REQ); + if (reply.type() != QVariant::List) + return 0; + vl = reply.toList(); + if (vl.isEmpty()) + return 0; + reply = vl.first(); + if (reply.type() != QVariant::UInt) + return 0; + signals_left = total_signals = reply.toUInt(); + if (!signals_left) + return 0; + + started = time(0); + addr_results.clear(); + while (signals_left) { + mInterface.clear(); + while ((time(0)<=(started+timeout_secs)) && mInterface.isEmpty()) { + mDBus->synchronousDispatch(1000); + } + + if (time(0)>(started+timeout_secs)) { + total_signals = 0; + break; + } + + if (mSignal != ICD_DBUS_API_ADDRINFO_SIG) { + continue; + } + + if (mError.isEmpty()) { + get_addrinfo_all_result(mArgs, result); + addr_results << result; + signals_left--; + } else { + qWarning() << "Error:" << mError; + break; + } + } + + PDEBUG("total_signals=%d\n", total_signals); + return total_signals; +} + + +uint IcdPrivate::addrinfo(QString& service_type, uint service_attrs, + QString& service_id, QString& network_type, + uint network_attrs, QByteArray& network_id, + IcdAddressInfoResult& addr_result) +{ + QTimer timer; + QVariant reply; + uint total_signals; + QVariantList vl; + + clearState(); + + reply = mDBus->call(ICD_DBUS_API_ADDRINFO_REQ, + service_type, service_attrs, service_id, + network_type, network_attrs, network_id); + if (reply.type() != QVariant::List) + return 0; + vl = reply.toList(); + if (vl.isEmpty()) + return 0; + reply = vl.first(); + total_signals = reply.toUInt(); + + if (!total_signals) + return 0; + + timer.setSingleShot(true); + timer.start(timeout); + + mInterface.clear(); + while (timer.isActive() && mInterface.isEmpty()) { + QCoreApplication::processEvents(QEventLoop::AllEvents, 1000); + + if (mSignal != ICD_DBUS_API_ADDRINFO_SIG) { + mInterface.clear(); + continue; + } + } + + timer.stop(); + + if (mError.isEmpty()) { + get_addrinfo_all_result(mArgs, addr_result); + } else { + qWarning() << "Error:" << mError; + } + + // The returned value should be one because we asked for one addrinfo + return total_signals; +} + + +Icd::Icd(QObject *parent) + : QObject(parent), d(new IcdPrivate(this)) +{ +} + +Icd::Icd(unsigned int timeout, QObject *parent) + : QObject(parent), d(new IcdPrivate(timeout, this)) +{ +} + +Icd::Icd(unsigned int timeout, IcdDbusInterfaceVer ver, QObject *parent) + : QObject(parent), d(new IcdPrivate(timeout, ver, this)) +{ +} + +Icd::~Icd() +{ + delete d; +} + + +QStringList Icd::scan(icd_scan_request_flags flags, + QStringList &network_types, + QList& scan_results, + QString& error) +{ + return d->scan(flags, network_types, scan_results, error); +} + + +uint Icd::state(QString& service_type, uint service_attrs, + QString& service_id, QString& network_type, + uint network_attrs, QByteArray& network_id, + IcdStateResult &state_result) +{ + return d->state(service_type, service_attrs, service_id, + network_type, network_attrs, network_id, + state_result); +} + + +uint Icd::addrinfo(QString& service_type, uint service_attrs, + QString& service_id, QString& network_type, + uint network_attrs, QByteArray& network_id, + IcdAddressInfoResult& addr_result) +{ + return d->addrinfo(service_type, service_attrs, service_id, + network_type, network_attrs, network_id, + addr_result); +} + + +uint Icd::state(QList& state_results) +{ + return d->state(state_results); +} + + +uint Icd::statistics(QList& stats_results) +{ + return d->statistics(stats_results); +} + + +uint Icd::addrinfo(QList& addr_results) +{ + return d->addrinfo(addr_results); +} + + +void Icd::icdSignalReceived(const QString& interface, + const QString& signal, + const QList& args) +{ + d->signalReceived(interface, signal, args); +} + + +void Icd::icdCallReply(const QString& method, + const QList& args, + const QString& error) +{ + d->callReply(method, args, error); +} + +} // Maemo namespace + + diff --git a/src/plugins/bearer/icd/maemo_icd.h b/src/plugins/bearer/icd/maemo_icd.h new file mode 100644 index 0000000..156316a --- /dev/null +++ b/src/plugins/bearer/icd/maemo_icd.h @@ -0,0 +1,174 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef MAEMO_ICD_H +#define MAEMO_ICD_H + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#define ICD_LONG_SCAN_TIMEOUT (30*1000) /* 30sec */ +#define ICD_SHORT_SCAN_TIMEOUT (10*1000) /* 10sec */ +#define ICD_SHORT_CONNECT_TIMEOUT (10*1000) /* 10sec */ +#define ICD_LONG_CONNECT_TIMEOUT (150*1000) /* 2.5min */ + +namespace Maemo { + +struct CommonParams { + QString service_type; + uint service_attrs; + QString service_id; + QString network_type; + uint network_attrs; + QByteArray network_id; +}; + +struct IcdScanResult { + uint status; // see #icd_scan_status + uint timestamp; // when last seen + QString service_name; + uint service_priority; // within a service type + QString network_name; + uint network_priority; + struct CommonParams scan; + uint signal_strength; // quality, 0 (none) - 10 (good) + QString station_id; // e.g. MAC address or similar id + uint signal_dB; // use signal strength above unless you know what you are doing + + IcdScanResult() { + status = timestamp = scan.service_attrs = service_priority = + scan.network_attrs = network_priority = signal_strength = + signal_dB = 0; + } +}; + +struct IcdStateResult { + struct CommonParams params; + QString error; + uint state; +}; + +struct IcdStatisticsResult { + struct CommonParams params; + uint time_active; // in seconds + enum icd_nw_levels signal_strength; // see network_api_defines.h in icd2-dev package + uint bytes_sent; + uint bytes_received; +}; + +struct IcdIPInformation { + QString address; + QString netmask; + QString default_gateway; + QString dns1; + QString dns2; + QString dns3; +}; + +struct IcdAddressInfoResult { + struct CommonParams params; + QList ip_info; +}; + +enum IcdDbusInterfaceVer { + IcdOldDbusInterface = 0, // use the old OSSO-IC interface + IcdNewDbusInterface // use the new Icd2 interface (default) +}; + + +class IcdPrivate; +class Icd : public QObject +{ + Q_OBJECT + +public: + Icd(QObject *parent = 0); + Icd(unsigned int timeout, QObject *parent = 0); + Icd(unsigned int timeout, IcdDbusInterfaceVer ver, QObject *parent = 0); + ~Icd(); + + /* Icd2 dbus API functions */ + QStringList scan(icd_scan_request_flags flags, + QStringList &network_types, + QList& scan_results, + QString& error); + + uint state(QString& service_type, uint service_attrs, + QString& service_id, QString& network_type, + uint network_attrs, QByteArray& network_id, + IcdStateResult &state_result); + + uint addrinfo(QString& service_type, uint service_attrs, + QString& service_id, QString& network_type, + uint network_attrs, QByteArray& network_id, + IcdAddressInfoResult& addr_result); + + uint state(QList& state_results); + uint statistics(QList& stats_results); + uint addrinfo(QList& addr_results); + +private Q_SLOTS: + void icdSignalReceived(const QString& interface, + const QString& signal, + const QList& args); + void icdCallReply(const QString& method, + const QList& args, + const QString& error); + +private: + IcdPrivate *d; + friend class IcdPrivate; +}; + +} // Maemo namespace + +#endif diff --git a/src/plugins/bearer/icd/proxyconf.cpp b/src/plugins/bearer/icd/proxyconf.cpp new file mode 100644 index 0000000..e5c8f4e --- /dev/null +++ b/src/plugins/bearer/icd/proxyconf.cpp @@ -0,0 +1,412 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include "proxyconf.h" + +#define CONF_PROXY "/system/proxy" +#define HTTP_PROXY "/system/http_proxy" + + +namespace Maemo { + +static QString convertKey(const char *key) +{ + return QString::fromUtf8(key); +} + +static QVariant convertValue(GConfValue *src) +{ + if (!src) { + return QVariant(); + } else { + switch (src->type) { + case GCONF_VALUE_INVALID: + return QVariant(QVariant::Invalid); + case GCONF_VALUE_BOOL: + return QVariant((bool)gconf_value_get_bool(src)); + case GCONF_VALUE_INT: + return QVariant(gconf_value_get_int(src)); + case GCONF_VALUE_FLOAT: + return QVariant(gconf_value_get_float(src)); + case GCONF_VALUE_STRING: + return QVariant(QString::fromUtf8(gconf_value_get_string(src))); + case GCONF_VALUE_LIST: + switch (gconf_value_get_list_type(src)) { + case GCONF_VALUE_STRING: + { + QStringList result; + for (GSList *elts = gconf_value_get_list(src); elts; elts = elts->next) + result.append(QString::fromUtf8(gconf_value_get_string((GConfValue *)elts->data))); + return QVariant(result); + } + default: + { + QList result; + for (GSList *elts = gconf_value_get_list(src); elts; elts = elts->next) + result.append(convertValue((GConfValue *)elts->data)); + return QVariant(result); + } + } + case GCONF_VALUE_SCHEMA: + default: + return QVariant(); + } + } +} + + +/* Fast version of GConfItem, allows reading subtree at a time */ +class GConfItemFast { +public: + GConfItemFast(const QString &k) : key(k) {} + QHash getEntries() const; + +private: + QString key; +}; + +#define withClient(c) for (GConfClient *c = gconf_client_get_default(); c; c=0) + + +QHash GConfItemFast::getEntries() const +{ + QHash children; + + withClient(client) { + QByteArray k = key.toUtf8(); + GSList *entries = gconf_client_all_entries(client, k.data(), NULL); + for (GSList *e = entries; e; e = e->next) { + char *key_name = strrchr(((GConfEntry *)e->data)->key, '/'); + if (!key_name) + key_name = ((GConfEntry *)e->data)->key; + else + key_name++; + QString key(convertKey(key_name)); + QVariant value = convertValue(((GConfEntry *)e->data)->value); + gconf_entry_unref((GConfEntry *)e->data); + //qDebug()<<"key="< queryProxy(const QNetworkProxyQuery &query = QNetworkProxyQuery()); +}; + + +QList NetworkProxyFactory::queryProxy(const QNetworkProxyQuery &query) +{ + ProxyConf proxy_conf; + + QList result = proxy_conf.flush(query); + if (result.isEmpty()) + result << QNetworkProxy::NoProxy; + + return result; +} + + +class ProxyConfPrivate { +private: + // proxy values from gconf + QString mode; + bool use_http_host; + QString autoconfig_url; + QString http_proxy; + quint16 http_port; + QList ignore_hosts; + QString secure_host; + quint16 secure_port; + QString ftp_host; + quint16 ftp_port; + QString socks_host; + quint16 socks_port; + QString rtsp_host; + quint16 rtsp_port; + + bool isHostExcluded(const QString &host); + +public: + QString prefix; + QString http_prefix; + + void readProxyData(); + QList flush(const QNetworkProxyQuery &query); +}; + + +static QHash getValues(const QString& prefix) +{ + GConfItemFast item(prefix); + return item.getEntries(); +} + +static QHash getHttpValues(const QString& prefix) +{ + GConfItemFast item(prefix); + return item.getEntries(); +} + +#define GET(var, type) \ + do { \ + QVariant v = values.value(#var); \ + if (v.isValid()) \ + var = v.to##type (); \ + } while(0) + +#define GET_HTTP(var, name, type) \ + do { \ + QVariant v = httpValues.value(#name); \ + if (v.isValid()) \ + var = v.to##type (); \ + } while(0) + + +void ProxyConfPrivate::readProxyData() +{ + QHash values = getValues(prefix); + QHash httpValues = getHttpValues(http_prefix); + + //qDebug()<<"values="< ProxyConfPrivate::flush(const QNetworkProxyQuery &query) +{ + QList result; + +#if 0 + qDebug()<<"http_proxy" << http_proxy; + qDebug()<<"http_port" << http_port; + qDebug()<<"ignore_hosts" << ignore_hosts; + qDebug()<<"use_http_host" << use_http_host; + qDebug()<<"mode" << mode; + qDebug()<<"autoconfig_url" << autoconfig_url; + qDebug()<<"secure_host" << secure_host; + qDebug()<<"secure_port" << secure_port; + qDebug()<<"ftp_host" << ftp_host; + qDebug()<<"ftp_port" << ftp_port; + qDebug()<<"socks_host" << socks_host; + qDebug()<<"socks_port" << socks_port; + qDebug()<<"rtsp_host" << rtsp_host; + qDebug()<<"rtsp_port" << rtsp_port; +#endif + + if (isHostExcluded(query.peerHostName())) + return result; // no proxy for this host + + if (mode == "auto") { + // TODO: pac currently not supported, fix me + return result; + } + + if (mode == "manual") { + bool isHttps = false; + QString protocol = query.protocolTag().toLower(); + + // try the protocol-specific proxy + QNetworkProxy protocolSpecificProxy; + + if (protocol == QLatin1String("ftp")) { + if (!ftp_host.isEmpty()) { + protocolSpecificProxy.setType(QNetworkProxy::FtpCachingProxy); + protocolSpecificProxy.setHostName(ftp_host); + protocolSpecificProxy.setPort(ftp_port); + } + } else if (protocol == QLatin1String("http")) { + if (!http_proxy.isEmpty()) { + protocolSpecificProxy.setType(QNetworkProxy::HttpProxy); + protocolSpecificProxy.setHostName(http_proxy); + protocolSpecificProxy.setPort(http_port); + } + } else if (protocol == QLatin1String("https")) { + isHttps = true; + if (!secure_host.isEmpty()) { + protocolSpecificProxy.setType(QNetworkProxy::HttpProxy); + protocolSpecificProxy.setHostName(secure_host); + protocolSpecificProxy.setPort(secure_port); + } + } + + if (protocolSpecificProxy.type() != QNetworkProxy::DefaultProxy) + result << protocolSpecificProxy; + + + if (!socks_host.isEmpty()) { + QNetworkProxy proxy; + proxy.setType(QNetworkProxy::Socks5Proxy); + proxy.setHostName(socks_host); + proxy.setPort(socks_port); + result << proxy; + } + + + // Add the HTTPS proxy if present (and if we haven't added yet) + if (!isHttps) { + QNetworkProxy https; + if (!secure_host.isEmpty()) { + https.setType(QNetworkProxy::HttpProxy); + https.setHostName(secure_host); + https.setPort(secure_port); + } + + if (https.type() != QNetworkProxy::DefaultProxy && + https != protocolSpecificProxy) + result << https; + } + } + + return result; +} + + +ProxyConf::ProxyConf() + : d_ptr(new ProxyConfPrivate) +{ + g_type_init(); + d_ptr->prefix = CONF_PROXY; + d_ptr->http_prefix = HTTP_PROXY; +} + +ProxyConf::~ProxyConf() +{ + delete d_ptr; +} + + +QList ProxyConf::flush(const QNetworkProxyQuery &query) +{ + d_ptr->readProxyData(); + return d_ptr->flush(query); +} + + +static int refcount = 0; +static QReadWriteLock lock; + +void ProxyConf::update() +{ + QWriteLocker locker(&lock); + NetworkProxyFactory *factory = new NetworkProxyFactory(); + QNetworkProxyFactory::setApplicationProxyFactory((QNetworkProxyFactory*)factory); + refcount++; +} + + +void ProxyConf::clear(void) +{ + QWriteLocker locker(&lock); + refcount--; + if (refcount == 0) + QNetworkProxyFactory::setApplicationProxyFactory(NULL); + + if (refcount<0) + refcount = 0; +} + + +} // namespace Maemo diff --git a/src/plugins/bearer/icd/proxyconf.h b/src/plugins/bearer/icd/proxyconf.h new file mode 100644 index 0000000..884cc5c --- /dev/null +++ b/src/plugins/bearer/icd/proxyconf.h @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef PROXYCONF_H +#define PROXYCONF_H + +#include +#include + +namespace Maemo { + +class ProxyConfPrivate; +class ProxyConf { +private: + ProxyConfPrivate *d_ptr; + +public: + ProxyConf(); + virtual ~ProxyConf(); + + QList flush(const QNetworkProxyQuery &query = QNetworkProxyQuery()); // read the proxies from db + + /* Note that for each update() call there should be corresponding + * clear() call because the ProxyConf class implements a reference + * counting mechanism. The factory is removed only when there is + * no one using the factory any more. + */ + static void update(void); // this builds QNetworkProxy factory + static void clear(void); // this removes QNetworkProxy factory +}; + +} // namespace Maemo + +#endif diff --git a/src/plugins/bearer/icd/qicdengine.cpp b/src/plugins/bearer/icd/qicdengine.cpp index 3264f15..bdf4e2e 100644 --- a/src/plugins/bearer/icd/qicdengine.cpp +++ b/src/plugins/bearer/icd/qicdengine.cpp @@ -43,7 +43,7 @@ #include "qnetworksession_impl.h" #include -#include +#include #include #include @@ -67,6 +67,10 @@ QString IcdNetworkConfigurationPrivate::bearerTypeName() const return iap_type; } +/******************************************************************************/ +/** IapAddTimer specific */ +/******************************************************************************/ + /* The IapAddTimer is a helper class that makes sure we update * the configuration only after all db additions to certain * iap are finished (after a certain timeout) @@ -162,6 +166,9 @@ void IapAddTimer::del(QString& iap_id) } } +/******************************************************************************/ +/** IAPMonitor specific */ +/******************************************************************************/ class IapMonitor : public Maemo::IAPMonitor { @@ -216,6 +223,11 @@ void IapMonitor::iapRemoved(const QString &iap_id) d->deleteConfiguration(id); } + +/******************************************************************************/ +/** QIcdEngine implementation */ +/******************************************************************************/ + QIcdEngine::QIcdEngine(QObject *parent) : QBearerEngine(parent), iapMonitor(0), m_dbusInterface(0), firstUpdate(true), m_scanGoingOn(false) diff --git a/src/plugins/bearer/icd/qicdengine.h b/src/plugins/bearer/icd/qicdengine.h index 0d5ba27..d528f15 100644 --- a/src/plugins/bearer/icd/qicdengine.h +++ b/src/plugins/bearer/icd/qicdengine.h @@ -46,7 +46,7 @@ #include -#include +#include "maemo_icd.h" QT_BEGIN_NAMESPACE diff --git a/src/plugins/bearer/icd/qnetworksession_impl.cpp b/src/plugins/bearer/icd/qnetworksession_impl.cpp index 787cc55..2ed0b88 100644 --- a/src/plugins/bearer/icd/qnetworksession_impl.cpp +++ b/src/plugins/bearer/icd/qnetworksession_impl.cpp @@ -60,13 +60,16 @@ QDBusArgument &operator<<(QDBusArgument &argument, const ICd2DetailsDBusStruct &icd2) { argument.beginStructure(); + argument << icd2.serviceType; argument << icd2.serviceAttributes; argument << icd2.setviceId; argument << icd2.networkType; argument << icd2.networkAttributes; argument << icd2.networkId; + argument.endStructure(); + return argument; } @@ -74,13 +77,16 @@ const QDBusArgument &operator>>(const QDBusArgument &argument, ICd2DetailsDBusStruct &icd2) { argument.beginStructure(); + argument >> icd2.serviceType; argument >> icd2.serviceAttributes; argument >> icd2.setviceId; argument >> icd2.networkType; argument >> icd2.networkAttributes; argument >> icd2.networkId; + argument.endStructure(); + return argument; } @@ -104,9 +110,12 @@ QDBusArgument &operator<<(QDBusArgument &argument, const ICd2DetailsList &detailsList) { argument.beginArray(qMetaTypeId()); + for (int i = 0; i < detailsList.count(); ++i) argument << detailsList[i]; + argument.endArray(); + return argument; } @@ -144,7 +153,8 @@ void QNetworkSessionPrivateImpl::iapStateChanged(const QString& iapid, uint icd_ void QNetworkSessionPrivateImpl::cleanupSession(void) { - QObject::disconnect(q, SIGNAL(stateChanged(QNetworkSession::State)), this, SLOT(updateProxies(QNetworkSession::State))); + QObject::disconnect(q, SIGNAL(stateChanged(QNetworkSession::State)), + this, SLOT(updateProxies(QNetworkSession::State))); } diff --git a/src/plugins/bearer/icd/wlan-utils.h b/src/plugins/bearer/icd/wlan-utils.h new file mode 100644 index 0000000..1d9e89d --- /dev/null +++ b/src/plugins/bearer/icd/wlan-utils.h @@ -0,0 +1,110 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +#ifndef WLAN_UTILS_H +#define WLAN_UTILS_H + +/** Originally taken from: libicd-network-wlan-dev.h*/ + +#include +#include +#include +#include + +/* capability bits inside network attributes var */ +#define NWATTR_WPS_MASK 0x0000F000 +#define NWATTR_ALGORITHM_MASK 0x00000F00 +#define NWATTR_WPA2_MASK 0x00000080 +#define NWATTR_METHOD_MASK 0x00000078 +#define NWATTR_MODE_MASK 0x00000007 + +#define CAP_LOCALMASK 0x0FFFE008 + +/* how much to shift between capability and network attributes var */ +#define CAP_SHIFT_WPS 3 +#define CAP_SHIFT_ALGORITHM 20 +#define CAP_SHIFT_WPA2 1 +#define CAP_SHIFT_METHOD 1 +#define CAP_SHIFT_MODE 0 +#define CAP_SHIFT_ALWAYS_ONLINE 26 + +/* ------------------------------------------------------------------------- */ +/* From combined to capability */ +static inline dbus_uint32_t nwattr2cap(guint nwattrs, dbus_uint32_t *cap) +{ + guint oldval = *cap; + + *cap &= CAP_LOCALMASK; /* clear old capabilities */ + *cap |= + ((nwattrs & ICD_NW_ATTR_ALWAYS_ONLINE) >> CAP_SHIFT_ALWAYS_ONLINE) | + ((nwattrs & NWATTR_WPS_MASK) >> CAP_SHIFT_WPS) | + ((nwattrs & NWATTR_ALGORITHM_MASK) << CAP_SHIFT_ALGORITHM) | + ((nwattrs & NWATTR_WPA2_MASK) << CAP_SHIFT_WPA2) | + ((nwattrs & NWATTR_METHOD_MASK) << CAP_SHIFT_METHOD) | + (nwattrs & NWATTR_MODE_MASK); + + return oldval; +} + + +/* ------------------------------------------------------------------------- */ +/* From capability to combined */ +static inline guint cap2nwattr(dbus_uint32_t cap, guint *nwattrs) +{ + guint oldval = *nwattrs; + + *nwattrs &= ~ICD_NW_ATTR_LOCALMASK; /* clear old capabilities */ + *nwattrs |= +#ifdef WLANCOND_WPS_MASK + ((cap & WLANCOND_WPS_MASK) << CAP_SHIFT_WPS) | +#endif + ((cap & (WLANCOND_ENCRYPT_ALG_MASK | + WLANCOND_ENCRYPT_GROUP_ALG_MASK)) >> CAP_SHIFT_ALGORITHM)| + ((cap & WLANCOND_ENCRYPT_WPA2_MASK) >> CAP_SHIFT_WPA2) | + ((cap & WLANCOND_ENCRYPT_METHOD_MASK) >> CAP_SHIFT_METHOD) | + (cap & WLANCOND_MODE_MASK); + + return oldval; +} + + +#endif -- cgit v0.12 From 83e6bc232e687bab93c9eddaf0b4479462c8414c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Mon, 20 Sep 2010 14:54:30 +0200 Subject: Fixed scaled point drawing with square cap in raster paint engine. With a large pen width and a small scale, due to the hacky way we draw points (stroking a line from (x, y) to (x + tiny_amount, y)), we some times end up snapping these two points to the same in rasterizeLine(). If we instead apply the SquareCap before we do clipping / snapping we don't get this problem. Task-number: QTBUG-13429 Reviewed-by: Trond (cherry picked from commit 7c673a4cf64ba043bb27f90287517bdcdd7a21db) --- src/gui/painting/qrasterizer.cpp | 41 +++++++++++++++--------------------- tests/auto/qpainter/tst_qpainter.cpp | 22 +++++++++++++++++++ 2 files changed, 39 insertions(+), 24 deletions(-) diff --git a/src/gui/painting/qrasterizer.cpp b/src/gui/painting/qrasterizer.cpp index f8f8afb..61ed12e 100644 --- a/src/gui/painting/qrasterizer.cpp +++ b/src/gui/painting/qrasterizer.cpp @@ -718,17 +718,21 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, QPointF pa = a; QPointF pb = b; - QPointF offs = QPointF(qAbs(b.y() - a.y()), qAbs(b.x() - a.x())) * width * 0.5; - if (squareCap) - offs += QPointF(offs.y(), offs.x()); + if (squareCap) { + QPointF delta = pb - pa; + pa -= (0.5f * width) * delta; + pb += (0.5f * width) * delta; + } + + QPointF offs = QPointF(qAbs(b.y() - a.y()), qAbs(b.x() - a.x())) * width * 0.5; const QRectF clip(d->clipRect.topLeft() - offs, d->clipRect.bottomRight() + QPoint(1, 1) + offs); - if (!clip.contains(a) || !clip.contains(b)) { + if (!clip.contains(pa) || !clip.contains(pb)) { qreal t1 = 0; qreal t2 = 1; - const qreal o[2] = { a.x(), a.y() }; - const qreal d[2] = { b.x() - a.x(), b.y() - a.y() }; + const qreal o[2] = { pa.x(), pa.y() }; + const qreal d[2] = { pb.x() - pa.x(), pb.y() - pa.y() }; const qreal low[2] = { clip.left(), clip.top() }; const qreal high[2] = { clip.right(), clip.bottom() }; @@ -751,8 +755,12 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, if (t1 >= t2) return; } - pa = a + (b - a) * t1; - pb = a + (b - a) * t2; + + QPointF npa = pa + (pb - pa) * t1; + QPointF npb = pa + (pb - pa) * t2; + + pa = npa; + pb = npb; } if (!d->antialiased) { @@ -799,12 +807,7 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, pa = QPointF(x, y - dy); pb = QPointF(x, y + dy); - if (squareCap) - width = 1 / width + 1.0f; - else - width = 1 / width; - - squareCap = false; + width = 1 / width; } if (q16Dot16Compare(pa.x(), pb.x())) { @@ -814,11 +817,6 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, const qreal dy = pb.y() - pa.y(); const qreal halfWidth = 0.5f * width * dy; - if (squareCap) { - pa.ry() -= halfWidth; - pb.ry() += halfWidth; - } - qreal left = pa.x() - halfWidth; qreal right = pa.x() + halfWidth; @@ -899,11 +897,6 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, delta *= 0.5f * width; const QPointF perp(delta.y(), -delta.x()); - if (squareCap) { - pa -= delta; - pb += delta; - } - QPointF top; QPointF left; QPointF right; diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp index f358681..a94c300 100644 --- a/tests/auto/qpainter/tst_qpainter.cpp +++ b/tests/auto/qpainter/tst_qpainter.cpp @@ -252,6 +252,8 @@ private slots: void QTBUG5939_attachPainterPrivate(); + void drawPointScaled(); + private: void fillData(); void setPenColor(QPainter& p); @@ -4522,6 +4524,26 @@ void tst_QPainter::QTBUG5939_attachPainterPrivate() QCOMPARE(widget->deviceTransform, proxy->deviceTransform); } +void tst_QPainter::drawPointScaled() +{ + QImage image(32, 32, QImage::Format_RGB32); + image.fill(0xffffffff); + + QPainter p(&image); + + p.scale(0.1, 0.1); + + QPen pen; + pen.setWidth(1000); + pen.setColor(Qt::red); + + p.setPen(pen); + p.drawPoint(0, 0); + p.end(); + + QCOMPARE(image.pixel(16, 16), 0xffff0000); +} + QTEST_MAIN(tst_QPainter) #include "tst_qpainter.moc" -- cgit v0.12 From e8d9e657509be4d8fea62a73c8dd51305951f1c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 23 Sep 2010 10:04:39 +0200 Subject: Fixed floating point overflow issues in QRasterizer::rasterizeLine Change 7c673a4cf64ba04 introduced some autotest failures in the fpe_steepSlopes test in QPainter. Since the other rasterizers all deal in a 26.6 fixed point coordinate space we should snap the line vertices to this to prevent floating point overflows due to very steep slopes. This also necessitates keeping track of four different slope / inverse slope increments for each of the four edges. This also fixes a previously QEXPECT_FAIL'ed test case. Task-number: QTBUG-13429 Reviewed-by: Trond (cherry picked from commit 93199a5b7082fd484b7f21ad4825d71693ecead2) --- src/gui/painting/qrasterizer.cpp | 139 ++++++++++++++++++++--------------- tests/auto/qpainter/tst_qpainter.cpp | 1 - 2 files changed, 79 insertions(+), 61 deletions(-) diff --git a/src/gui/painting/qrasterizer.cpp b/src/gui/painting/qrasterizer.cpp index 61ed12e..4fded1f 100644 --- a/src/gui/painting/qrasterizer.cpp +++ b/src/gui/painting/qrasterizer.cpp @@ -65,6 +65,12 @@ typedef int Q16Dot16; #define COORD_ROUNDING 1 // 0: round up, 1: round down #define COORD_OFFSET 32 // 26.6, 32 is half a pixel +static inline QT_FT_Vector PointToVector(const QPointF &p) +{ + QT_FT_Vector result = { QT_FT_Pos(p.x() * 64), QT_FT_Pos(p.y() * 64) }; + return result; +} + class QSpanBuffer { public: QSpanBuffer(ProcessSpans blend, void *data, const QRect &clipRect) @@ -693,9 +699,9 @@ static Q16Dot16 intersectPixelFP(int x, Q16Dot16 top, Q16Dot16 bottom, Q16Dot16 } } -static inline bool q16Dot16Compare(qreal p1, qreal p2) +static inline bool q26Dot6Compare(qreal p1, qreal p2) { - return FloatToQ16Dot16(p2 - p1) == 0; + return int((p2 - p1) * 64.) == 0; } static inline qreal qFloorF(qreal v) @@ -708,6 +714,12 @@ static inline qreal qFloorF(qreal v) return floor(v); } +static inline QPointF snapTo26Dot6Grid(const QPointF &p) +{ + return QPointF(qFloorF(p.x() * 64) * (1 / qreal(64)), + qFloorF(p.y() * 64) * (1 / qreal(64))); +} + void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, bool squareCap) { if (a == b || width == 0 || d->clipRect.isEmpty()) @@ -771,15 +783,6 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, } { - const qreal gridResolution = 64; - const qreal reciprocal = 1 / gridResolution; - - // snap to grid to prevent large slopes - pa.rx() = qFloorF(pa.rx() * gridResolution) * reciprocal; - pa.ry() = qFloorF(pa.ry() * gridResolution) * reciprocal; - pb.rx() = qFloorF(pb.rx() * gridResolution) * reciprocal; - pb.ry() = qFloorF(pb.ry() * gridResolution) * reciprocal; - // old delta const QPointF d0 = a - b; const qreal w0 = d0.x() * d0.x() + d0.y() * d0.y(); @@ -797,7 +800,7 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, QSpanBuffer buffer(d->blend, d->data, d->clipRect); - if (q16Dot16Compare(pa.y(), pb.y())) { + if (q26Dot6Compare(pa.y(), pb.y())) { const qreal x = (pa.x() + pb.x()) * 0.5f; const qreal dx = qAbs(pb.x() - pa.x()) * 0.5f; @@ -810,7 +813,7 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, width = 1 / width; } - if (q16Dot16Compare(pa.x(), pb.x())) { + if (q26Dot6Compare(pa.x(), pb.x())) { if (pa.y() > pb.y()) qSwap(pa, pb); @@ -826,7 +829,7 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, pa.ry() = qBound(qreal(d->clipRect.top()), pa.y(), qreal(d->clipRect.bottom() + 1)); pb.ry() = qBound(qreal(d->clipRect.top()), pb.y(), qreal(d->clipRect.bottom() + 1)); - if (q16Dot16Compare(left, right) || q16Dot16Compare(pa.y(), pb.y())) + if (q26Dot6Compare(left, right) || q26Dot6Compare(pa.y(), pb.y())) return; if (d->antialiased) { @@ -914,14 +917,36 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, bottom = pb + perp; } + top = snapTo26Dot6Grid(top); + bottom = snapTo26Dot6Grid(bottom); + left = snapTo26Dot6Grid(left); + right = snapTo26Dot6Grid(right); + const qreal topBound = qBound(qreal(d->clipRect.top()), top.y(), qreal(d->clipRect.bottom())); const qreal bottomBound = qBound(qreal(d->clipRect.top()), bottom.y(), qreal(d->clipRect.bottom())); - const qreal leftSlope = (left.x() - top.x()) / (left.y() - top.y()); - const qreal rightSlope = -1.0f / leftSlope; + const QPointF topLeftEdge = left - top; + const QPointF topRightEdge = right - top; + const QPointF bottomLeftEdge = bottom - left; + const QPointF bottomRightEdge = bottom - right; - const Q16Dot16 leftSlopeFP = FloatToQ16Dot16(leftSlope); - const Q16Dot16 rightSlopeFP = FloatToQ16Dot16(rightSlope); + const qreal topLeftSlope = topLeftEdge.x() / topLeftEdge.y(); + const qreal bottomLeftSlope = bottomLeftEdge.x() / bottomLeftEdge.y(); + + const qreal topRightSlope = topRightEdge.x() / topRightEdge.y(); + const qreal bottomRightSlope = bottomRightEdge.x() / bottomRightEdge.y(); + + const Q16Dot16 topLeftSlopeFP = FloatToQ16Dot16(topLeftSlope); + const Q16Dot16 topRightSlopeFP = FloatToQ16Dot16(topRightSlope); + + const Q16Dot16 bottomLeftSlopeFP = FloatToQ16Dot16(bottomLeftSlope); + const Q16Dot16 bottomRightSlopeFP = FloatToQ16Dot16(bottomRightSlope); + + const Q16Dot16 invTopLeftSlopeFP = FloatToQ16Dot16(1 / topLeftSlope); + const Q16Dot16 invTopRightSlopeFP = FloatToQ16Dot16(1 / topRightSlope); + + const Q16Dot16 invBottomLeftSlopeFP = FloatToQ16Dot16(1 / bottomLeftSlope); + const Q16Dot16 invBottomRightSlopeFP = FloatToQ16Dot16(1 / bottomRightSlope); if (d->antialiased) { const Q16Dot16 iTopFP = IntToQ16Dot16(int(topBound)); @@ -929,16 +954,16 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, const Q16Dot16 iRightFP = IntToQ16Dot16(int(right.y())); const Q16Dot16 iBottomFP = IntToQ16Dot16(int(bottomBound)); - Q16Dot16 leftIntersectAf = FloatToQ16Dot16(top.x() + (int(topBound) - top.y()) * leftSlope); - Q16Dot16 rightIntersectAf = FloatToQ16Dot16(top.x() + (int(topBound) - top.y()) * rightSlope); + Q16Dot16 leftIntersectAf = FloatToQ16Dot16(top.x() + (int(topBound) - top.y()) * topLeftSlope); + Q16Dot16 rightIntersectAf = FloatToQ16Dot16(top.x() + (int(topBound) - top.y()) * topRightSlope); Q16Dot16 leftIntersectBf = 0; Q16Dot16 rightIntersectBf = 0; if (iLeftFP < iTopFP) - leftIntersectBf = FloatToQ16Dot16(left.x() + (int(topBound) - left.y()) * rightSlope); + leftIntersectBf = FloatToQ16Dot16(left.x() + (int(topBound) - left.y()) * bottomLeftSlope); if (iRightFP < iTopFP) - rightIntersectBf = FloatToQ16Dot16(right.x() + (int(topBound) - right.y()) * leftSlope); + rightIntersectBf = FloatToQ16Dot16(right.x() + (int(topBound) - right.y()) * bottomRightSlope); Q16Dot16 rowTop, rowBottomLeft, rowBottomRight, rowTopLeft, rowTopRight, rowBottom; Q16Dot16 topLeftIntersectAf, topLeftIntersectBf, topRightIntersectAf, topRightIntersectBf; @@ -953,9 +978,9 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, rowTop = qMax(iTopFP, yTopFP); topLeftIntersectAf = leftIntersectAf + - Q16Dot16Multiply(leftSlopeFP, rowTop - iTopFP); + Q16Dot16Multiply(topLeftSlopeFP, rowTop - iTopFP); topRightIntersectAf = rightIntersectAf + - Q16Dot16Multiply(rightSlopeFP, rowTop - iTopFP); + Q16Dot16Multiply(topRightSlopeFP, rowTop - iTopFP); Q16Dot16 yFP = iTopFP; while (yFP <= iBottomFP) { @@ -967,30 +992,30 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, if (yFP == iLeftFP) { const int y = Q16Dot16ToInt(yFP); - leftIntersectBf = FloatToQ16Dot16(left.x() + (y - left.y()) * rightSlope); - topLeftIntersectBf = leftIntersectBf + Q16Dot16Multiply(rightSlopeFP, rowTopLeft - yFP); - bottomLeftIntersectAf = leftIntersectAf + Q16Dot16Multiply(leftSlopeFP, rowBottomLeft - yFP); + leftIntersectBf = FloatToQ16Dot16(left.x() + (y - left.y()) * bottomLeftSlope); + topLeftIntersectBf = leftIntersectBf + Q16Dot16Multiply(bottomLeftSlopeFP, rowTopLeft - yFP); + bottomLeftIntersectAf = leftIntersectAf + Q16Dot16Multiply(topLeftSlopeFP, rowBottomLeft - yFP); } else { topLeftIntersectBf = leftIntersectBf; - bottomLeftIntersectAf = leftIntersectAf + leftSlopeFP; + bottomLeftIntersectAf = leftIntersectAf + topLeftSlopeFP; } if (yFP == iRightFP) { const int y = Q16Dot16ToInt(yFP); - rightIntersectBf = FloatToQ16Dot16(right.x() + (y - right.y()) * leftSlope); - topRightIntersectBf = rightIntersectBf + Q16Dot16Multiply(leftSlopeFP, rowTopRight - yFP); - bottomRightIntersectAf = rightIntersectAf + Q16Dot16Multiply(rightSlopeFP, rowBottomRight - yFP); + rightIntersectBf = FloatToQ16Dot16(right.x() + (y - right.y()) * bottomRightSlope); + topRightIntersectBf = rightIntersectBf + Q16Dot16Multiply(bottomRightSlopeFP, rowTopRight - yFP); + bottomRightIntersectAf = rightIntersectAf + Q16Dot16Multiply(topRightSlopeFP, rowBottomRight - yFP); } else { topRightIntersectBf = rightIntersectBf; - bottomRightIntersectAf = rightIntersectAf + rightSlopeFP; + bottomRightIntersectAf = rightIntersectAf + topRightSlopeFP; } if (yFP == iBottomFP) { - bottomLeftIntersectBf = leftIntersectBf + Q16Dot16Multiply(rightSlopeFP, rowBottom - yFP); - bottomRightIntersectBf = rightIntersectBf + Q16Dot16Multiply(leftSlopeFP, rowBottom - yFP); + bottomLeftIntersectBf = leftIntersectBf + Q16Dot16Multiply(bottomLeftSlopeFP, rowBottom - yFP); + bottomRightIntersectBf = rightIntersectBf + Q16Dot16Multiply(bottomRightSlopeFP, rowBottom - yFP); } else { - bottomLeftIntersectBf = leftIntersectBf + rightSlopeFP; - bottomRightIntersectBf = rightIntersectBf + leftSlopeFP; + bottomLeftIntersectBf = leftIntersectBf + bottomLeftSlopeFP; + bottomRightIntersectBf = rightIntersectBf + bottomRightSlopeFP; } if (yFP < iLeftFP) { @@ -1035,21 +1060,21 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, if (yFP <= iLeftFP) excluded += intersectPixelFP(x, rowTop, rowBottomLeft, bottomLeftIntersectAf, topLeftIntersectAf, - leftSlopeFP, -rightSlopeFP); + topLeftSlopeFP, invTopLeftSlopeFP); if (yFP >= iLeftFP) excluded += intersectPixelFP(x, rowTopLeft, rowBottom, topLeftIntersectBf, bottomLeftIntersectBf, - rightSlopeFP, -leftSlopeFP); + bottomLeftSlopeFP, invBottomLeftSlopeFP); if (x >= rightMin) { if (yFP <= iRightFP) excluded += (rowBottomRight - rowTop) - intersectPixelFP(x, rowTop, rowBottomRight, topRightIntersectAf, bottomRightIntersectAf, - rightSlopeFP, -leftSlopeFP); + topRightSlopeFP, invTopRightSlopeFP); if (yFP >= iRightFP) excluded += (rowBottom - rowTopRight) - intersectPixelFP(x, rowTopRight, rowBottom, bottomRightIntersectBf, topRightIntersectBf, - leftSlopeFP, -rightSlopeFP); + bottomRightSlopeFP, invBottomRightSlopeFP); } Q16Dot16 coverage = rowHeight - excluded; @@ -1067,11 +1092,11 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, if (yFP <= iRightFP) excluded += (rowBottomRight - rowTop) - intersectPixelFP(x, rowTop, rowBottomRight, topRightIntersectAf, bottomRightIntersectAf, - rightSlopeFP, -leftSlopeFP); + topRightSlopeFP, invTopRightSlopeFP); if (yFP >= iRightFP) excluded += (rowBottom - rowTopRight) - intersectPixelFP(x, rowTopRight, rowBottom, bottomRightIntersectBf, topRightIntersectBf, - leftSlopeFP, -rightSlopeFP); + bottomRightSlopeFP, invBottomRightSlopeFP); Q16Dot16 coverage = rowHeight - excluded; buffer.addSpan(x, 1, Q16Dot16ToInt(yFP), @@ -1079,10 +1104,10 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, ++x; } - leftIntersectAf += leftSlopeFP; - leftIntersectBf += rightSlopeFP; - rightIntersectAf += rightSlopeFP; - rightIntersectBf += leftSlopeFP; + leftIntersectAf += topLeftSlopeFP; + leftIntersectBf += bottomLeftSlopeFP; + rightIntersectAf += topRightSlopeFP; + rightIntersectBf += bottomRightSlopeFP; topLeftIntersectAf = leftIntersectAf; topRightIntersectAf = rightIntersectAf; @@ -1096,10 +1121,10 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, int iBottom = bottom.y() < 0.5f? -1 : int(bottom.y() - 0.5f); int iMiddle = qMin(iLeft, iRight); - Q16Dot16 leftIntersectAf = FloatToQ16Dot16(top.x() + 0.5f + (iTop + 0.5f - top.y()) * leftSlope); - Q16Dot16 leftIntersectBf = FloatToQ16Dot16(left.x() + 0.5f + (iLeft + 1.5f - left.y()) * rightSlope); - Q16Dot16 rightIntersectAf = FloatToQ16Dot16(top.x() - 0.5f + (iTop + 0.5f - top.y()) * rightSlope); - Q16Dot16 rightIntersectBf = FloatToQ16Dot16(right.x() - 0.5f + (iRight + 1.5f - right.y()) * leftSlope); + Q16Dot16 leftIntersectAf = FloatToQ16Dot16(top.x() + 0.5f + (iTop + 0.5f - top.y()) * topLeftSlope); + Q16Dot16 leftIntersectBf = FloatToQ16Dot16(left.x() + 0.5f + (iLeft + 1.5f - left.y()) * bottomLeftSlope); + Q16Dot16 rightIntersectAf = FloatToQ16Dot16(top.x() - 0.5f + (iTop + 0.5f - top.y()) * topRightSlope); + Q16Dot16 rightIntersectBf = FloatToQ16Dot16(right.x() - 0.5f + (iRight + 1.5f - right.y()) * bottomRightSlope); int ny; int y = iTop; @@ -1121,10 +1146,10 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, ri += rs; \ } - DO_SEGMENT(iMiddle, leftIntersectAf, rightIntersectAf, leftSlopeFP, rightSlopeFP) - DO_SEGMENT(iRight, leftIntersectBf, rightIntersectAf, rightSlopeFP, rightSlopeFP) - DO_SEGMENT(iLeft, leftIntersectAf, rightIntersectBf, leftSlopeFP, leftSlopeFP) - DO_SEGMENT(iBottom, leftIntersectBf, rightIntersectBf, rightSlopeFP, leftSlopeFP) + DO_SEGMENT(iMiddle, leftIntersectAf, rightIntersectAf, topLeftSlopeFP, topRightSlopeFP) + DO_SEGMENT(iRight, leftIntersectBf, rightIntersectAf, bottomLeftSlopeFP, topRightSlopeFP) + DO_SEGMENT(iLeft, leftIntersectAf, rightIntersectBf, topLeftSlopeFP, bottomRightSlopeFP); + DO_SEGMENT(iBottom, leftIntersectBf, rightIntersectBf, bottomLeftSlopeFP, bottomRightSlopeFP); #undef DO_SEGMENT } } @@ -1176,12 +1201,6 @@ void QRasterizer::rasterize(const QT_FT_Outline *outline, Qt::FillRule fillRule) d->scanConverter.end(); } -static inline QT_FT_Vector PointToVector(const QPointF &p) -{ - QT_FT_Vector result = { QT_FT_Pos(p.x() * 64), QT_FT_Pos(p.y() * 64) }; - return result; -} - void QRasterizer::rasterize(const QPainterPath &path, Qt::FillRule fillRule) { if (path.isEmpty()) diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp index a94c300..45f5c3e 100644 --- a/tests/auto/qpainter/tst_qpainter.cpp +++ b/tests/auto/qpainter/tst_qpainter.cpp @@ -3172,7 +3172,6 @@ void fpe_steepSlopes() p.setRenderHint(QPainter::Antialiasing, antialiased); p.setTransform(transform); - QEXPECT_FAIL("steep line 3 aa", "needs to be fixed", Continue); p.drawLine(line); } -- cgit v0.12 From ee550b73ca47eeee2b2d745eaa28c8d0069190e5 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 27 Sep 2010 14:47:21 +0200 Subject: Fix assert when placing a .qml file inside $QTDIR/imports The assert "Internal error: Plugin imported previously with different uri" happens on Windows. $QTDIR\imports, which is prefixed to the search path, is still written with backslashes. Unify this to forward slashes for all paths. Task-number:QTBUG-13994 Reviewed-by: mae (cherry picked from commit 0aa6360b7648ddeb8a905960265eb46d8c12448f) --- src/declarative/qml/qdeclarativeimport.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/declarative/qml/qdeclarativeimport.cpp index 8f95e26..fe4ed48 100644 --- a/src/declarative/qml/qdeclarativeimport.cpp +++ b/src/declarative/qml/qdeclarativeimport.cpp @@ -876,6 +876,7 @@ void QDeclarativeImportDatabase::addImportPath(const QString& path) cPath = dir.canonicalPath(); } else { cPath = path; + cPath.replace(QLatin1Char('\\'), QLatin1Char('/')); } if (!cPath.isEmpty() -- cgit v0.12 From d7e92cd6d44b6d0bc5157ba0dfd98e6627d45ed6 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 27 Sep 2010 16:15:40 +0300 Subject: Fixed incorrect snippet in BLD_INF_RULES documentation Task-number: QTBUG-13988 Reviewed-by: TrustMe (cherry picked from commit 1e4f736c2825c8c36ec74719efbc723f6374d072) --- doc/src/development/qmake-manual.qdoc | 2 +- doc/src/snippets/code/doc_src_qmake-manual.qdoc | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc index f4becf8..9f569e9 100644 --- a/doc/src/development/qmake-manual.qdoc +++ b/doc/src/development/qmake-manual.qdoc @@ -1088,7 +1088,7 @@ For example: - \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 146 + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 152 This will add the specified statements to the \c prj_exports section of the generated \c bld.inf file. diff --git a/doc/src/snippets/code/doc_src_qmake-manual.qdoc b/doc/src/snippets/code/doc_src_qmake-manual.qdoc index 4ac7d5e..8c35c3f 100644 --- a/doc/src/snippets/code/doc_src_qmake-manual.qdoc +++ b/doc/src/snippets/code/doc_src_qmake-manual.qdoc @@ -1002,3 +1002,10 @@ symbian { RSS_RULES.service_list += "uid = 0x12345678; datatype_list = \{\}; opaque_data = r_my_icon;" RSS_RULES.footer +="RESOURCE CAPTION_AND_ICON_INFO r_my_icon \{ icon_file =\"$$PWD/my_icon.svg\"; \}" //! [151] + +//! [152] +my_exports = \ + "foo.h /epoc32/include/mylib/foo.h" \ + "bar.h /epoc32/include/mylib/bar.h" +BLD_INF_RULES.prj_exports += my_exports +//! [152] -- cgit v0.12 From 5197ca2a89ce942a8991ceec50f7be89ff72455f Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 27 Sep 2010 15:39:18 +0300 Subject: Streamlined smart installer package creation Previously manual editing of the pkg file was required to publish application using smart installer. Now a proper app_installer.pkg will be created as long as application has protected range UID. Also changed "make installer_sis" to always generate the application sis as publishing process supports signing both application and its smart installer wrapper packages in single step. Task-number: QTBUG-13991 Reviewed-by: axis (cherry picked from commit bc8409b9d04be54d98ca97d96c32473039f58a80) --- mkspecs/features/symbian/sis_targets.prf | 4 ++-- qmake/generators/symbian/symbiancommon.cpp | 13 ++++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/mkspecs/features/symbian/sis_targets.prf b/mkspecs/features/symbian/sis_targets.prf index 800a04c..673127e 100644 --- a/mkspecs/features/symbian/sis_targets.prf +++ b/mkspecs/features/symbian/sis_targets.prf @@ -67,7 +67,7 @@ equals(GENERATE_SIS_TARGETS, true) { , \ $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ ) - installer_sis_target.depends = $${baseTarget}.sis + installer_sis_target.depends = sis ok_installer_sis_target.target = ok_installer_sis ok_installer_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $${baseTarget}_installer.pkg - \ @@ -154,7 +154,7 @@ equals(GENERATE_SIS_TARGETS, true) { installer_sis_target.target = installer_sis installer_sis_target.commands = $$QMAKE_CREATEPACKAGE $(QT_SIS_OPTIONS) $${baseTarget}_installer.pkg - \ $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) - installer_sis_target.depends = $${sis_destdir}/$${baseTarget}.sis + installer_sis_target.depends = sis !isEmpty(sis_destdir):!equals(sis_destdir, "."):!equals(sis_destdir, "./") { sis_target.commands += && $$QMAKE_MOVE $${baseTarget}.sis $$sis_destdir diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp index a60ae07..9af3fe4 100644 --- a/qmake/generators/symbian/symbiancommon.cpp +++ b/qmake/generators/symbian/symbiancommon.cpp @@ -178,8 +178,15 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB QTextStream ts(&stubPkgFile); QString installerSisHeader = project->values("DEPLOYMENT.installer_header").join("\n"); - if (installerSisHeader.isEmpty()) - installerSisHeader = "0xA000D7CE"; // Use default self-signable UID if not defined + if (installerSisHeader.isEmpty()) { + // Use correct protected UID for publishing if application UID is in protected range, + // otherwise use self-signable test UID. + QRegExp protUidMatcher("0[xX][0-7].*"); + if (protUidMatcher.exactMatch(uid3)) + installerSisHeader = QLatin1String("0x2002CCCF"); + else + installerSisHeader = QLatin1String("0xA000D7CE"); // Use default self-signable UID + } QString wrapperStreamBuffer; QTextStream tw(&wrapperStreamBuffer); @@ -531,7 +538,7 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB // Wrapped files deployment QString currentPath = qmake_getpwd(); QString sisName = QString("%1.sis").arg(fixedTarget); - twf << "\"" << currentPath << "/" << sisName << "\" - \"c:\\private\\2002CCCE\\import\\" << sisName << "\"" << endl; + twf << "\"" << currentPath << "/" << sisName << "\" - \"!:\\private\\2002CCCE\\import\\" << sisName << "\"" << endl; QString bootStrapPath = QLibraryInfo::location(QLibraryInfo::PrefixPath); bootStrapPath.append("/smartinstaller.sis"); -- cgit v0.12 From f9312fec1c44097a2093b3075aa68901327eb9c5 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Wed, 29 Sep 2010 14:02:10 +0200 Subject: Fixes cursor shape when widget becomes native on X11. When a native window handle is created for a widget that has override cursor set, we should reset the cursor on the parent and set the cursor on the new window handle. Task-number: QTBUG-6185 Reviewed-by: Olivier Goffart (cherry picked from commit 9e9a7bc29319d52c3e563bc2c5282cb7e6890eba) --- src/gui/kernel/qwidget_x11.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp index e01489f..8d80e10 100644 --- a/src/gui/kernel/qwidget_x11.cpp +++ b/src/gui/kernel/qwidget_x11.cpp @@ -889,8 +889,10 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO q->setWindowOpacity(maybeTopData()->opacity/255.); } - } else if (q->testAttribute(Qt::WA_SetCursor) && q->internalWinId()) { + } else if (q->internalWinId()) { qt_x11_enforce_cursor(q); + if (QWidget *p = q->parentWidget()) // reset the cursor on the native parent + qt_x11_enforce_cursor(p); } if (extra && !extra->mask.isEmpty() && q->internalWinId()) -- cgit v0.12 From 5efa6ff7ca33d2dca14418ac8ffb49b69e2e2452 Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Thu, 30 Sep 2010 13:45:00 +0200 Subject: QAxBase::dynamicCall() returns invalid QVariant Starting from 4.7.0, QVariant is recognized as a standard type by the meta type system. ActiveQt needs to consider this while converting COM VARIANT types to a QVariant. Task-number: QTBUG-13845 Reviewed-by: Volker Hilsheimer Reviewed-by: Olivier Goffart (cherry picked from commit fc50d7ecaacfbfef1dbefd6ffdc083cb66c5633c) --- src/activeqt/shared/qaxtypes.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/activeqt/shared/qaxtypes.cpp b/src/activeqt/shared/qaxtypes.cpp index 957733e..ff21a9f 100644 --- a/src/activeqt/shared/qaxtypes.cpp +++ b/src/activeqt/shared/qaxtypes.cpp @@ -1376,8 +1376,10 @@ QVariant VARIANTToQVariant(const VARIANT &arg, const QByteArray &typeName, uint } QVariant::Type proptype = (QVariant::Type)type; - if (proptype == QVariant::Invalid && !typeName.isEmpty()) - proptype = QVariant::nameToType(typeName); + if (proptype == QVariant::Invalid && !typeName.isEmpty()) { + if (typeName != "QVariant") + proptype = QVariant::nameToType(typeName); + } if (proptype != QVariant::LastType && proptype != QVariant::Invalid && var.type() != proptype) { if (var.canConvert(proptype)) { QVariant oldvar = var; -- cgit v0.12 From bb0d20406d5d1b473b9f8d9c1284d310405fcd47 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 28 Sep 2010 13:55:04 +1000 Subject: Fix crash when trying to append a null transform to QDeclarativeItem. Task-number: QTBUG-13893 (cherry picked from commit 085a121cb1ebba38d62c924500dbc71806b29b3c) --- src/declarative/graphicsitems/qdeclarativeitem.cpp | 2 +- .../declarative/qdeclarativeitem/data/transformCrash.qml | 13 +++++++++++++ .../declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp | 12 ++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 tests/auto/declarative/qdeclarativeitem/data/transformCrash.qml diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index e9da4f7..230169d 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -1705,7 +1705,7 @@ int QDeclarativeItemPrivate::transform_count(QDeclarativeListProperty *list, QGraphicsTransform *item) { QGraphicsObject *object = qobject_cast(list->object); - if (object) // QGraphicsItem applies the list in the wrong order, so we prepend. + if (object && item) // QGraphicsItem applies the list in the wrong order, so we prepend. QGraphicsItemPrivate::get(object)->prependGraphicsTransform(item); } diff --git a/tests/auto/declarative/qdeclarativeitem/data/transformCrash.qml b/tests/auto/declarative/qdeclarativeitem/data/transformCrash.qml new file mode 100644 index 0000000..ab7fa84 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeitem/data/transformCrash.qml @@ -0,0 +1,13 @@ +import Qt 4.7 + +Item { + id: wrapper + width: 200 + height: 200 + + QtObject { + id: object + } + + Component.onCompleted: wrapper.transform = object +} diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp index 25ca157..6b28c53 100644 --- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp +++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp @@ -81,6 +81,8 @@ private slots: void resourcesProperty(); void mouseFocus(); + void transformCrash(); + private: template T *findItem(QGraphicsObject *parent, const QString &objectName); @@ -792,6 +794,16 @@ void tst_QDeclarativeItem::childrenRectBug3() delete canvas; } +// QTBUG-13893 +void tst_QDeclarativeItem::transformCrash() +{ + QDeclarativeView *canvas = new QDeclarativeView(0); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/transformCrash.qml")); + canvas->show(); + + delete canvas; +} + template T *tst_QDeclarativeItem::findItem(QGraphicsObject *parent, const QString &objectName) { -- cgit v0.12 From 916cc3ac7dde877ae8dd605f217699ecf9da06c6 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 30 Sep 2010 16:11:43 +0300 Subject: Added support for unsigned smart installer package creation in Symbian Make target "unsigned_installer_sis" can now be used to create unsigned smart installer sis. The contained application sis will also be unsigned. Task-number: QTBUG-13902 Reviewed-by: axis (cherry picked from commit 6d5309c2fbdbf15948b430de103f393c5af5b7cd) --- bin/createpackage.pl | 27 +++++++++++++++++++++++++-- doc/src/platforms/symbian-introduction.qdoc | 2 ++ mkspecs/features/symbian/sis_targets.prf | 24 ++++++++++++++++++++++-- 3 files changed, 49 insertions(+), 4 deletions(-) diff --git a/bin/createpackage.pl b/bin/createpackage.pl index cce0b54..72c61f6 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -148,6 +148,10 @@ my $certfilepath = abs_path(dirname($certfile)); my $templatepkg = $ARGV[0]; my $targetplatform = lc $ARGV[1]; +if ($targetplatform eq "") { + $targetplatform = "-"; +} + my @tmpvalues = split('-', $targetplatform); my $target; $target = $tmpvalues[0] or $target = ""; @@ -179,11 +183,11 @@ $passphrase = $ARGV[4] or $passphrase = ""; my $pkgoutputbasename = $templatepkg; my $preservePkgOutput = ""; $pkgoutputbasename =~ s/_template/_$targetplatform/g; +$pkgoutputbasename =~ s/_installer\.pkg/_installer___temp\.pkg/g; if ($pkgoutputbasename eq $templatepkg) { $preservePkgOutput = "1"; } $pkgoutputbasename =~ s/\.pkg//g; -$pkgoutputbasename = $pkgoutputbasename; # Store output file names to variables my $pkgoutput = $pkgoutputbasename.".pkg"; @@ -191,6 +195,7 @@ my $sisoutputbasename; if ($signed_sis_name eq "") { $sisoutputbasename = $pkgoutputbasename; $sisoutputbasename =~ s/_$targetplatform//g; + $sisoutputbasename =~ s/_installer___temp/_installer/g; $signed_sis_name = $sisoutputbasename.".sis"; } else { $sisoutputbasename = $signed_sis_name; @@ -201,6 +206,16 @@ if ($signed_sis_name eq "") { } } +my $installer_unsigned_app_sis_name = ""; +my $installer_app_sis_name = ""; + +if ($templatepkg =~ m/_installer\.pkg$/i && $onlyUnsigned) { + $installer_unsigned_app_sis_name = $templatepkg; + $installer_unsigned_app_sis_name =~ s/_installer.pkg$/_unsigned.sis/i; + $installer_app_sis_name = $installer_unsigned_app_sis_name; + $installer_app_sis_name =~ s/_unsigned.sis$/.sis/; +} + my $unsigned_sis_name = $sisoutputbasename."_unsigned.sis"; my $stub_sis_name = $sisoutputbasename.".sis"; @@ -271,7 +286,9 @@ if (length($certfile)) { # Remove any existing .sis packages unlink $unsigned_sis_name; -unlink $signed_sis_name; +if (!$onlyUnsigned) { + unlink $signed_sis_name; +} if (!$preservePkgOutput) { unlink $pkgoutput; } @@ -296,6 +313,10 @@ if (m/\$\(PLATFORM\)/) { s/\$\(PLATFORM\)/$platform/gm; s/\$\(TARGET\)/$target/gm; +if ($installer_unsigned_app_sis_name ne "") { + s/$installer_app_sis_name\"/$installer_unsigned_app_sis_name\"/; +} + #write the output open( OUTPUT, ">$pkgoutput" ) or die "Error '$pkgoutput' $!\n"; print OUTPUT $_; @@ -347,6 +368,7 @@ if($stub) { if (!$preservePkgOutput) { unlink $pkgoutput; } + print ("\n"); exit; } @@ -388,6 +410,7 @@ if($stub) { # Lets leave the generated PKG for problem solving purposes print ("\nSIS creation failed!\n"); } + print ("\n"); } #end of file diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc index fafe007..9bf5c72 100644 --- a/doc/src/platforms/symbian-introduction.qdoc +++ b/doc/src/platforms/symbian-introduction.qdoc @@ -144,6 +144,8 @@ Smart installer will attempt to download missing dependencies in addition to just installing the application. + \row \o \c unsigned_installer_sis \o Create unsigned \l{Smart Installer}{smart installer} + \c .sis file for project. \row \o \c stub_sis \o Create a stub sis to allow upgradability of projects that are deployed in ROM \endtable diff --git a/mkspecs/features/symbian/sis_targets.prf b/mkspecs/features/symbian/sis_targets.prf index 673127e..b145263 100644 --- a/mkspecs/features/symbian/sis_targets.prf +++ b/mkspecs/features/symbian/sis_targets.prf @@ -73,6 +73,17 @@ equals(GENERATE_SIS_TARGETS, true) { ok_installer_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $${baseTarget}_installer.pkg - \ $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) + unsigned_installer_sis_target.target = unsigned_installer_sis + unsigned_installer_sis_target.commands = $(if $(wildcard $${baseTarget}_installer.pkg), \ + $(MAKE) -f $(MAKEFILE) ok_unsigned_installer_sis \ + , \ + $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ + ) + unsigned_installer_sis_target.depends = unsigned_sis + + ok_unsigned_installer_sis_target.target = ok_unsigned_installer_sis + ok_unsigned_installer_sis_target.commands = createpackage $(QT_SIS_OPTIONS) -o $${baseTarget}_installer.pkg + fail_sis_nopkg_target.target = fail_sis_nopkg fail_sis_nopkg_target.commands = "$(error PKG file does not exist, 'sis' and 'installer_sis' target are only supported for executables or projects with DEPLOYMENT statement)" @@ -105,6 +116,8 @@ equals(GENERATE_SIS_TARGETS, true) { target_sis_target \ installer_sis_target \ ok_installer_sis_target \ + unsigned_installer_sis_target \ + ok_unsigned_installer_sis_target \ fail_sis_nopkg_target \ fail_sis_nocache_target \ stub_sis_target \ @@ -156,15 +169,22 @@ equals(GENERATE_SIS_TARGETS, true) { $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) installer_sis_target.depends = sis + unsigned_installer_sis_target.target = unsigned_installer_sis + unsigned_installer_sis_target.commands = $$QMAKE_CREATEPACKAGE $(QT_SIS_OPTIONS) -o $${baseTarget}_installer.pkg + unsigned_installer_sis_target.depends = unsigned_sis + !isEmpty(sis_destdir):!equals(sis_destdir, "."):!equals(sis_destdir, "./") { sis_target.commands += && $$QMAKE_MOVE $${baseTarget}.sis $$sis_destdir - installer_sis_target.commands += && $$QMAKE_MOVE $${baseTarget}.sis $$sis_destdir + unsigned_sis_target.commands += && $$QMAKE_MOVE $${baseTarget}_unsigned.sis $$sis_destdir + installer_sis_target.commands += && $$QMAKE_MOVE $${baseTarget}_installer.sis $$sis_destdir + unsigned_installer_sis_target.commands += && $$QMAKE_MOVE $${baseTarget}_unsigned_installer.sis $$sis_destdir } QMAKE_EXTRA_TARGETS += sis_target \ unsigned_sis_target \ target_sis_target \ - installer_sis_target + installer_sis_target \ + unsigned_installer_sis_target QMAKE_DISTCLEAN += $${sis_destdir}/$${baseTarget}.sis } -- cgit v0.12 From 664fc515072b58765bb35da0920ab4858cf478aa Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 27 Sep 2010 10:56:00 +0200 Subject: QDeclarativeDebugService: Add bc autotest Although it's a private header we use qdeclarativedebugservice_p.h in creator / qmljsdebugger library. Working with a copy of the header in the autotest hopefully catches some bc breakages. (cherry picked from commit 31dcf2b4028b1f76301fc69fccff0a9474a0a135) --- .../private_headers/qdeclarativedebugservice_p.h | 92 ++++++++++++++++++++++ .../qdeclarativedebugservice.pro | 3 +- .../tst_qdeclarativedebugservice.cpp | 2 +- 3 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativedebugservice/private_headers/qdeclarativedebugservice_p.h diff --git a/tests/auto/declarative/qdeclarativedebugservice/private_headers/qdeclarativedebugservice_p.h b/tests/auto/declarative/qdeclarativedebugservice/private_headers/qdeclarativedebugservice_p.h new file mode 100644 index 0000000..0cadbe5 --- /dev/null +++ b/tests/auto/declarative/qdeclarativedebugservice/private_headers/qdeclarativedebugservice_p.h @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDECLARATIVEDEBUGSERVICE_H +#define QDECLARATIVEDEBUGSERVICE_H + +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Declarative) + +class QDeclarativeDebugServicePrivate; +class Q_DECLARATIVE_EXPORT QDeclarativeDebugService : public QObject +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QDeclarativeDebugService) + Q_DISABLE_COPY(QDeclarativeDebugService) + +public: + explicit QDeclarativeDebugService(const QString &, QObject *parent = 0); + ~QDeclarativeDebugService(); + + QString name() const; + + enum Status { NotConnected, Unavailable, Enabled }; + Status status() const; + + void sendMessage(const QByteArray &); + + static int idForObject(QObject *); + static QObject *objectForId(int); + + static QString objectToString(QObject *obj); + + static bool isDebuggingEnabled(); + static bool hasDebuggingClient(); + +protected: + virtual void statusChanged(Status); + virtual void messageReceived(const QByteArray &); + +private: + friend class QDeclarativeDebugServer; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QDECLARATIVEDEBUGSERVICE_H + diff --git a/tests/auto/declarative/qdeclarativedebugservice/qdeclarativedebugservice.pro b/tests/auto/declarative/qdeclarativedebugservice/qdeclarativedebugservice.pro index a62e148..83bcadb 100644 --- a/tests/auto/declarative/qdeclarativedebugservice/qdeclarativedebugservice.pro +++ b/tests/auto/declarative/qdeclarativedebugservice/qdeclarativedebugservice.pro @@ -2,7 +2,8 @@ load(qttest_p4) contains(QT_CONFIG,declarative): QT += network declarative macx:CONFIG -= app_bundle -HEADERS += ../shared/debugutil_p.h +HEADERS += ../shared/debugutil_p.h \ + private_headers/qdeclarativedebugservice_p.h SOURCES += tst_qdeclarativedebugservice.cpp \ ../shared/debugutil.cpp diff --git a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp index 4683199..70679b9 100644 --- a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp +++ b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp @@ -50,8 +50,8 @@ #include #include #include -#include +#include "private_headers/qdeclarativedebugservice_p.h" #include "../../../shared/util.h" #include "../shared/debugutil_p.h" -- cgit v0.12 From bc93f0cb3af281957101b1427635044ac94dac5d Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 28 Sep 2010 14:53:44 +0200 Subject: fix moc argument quoting on mingw for some bizarre reason, mingw doesn't like double quotes. so instead of building some more elaborate custom quoting, just let qmake do it for us. Reviewed-by: mariusSO (cherry picked from commit fa5c83003db5dea46fc045b2fd90e6308a0d8911) --- mkspecs/features/moc.prf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf index 15e7fd9..89e9b40 100644 --- a/mkspecs/features/moc.prf +++ b/mkspecs/features/moc.prf @@ -39,22 +39,22 @@ win32:count($$list($$INCLUDEPATH), 40, >) { } } -defineReplace(mocCmd) { +defineReplace(mocCmdBase) { !isEmpty(WIN_INCLUDETEMP) { RET = if(contains(TEMPLATE, "vc.*")|contains(TEMPLATE_PREFIX, "vc")) { RET += $$mocinclude.commands } - RET += $$QMAKE_MOC $(DEFINES) @$$WIN_INCLUDETEMP $$join(QMAKE_COMPILER_DEFINES, " -D", -D) \"$$1\" -o $$2 + RET += $$QMAKE_MOC $(DEFINES) @$$WIN_INCLUDETEMP $$join(QMAKE_COMPILER_DEFINES, " -D", -D) return($$RET) } - return($$QMAKE_MOC $(DEFINES) $(INCPATH) $$join(QMAKE_COMPILER_DEFINES, " -D", -D) \"$$1\" -o $$2) + return($$QMAKE_MOC $(DEFINES) $(INCPATH) $$join(QMAKE_COMPILER_DEFINES, " -D", -D)) } #moc headers moc_header.CONFIG = moc_verify moc_header.dependency_type = TYPE_C -moc_header.commands = ${QMAKE_FUNC_mocCmd} +moc_header.commands = ${QMAKE_FUNC_mocCmdBase} ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} moc_header.output = $$MOC_DIR/$${QMAKE_H_MOD_MOC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_CPP)} moc_header.input = HEADERS moc_header.variable_out = SOURCES @@ -69,7 +69,7 @@ INCREDIBUILD_XGE += moc_header #moc sources moc_source.CONFIG = no_link moc_verify moc_source.dependency_type = TYPE_C -moc_source.commands = ${QMAKE_FUNC_mocCmd} +moc_source.commands = ${QMAKE_FUNC_mocCmdBase} ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} moc_source.output = $$MOC_DIR/$${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_EXT_CPP_MOC} moc_source.input = SOURCES OBJECTIVE_SOURCES moc_source.name = MOC ${QMAKE_FILE_IN} -- cgit v0.12 From 89f383cdd9aa9d928341b15f99ecd9396b2f43cb Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 30 Sep 2010 10:42:21 +0300 Subject: Fix QApplication::desktop()->availableGeometry() for Symbian Since screen geometry changes before client area geometry is changed in Eikon, we need to send two resize events, one for screen area change and one for client area change. Note that the correct way to detect client area change in applications is to connect to QApplication::desktop() signal workAreaResized(int) instead of filtering for resize events meant for QDesktopWidget. Task-number: QTBUG-14058 Reviewed-by: Jason Barron (cherry picked from commit 0725abc4607755833a1eb7cb9e083add48d03a88) --- src/gui/kernel/qapplication_s60.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index e937918..988823b 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -673,6 +673,9 @@ void QSymbianControl::HandleStatusPaneSizeChange() { QS60MainAppUi *s60AppUi = static_cast(S60->appUi()); s60AppUi->HandleStatusPaneSizeChange(); + // Send resize event to trigger desktopwidget workAreaResized signal + QResizeEvent e(qt_desktopWidget->size(), qt_desktopWidget->size()); + QApplication::sendEvent(qt_desktopWidget, &e); } #endif -- cgit v0.12 From 4175e45658abd6913b5152a7637f8a23477b7c2d Mon Sep 17 00:00:00 2001 From: axis Date: Mon, 27 Sep 2010 13:37:14 +0200 Subject: Fixed regression when typing in QTextControl based widgets on Symbian The bug was that when querying for the maximum text length, the case where an invalid QVariant was returned (which is allowed) was not handled properly. This would lead to input being blocked by the input context when it shouldn't. RevBy: Sami Merila (cherry picked from commit 3bb3af84bef3c0472ca8ed0d5c6bb3c82320956d) --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 6 +- tests/auto/qinputcontext/tst_qinputcontext.cpp | 257 +++++++++++++++++++----- 2 files changed, 208 insertions(+), 55 deletions(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index af86d77..4a1b9b9 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -238,8 +238,10 @@ bool QCoeFepInputContext::filterEvent(const QEvent *event) } QString widgetText = focusWidget()->inputMethodQuery(Qt::ImSurroundingText).toString(); - int maxLength = focusWidget()->inputMethodQuery(Qt::ImMaximumTextLength).toInt(); - if (!keyEvent->text().isEmpty() && widgetText.size() + m_preeditString.size() >= maxLength) { + bool validLength; + int maxLength = focusWidget()->inputMethodQuery(Qt::ImMaximumTextLength).toInt(&validLength); + if (!keyEvent->text().isEmpty() && validLength + && widgetText.size() + m_preeditString.size() >= maxLength) { // Don't send key events with string content if the widget is "full". return true; } diff --git a/tests/auto/qinputcontext/tst_qinputcontext.cpp b/tests/auto/qinputcontext/tst_qinputcontext.cpp index d077bc1..700a49b 100644 --- a/tests/auto/qinputcontext/tst_qinputcontext.cpp +++ b/tests/auto/qinputcontext/tst_qinputcontext.cpp @@ -67,6 +67,8 @@ public: tst_QInputContext() : m_phoneIsQwerty(false) {} virtual ~tst_QInputContext() {} + template void symbianTestCoeFepInputContext_addData(); + public slots: void initTestCase(); void cleanupTestCase() {} @@ -467,6 +469,7 @@ void tst_QInputContext::focusProxy() void tst_QInputContext::symbianTestCoeFepInputContext_data() { #ifdef Q_OS_SYMBIAN + QTest::addColumn ("editwidget"); QTest::addColumn ("inputMethodEnabled"); QTest::addColumn ("inputMethodHints"); QTest::addColumn ("maxLength"); // Zero for no limit @@ -474,7 +477,23 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() QTest::addColumn > ("keyEvents"); QTest::addColumn ("finalString"); QTest::addColumn ("preeditString"); + + symbianTestCoeFepInputContext_addData(); + symbianTestCoeFepInputContext_addData(); + symbianTestCoeFepInputContext_addData(); +#endif +} + +Q_DECLARE_METATYPE(QWidget *) +Q_DECLARE_METATYPE(QLineEdit *) +Q_DECLARE_METATYPE(QPlainTextEdit *) +Q_DECLARE_METATYPE(QTextEdit *) + +template +void tst_QInputContext::symbianTestCoeFepInputContext_addData() +{ QList events; + QWidget *editwidget; events << FepReplayEvent(EStdKeyBackspace, EKeyBackspace, 0, 0); events << FepReplayEvent(EStdKeyBackspace, EKeyBackspace, 0, 0); @@ -487,7 +506,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() events << FepReplayEvent(EStdKeyBackspace, EKeyBackspace, 0, 0); events << FepReplayEvent('2', '2', 0, 0); events << FepReplayEvent('1', '1', 0, 0); - QTest::newRow("Numbers (no FEP)") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Numbers (no FEP)").toLocal8Bit()) + << editwidget << false << Qt::InputMethodHints(Qt::ImhNone) << 0 @@ -495,7 +517,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("521") << QString(""); - QTest::newRow("Numbers and password mode (no FEP)") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Numbers and password mode (no FEP)").toLocal8Bit()) + << editwidget << false << Qt::InputMethodHints(Qt::ImhNone) << 0 @@ -503,7 +528,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("521") << QString(""); - QTest::newRow("Numbers") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Numbers").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhDigitsOnly) << 0 @@ -511,7 +539,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("521") << QString(""); - QTest::newRow("Numbers max length (no FEP)") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Numbers max length (no FEP)").toLocal8Bit()) + << editwidget << false << Qt::InputMethodHints(Qt::ImhNone) << 2 @@ -519,7 +550,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("21") << QString(""); - QTest::newRow("Numbers max length") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Numbers max length").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhDigitsOnly) << 2 @@ -534,7 +568,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() events << FepReplayEvent(EEventKey, '5', '5', 0, 1); events << FepReplayEvent(EEventKey, '5', '5', 0, 1); events << FepReplayEvent(EEventKeyUp, '5', 0, 0, 0); - QTest::newRow("Numbers and autorepeat (no FEP)") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Numbers and autorepeat (no FEP)").toLocal8Bit()) + << editwidget << false << Qt::InputMethodHints(Qt::ImhNone) << 0 @@ -552,7 +589,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() events << FepReplayEvent('5', '5', 0, 0); events << FepReplayEvent('5', '5', 0, 0); events << FepReplayEvent(EStdKeyBackspace, EKeyBackspace, 0, 0); - QTest::newRow("Multitap") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Multitap").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhNoPredictiveText) << 0 @@ -560,7 +600,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("Adh") << QString(""); - QTest::newRow("Multitap with no auto uppercase") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Multitap with no auto uppercase").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhNoPredictiveText | Qt::ImhNoAutoUppercase) << 0 @@ -568,7 +611,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("adh") << QString(""); - QTest::newRow("Multitap with uppercase") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Multitap with uppercase").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhNoPredictiveText | Qt::ImhPreferUppercase) << 0 @@ -576,7 +622,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("ADH") << QString(""); - QTest::newRow("Multitap with lowercase") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Multitap with lowercase").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase) << 0 @@ -584,7 +633,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("adh") << QString(""); - QTest::newRow("Multitap with forced uppercase") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Multitap with forced uppercase").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhNoPredictiveText | Qt::ImhUppercaseOnly) << 0 @@ -592,7 +644,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("ADH") << QString(""); - QTest::newRow("Multitap with forced lowercase") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Multitap with forced lowercase").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhNoPredictiveText | Qt::ImhLowercaseOnly) << 0 @@ -611,7 +666,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() events << FepReplayEvent('5', '5', 0, 0); events << FepReplayEvent('5', '5', 0, 0); events << FepReplayEvent(EStdKeyBackspace, EKeyBackspace, 0, 0); - QTest::newRow("Multitap with mode switch") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Multitap with mode switch").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhNoPredictiveText) << 0 @@ -626,7 +684,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() events << FepReplayEvent('8', '8', 0, 0); events << FepReplayEvent('9', '9', 0, 0); events << FepReplayEvent('9', '9', 0, 0); - QTest::newRow("Multitap with unfinished text") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Multitap with unfinished text").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhNoPredictiveText) << 0 @@ -635,7 +696,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << QString("Qt") << QString("x"); events << FepReplayEvent(2000); - QTest::newRow("Multitap with committed text") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Multitap with committed text").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhNoPredictiveText) << 0 @@ -671,7 +735,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() events << FepReplayEvent('8', '8', 0, 0); events << FepReplayEvent(2000); events << FepReplayEvent(EStdKeyDevice3, EKeyDevice3, 0, 0); // Select key - QTest::newRow("Multitap and numbers") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Multitap and numbers").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhNoPredictiveText) << 0 @@ -679,7 +746,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("H778wmt") << QString(""); - QTest::newRow("T9 and numbers") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": T9 and numbers").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhPreferLowercase) << 0 @@ -692,7 +762,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() events << FepReplayEvent('4', '4', 0, 0); events << FepReplayEvent('4', '4', 0, 0); events << FepReplayEvent(EStdKeyDevice3, EKeyDevice3, 0, 0); // Select key - QTest::newRow("T9") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": T9").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhPreferLowercase) << 0 @@ -700,7 +773,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("hi") << QString(""); - QTest::newRow("T9 with uppercase") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": T9 with uppercase").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhPreferUppercase) << 0 @@ -708,7 +784,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("HI") << QString(""); - QTest::newRow("T9 with forced lowercase") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": T9 with forced lowercase").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhLowercaseOnly) << 0 @@ -716,7 +795,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("hi") << QString(""); - QTest::newRow("T9 with forced uppercase") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": T9 with forced uppercase").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhUppercaseOnly) << 0 @@ -724,7 +806,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("HI") << QString(""); - QTest::newRow("T9 with maxlength") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": T9 with maxlength").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhLowercaseOnly) << 1 @@ -746,7 +831,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() events << FepReplayEvent(EStdKeyRightArrow, EKeyRightArrow, 0, 0); events << FepReplayEvent('8', '8', 0, 0); events << FepReplayEvent('8', '8', 0, 0); - QTest::newRow("T9 with movement and unfinished text") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": T9 with movement and unfinished text").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhPreferLowercase) << 0 @@ -754,7 +842,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("you hi") << QString("tv"); - QTest::newRow("T9 with movement, password and unfinished text") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": T9 with movement, password and unfinished text").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhPreferLowercase) << 0 @@ -762,7 +853,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("wmt h") << QString("u"); - QTest::newRow("T9 with movement, maxlength, password and unfinished text") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": T9 with movement, maxlength, password and unfinished text").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhPreferLowercase) << 2 @@ -770,7 +864,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("wh") << QString(""); - QTest::newRow("T9 with movement, maxlength and unfinished text") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": T9 with movement, maxlength and unfinished text").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhPreferLowercase) << 2 @@ -778,7 +875,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("hi") << QString(""); - QTest::newRow("Multitap with movement and unfinished text") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Multitap with movement and unfinished text").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase) << 0 @@ -786,7 +886,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("wmt h") << QString("u"); - QTest::newRow("Multitap with movement, maxlength and unfinished text") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Multitap with movement, maxlength and unfinished text").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase) << 2 @@ -794,7 +897,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("wh") << QString(""); - QTest::newRow("Numbers with movement") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Numbers with movement").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhDigitsOnly) << 0 @@ -802,7 +908,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("96804488") << QString(""); - QTest::newRow("Numbers with movement and maxlength") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Numbers with movement and maxlength").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhDigitsOnly) << 2 @@ -810,7 +919,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("44") << QString(""); - QTest::newRow("Numbers with movement, password and unfinished text") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Numbers with movement, password and unfinished text").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhDigitsOnly) << 0 @@ -818,7 +930,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("9680448") << QString("8"); - QTest::newRow("Numbers with movement, maxlength, password and unfinished text") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Numbers with movement, maxlength, password and unfinished text").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhDigitsOnly) << 2 @@ -827,7 +942,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << QString("44") << QString(""); events << FepReplayEvent(EStdKeyRightArrow, EKeyRightArrow, 0, 0); - QTest::newRow("T9 with movement") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": T9 with movement").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhPreferLowercase) << 0 @@ -835,7 +953,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("you htvi") << QString(""); - QTest::newRow("T9 with movement and password") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": T9 with movement and password").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhPreferLowercase) << 0 @@ -843,7 +964,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("wmt hu") << QString(""); - QTest::newRow("T9 with movement, maxlength and password") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": T9 with movement, maxlength and password").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhPreferLowercase) << 2 @@ -851,7 +975,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("wh") << QString(""); - QTest::newRow("Multitap with movement") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Multitap with movement").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase) << 0 @@ -859,7 +986,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("wmt hu") << QString(""); - QTest::newRow("Multitap with movement and maxlength") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Multitap with movement and maxlength").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase) << 2 @@ -867,7 +997,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("wh") << QString(""); - QTest::newRow("Numbers with movement and password") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Numbers with movement and password").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhDigitsOnly) << 0 @@ -875,7 +1008,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("96804488") << QString(""); - QTest::newRow("Numbers with movement, maxlength and password") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Numbers with movement, maxlength and password").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhDigitsOnly) << 2 @@ -888,7 +1024,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() // Test that the symbol key successfully does nothing when in number-only mode. events << FepReplayEvent(EEventKeyDown, EStdKeyLeftFunc, 0, 0, 0); events << FepReplayEvent(EEventKeyUp, EStdKeyLeftFunc, 0, 0, 0); - QTest::newRow("Dead symbols key") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Dead symbols key").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhDigitsOnly) << 0 @@ -896,7 +1035,10 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << events << QString("") << QString(""); - QTest::newRow("Dead symbols key and password") + editwidget = new WidgetType; + QTest::newRow(QString(QString::fromLatin1(editwidget->metaObject()->className()) + + ": Dead symbols key and password").toLocal8Bit()) + << editwidget << true << Qt::InputMethodHints(Qt::ImhDigitsOnly) << 0 @@ -905,7 +1047,6 @@ void tst_QInputContext::symbianTestCoeFepInputContext_data() << QString("") << QString(""); events.clear(); -#endif } void tst_QInputContext::symbianTestCoeFepInputContext() @@ -918,6 +1059,7 @@ void tst_QInputContext::symbianTestCoeFepInputContext() QSKIP("coefep is not the active input context; skipping test", SkipAll); } + QFETCH(QWidget *, editwidget); QFETCH(bool, inputMethodEnabled); QFETCH(Qt::InputMethodHints, inputMethodHints); QFETCH(int, maxLength); @@ -933,30 +1075,39 @@ void tst_QInputContext::symbianTestCoeFepInputContext() QWidget w; QLayout *layout = new QVBoxLayout; w.setLayout(layout); - QLineEdit *lineedit = new QLineEdit; - layout->addWidget(lineedit); - lineedit->setFocus(); + + layout->addWidget(editwidget); + editwidget->setFocus(); #ifdef QT_KEYPAD_NAVIGATION - lineedit->setEditFocus(true); + editwidget->setEditFocus(true); #endif w.show(); - lineedit->setAttribute(Qt::WA_InputMethodEnabled, inputMethodEnabled); - lineedit->setInputMethodHints(inputMethodHints); - if (maxLength > 0) - lineedit->setMaxLength(maxLength); - lineedit->setEchoMode(echoMode); + editwidget->setAttribute(Qt::WA_InputMethodEnabled, inputMethodEnabled); + editwidget->setInputMethodHints(inputMethodHints); + QLineEdit *lineedit = qobject_cast(editwidget); + if (lineedit) { + if (maxLength > 0) + lineedit->setMaxLength(maxLength); + lineedit->setEchoMode(echoMode); + } else if (maxLength > 0 || echoMode != QLineEdit::Normal) { + // Only QLineEdits support these features so don't attempt any tests using those + // on other widgets. + return; + } QTest::qWait(200); foreach(FepReplayEvent event, keyEvents) { - event.replay(lineedit); + event.replay(editwidget); } QApplication::processEvents(); - QCOMPARE(lineedit->text(), finalString); + QCOMPARE(editwidget->inputMethodQuery(Qt::ImSurroundingText).toString(), finalString); QCOMPARE(ic->m_preeditString, preeditString); + + delete editwidget; #endif } -- cgit v0.12 From 2548104448577f7e87d10c827ef464a62e6d8fc6 Mon Sep 17 00:00:00 2001 From: axis Date: Tue, 28 Sep 2010 08:21:13 +0200 Subject: Fixed compile error on non-Symbian platforms. (cherry picked from commit 3e3ce984b54a0b199bf5d4f5e3dcb0a9d5b5bd79) --- tests/auto/qinputcontext/tst_qinputcontext.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/auto/qinputcontext/tst_qinputcontext.cpp b/tests/auto/qinputcontext/tst_qinputcontext.cpp index 700a49b..7811a53 100644 --- a/tests/auto/qinputcontext/tst_qinputcontext.cpp +++ b/tests/auto/qinputcontext/tst_qinputcontext.cpp @@ -492,6 +492,7 @@ Q_DECLARE_METATYPE(QTextEdit *) template void tst_QInputContext::symbianTestCoeFepInputContext_addData() { +#ifdef Q_OS_SYMBIAN QList events; QWidget *editwidget; @@ -1047,6 +1048,7 @@ void tst_QInputContext::symbianTestCoeFepInputContext_addData() << QString("") << QString(""); events.clear(); +#endif } void tst_QInputContext::symbianTestCoeFepInputContext() -- cgit v0.12 From 837e4024556c74a031acad87e9dd5972d5ef81ef Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Tue, 28 Sep 2010 18:50:18 +1000 Subject: If a type is registered under several names, share the attached property object Task-number: QTBUG-13799 (cherry picked from commit 746954581f06e0bca98f25eb95dca09c663d47bf) --- .../qml/qdeclarativecompiledbindings.cpp | 10 ++++----- src/declarative/qml/qdeclarativecompiler.cpp | 2 +- src/declarative/qml/qdeclarativemetatype.cpp | 25 +++++++++++++++++++++- src/declarative/qml/qdeclarativemetatype_p.h | 1 + src/declarative/qml/qdeclarativeproperty.cpp | 4 ++-- .../qml/qdeclarativetypenamescriptclass.cpp | 2 +- .../data/sharedAttachedObject.qml | 16 ++++++++++++++ .../qdeclarativeecmascript/testtypes.cpp | 1 + .../tst_qdeclarativeecmascript.cpp | 11 ++++++++++ 9 files changed, 62 insertions(+), 10 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/sharedAttachedObject.qml diff --git a/src/declarative/qml/qdeclarativecompiledbindings.cpp b/src/declarative/qml/qdeclarativecompiledbindings.cpp index 9402596..5f0fd56 100644 --- a/src/declarative/qml/qdeclarativecompiledbindings.cpp +++ b/src/declarative/qml/qdeclarativecompiledbindings.cpp @@ -438,7 +438,7 @@ struct Instr { qint8 output; qint8 reg; quint8 exceptionId; - quint32 index; + quint32 id; } attached; struct { QML_INSTR_HEADER @@ -988,7 +988,7 @@ static void dumpInstruction(const Instr *instr) qWarning().nospace() << "\t" << "LoadRoot" << "\t\t" << instr->load.index << "\t" << instr->load.reg; break; case Instr::LoadAttached: - qWarning().nospace() << "\t" << "LoadAttached" << "\t\t" << instr->attached.output << "\t" << instr->attached.reg << "\t" << instr->attached.index; + qWarning().nospace() << "\t" << "LoadAttached" << "\t\t" << instr->attached.output << "\t" << instr->attached.reg << "\t" << instr->attached.id; break; case Instr::ConvertIntToReal: qWarning().nospace() << "\t" << "ConvertIntToReal" << "\t" << instr->unaryop.output << "\t" << instr->unaryop.src; @@ -1225,7 +1225,7 @@ void QDeclarativeCompiledBindingsPrivate::run(int instrIndex, output.setUndefined(); } else { QObject *attached = - qmlAttachedPropertiesObjectById(instr->attached.index, + qmlAttachedPropertiesObjectById(instr->attached.id, registers[instr->attached.reg].getQObject(), true); Q_ASSERT(attached); @@ -1895,7 +1895,7 @@ bool QDeclarativeBindingCompilerPrivate::parseName(AST::Node *node, Result &type attach.common.type = Instr::LoadAttached; attach.attached.output = reg; attach.attached.reg = reg; - attach.attached.index = attachType->index(); + attach.attached.id = attachType->attachedPropertiesId(); attach.attached.exceptionId = exceptionId(nameNodes.at(ii)); bytecode << attach; @@ -2011,7 +2011,7 @@ bool QDeclarativeBindingCompilerPrivate::parseName(AST::Node *node, Result &type attach.common.type = Instr::LoadAttached; attach.attached.output = reg; attach.attached.reg = reg; - attach.attached.index = attachType->index(); + attach.attached.id = attachType->attachedPropertiesId(); bytecode << attach; absType = 0; diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index e55dc92..8c5fd3a 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -1407,7 +1407,7 @@ bool QDeclarativeCompiler::buildProperty(QDeclarativeParser::Property *prop, COMPILE_EXCEPTION(prop, tr("Invalid attached object assignment")); Q_ASSERT(type->attachedPropertiesFunction()); - prop->index = type->index(); + prop->index = type->attachedPropertiesId(); prop->value->metatype = type->attachedPropertiesType(); } else { // Setup regular property data diff --git a/src/declarative/qml/qdeclarativemetatype.cpp b/src/declarative/qml/qdeclarativemetatype.cpp index a5c878f..7a78a1f 100644 --- a/src/declarative/qml/qdeclarativemetatype.cpp +++ b/src/declarative/qml/qdeclarativemetatype.cpp @@ -146,6 +146,7 @@ public: const QMetaObject *m_baseMetaObject; QDeclarativeAttachedPropertiesFunc m_attachedPropertiesFunc; const QMetaObject *m_attachedPropertiesType; + int m_attachedPropertiesId; int m_parserStatusCast; int m_propertyValueSourceCast; int m_propertyValueInterceptorCast; @@ -155,8 +156,12 @@ public: QDeclarativeCustomParser *m_customParser; mutable volatile bool m_isSetup:1; mutable QList m_metaObjects; + + static QHash m_attachedPropertyIds; }; +QHash QDeclarativeTypePrivate::m_attachedPropertyIds; + QDeclarativeTypePrivate::QDeclarativeTypePrivate() : m_isInterface(false), m_iid(0), m_typeId(0), m_listId(0), m_allocationSize(0), m_newFunc(0), m_baseMetaObject(0), m_attachedPropertiesFunc(0), m_attachedPropertiesType(0), @@ -198,6 +203,14 @@ QDeclarativeType::QDeclarativeType(int index, const QDeclarativePrivate::Registe d->m_baseMetaObject = type.metaObject; d->m_attachedPropertiesFunc = type.attachedPropertiesFunction; d->m_attachedPropertiesType = type.attachedPropertiesMetaObject; + if (d->m_attachedPropertiesType) { + QHash::Iterator iter = d->m_attachedPropertyIds.find(d->m_baseMetaObject); + if (iter == d->m_attachedPropertyIds.end()) + iter = d->m_attachedPropertyIds.insert(d->m_baseMetaObject, index); + d->m_attachedPropertiesId = *iter; + } else { + d->m_attachedPropertiesId = -1; + } d->m_parserStatusCast = type.parserStatusCast; d->m_propertyValueSourceCast = type.valueSourceCast; d->m_propertyValueInterceptorCast = type.valueInterceptorCast; @@ -461,6 +474,16 @@ const QMetaObject *QDeclarativeType::attachedPropertiesType() const return d->m_attachedPropertiesType; } +/* +This is the id passed to qmlAttachedPropertiesById(). This is different from the index +for the case that a single class is registered under two or more names (eg. Item in +Qt 4.7 and QtQuick 1.0). +*/ +int QDeclarativeType::attachedPropertiesId() const +{ + return d->m_attachedPropertiesId; +} + int QDeclarativeType::parserStatusCast() const { return d->m_parserStatusCast; @@ -662,7 +685,7 @@ int QDeclarativeMetaType::attachedPropertiesFuncId(const QMetaObject *mo) QDeclarativeType *type = data->metaObjectToType.value(mo); if (type && type->attachedPropertiesFunction()) - return type->index(); + return type->attachedPropertiesId(); else return -1; } diff --git a/src/declarative/qml/qdeclarativemetatype_p.h b/src/declarative/qml/qdeclarativemetatype_p.h index f410547..382abd2 100644 --- a/src/declarative/qml/qdeclarativemetatype_p.h +++ b/src/declarative/qml/qdeclarativemetatype_p.h @@ -137,6 +137,7 @@ public: QDeclarativeAttachedPropertiesFunc attachedPropertiesFunction() const; const QMetaObject *attachedPropertiesType() const; + int attachedPropertiesId() const; int parserStatusCast() const; QVariant fromObject(QObject *) const; diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/declarative/qml/qdeclarativeproperty.cpp index d0dd2e8..bc20bff 100644 --- a/src/declarative/qml/qdeclarativeproperty.cpp +++ b/src/declarative/qml/qdeclarativeproperty.cpp @@ -220,7 +220,7 @@ void QDeclarativePropertyPrivate::initProperty(QObject *obj, const QString &name QDeclarativeAttachedPropertiesFunc func = data->type->attachedPropertiesFunction(); if (!func) return; // Not an attachable type - currentObject = qmlAttachedPropertiesObjectById(data->type->index(), currentObject); + currentObject = qmlAttachedPropertiesObjectById(data->type->attachedPropertiesId(), currentObject); if (!currentObject) return; // Something is broken with the attachable type } else { Q_ASSERT(data->typeNamespace); @@ -232,7 +232,7 @@ void QDeclarativePropertyPrivate::initProperty(QObject *obj, const QString &name QDeclarativeAttachedPropertiesFunc func = data->type->attachedPropertiesFunction(); if (!func) return; // Not an attachable type - currentObject = qmlAttachedPropertiesObjectById(data->type->index(), currentObject); + currentObject = qmlAttachedPropertiesObjectById(data->type->attachedPropertiesId(), currentObject); if (!currentObject) return; // Something is broken with the attachable type } } else { diff --git a/src/declarative/qml/qdeclarativetypenamescriptclass.cpp b/src/declarative/qml/qdeclarativetypenamescriptclass.cpp index 764a8db..cba7b4a 100644 --- a/src/declarative/qml/qdeclarativetypenamescriptclass.cpp +++ b/src/declarative/qml/qdeclarativetypenamescriptclass.cpp @@ -129,7 +129,7 @@ QDeclarativeTypeNameScriptClass::queryProperty(Object *obj, const Identifier &na return 0; } else if (data->object) { // Must be an attached property - object = qmlAttachedPropertiesObjectById(data->type->index(), data->object); + object = qmlAttachedPropertiesObjectById(data->type->attachedPropertiesId(), data->object); if (!object) return 0; return ep->objectClass->queryProperty(object, name, flags, 0); } diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/sharedAttachedObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/sharedAttachedObject.qml new file mode 100644 index 0000000..817391d --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/sharedAttachedObject.qml @@ -0,0 +1,16 @@ +import Qt.test 1.0 +import Qt 4.7 + +MyQmlObject { + id: root + property bool test1: false + property bool test2: false + + MyQmlObject.value2: 7 + + Component.onCompleted: { + test1 = root.MyQmlObject.value2 == 7; + test2 = root.MyQmlObjectAlias.value2 == 7; + } +} + diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp b/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp index 8a4605a..810a0f7 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp @@ -102,6 +102,7 @@ public: void registerTypes() { + qmlRegisterType("Qt.test", 1,0, "MyQmlObjectAlias"); qmlRegisterType("Qt.test", 1,0, "MyQmlObject"); qmlRegisterType("Qt.test", 1,0, "MyDeferredObject"); qmlRegisterType("Qt.test", 1,0, "MyQmlContainer"); diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index c10a110..4feb630 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -161,6 +161,7 @@ private slots: void nonscriptable(); void deleteLater(); void in(); + void sharedAttachedObject(); void include(); @@ -2583,6 +2584,16 @@ void tst_qdeclarativeecmascript::in() delete o; } +void tst_qdeclarativeecmascript::sharedAttachedObject() +{ + QDeclarativeComponent component(&engine, TEST_FILE("sharedAttachedObject.qml")); + QObject *o = component.create(); + QVERIFY(o != 0); + QCOMPARE(o->property("test1").toBool(), true); + QCOMPARE(o->property("test2").toBool(), true); + delete o; +} + QTEST_MAIN(tst_qdeclarativeecmascript) #include "tst_qdeclarativeecmascript.moc" -- cgit v0.12 From 94aa8a639de93861cfafef2e195616cb8ee52093 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Wed, 29 Sep 2010 11:13:18 +1000 Subject: Register QtQuick 1.0 module. Qt 4.7 is still supported, but deprecated. Reviewed-by: Martin Jones Task-number: QTBUG-13799 (cherry picked from commit 4fcf055f66cc23c9e60a7add489e394420e71914) --- .../graphicsitems/qdeclarativeitemsmodule.cpp | 98 +++++++++++++++++----- src/declarative/qml/qdeclarativeengine.cpp | 12 ++- src/declarative/qml/qdeclarativevaluetype.cpp | 12 ++- src/declarative/util/qdeclarativeutilmodule.cpp | 54 +++++++++++- tools/qml/qmlruntime.cpp | 1 + 5 files changed, 146 insertions(+), 31 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp index 783eff1..52703c2 100644 --- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp @@ -97,7 +97,84 @@ void QDeclarativeItemModule::defineModule() { QDeclarativePrivate::RegisterAutoParent autoparent = { 0, &qgraphicsobject_autoParent }; QDeclarativePrivate::qmlregister(QDeclarativePrivate::AutoParentRegistration, &autoparent); +#ifdef QT_NO_MOVIE + qmlRegisterTypeNotAvailable("QtQuick",1,0,"AnimatedImage", + qApp->translate("QDeclarativeAnimatedImage","Qt was built without support for QMovie")); +#else + qmlRegisterType("QtQuick",1,0,"AnimatedImage"); +#endif + qmlRegisterType("QtQuick",1,0,"BorderImage"); + qmlRegisterType("QtQuick",1,0,"Column"); + qmlRegisterType("QtQuick",1,0,"Drag"); + qmlRegisterType("QtQuick",1,0,"Flickable"); + qmlRegisterType("QtQuick",1,0,"Flipable"); + qmlRegisterType("QtQuick",1,0,"Flow"); + qmlRegisterType("QtQuick",1,0,"FocusPanel"); + qmlRegisterType("QtQuick",1,0,"FocusScope"); + qmlRegisterType("QtQuick",1,0,"Gradient"); + qmlRegisterType("QtQuick",1,0,"GradientStop"); + qmlRegisterType("QtQuick",1,0,"Grid"); + qmlRegisterType("QtQuick",1,0,"GridView"); + qmlRegisterType("QtQuick",1,0,"Image"); + qmlRegisterType("QtQuick",1,0,"Item"); + qmlRegisterType("QtQuick",1,0,"LayoutItem"); + qmlRegisterType("QtQuick",1,0,"ListView"); + qmlRegisterType("QtQuick",1,0,"Loader"); + qmlRegisterType("QtQuick",1,0,"MouseArea"); + qmlRegisterType("QtQuick",1,0,"Path"); + qmlRegisterType("QtQuick",1,0,"PathAttribute"); + qmlRegisterType("QtQuick",1,0,"PathCubic"); + qmlRegisterType("QtQuick",1,0,"PathLine"); + qmlRegisterType("QtQuick",1,0,"PathPercent"); + qmlRegisterType("QtQuick",1,0,"PathQuad"); + qmlRegisterType("QtQuick",1,0,"PathView"); +#ifndef QT_NO_VALIDATOR + qmlRegisterType("QtQuick",1,0,"IntValidator"); + qmlRegisterType("QtQuick",1,0,"DoubleValidator"); + qmlRegisterType("QtQuick",1,0,"RegExpValidator"); +#endif + qmlRegisterType("QtQuick",1,0,"Rectangle"); + qmlRegisterType("QtQuick",1,0,"Repeater"); + qmlRegisterType("QtQuick",1,0,"Rotation"); + qmlRegisterType("QtQuick",1,0,"Row"); + qmlRegisterType("QtQuick",1,0,"Translate"); + qmlRegisterType("QtQuick",1,0,"Scale"); + qmlRegisterType("QtQuick",1,0,"Text"); + qmlRegisterType("QtQuick",1,0,"TextEdit"); +#ifndef QT_NO_LINEEDIT + qmlRegisterType("QtQuick",1,0,"TextInput"); +#endif + qmlRegisterType("QtQuick",1,0,"ViewSection"); + qmlRegisterType("QtQuick",1,0,"VisualDataModel"); + qmlRegisterType("QtQuick",1,0,"VisualItemModel"); + qmlRegisterType(); + qmlRegisterType(); + qmlRegisterType(); + qmlRegisterType(); + qmlRegisterType("QtQuick",1,0,"QGraphicsWidget"); + qmlRegisterExtendedType("QtQuick",1,0,"QGraphicsWidget"); + qmlRegisterType(); + qmlRegisterType(); + qmlRegisterType(); + qmlRegisterType(); +#ifndef QT_NO_VALIDATOR + qmlRegisterType(); +#endif + qmlRegisterType(); +#ifndef QT_NO_ACTION + qmlRegisterType(); +#endif + qmlRegisterType(); + qmlRegisterType(); +#ifndef QT_NO_GRAPHICSEFFECT + qmlRegisterType(); +#endif + + qmlRegisterUncreatableType("QtQuick",1,0,"KeyNavigation",QDeclarativeKeyNavigationAttached::tr("KeyNavigation is only available via attached properties")); + qmlRegisterUncreatableType("QtQuick",1,0,"Keys",QDeclarativeKeysAttached::tr("Keys is only available via attached properties")); + +#ifndef QT_NO_IMPORT_QT47_QML #ifdef QT_NO_MOVIE qmlRegisterTypeNotAvailable("Qt",4,7,"AnimatedImage", qApp->translate("QDeclarativeAnimatedImage","Qt was built without support for QMovie")); @@ -149,29 +226,10 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType("Qt",4,7,"VisualDataModel"); qmlRegisterType("Qt",4,7,"VisualItemModel"); - qmlRegisterType(); - qmlRegisterType(); - qmlRegisterType(); - qmlRegisterType(); qmlRegisterType("Qt",4,7,"QGraphicsWidget"); qmlRegisterExtendedType("Qt",4,7,"QGraphicsWidget"); - qmlRegisterType(); - qmlRegisterType(); - qmlRegisterType(); - qmlRegisterType(); -#ifndef QT_NO_VALIDATOR - qmlRegisterType(); -#endif - qmlRegisterType(); -#ifndef QT_NO_ACTION - qmlRegisterType(); -#endif - qmlRegisterType(); - qmlRegisterType(); -#ifndef QT_NO_GRAPHICSEFFECT - qmlRegisterType(); -#endif qmlRegisterUncreatableType("Qt",4,7,"KeyNavigation",QDeclarativeKeyNavigationAttached::tr("KeyNavigation is only available via attached properties")); qmlRegisterUncreatableType("Qt",4,7,"Keys",QDeclarativeKeysAttached::tr("Keys is only available via attached properties")); +#endif } diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 80db230..bfed22c 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -141,7 +141,7 @@ QT_BEGIN_NAMESPACE \qml // MyRect.qml - import Qt 4.7 + import QtQuick 1.0 Item { width: 200; height: 200 @@ -177,9 +177,15 @@ static bool qt_QmlQtModule_registered = false; void QDeclarativeEnginePrivate::defineModule() { + qmlRegisterType("QtQuick",1,0,"Component"); + qmlRegisterType("QtQuick",1,0,"QtObject"); + qmlRegisterType("QtQuick",1,0,"WorkerScript"); + +#ifndef QT_NO_IMPORT_QT47_QML qmlRegisterType("Qt",4,7,"Component"); qmlRegisterType("Qt",4,7,"QtObject"); qmlRegisterType("Qt",4,7,"WorkerScript"); +#endif qmlRegisterType(); } @@ -198,7 +204,7 @@ with enums and functions. To use it, call the members of the global \c Qt objec For example: \qml -import Qt 4.7 +import QtQuick 1.0 Text { color: Qt.rgba(255, 0, 0, 1) @@ -510,7 +516,7 @@ QDeclarativeWorkerScriptEngine *QDeclarativeEnginePrivate::getWorkerScriptEngine \code QDeclarativeEngine engine; QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7\nText { text: \"Hello world!\" }", QUrl()); + component.setData("import QtQuick 1.0\nText { text: \"Hello world!\" }", QUrl()); QDeclarativeItem *item = qobject_cast(component.create()); //add item to view, etc diff --git a/src/declarative/qml/qdeclarativevaluetype.cpp b/src/declarative/qml/qdeclarativevaluetype.cpp index fda62ee..b9e9cec 100644 --- a/src/declarative/qml/qdeclarativevaluetype.cpp +++ b/src/declarative/qml/qdeclarativevaluetype.cpp @@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE Q_GUI_EXPORT int qt_defaultDpi(); template -int qmlRegisterValueTypeEnums(const char *qmlName) +int qmlRegisterValueTypeEnums(const char *uri, int versionMajor, int versionMinor, const char *qmlName) { QByteArray name(T::staticMetaObject.className()); @@ -63,7 +63,7 @@ int qmlRegisterValueTypeEnums(const char *qmlName) QString(), - "Qt", 4, 7, qmlName, &T::staticMetaObject, + uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject, 0, 0, @@ -99,8 +99,12 @@ bool QDeclarativeValueTypeFactory::isValueType(int idx) void QDeclarativeValueTypeFactory::registerValueTypes() { - qmlRegisterValueTypeEnums("Easing"); - qmlRegisterValueTypeEnums("Font"); + qmlRegisterValueTypeEnums("QtQuick",1,0,"Easing"); + qmlRegisterValueTypeEnums("QtQuick",1,0,"Font"); +#ifndef QT_NO_IMPORT_QT47_QML + qmlRegisterValueTypeEnums("Qt",4,7,"Easing"); + qmlRegisterValueTypeEnums("Qt",4,7,"Font"); +#endif } QDeclarativeValueType *QDeclarativeValueTypeFactory::valueType(int t) diff --git a/src/declarative/util/qdeclarativeutilmodule.cpp b/src/declarative/util/qdeclarativeutilmodule.cpp index c5bfebd..0544f22 100644 --- a/src/declarative/util/qdeclarativeutilmodule.cpp +++ b/src/declarative/util/qdeclarativeutilmodule.cpp @@ -75,6 +75,55 @@ void QDeclarativeUtilModule::defineModule() { + qmlRegisterType("QtQuick",1,0,"AnchorAnimation"); + qmlRegisterType("QtQuick",1,0,"AnchorChanges"); + qmlRegisterType("QtQuick",1,0,"Behavior"); + qmlRegisterType("QtQuick",1,0,"Binding"); + qmlRegisterType("QtQuick",1,0,"ColorAnimation"); + qmlRegisterType("QtQuick",1,0,"Connections"); + qmlRegisterType("QtQuick",1,0,"SmoothedAnimation"); + qmlRegisterType("QtQuick",1,0,"FontLoader"); + qmlRegisterType("QtQuick",1,0,"ListElement"); + qmlRegisterType("QtQuick",1,0,"NumberAnimation"); + qmlRegisterType("QtQuick",1,0,"Package"); + qmlRegisterType("QtQuick",1,0,"ParallelAnimation"); + qmlRegisterType("QtQuick",1,0,"ParentAnimation"); + qmlRegisterType("QtQuick",1,0,"ParentChange"); + qmlRegisterType("QtQuick",1,0,"PauseAnimation"); + qmlRegisterType("QtQuick",1,0,"PropertyAction"); + qmlRegisterType("QtQuick",1,0,"PropertyAnimation"); + qmlRegisterType("QtQuick",1,0,"RotationAnimation"); + qmlRegisterType("QtQuick",1,0,"ScriptAction"); + qmlRegisterType("QtQuick",1,0,"SequentialAnimation"); + qmlRegisterType("QtQuick",1,0,"SpringAnimation"); + qmlRegisterType("QtQuick",1,0,"StateChangeScript"); + qmlRegisterType("QtQuick",1,0,"StateGroup"); + qmlRegisterType("QtQuick",1,0,"State"); + qmlRegisterType("QtQuick",1,0,"SystemPalette"); + qmlRegisterType("QtQuick",1,0,"Timer"); + qmlRegisterType("QtQuick",1,0,"Transition"); + qmlRegisterType("QtQuick",1,0,"Vector3dAnimation"); +#ifdef QT_NO_XMLPATTERNS + qmlRegisterTypeNotAvailable("QtQuick",1,0,"XmlListModel", + qApp->translate("QDeclarativeXmlListModel","Qt was built without support for xmlpatterns")); + qmlRegisterTypeNotAvailable("QtQuick",1,0,"XmlRole", + qApp->translate("QDeclarativeXmlListModel","Qt was built without support for xmlpatterns")); +#else + qmlRegisterType("QtQuick",1,0,"XmlListModel"); + qmlRegisterType("QtQuick",1,0,"XmlRole"); +#endif + + qmlRegisterType(); + qmlRegisterType(); + qmlRegisterType(); + + qmlRegisterUncreatableType("QtQuick",1,0,"Animation",QDeclarativeAbstractAnimation::tr("Animation is an abstract class")); + + qmlRegisterCustomType("QtQuick",1,0,"ListModel", new QDeclarativeListModelParser); + qmlRegisterCustomType("QtQuick",1,0,"PropertyChanges", new QDeclarativePropertyChangesParser); + qmlRegisterCustomType("QtQuick",1,0,"Connections", new QDeclarativeConnectionsParser); + +#ifndef QT_NO_IMPORT_QT47_QML qmlRegisterType("Qt",4,7,"AnchorAnimation"); qmlRegisterType("Qt",4,7,"AnchorChanges"); qmlRegisterType("Qt",4,7,"Behavior"); @@ -113,13 +162,10 @@ void QDeclarativeUtilModule::defineModule() qmlRegisterType("Qt",4,7,"XmlRole"); #endif - qmlRegisterType(); - qmlRegisterType(); - qmlRegisterType(); - qmlRegisterUncreatableType("Qt",4,7,"Animation",QDeclarativeAbstractAnimation::tr("Animation is an abstract class")); qmlRegisterCustomType("Qt", 4,7, "ListModel", new QDeclarativeListModelParser); qmlRegisterCustomType("Qt", 4, 7, "PropertyChanges", new QDeclarativePropertyChangesParser); qmlRegisterCustomType("Qt", 4, 7, "Connections", new QDeclarativeConnectionsParser); +#endif } diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index c59621a..5e169d8 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -1532,6 +1532,7 @@ void QDeclarativeViewer::registerTypes() if (!registered) { // registering only for exposing the DeviceOrientation::Orientation enum qmlRegisterUncreatableType("Qt",4,7,"Orientation",""); + qmlRegisterUncreatableType("QtQuick",1,0,"Orientation",""); registered = true; } } -- cgit v0.12 From dcc5c7ea047513ceb6fc75aac526b17ad6629d4c Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Fri, 1 Oct 2010 15:28:48 +1000 Subject: Replace all occurances of "Qt 4.7" with "QtQuick 1.0" Task-number: QTBUG-13799 Reviewed-by: Martin Jones (cherry picked from commit 49452ad6b22e080b1dfdfde38c21c48bb910a1ae) Conflicts: tests/auto/declarative/qdeclarativeconnection/data/error-object.qml tests/auto/declarative/qdeclarativeconnection/data/error-property.qml tests/auto/declarative/qdeclarativeconnection/data/error-property2.qml tests/auto/declarative/qdeclarativeconnection/data/error-syntax.qml tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp tests/auto/declarative/qdeclarativeqt/data/quit.qml tests/auto/declarative/qdeclarativeview/data/error1.qml --- demos/declarative/calculator/Core/Button.qml | 2 +- demos/declarative/calculator/Core/Display.qml | 2 +- demos/declarative/calculator/calculator.qml | 2 +- demos/declarative/flickr/common/Progress.qml | 2 +- demos/declarative/flickr/common/RssModel.qml | 2 +- demos/declarative/flickr/common/ScrollBar.qml | 2 +- demos/declarative/flickr/common/Slider.qml | 2 +- demos/declarative/flickr/flickr-90.qml | 2 +- demos/declarative/flickr/flickr.qml | 2 +- demos/declarative/flickr/mobile/Button.qml | 2 +- demos/declarative/flickr/mobile/GridDelegate.qml | 2 +- demos/declarative/flickr/mobile/ImageDetails.qml | 2 +- demos/declarative/flickr/mobile/ListDelegate.qml | 2 +- demos/declarative/flickr/mobile/TitleBar.qml | 2 +- demos/declarative/flickr/mobile/ToolBar.qml | 2 +- .../minehunt/MinehuntCore/Explosion.qml | 2 +- demos/declarative/minehunt/MinehuntCore/Tile.qml | 2 +- demos/declarative/minehunt/minehunt.qml | 2 +- .../photoviewer/PhotoViewerCore/AlbumDelegate.qml | 2 +- .../photoviewer/PhotoViewerCore/BusyIndicator.qml | 2 +- .../photoviewer/PhotoViewerCore/Button.qml | 2 +- .../photoviewer/PhotoViewerCore/EditableButton.qml | 2 +- .../photoviewer/PhotoViewerCore/PhotoDelegate.qml | 2 +- .../photoviewer/PhotoViewerCore/ProgressBar.qml | 2 +- .../photoviewer/PhotoViewerCore/RssModel.qml | 2 +- .../photoviewer/PhotoViewerCore/Tag.qml | 2 +- demos/declarative/photoviewer/photoviewer.qml | 2 +- .../declarative/rssnews/content/BusyIndicator.qml | 2 +- .../rssnews/content/CategoryDelegate.qml | 2 +- demos/declarative/rssnews/content/NewsDelegate.qml | 2 +- demos/declarative/rssnews/content/RssFeeds.qml | 2 +- demos/declarative/rssnews/content/ScrollBar.qml | 2 +- demos/declarative/rssnews/rssnews.qml | 2 +- .../samegame/SamegameCore/BoomBlock.qml | 2 +- demos/declarative/samegame/SamegameCore/Button.qml | 2 +- demos/declarative/samegame/SamegameCore/Dialog.qml | 2 +- demos/declarative/samegame/samegame.qml | 2 +- demos/declarative/snake/content/Button.qml | 2 +- demos/declarative/snake/content/Cookie.qml | 2 +- demos/declarative/snake/content/HighScoreModel.qml | 2 +- demos/declarative/snake/content/Link.qml | 2 +- demos/declarative/snake/content/Skull.qml | 2 +- demos/declarative/snake/snake.qml | 2 +- demos/declarative/twitter/TwitterCore/Button.qml | 2 +- .../twitter/TwitterCore/FatDelegate.qml | 2 +- demos/declarative/twitter/TwitterCore/Input.qml | 2 +- demos/declarative/twitter/TwitterCore/Loading.qml | 2 +- .../twitter/TwitterCore/MultiTitleBar.qml | 2 +- demos/declarative/twitter/TwitterCore/RssModel.qml | 2 +- .../declarative/twitter/TwitterCore/SearchView.qml | 2 +- demos/declarative/twitter/TwitterCore/TitleBar.qml | 2 +- demos/declarative/twitter/TwitterCore/ToolBar.qml | 2 +- .../declarative/twitter/TwitterCore/UserModel.qml | 2 +- demos/declarative/twitter/twitter.qml | 2 +- demos/declarative/webbrowser/content/Button.qml | 2 +- .../webbrowser/content/FlickableWebView.qml | 2 +- demos/declarative/webbrowser/content/Header.qml | 2 +- demos/declarative/webbrowser/content/ScrollBar.qml | 2 +- demos/declarative/webbrowser/content/UrlInput.qml | 2 +- demos/declarative/webbrowser/webbrowser.qml | 2 +- demos/qtdemo/qmlShell.qml | 2 +- doc/src/declarative/modules.qdoc | 8 +- doc/src/declarative/qdeclarativedebugging.qdoc | 2 +- doc/src/declarative/qdeclarativedocument.qdoc | 2 +- doc/src/declarative/qdeclarativei18n.qdoc | 2 +- doc/src/declarative/qdeclarativeintro.qdoc | 2 +- doc/src/declarative/qmlruntime.qdoc | 2 +- doc/src/declarative/qmlviewer.qdoc | 8 +- doc/src/declarative/qtbinding.qdoc | 2 +- doc/src/declarative/scope.qdoc | 10 +- doc/src/getting-started/gettingstartedqml.qdoc | 4 +- .../snippets/declarative/SelfDestroyingRect.qml | 2 +- doc/src/snippets/declarative/Sprite.qml | 2 +- doc/src/snippets/declarative/anchoranimation.qml | 2 +- doc/src/snippets/declarative/anchorchanges.qml | 2 +- doc/src/snippets/declarative/animatedimage.qml | 2 +- .../snippets/declarative/animation-behavioral.qml | 2 +- doc/src/snippets/declarative/animation-easing.qml | 2 +- .../snippets/declarative/animation-elements.qml | 2 +- doc/src/snippets/declarative/animation-groups.qml | 2 +- .../declarative/animation-propertyvaluesource.qml | 2 +- .../declarative/animation-signalhandler.qml | 2 +- .../snippets/declarative/animation-standalone.qml | 2 +- .../snippets/declarative/animation-transitions.qml | 2 +- doc/src/snippets/declarative/behavior.qml | 2 +- .../declarative/borderimage/borderimage-scaled.qml | 2 +- .../declarative/borderimage/borderimage-tiled.qml | 2 +- .../declarative/borderimage/normal-image.qml | 2 +- .../codingconventions/dotproperties.qml | 2 +- .../codingconventions/javascript-imports.qml | 2 +- .../declarative/codingconventions/javascript.qml | 2 +- .../declarative/codingconventions/lists.qml | 2 +- .../declarative/codingconventions/photo.qml | 2 +- doc/src/snippets/declarative/coloranimation.qml | 2 +- doc/src/snippets/declarative/column/column.qml | 2 +- .../column/vertical-positioner-transition.qml | 2 +- .../declarative/column/vertical-positioner.qml | 2 +- doc/src/snippets/declarative/comments.qml | 2 +- doc/src/snippets/declarative/component.qml | 2 +- .../declarative/createComponent-simple.qml | 2 +- doc/src/snippets/declarative/createComponent.qml | 2 +- doc/src/snippets/declarative/createQmlObject.qml | 4 +- .../declarative/dynamicObjects-destroy.qml | 2 +- doc/src/snippets/declarative/flickable.qml | 2 +- .../snippets/declarative/flickableScrollbar.qml | 2 +- doc/src/snippets/declarative/flipable/flipable.qml | 2 +- doc/src/snippets/declarative/flow-diagram.qml | 2 +- doc/src/snippets/declarative/flow.qml | 2 +- doc/src/snippets/declarative/focusscopes.qml | 2 +- doc/src/snippets/declarative/folderlistmodel.qml | 2 +- doc/src/snippets/declarative/gradient.qml | 2 +- doc/src/snippets/declarative/grid/grid-items.qml | 2 +- .../snippets/declarative/grid/grid-no-spacing.qml | 2 +- doc/src/snippets/declarative/grid/grid-spacing.qml | 2 +- doc/src/snippets/declarative/grid/grid.qml | 2 +- .../snippets/declarative/gridview/ContactModel.qml | 2 +- doc/src/snippets/declarative/gridview/gridview.qml | 2 +- doc/src/snippets/declarative/image.qml | 2 +- doc/src/snippets/declarative/listmodel-modify.qml | 2 +- doc/src/snippets/declarative/listmodel-nested.qml | 2 +- doc/src/snippets/declarative/listmodel-simple.qml | 2 +- doc/src/snippets/declarative/listmodel.qml | 2 +- .../snippets/declarative/listview/ContactModel.qml | 2 +- .../declarative/listview/listview-snippet.qml | 2 +- doc/src/snippets/declarative/listview/listview.qml | 2 +- doc/src/snippets/declarative/loader/KeyReader.qml | 2 +- doc/src/snippets/declarative/loader/MyItem.qml | 2 +- .../snippets/declarative/loader/connections.qml | 2 +- doc/src/snippets/declarative/loader/focus.qml | 2 +- doc/src/snippets/declarative/loader/simple.qml | 2 +- .../declarative/mousearea/mousearea-snippet.qml | 2 +- .../snippets/declarative/mousearea/mousearea.qml | 2 +- .../declarative/mousearea/mouseareadragfilter.qml | 2 +- doc/src/snippets/declarative/numberanimation.qml | 2 +- doc/src/snippets/declarative/parallelanimation.qml | 2 +- doc/src/snippets/declarative/parentanimation.qml | 2 +- doc/src/snippets/declarative/parentchange.qml | 2 +- .../snippets/declarative/pathview/ContactModel.qml | 2 +- .../declarative/pathview/pathattributes.qml | 2 +- doc/src/snippets/declarative/pathview/pathview.qml | 2 +- doc/src/snippets/declarative/propertyaction.qml | 2 +- doc/src/snippets/declarative/propertyanimation.qml | 2 +- doc/src/snippets/declarative/propertychanges.qml | 2 +- .../qml-data-models/dynamic-listmodel.qml | 2 +- .../declarative/qml-data-models/listelements.qml | 2 +- .../qml-data-models/listmodel-listview.qml | 2 +- .../declarative/qml-documents/inline-component.qml | 2 +- .../qml-documents/inline-text-component.qml | 2 +- .../declarative/qml-documents/non-trivial.qml | 2 +- .../declarative/qml-documents/qmldocuments.qml | 2 +- .../snippets/declarative/qml-intro/anchors1.qml | 2 +- .../snippets/declarative/qml-intro/anchors2.qml | 2 +- .../snippets/declarative/qml-intro/anchors3.qml | 2 +- .../declarative/qml-intro/hello-world1.qml | 2 +- .../declarative/qml-intro/hello-world2.qml | 2 +- .../declarative/qml-intro/hello-world3.qml | 2 +- .../declarative/qml-intro/hello-world4.qml | 2 +- .../declarative/qml-intro/hello-world5.qml | 2 +- .../declarative/qml-intro/number-animation1.qml | 2 +- .../declarative/qml-intro/number-animation2.qml | 2 +- .../snippets/declarative/qml-intro/rectangle.qml | 2 +- .../qml-intro/sequential-animation1.qml | 2 +- .../qml-intro/sequential-animation2.qml | 2 +- .../qml-intro/sequential-animation3.qml | 4 +- doc/src/snippets/declarative/qml-intro/states1.qml | 2 +- .../declarative/qml-intro/transformations1.qml | 2 +- .../qtbinding/contextproperties/main.qml | 2 +- .../declarative/qtbinding/custompalette/main.qml | 2 +- .../declarative/qtbinding/resources/main.qml | 2 +- .../declarative/qtbinding/stopwatch/main.qml | 2 +- doc/src/snippets/declarative/qtobject.qml | 2 +- .../declarative/rectangle/rect-border-width.qml | 2 +- .../declarative/rectangle/rectangle-colors.qml | 2 +- .../declarative/rectangle/rectangle-gradient.qml | 2 +- .../declarative/rectangle/rectangle-smooth.qml | 2 +- .../snippets/declarative/rectangle/rectangle.qml | 2 +- .../declarative/repeaters/repeater-grid-index.qml | 2 +- .../snippets/declarative/repeaters/repeater.qml | 2 +- doc/src/snippets/declarative/rotation.qml | 2 +- doc/src/snippets/declarative/rotationanimation.qml | 2 +- doc/src/snippets/declarative/row.qml | 2 +- doc/src/snippets/declarative/row/row.qml | 2 +- .../snippets/declarative/sequentialanimation.qml | 2 +- doc/src/snippets/declarative/smoothedanimation.qml | 2 +- doc/src/snippets/declarative/springanimation.qml | 2 +- doc/src/snippets/declarative/state-when.qml | 2 +- doc/src/snippets/declarative/state.qml | 2 +- doc/src/snippets/declarative/states.qml | 2 +- doc/src/snippets/declarative/systempalette.qml | 2 +- .../snippets/declarative/text/onLinkActivated.qml | 2 +- doc/src/snippets/declarative/texteditor.qml | 2 +- .../snippets/declarative/transition-from-to.qml | 2 +- .../snippets/declarative/transition-reversible.qml | 2 +- doc/src/snippets/declarative/transition.qml | 2 +- doc/src/snippets/declarative/visualdatamodel.qml | 2 +- .../declarative/visualdatamodel_rootindex/view.qml | 2 +- doc/src/snippets/declarative/workerscript.qml | 2 +- doc/src/snippets/declarative/xmlrole.qml | 2 +- .../animation/basics/color-animation.qml | 2 +- .../animation/basics/property-animation.qml | 2 +- .../declarative/animation/behaviors/SideRect.qml | 2 +- .../animation/behaviors/behavior-example.qml | 2 +- .../animation/easing/content/QuitButton.qml | 4 +- examples/declarative/animation/easing/easing.qml | 2 +- examples/declarative/animation/states/states.qml | 2 +- .../declarative/animation/states/transitions.qml | 2 +- .../imageprovider/imageprovider-example.qml | 2 +- .../networkaccessmanagerfactory/view.qml | 2 +- .../plugins/com/nokia/TimeExample/Clock.qml | 2 +- .../qgraphicslayouts/layoutitem/layoutitem.qml | 2 +- .../qgraphicsgridlayout/qgraphicsgridlayout.qml | 2 +- .../qgraphicslinearlayout.qml | 2 +- .../cppextensions/qwidgets/qwidgets.qml | 2 +- .../referenceexamples/methods/example.qml | 2 +- examples/declarative/i18n/i18n.qml | 2 +- .../imageelements/borderimage/borderimage.qml | 2 +- .../borderimage/content/MyBorderImage.qml | 2 +- .../borderimage/content/ShadowRectangle.qml | 2 +- .../imageelements/borderimage/shadows.qml | 2 +- .../declarative/imageelements/image/ImageCell.qml | 2 +- examples/declarative/imageelements/image/image.qml | 2 +- .../keyinteraction/focus/Core/ContextMenu.qml | 2 +- .../keyinteraction/focus/Core/GridMenu.qml | 2 +- .../keyinteraction/focus/Core/ListMenu.qml | 2 +- .../keyinteraction/focus/Core/ListViewDelegate.qml | 2 +- .../declarative/keyinteraction/focus/focus.qml | 2 +- .../modelviews/abstractitemmodel/view.qml | 2 +- .../modelviews/gridview/gridview-example.qml | 2 +- .../modelviews/listview/content/PetsModel.qml | 2 +- .../listview/content/PressAndHoldButton.qml | 2 +- .../modelviews/listview/content/RecipesModel.qml | 2 +- .../modelviews/listview/content/TextButton.qml | 2 +- .../modelviews/listview/dynamiclist.qml | 2 +- .../modelviews/listview/expandingdelegates.qml | 2 +- .../declarative/modelviews/listview/highlight.qml | 2 +- .../modelviews/listview/highlightranges.qml | 2 +- .../declarative/modelviews/listview/sections.qml | 2 +- .../modelviews/objectlistmodel/view.qml | 2 +- .../declarative/modelviews/package/Delegate.qml | 2 +- examples/declarative/modelviews/package/view.qml | 2 +- .../declarative/modelviews/parallax/parallax.qml | 2 +- .../modelviews/parallax/qml/ParallaxView.qml | 2 +- .../declarative/modelviews/parallax/qml/Smiley.qml | 2 +- .../modelviews/pathview/pathview-example.qml | 2 +- .../modelviews/stringlistmodel/view.qml | 2 +- .../modelviews/visualitemmodel/visualitemmodel.qml | 2 +- examples/declarative/modelviews/webview/alerts.qml | 2 +- .../declarative/modelviews/webview/autosize.qml | 2 +- .../modelviews/webview/content/Mapping/Map.qml | 2 +- .../declarative/modelviews/webview/googlemaps.qml | 2 +- .../declarative/modelviews/webview/inlinehtml.qml | 2 +- .../declarative/modelviews/webview/newwindows.qml | 2 +- examples/declarative/positioners/Button.qml | 2 +- examples/declarative/positioners/positioners.qml | 2 +- .../declarative/screenorientation/Core/Bubble.qml | 4 +- .../declarative/screenorientation/Core/Button.qml | 2 +- .../screenorientation/screenorientation.qml | 2 +- examples/declarative/sqllocalstorage/hello.qml | 2 +- examples/declarative/text/fonts/availableFonts.qml | 2 +- examples/declarative/text/fonts/banner.qml | 2 +- examples/declarative/text/fonts/fonts.qml | 2 +- examples/declarative/text/fonts/hello.qml | 2 +- .../text/textselection/textselection.qml | 2 +- .../threading/threadedlistmodel/timedisplay.qml | 2 +- .../threading/workerscript/workerscript.qml | 2 +- .../gestures/experimental-gestures.qml | 2 +- .../mousearea/mousearea-example.qml | 2 +- examples/declarative/toys/clocks/clocks.qml | 2 +- examples/declarative/toys/clocks/content/Clock.qml | 2 +- .../declarative/toys/clocks/content/QuitButton.qml | 4 +- examples/declarative/toys/corkboards/Day.qml | 2 +- .../declarative/toys/corkboards/corkboards.qml | 2 +- .../declarative/toys/dynamicscene/dynamicscene.qml | 4 +- .../declarative/toys/dynamicscene/qml/Button.qml | 2 +- .../toys/dynamicscene/qml/GenericSceneItem.qml | 2 +- .../toys/dynamicscene/qml/PaletteItem.qml | 2 +- .../toys/dynamicscene/qml/PerspectiveItem.qml | 2 +- examples/declarative/toys/dynamicscene/qml/Sun.qml | 2 +- .../toys/tic-tac-toe/content/Button.qml | 2 +- .../toys/tic-tac-toe/content/TicTac.qml | 2 +- .../declarative/toys/tic-tac-toe/tic-tac-toe.qml | 2 +- examples/declarative/toys/tvtennis/tvtennis.qml | 2 +- .../tutorials/extending/chapter1-basics/app.qml | 2 +- .../tutorials/extending/chapter2-methods/app.qml | 2 +- .../tutorials/extending/chapter3-bindings/app.qml | 2 +- .../extending/chapter4-customPropertyTypes/app.qml | 2 +- .../extending/chapter5-listproperties/app.qml | 2 +- .../tutorials/extending/chapter6-plugins/app.qml | 2 +- examples/declarative/tutorials/helloworld/Cell.qml | 2 +- .../declarative/tutorials/helloworld/tutorial1.qml | 2 +- .../declarative/tutorials/helloworld/tutorial2.qml | 2 +- .../declarative/tutorials/helloworld/tutorial3.qml | 2 +- .../tutorials/samegame/samegame1/Block.qml | 2 +- .../tutorials/samegame/samegame1/Button.qml | 2 +- .../tutorials/samegame/samegame1/samegame.qml | 2 +- .../tutorials/samegame/samegame2/Block.qml | 2 +- .../tutorials/samegame/samegame2/Button.qml | 2 +- .../tutorials/samegame/samegame2/samegame.qml | 2 +- .../tutorials/samegame/samegame3/Block.qml | 2 +- .../tutorials/samegame/samegame3/Button.qml | 2 +- .../tutorials/samegame/samegame3/Dialog.qml | 2 +- .../tutorials/samegame/samegame3/samegame.qml | 2 +- .../samegame/samegame4/content/BoomBlock.qml | 2 +- .../samegame/samegame4/content/Button.qml | 2 +- .../samegame/samegame4/content/Dialog.qml | 2 +- .../tutorials/samegame/samegame4/samegame.qml | 2 +- .../ui-components/dialcontrol/content/Dial.qml | 2 +- .../dialcontrol/content/QuitButton.qml | 4 +- .../ui-components/dialcontrol/dialcontrol.qml | 2 +- .../ui-components/flipable/content/Card.qml | 2 +- .../ui-components/flipable/flipable.qml | 2 +- .../progressbar/content/ProgressBar.qml | 2 +- .../declarative/ui-components/progressbar/main.qml | 2 +- .../ui-components/scrollbar/ScrollBar.qml | 2 +- .../declarative/ui-components/scrollbar/main.qml | 2 +- .../ui-components/searchbox/SearchBox.qml | 2 +- .../declarative/ui-components/searchbox/main.qml | 2 +- .../ui-components/slideswitch/content/Switch.qml | 2 +- .../ui-components/slideswitch/slideswitch.qml | 2 +- .../ui-components/spinner/content/Spinner.qml | 2 +- .../declarative/ui-components/spinner/main.qml | 2 +- .../ui-components/tabwidget/TabWidget.qml | 2 +- .../declarative/ui-components/tabwidget/main.qml | 2 +- .../xml/xmlhttprequest/xmlhttprequest-example.qml | 2 +- .../tutorials/gettingStarted/gsQml/core/button.qml | 4 +- .../gettingStarted/gsQml/core/editMenu.qml | 4 +- .../gettingStarted/gsQml/core/fileDialog.qml | 4 +- .../gettingStarted/gsQml/core/fileMenu.qml | 2 +- .../gettingStarted/gsQml/core/menuBar.qml | 2 +- .../gettingStarted/gsQml/core/textArea.qml | 4 +- .../tutorials/gettingStarted/gsQml/texteditor.qml | 2 +- src/declarative/graphicsitems/qdeclarativeitem.cpp | 2 +- .../graphicsitems/qdeclarativetextedit.cpp | 4 +- .../graphicsitems/qdeclarativetextinput.cpp | 6 +- .../graphicsitems/qdeclarativevisualitemmodel.cpp | 2 +- src/declarative/qml/qdeclarativecompiler.cpp | 2 +- src/declarative/qml/qdeclarativecomponent.cpp | 2 +- src/declarative/qml/qdeclarativecontext.cpp | 4 +- src/declarative/qml/qdeclarativedom.cpp | 2 +- src/declarative/qml/qdeclarativeexpression.cpp | 2 +- src/declarative/util/qdeclarativefontloader.cpp | 2 +- src/declarative/util/qdeclarativetimer.cpp | 2 +- src/declarative/util/qdeclarativexmllistmodel.cpp | 2 +- src/imports/particles/qdeclarativeparticles.cpp | 2 +- .../declarative/parserstress/tst_parserstress.cpp | 2 +- .../qdeclarativeanchors/data/anchors.qml | 2 +- .../data/anchorsqgraphicswidget.qml | 2 +- .../qdeclarativeanchors/data/centerin.qml | 2 +- .../qdeclarativeanchors/data/crash1.qml | 2 +- .../declarative/qdeclarativeanchors/data/fill.qml | 2 +- .../qdeclarativeanchors/data/hvCenter.qml | 2 +- .../declarative/qdeclarativeanchors/data/loop1.qml | 2 +- .../declarative/qdeclarativeanchors/data/loop2.qml | 2 +- .../qdeclarativeanchors/data/margins.qml | 2 +- .../tst_qdeclarativeanchors.cpp | 2 +- .../qdeclarativeanimatedimage/data/colors.qml | 2 +- .../qdeclarativeanimatedimage/data/stickman.qml | 2 +- .../data/stickmanerror1.qml | 2 +- .../data/stickmanpause.qml | 2 +- .../data/stickmanscaled.qml | 2 +- .../data/stickmanstopped.qml | 2 +- .../tst_qdeclarativeanimatedimage.cpp | 2 +- .../qdeclarativeanimations/data/attached.qml | 2 +- .../qdeclarativeanimations/data/badproperty1.qml | 2 +- .../qdeclarativeanimations/data/badproperty2.qml | 2 +- .../qdeclarativeanimations/data/badtype1.qml | 2 +- .../qdeclarativeanimations/data/badtype2.qml | 2 +- .../qdeclarativeanimations/data/badtype3.qml | 2 +- .../qdeclarativeanimations/data/badtype4.qml | 2 +- .../qdeclarativeanimations/data/dontAutoStart.qml | 2 +- .../qdeclarativeanimations/data/dontStart.qml | 2 +- .../qdeclarativeanimations/data/dontStart2.qml | 2 +- .../qdeclarativeanimations/data/dotproperty.qml | 2 +- .../qdeclarativeanimations/data/mixedtype1.qml | 2 +- .../qdeclarativeanimations/data/mixedtype2.qml | 2 +- .../data/nonTransitionBug.qml | 2 +- .../qdeclarativeanimations/data/properties.qml | 2 +- .../qdeclarativeanimations/data/properties2.qml | 2 +- .../qdeclarativeanimations/data/properties3.qml | 2 +- .../qdeclarativeanimations/data/properties4.qml | 2 +- .../qdeclarativeanimations/data/properties5.qml | 2 +- .../data/propertiesTransition.qml | 2 +- .../data/propertiesTransition2.qml | 2 +- .../data/propertiesTransition3.qml | 2 +- .../data/propertiesTransition4.qml | 2 +- .../data/propertiesTransition5.qml | 2 +- .../data/propertiesTransition6.qml | 2 +- .../data/propertiesTransition7.qml | 2 +- .../qdeclarativeanimations/data/rotation.qml | 2 +- .../qdeclarativeanimations/data/runningTrueBug.qml | 2 +- .../qdeclarativeanimations/data/valuesource.qml | 2 +- .../qdeclarativeanimations/data/valuesource2.qml | 2 +- .../tst_qdeclarativeanimations.cpp | 8 +- .../qdeclarativebehaviors/data/binding.qml | 2 +- .../qdeclarativebehaviors/data/color.qml | 2 +- .../qdeclarativebehaviors/data/cpptrigger.qml | 2 +- .../qdeclarativebehaviors/data/disabled.qml | 2 +- .../qdeclarativebehaviors/data/dontStart.qml | 2 +- .../qdeclarativebehaviors/data/empty.qml | 2 +- .../qdeclarativebehaviors/data/explicit.qml | 2 +- .../qdeclarativebehaviors/data/groupProperty.qml | 2 +- .../qdeclarativebehaviors/data/groupProperty2.qml | 2 +- .../data/groupedPropertyCrash.qml | 2 +- .../qdeclarativebehaviors/data/loop.qml | 2 +- .../qdeclarativebehaviors/data/nonSelecting2.qml | 2 +- .../qdeclarativebehaviors/data/parent.qml | 2 +- .../qdeclarativebehaviors/data/qtbug12295.qml | 2 +- .../data/reassignedAnimation.qml | 2 +- .../qdeclarativebehaviors/data/runningTrue.qml | 2 +- .../qdeclarativebehaviors/data/scripttrigger.qml | 2 +- .../qdeclarativebehaviors/data/simple.qml | 2 +- .../qdeclarativebehaviors/data/startup.qml | 2 +- .../qdeclarativebehaviors/data/startup2.qml | 2 +- .../qdeclarativebinding/data/test-binding.qml | 2 +- .../qdeclarativebinding/data/test-binding2.qml | 2 +- .../tst_qdeclarativeborderimage.cpp | 20 +-- .../qdeclarativecomponent/data/createObject.qml | 2 +- .../data/connection-targetchange.qml | 2 +- .../data/connection-unknownsignals-ignored.qml | 2 +- .../data/connection-unknownsignals-notarget.qml | 2 +- .../data/connection-unknownsignals-parent.qml | 2 +- .../data/connection-unknownsignals.qml | 2 +- .../data/test-connection.qml | 2 +- .../data/test-connection2.qml | 2 +- .../data/test-connection3.qml | 2 +- .../qdeclarativeconnection/data/trimming.qml | 2 +- .../tst_qdeclarativecontext.cpp | 18 +-- .../qdeclarativedebug/tst_qdeclarativedebug.cpp | 6 +- .../qdeclarativedom/data/MyComponent.qml | 2 +- .../declarative/qdeclarativedom/data/MyItem.qml | 2 +- .../qdeclarativedom/data/import/Bar.qml | 2 +- .../qdeclarativedom/data/importlib/sublib/Foo.qml | 2 +- .../auto/declarative/qdeclarativedom/data/top.qml | 2 +- .../qdeclarativedom/tst_qdeclarativedom.cpp | 162 ++++++++++----------- .../qdeclarativeecmascript/data/CustomObject.qml | 2 +- .../qdeclarativeecmascript/data/MethodsObject.qml | 2 +- .../data/NestedTypeTransientErrors.qml | 2 +- .../qdeclarativeecmascript/data/ScopeObject.qml | 2 +- .../data/SpuriousWarning.qml | 2 +- .../data/aliasPropertyAndBinding.qml | 2 +- .../data/assignBasicTypes.qml | 2 +- .../data/attachedPropertyScope.qml | 2 +- .../qdeclarativeecmascript/data/bug.1.qml | 2 +- .../data/canAssignNullToQObject.2.qml | 2 +- .../qdeclarativeecmascript/data/compiled.qml | 2 +- .../data/compositePropertyType.qml | 2 +- .../data/deferredPropertiesErrors.qml | 2 +- .../qdeclarativeecmascript/data/deleteLater.qml | 2 +- .../qdeclarativeecmascript/data/deletedEngine.qml | 2 +- .../qdeclarativeecmascript/data/deletedObject.qml | 2 +- .../qdeclarativeecmascript/data/eval.qml | 2 +- .../data/exceptionProducesWarning.qml | 2 +- .../data/exceptionProducesWarning2.qml | 2 +- .../data/extendedObjectPropertyLookup.qml | 2 +- .../data/extensionObjects.qml | 2 +- .../qdeclarativeecmascript/data/function.qml | 2 +- .../qdeclarativeecmascript/data/functionErrors.qml | 2 +- .../data/idShortcutInvalidates.1.qml | 2 +- .../data/idShortcutInvalidates.qml | 2 +- .../declarative/qdeclarativeecmascript/data/in.qml | 2 +- .../qdeclarativeecmascript/data/include.qml | 2 +- .../data/include_callback.qml | 2 +- .../qdeclarativeecmascript/data/include_pragma.qml | 2 +- .../qdeclarativeecmascript/data/include_remote.qml | 2 +- .../data/include_remote_missing.qml | 2 +- .../qdeclarativeecmascript/data/include_shared.qml | 2 +- .../data/invokableObjectArg.qml | 2 +- .../data/invokableObjectRet.qml | 2 +- .../qdeclarativeecmascript/data/jsObject.qml | 2 +- .../data/libraryScriptAssert.qml | 2 +- .../qdeclarativeecmascript/data/listProperties.qml | 2 +- .../qdeclarativeecmascript/data/listToVariant.qml | 2 +- .../qdeclarativeecmascript/data/methods.3.qml | 2 +- .../qdeclarativeecmascript/data/methods.4.qml | 2 +- .../qdeclarativeecmascript/data/methods.5.qml | 2 +- .../data/multiEngineObject.qml | 2 +- .../data/noSpuriousWarningsAtShutdown.2.qml | 2 +- .../data/noSpuriousWarningsAtShutdown.qml | 2 +- .../qdeclarativeecmascript/data/nonscriptable.qml | 2 +- .../data/nullObjectBinding.qml | 2 +- .../data/objectsCompareAsEqual.qml | 2 +- .../qdeclarativeecmascript/data/ownership.qml | 2 +- .../data/propertyAssignmentErrors.qml | 2 +- .../data/qlistqobjectMethods.qml | 2 +- .../qdeclarativeecmascript/data/qtbug_10696.qml | 2 +- .../qdeclarativeecmascript/data/qtbug_11600.qml | 2 +- .../qdeclarativeecmascript/data/qtbug_11606.qml | 2 +- .../data/qtcreatorbug_1289.qml | 2 +- .../qdeclarativeecmascript/data/scope.2.qml | 2 +- .../qdeclarativeecmascript/data/scope.3.qml | 2 +- .../qdeclarativeecmascript/data/scope.qml | 2 +- .../data/scriptConnect.1.qml | 2 +- .../data/scriptConnect.2.qml | 2 +- .../data/scriptConnect.3.qml | 2 +- .../data/scriptConnect.4.qml | 2 +- .../data/scriptConnect.5.qml | 2 +- .../data/scriptConnect.6.qml | 2 +- .../data/scriptDisconnect.1.qml | 2 +- .../data/scriptDisconnect.2.qml | 2 +- .../data/scriptDisconnect.3.qml | 2 +- .../data/scriptDisconnect.4.qml | 2 +- .../data/sharedAttachedObject.qml | 2 +- .../qdeclarativeecmascript/data/shutdownErrors.qml | 2 +- .../data/signalTriggeredBindings.qml | 2 +- .../qdeclarativeecmascript/data/strictlyEquals.qml | 2 +- .../data/transientErrors.2.qml | 2 +- .../data/transientErrors.qml | 2 +- .../data/variantsAssignedUndefined.qml | 2 +- .../qdeclarativeengine/tst_qdeclarativeengine.cpp | 8 +- .../qdeclarativeflickable/data/flickable01.qml | 2 +- .../qdeclarativeflickable/data/flickable02.qml | 2 +- .../qdeclarativeflickable/data/flickable03.qml | 2 +- .../qdeclarativeflickable/data/flickable04.qml | 2 +- .../data/flickableqgraphicswidget.qml | 2 +- .../tst_qdeclarativeflickable.cpp | 10 +- .../qdeclarativeflipable/data/crash.qml | 2 +- .../qdeclarativeflipable/data/flipable-abort.qml | 2 +- .../qdeclarativeflipable/data/test-flipable.qml | 2 +- .../qdeclarativefocusscope/data/chain.qml | 2 +- .../qdeclarativefocusscope/data/forcefocus.qml | 2 +- .../qdeclarativefocusscope/data/signalEmission.qml | 2 +- .../qdeclarativefocusscope/data/test.qml | 2 +- .../qdeclarativefocusscope/data/test2.qml | 2 +- .../qdeclarativefocusscope/data/test3.qml | 2 +- .../qdeclarativefocusscope/data/test4.qml | 2 +- .../qdeclarativefocusscope/data/test5.qml | 2 +- .../tst_qdeclarativefontloader.cpp | 16 +- .../qdeclarativegridview/data/displaygrid.qml | 2 +- .../qdeclarativegridview/data/footer.qml | 2 +- .../data/gridview-enforcerange.qml | 2 +- .../data/gridview-initCurrent.qml | 2 +- .../qdeclarativegridview/data/gridview1.qml | 2 +- .../qdeclarativegridview/data/gridview2.qml | 2 +- .../qdeclarativegridview/data/gridview3.qml | 2 +- .../qdeclarativegridview/data/manual-highlight.qml | 2 +- .../data/propertychangestest.qml | 2 +- .../qdeclarativegridview/data/setindex.qml | 2 +- .../tst_qdeclarativegridview.cpp | 4 +- .../qdeclarativeimage/data/aspectratio.qml | 2 +- .../declarative/qdeclarativeimage/data/tiling.qml | 2 +- .../qdeclarativeimage/tst_qdeclarativeimage.cpp | 16 +- .../tst_qdeclarativeimageprovider.cpp | 8 +- .../qdeclarativeinfo/data/NestedObject.qml | 2 +- .../qdeclarativeinfo/data/nestedQmlObject.qml | 2 +- .../qdeclarativeinfo/data/qmlObject.qml | 2 +- .../qdeclarativeitem/data/childrenProperty.qml | 2 +- .../qdeclarativeitem/data/childrenRect.qml | 2 +- .../qdeclarativeitem/data/childrenRectBug.qml | 2 +- .../qdeclarativeitem/data/childrenRectBug2.qml | 2 +- .../qdeclarativeitem/data/childrenRectBug3.qml | 2 +- .../qdeclarativeitem/data/keynavigationtest.qml | 2 +- .../qdeclarativeitem/data/keyspriority.qml | 2 +- .../declarative/qdeclarativeitem/data/keystest.qml | 2 +- .../qdeclarativeitem/data/mapCoordinates.qml | 2 +- .../qdeclarativeitem/data/mouseFocus.qml | 2 +- .../qdeclarativeitem/data/propertychanges.qml | 2 +- .../qdeclarativeitem/data/resourcesProperty.qml | 2 +- .../qdeclarativeitem/tst_qdeclarativeitem.cpp | 6 +- .../qdeclarativelanguage/data/Alias.qml | 2 +- .../qdeclarativelanguage/data/Alias2.qml | 2 +- .../qdeclarativelanguage/data/Alias3.qml | 2 +- .../qdeclarativelanguage/data/Alias4.qml | 2 +- .../data/ComponentComposite.qml | 2 +- .../qdeclarativelanguage/data/CompositeType.qml | 2 +- .../qdeclarativelanguage/data/CompositeType3.qml | 2 +- .../data/DynamicPropertiesNestedType.qml | 2 +- .../qdeclarativelanguage/data/HelperAlias.qml | 2 +- .../qdeclarativelanguage/data/LocalLast.qml | 2 +- .../qdeclarativelanguage/data/NestedAlias.qml | 2 +- .../qdeclarativelanguage/data/NestedErrorsType.qml | 2 +- .../qdeclarativelanguage/data/OnCompletedType.qml | 2 +- .../data/OnDestructionType.qml | 2 +- .../qdeclarativelanguage/data/alias.1.qml | 2 +- .../qdeclarativelanguage/data/alias.3.qml | 2 +- .../qdeclarativelanguage/data/alias.5.qml | 2 +- .../qdeclarativelanguage/data/alias.6.qml | 2 +- .../qdeclarativelanguage/data/alias.7.qml | 2 +- .../qdeclarativelanguage/data/alias.8.qml | 2 +- .../qdeclarativelanguage/data/alias.9.qml | 2 +- .../data/aliasPropertiesAndSignals.qml | 2 +- .../data/assignCompositeToType.qml | 2 +- .../data/assignLiteralToVariant.qml | 2 +- .../data/assignObjectToVariant.qml | 2 +- .../data/assignToNamespace.qml | 2 +- .../data/attachedProperties.qml | 2 +- .../qdeclarativelanguage/data/component.1.qml | 2 +- .../qdeclarativelanguage/data/component.2.qml | 2 +- .../qdeclarativelanguage/data/component.3.qml | 2 +- .../qdeclarativelanguage/data/component.4.qml | 2 +- .../qdeclarativelanguage/data/component.5.qml | 2 +- .../qdeclarativelanguage/data/component.6.qml | 2 +- .../qdeclarativelanguage/data/component.7.qml | 2 +- .../qdeclarativelanguage/data/component.8.qml | 2 +- .../qdeclarativelanguage/data/component.9.qml | 2 +- .../data/componentCompositeType.qml | 2 +- .../qdeclarativelanguage/data/crash2.qml | 2 +- .../qdeclarativelanguage/data/customOnProperty.qml | 2 +- .../data/customParserIdNotAllowed.qml | 2 +- .../data/customParserTypes.qml | 2 +- .../data/declaredPropertyValues.qml | 2 +- .../qdeclarativelanguage/data/defaultGrouped.qml | 2 +- .../data/defaultPropertyListOrder.qml | 2 +- .../qdeclarativelanguage/data/destroyedSignal.qml | 2 +- .../data/dontDoubleCallClassBegin.qml | 2 +- .../qdeclarativelanguage/data/dynamicMeta.1.qml | 2 +- .../qdeclarativelanguage/data/dynamicMeta.2.qml | 2 +- .../qdeclarativelanguage/data/dynamicMeta.3.qml | 2 +- .../qdeclarativelanguage/data/dynamicMeta.4.qml | 2 +- .../qdeclarativelanguage/data/dynamicMeta.5.qml | 2 +- .../qdeclarativelanguage/data/dynamicObject.1.qml | 2 +- .../data/dynamicObjectProperties.2.qml | 4 +- .../data/dynamicObjectProperties.qml | 4 +- .../data/dynamicProperties.qml | 2 +- .../data/dynamicPropertiesNested.qml | 2 +- .../data/dynamicSignalsAndSlots.qml | 2 +- .../qdeclarativelanguage/data/enumTypes.qml | 2 +- .../data/importNamespaceConflict.qml | 2 +- .../qdeclarativelanguage/data/importNonExist.qml | 2 +- .../data/inlineQmlComponents.qml | 2 +- .../data/interfaceProperty.qml | 2 +- .../qdeclarativelanguage/data/invalidAlias.1.qml | 2 +- .../qdeclarativelanguage/data/invalidAlias.2.qml | 2 +- .../data/invalidAttachedProperty.1.qml | 2 +- .../data/invalidAttachedProperty.10.qml | 2 +- .../data/invalidAttachedProperty.11.qml | 2 +- .../data/invalidAttachedProperty.2.qml | 2 +- .../data/invalidAttachedProperty.3.qml | 2 +- .../data/invalidAttachedProperty.4.qml | 2 +- .../data/invalidAttachedProperty.5.qml | 2 +- .../data/invalidAttachedProperty.6.qml | 2 +- .../data/invalidAttachedProperty.7.qml | 2 +- .../data/invalidAttachedProperty.8.qml | 2 +- .../data/invalidAttachedProperty.9.qml | 2 +- .../data/invalidGroupedProperty.1.qml | 2 +- .../data/invalidGroupedProperty.2.qml | 2 +- .../data/invalidImportID.errors.txt | 2 +- .../qdeclarativelanguage/data/invalidImportID.qml | 4 +- .../qdeclarativelanguage/data/invalidProperty.qml | 2 +- .../lib/com/nokia/installedtest/InstalledTest.qml | 2 +- .../lib/com/nokia/installedtest/InstalledTest2.qml | 2 +- .../data/lib/com/nokia/installedtest/LocalLast.qml | 2 +- .../lib/com/nokia/installedtest/PrivateType.qml | 2 +- .../lib/com/nokia/installedtest0/InstalledTest.qml | 2 +- .../com/nokia/installedtest0/InstalledTest2.qml | 2 +- .../qdeclarativelanguage/data/listAssignment.1.qml | 2 +- .../data/listItemDeleteSelf.qml | 2 +- .../qdeclarativelanguage/data/listProperties.qml | 2 +- .../qdeclarativelanguage/data/method.1.qml | 2 +- .../qdeclarativelanguage/data/missingSignal.qml | 2 +- .../qdeclarativelanguage/data/nestedErrors.qml | 2 +- .../qdeclarativelanguage/data/noCreation.qml | 2 +- .../qdeclarativelanguage/data/onCompleted.qml | 2 +- .../qdeclarativelanguage/data/onDestruction.qml | 2 +- .../qdeclarativelanguage/data/property.1.qml | 2 +- .../qdeclarativelanguage/data/property.2.qml | 2 +- .../qdeclarativelanguage/data/property.3.qml | 2 +- .../qdeclarativelanguage/data/property.4.qml | 2 +- .../qdeclarativelanguage/data/property.5.qml | 2 +- .../qdeclarativelanguage/data/property.6.qml | 2 +- .../qdeclarativelanguage/data/property.7.qml | 2 +- .../data/qmlAttachedPropertiesObjectMethod.1.qml | 2 +- .../data/qmlAttachedPropertiesObjectMethod.2.qml | 2 +- .../qdeclarativelanguage/data/readOnly.3.qml | 2 +- .../qdeclarativelanguage/data/signal.1.qml | 2 +- .../qdeclarativelanguage/data/signal.2.qml | 2 +- .../qdeclarativelanguage/data/signal.3.qml | 2 +- .../qdeclarativelanguage/data/signal.4.qml | 2 +- .../qdeclarativelanguage/data/subdir/Test.qml | 2 +- .../data/subdir/subsubdir/SubTest.qml | 2 +- .../qdeclarativelanguage/data/variantNotify.qml | 2 +- .../qdeclarativelanguage/data/wrongType.16.qml | 2 +- .../declarative/qmllanguage/LocalInternal.qml | 2 +- .../qtest/declarative/qmllanguage/Test.qml | 2 +- .../declarative/qmllanguage/UndeclaredLocal.qml | 2 +- .../declarative/qmllanguage/subdir/SubTest.qml | 2 +- .../tst_qdeclarativelanguage.cpp | 14 +- .../qdeclarativelayoutitem/data/layoutItem.qml | 2 +- .../qdeclarativelistmodel/data/enumerate.qml | 2 +- .../qdeclarativelistmodel/data/model.qml | 2 +- .../qdeclarativelistmodel/data/multipleroles.qml | 4 +- .../tst_qdeclarativelistmodel.cpp | 32 ++-- .../qdeclarativelistreference/data/MyType.qml | 2 +- .../qdeclarativelistreference/data/engineTypes.qml | 2 +- .../data/variantToList.qml | 2 +- .../qdeclarativelistview/data/displaylist.qml | 2 +- .../qdeclarativelistview/data/footer.qml | 2 +- .../qdeclarativelistview/data/itemlist.qml | 2 +- .../data/listview-enforcerange.qml | 2 +- .../data/listview-initCurrent.qml | 2 +- .../data/listview-sections.qml | 2 +- .../qdeclarativelistview/data/listviewtest.qml | 2 +- .../qdeclarativelistview/data/manual-highlight.qml | 2 +- .../data/propertychangestest.qml | 2 +- .../data/strictlyenforcerange.qml | 2 +- .../tst_qdeclarativelistview.cpp | 4 +- .../qdeclarativeloader/data/AnchoredLoader.qml | 2 +- .../qdeclarativeloader/data/BlueRect.qml | 2 +- .../data/GraphicsWidget250x250.qml | 2 +- .../qdeclarativeloader/data/GreenRect.qml | 2 +- .../qdeclarativeloader/data/NoResize.qml | 2 +- .../data/NoResizeGraphicsWidget.qml | 2 +- .../qdeclarativeloader/data/Rect120x60.qml | 2 +- .../qdeclarativeloader/data/SetSourceComponent.qml | 2 +- .../data/SizeGraphicsWidgetToLoader.qml | 2 +- .../data/SizeLoaderToGraphicsWidget.qml | 2 +- .../qdeclarativeloader/data/SizeToItem.qml | 2 +- .../qdeclarativeloader/data/SizeToLoader.qml | 2 +- .../qdeclarativeloader/data/VmeError.qml | 2 +- .../declarative/qdeclarativeloader/data/crash.qml | 2 +- .../qdeclarativeloader/data/differentorigin.qml | 2 +- .../qdeclarativeloader/data/nonItem.qml | 2 +- .../qdeclarativeloader/data/sameorigin-load.qml | 2 +- .../qdeclarativeloader/data/sameorigin.qml | 2 +- .../qdeclarativeloader/data/vmeErrors.qml | 2 +- .../qdeclarativeloader/tst_qdeclarativeloader.cpp | 14 +- .../qdeclarativemousearea/data/clickandhold.qml | 2 +- .../qdeclarativemousearea/data/doubleclick.qml | 2 +- .../qdeclarativemousearea/data/dragging.qml | 2 +- .../qdeclarativemousearea/data/dragproperties.qml | 2 +- .../qdeclarativemousearea/data/dragreset.qml | 2 +- .../qdeclarativemousearea/data/rejectEvent.qml | 2 +- .../data/updateMousePosOnClick.qml | 2 +- .../data/updateMousePosOnResize.qml | 2 +- .../data/particlemotiontest.qml | 2 +- .../qdeclarativeparticles/data/particlestest.qml | 2 +- .../qdeclarativepathview/data/datamodel.qml | 2 +- .../qdeclarativepathview/data/displaypath.qml | 2 +- .../qdeclarativepathview/data/emptymodel.qml | 2 +- .../data/pathUpdateOnStartChanged.qml | 2 +- .../qdeclarativepathview/data/pathtest.qml | 2 +- .../qdeclarativepathview/data/pathview0.qml | 2 +- .../qdeclarativepathview/data/pathview1.qml | 2 +- .../qdeclarativepathview/data/pathview2.qml | 2 +- .../qdeclarativepathview/data/pathview3.qml | 2 +- .../qdeclarativepathview/data/pathview_package.qml | 2 +- .../qdeclarativepathview/data/propertychanges.qml | 2 +- .../tst_qdeclarativepathview.cpp | 2 +- .../data/flow-testimplicitsize.qml | 4 +- .../qdeclarativepositioners/data/flowtest.qml | 2 +- .../qdeclarativepositioners/data/grid-animated.qml | 2 +- .../qdeclarativepositioners/data/grid-spacing.qml | 2 +- .../data/grid-toptobottom.qml | 2 +- .../qdeclarativepositioners/data/gridtest.qml | 2 +- .../data/gridzerocolumns.qml | 2 +- .../data/horizontal-animated.qml | 2 +- .../data/horizontal-spacing.qml | 2 +- .../qdeclarativepositioners/data/horizontal.qml | 2 +- .../data/propertychangestest.qml | 2 +- .../qdeclarativepositioners/data/repeatertest.qml | 2 +- .../data/vertical-animated.qml | 2 +- .../data/vertical-spacing.qml | 2 +- .../qdeclarativepositioners/data/vertical.qml | 2 +- .../data/verticalqgraphicswidget.qml | 2 +- .../tst_qdeclarativepositioners.cpp | 28 ++-- .../qdeclarativeproperty/data/TestType.qml | 2 +- .../data/readSynthesizedObject.qml | 2 +- .../tst_qdeclarativepropertymap.cpp | 4 +- .../auto/declarative/qdeclarativeqt/data/atob.qml | 2 +- .../auto/declarative/qdeclarativeqt/data/btoa.qml | 2 +- .../declarative/qdeclarativeqt/data/consoleLog.qml | 2 +- .../qdeclarativeqt/data/createComponent.qml | 2 +- .../qdeclarativeqt/data/createComponentData.qml | 2 +- .../qdeclarativeqt/data/createComponent_lib.qml | 2 +- .../qdeclarativeqt/data/createQmlObject.qml | 16 +- .../declarative/qdeclarativeqt/data/darker.qml | 2 +- .../auto/declarative/qdeclarativeqt/data/enums.qml | 2 +- .../qdeclarativeqt/data/fontFamilies.qml | 2 +- .../declarative/qdeclarativeqt/data/formatting.qml | 2 +- .../auto/declarative/qdeclarativeqt/data/hsla.qml | 2 +- .../declarative/qdeclarativeqt/data/isQtObject.qml | 2 +- .../declarative/qdeclarativeqt/data/lighter.qml | 2 +- tests/auto/declarative/qdeclarativeqt/data/md5.qml | 2 +- .../qdeclarativeqt/data/openUrlExternally.qml | 2 +- .../auto/declarative/qdeclarativeqt/data/point.qml | 2 +- .../auto/declarative/qdeclarativeqt/data/rect.qml | 2 +- .../auto/declarative/qdeclarativeqt/data/rgba.qml | 2 +- .../auto/declarative/qdeclarativeqt/data/size.qml | 2 +- .../auto/declarative/qdeclarativeqt/data/tint.qml | 2 +- .../declarative/qdeclarativeqt/data/vector.qml | 2 +- .../qdeclarativerepeater/data/intmodel.qml | 2 +- .../qdeclarativerepeater/data/itemlist.qml | 2 +- .../qdeclarativerepeater/data/objlist.qml | 2 +- .../qdeclarativerepeater/data/properties.qml | 2 +- .../qdeclarativerepeater/data/repeater1.qml | 2 +- .../qdeclarativerepeater/data/repeater2.qml | 2 +- .../tst_qdeclarativerepeater.cpp | 2 +- .../data/backtrace1.qml | 2 +- .../data/smoothedanimation1.qml | 2 +- .../data/smoothedanimation2.qml | 2 +- .../data/smoothedanimation3.qml | 2 +- .../data/smoothedanimationBehavior.qml | 2 +- .../data/smoothedanimationValueSource.qml | 2 +- .../data/springanimation1.qml | 2 +- .../data/springanimation2.qml | 2 +- .../data/springanimation3.qml | 2 +- .../tst_qdeclarativesqldatabase.cpp | 2 +- .../qdeclarativestates/data/ExtendedRectangle.qml | 2 +- .../data/Implementation/MyType.qml | 2 +- .../qdeclarativestates/data/anchorChanges1.qml | 2 +- .../qdeclarativestates/data/anchorChanges2.qml | 2 +- .../qdeclarativestates/data/anchorChanges3.qml | 2 +- .../qdeclarativestates/data/anchorChanges4.qml | 2 +- .../qdeclarativestates/data/anchorChanges5.qml | 2 +- .../qdeclarativestates/data/anchorChangesCrash.qml | 2 +- .../qdeclarativestates/data/anchorRewindBug.qml | 4 +- .../qdeclarativestates/data/anchorRewindBug2.qml | 2 +- .../data/attachedPropertyChanges.qml | 2 +- .../data/autoStateAtStartupRestoreBug.qml | 2 +- .../qdeclarativestates/data/basicBinding.qml | 2 +- .../qdeclarativestates/data/basicBinding2.qml | 2 +- .../qdeclarativestates/data/basicBinding3.qml | 2 +- .../qdeclarativestates/data/basicBinding4.qml | 2 +- .../qdeclarativestates/data/basicChanges.qml | 2 +- .../qdeclarativestates/data/basicChanges2.qml | 2 +- .../qdeclarativestates/data/basicChanges3.qml | 2 +- .../qdeclarativestates/data/basicChanges4.qml | 2 +- .../qdeclarativestates/data/basicExtension.qml | 2 +- .../qdeclarativestates/data/deleting.qml | 2 +- .../qdeclarativestates/data/deletingState.qml | 2 +- .../qdeclarativestates/data/editProperties.qml | 2 +- .../qdeclarativestates/data/explicit.qml | 2 +- .../qdeclarativestates/data/extendsBug.qml | 2 +- .../qdeclarativestates/data/fakeExtension.qml | 2 +- .../qdeclarativestates/data/illegalObj.qml | 2 +- .../qdeclarativestates/data/illegalTempState.qml | 2 +- .../qdeclarativestates/data/legalTempState.qml | 2 +- .../qdeclarativestates/data/nonExistantProp.qml | 2 +- .../qdeclarativestates/data/parentChange1.qml | 2 +- .../qdeclarativestates/data/parentChange2.qml | 2 +- .../qdeclarativestates/data/parentChange3.qml | 2 +- .../qdeclarativestates/data/parentChange4.qml | 2 +- .../qdeclarativestates/data/parentChange5.qml | 2 +- .../qdeclarativestates/data/parentChange6.qml | 2 +- .../qdeclarativestates/data/propertyErrors.qml | 2 +- .../declarative/qdeclarativestates/data/reset.qml | 2 +- .../qdeclarativestates/data/restoreEntryValues.qml | 2 +- .../qdeclarativestates/data/returnToBase.qml | 2 +- .../declarative/qdeclarativestates/data/script.qml | 2 +- .../qdeclarativestates/data/signalOverride.qml | 2 +- .../qdeclarativestates/data/signalOverride2.qml | 2 +- .../data/signalOverrideCrash.qml | 2 +- .../data/signalOverrideCrash2.qml | 2 +- .../qdeclarativestates/data/unnamedWhen.qml | 2 +- .../qdeclarativestates/data/urlResolution.qml | 2 +- .../qdeclarativestates/data/whenOrdering.qml | 2 +- .../tst_qdeclarativesystempalette.cpp | 8 +- .../qdeclarativetext/data/alignments.qml | 2 +- .../qdeclarativetext/data/embeddedImagesLocal.qml | 2 +- .../data/embeddedImagesLocalError.qml | 2 +- .../qdeclarativetext/data/embeddedImagesRemote.qml | 2 +- .../data/embeddedImagesRemoteError.qml | 2 +- .../declarative/qdeclarativetext/data/rotated.qml | 2 +- .../qdeclarativetext/tst_qdeclarativetext.cpp | 110 +++++++------- .../qdeclarativetextedit/data/alignments.qml | 2 +- .../qdeclarativetextedit/data/cursorTest.qml | 2 +- .../qdeclarativetextedit/data/geometrySignals.qml | 2 +- .../qdeclarativetextedit/data/http/ErrItem.qml | 2 +- .../qdeclarativetextedit/data/http/NormItem.qml | 2 +- .../data/http/cursorHttpTest.qml | 2 +- .../data/http/cursorHttpTestFail1.qml | 2 +- .../data/http/cursorHttpTestFail2.qml | 2 +- .../data/http/cursorHttpTestPass.qml | 2 +- .../data/httpfail/FailItem.qml | 2 +- .../data/httpslow/WaitItem.qml | 2 +- .../qdeclarativetextedit/data/inputmethodhints.qml | 2 +- .../data/mouseselection_default.qml | 2 +- .../data/mouseselection_false.qml | 2 +- .../data/mouseselection_true.qml | 2 +- .../qdeclarativetextedit/data/navigation.qml | 2 +- .../qdeclarativetextedit/data/readOnly.qml | 2 +- .../tst_qdeclarativetextedit.cpp | 64 ++++---- .../qdeclarativetextinput/data/cursorTest.qml | 2 +- .../qdeclarativetextinput/data/echoMode.qml | 2 +- .../qdeclarativetextinput/data/geometrySignals.qml | 2 +- .../data/horizontalAlignment.qml | 2 +- .../qdeclarativetextinput/data/inputmethods.qml | 2 +- .../qdeclarativetextinput/data/masks.qml | 2 +- .../qdeclarativetextinput/data/maxLength.qml | 2 +- .../qdeclarativetextinput/data/navigation.qml | 2 +- .../qdeclarativetextinput/data/positionAt.qml | 2 +- .../qdeclarativetextinput/data/readOnly.qml | 2 +- .../qdeclarativetextinput/data/validators.qml | 2 +- .../tst_qdeclarativetextinput.cpp | 34 ++--- .../qdeclarativetimer/tst_qdeclarativetimer.cpp | 18 +-- .../qdeclarativevaluetypes/data/conflicting.1.qml | 2 +- .../qdeclarativevaluetypes/data/conflicting.2.qml | 2 +- .../qdeclarativevaluetypes/data/conflicting.3.qml | 2 +- .../qdeclarativevaluetypes/data/deletedObject.qml | 2 +- .../qdeclarativevaluetypes/data/enums.3.qml | 2 +- .../qdeclarativevaluetypes/data/enums.4.qml | 2 +- .../qdeclarativevaluetypes/data/enums.5.qml | 2 +- .../qdeclarativevaluetypes/data/font_write.5.qml | 2 +- .../qdeclarativevaluetypes/data/returnValues.qml | 2 +- .../qdeclarativevaluetypes/data/scriptAccess.qml | 2 +- .../data/sizereadonly_writeerror4.qml | 2 +- .../qdeclarativevaluetypes/data/varAssignment.qml | 2 +- .../data/resizemodedeclarativeitem.qml | 2 +- .../data/resizemodegraphicswidget.qml | 2 +- .../qdeclarativeviewer/data/orientation.qml | 2 +- .../qdeclarativevisualdatamodel/data/datalist.qml | 2 +- .../data/objectlist.qml | 2 +- .../data/singlerole1.qml | 2 +- .../data/singlerole2.qml | 2 +- .../data/visualdatamodel.qml | 2 +- .../declarative/qdeclarativewebview/data/basic.qml | 2 +- .../qdeclarativewebview/data/elements.qml | 2 +- .../qdeclarativewebview/data/javaScript.qml | 2 +- .../qdeclarativewebview/data/loadError.qml | 2 +- .../qdeclarativewebview/data/newwindows.qml | 2 +- .../qdeclarativewebview/data/propertychanges.qml | 2 +- .../qdeclarativewebview/data/sethtml.qml | 2 +- .../tst_qdeclarativewebview.cpp | 2 +- .../qdeclarativeworkerscript/data/BaseWorker.qml | 2 +- .../qdeclarativeworkerscript/data/worker.qml | 2 +- .../data/worker_pragma.qml | 2 +- .../qdeclarativexmlhttprequest/data/abort.qml | 2 +- .../data/abort_opened.qml | 2 +- .../data/abort_unsent.qml | 2 +- .../qdeclarativexmlhttprequest/data/attr.qml | 2 +- .../data/callbackException.qml | 2 +- .../qdeclarativexmlhttprequest/data/cdata.qml | 2 +- .../data/constructor.qml | 2 +- .../data/defaultState.qml | 2 +- .../qdeclarativexmlhttprequest/data/document.qml | 2 +- .../data/domExceptionCodes.qml | 2 +- .../qdeclarativexmlhttprequest/data/element.qml | 2 +- .../data/getAllResponseHeaders.qml | 2 +- .../data/getAllResponseHeaders_args.qml | 2 +- .../data/getAllResponseHeaders_sent.qml | 2 +- .../data/getAllResponseHeaders_unsent.qml | 2 +- .../data/getResponseHeader.qml | 2 +- .../data/getResponseHeader_args.qml | 2 +- .../data/getResponseHeader_sent.qml | 2 +- .../data/getResponseHeader_unsent.qml | 2 +- .../data/instanceStateValues.qml | 2 +- .../data/invalidMethodUsage.qml | 2 +- .../qdeclarativexmlhttprequest/data/open.qml | 2 +- .../data/open_arg_count.1.qml | 2 +- .../data/open_arg_count.2.qml | 2 +- .../data/open_invalid_method.qml | 2 +- .../qdeclarativexmlhttprequest/data/open_sync.qml | 2 +- .../qdeclarativexmlhttprequest/data/open_user.qml | 2 +- .../data/open_username.qml | 2 +- .../data/redirectError.qml | 2 +- .../data/redirectRecur.qml | 2 +- .../qdeclarativexmlhttprequest/data/redirects.qml | 2 +- .../data/responseText.qml | 2 +- .../data/responseXML_invalid.qml | 2 +- .../data/send_alreadySent.qml | 2 +- .../data/send_data.1.qml | 2 +- .../data/send_data.2.qml | 2 +- .../data/send_data.3.qml | 2 +- .../data/send_data.4.qml | 2 +- .../data/send_data.5.qml | 2 +- .../data/send_data.6.qml | 2 +- .../data/send_data.7.qml | 2 +- .../data/send_ignoreData.qml | 2 +- .../data/send_unsent.qml | 2 +- .../data/setRequestHeader.qml | 2 +- .../data/setRequestHeader_args.qml | 2 +- .../data/setRequestHeader_illegalName.qml | 2 +- .../data/setRequestHeader_sent.qml | 2 +- .../data/setRequestHeader_unsent.qml | 2 +- .../data/staticStateValues.qml | 2 +- .../qdeclarativexmlhttprequest/data/status.qml | 2 +- .../qdeclarativexmlhttprequest/data/statusText.qml | 2 +- .../qdeclarativexmlhttprequest/data/text.qml | 2 +- .../qdeclarativexmlhttprequest/data/utf16.qml | 2 +- .../qdeclarativexmllistmodel/data/model.qml | 2 +- .../qdeclarativexmllistmodel/data/model2.qml | 2 +- .../data/propertychanges.qml | 2 +- .../qdeclarativexmllistmodel/data/recipes.qml | 2 +- .../qdeclarativexmllistmodel/data/roleErrors.qml | 2 +- .../qdeclarativexmllistmodel/data/roleKeys.qml | 2 +- .../qdeclarativexmllistmodel/data/unique.qml | 2 +- .../auto/declarative/qmlvisual/ListView/basic1.qml | 2 +- .../auto/declarative/qmlvisual/ListView/basic2.qml | 2 +- .../auto/declarative/qmlvisual/ListView/basic3.qml | 2 +- .../auto/declarative/qmlvisual/ListView/basic4.qml | 2 +- .../declarative/qmlvisual/ListView/itemlist.qml | 2 +- .../declarative/qmlvisual/ListView/listview.qml | 2 +- .../qmlvisual/Package_Views/packageviews.qml | 2 +- .../bindinganimation/bindinganimation.qml | 2 +- .../colorAnimation/colorAnimation-visual.qml | 2 +- .../qmlvisual/animation/easing/easing.qml | 2 +- .../declarative/qmlvisual/animation/loop/loop.qml | 2 +- .../parallelAnimation/parallelAnimation-visual.qml | 2 +- .../parentAnimation/parentAnimation-visual.qml | 2 +- .../parentAnimation2/parentAnimation2.qml | 2 +- .../pauseAnimation/pauseAnimation-visual.qml | 2 +- .../propertyAction/propertyAction-visual.qml | 2 +- .../qmlvisual/animation/qtbug10586/qtbug10586.qml | 2 +- .../qmlvisual/animation/qtbug13398/qtbug13398.qml | 2 +- .../qmlvisual/animation/reanchor/reanchor.qml | 2 +- .../animation/scriptAction/scriptAction-visual.qml | 2 +- .../declarative/qmlvisual/fillmode/fillmode.qml | 2 +- .../auto/declarative/qmlvisual/focusscope/test.qml | 2 +- .../declarative/qmlvisual/focusscope/test2.qml | 2 +- .../declarative/qmlvisual/focusscope/test3.qml | 2 +- .../qdeclarativeborderimage/animated-smooth.qml | 2 +- .../qmlvisual/qdeclarativeborderimage/animated.qml | 2 +- .../qmlvisual/qdeclarativeborderimage/borders.qml | 2 +- .../content/MyBorderImage.qml | 2 +- .../qdeclarativeflickable/flickable-horizontal.qml | 2 +- .../qdeclarativeflickable/flickable-vertical.qml | 2 +- .../qdeclarativeflipable/test-flipable.qml | 2 +- .../qdeclarativeflipable/test_flipable_resize.qml | 2 +- .../qmlvisual/qdeclarativegridview/gridview.qml | 2 +- .../qmlvisual/qdeclarativegridview/gridview2.qml | 2 +- .../qmlvisual/qdeclarativemousearea/drag.qml | 2 +- .../qdeclarativemousearea/mousearea-flickable.qml | 2 +- .../qdeclarativemousearea/mousearea-visual.qml | 2 +- .../qmlvisual/qdeclarativeparticles/particles.qml | 2 +- .../qdeclarativepathview/test-pathview-2.qml | 2 +- .../qdeclarativepathview/test-pathview.qml | 2 +- .../qmlvisual/qdeclarativepositioners/dynamic.qml | 2 +- .../qdeclarativepositioners/usingRepeater.qml | 2 +- .../smoothedanimation.qml | 2 +- .../smoothedfollow.qml | 2 +- .../qmlvisual/qdeclarativespringfollow/clock.qml | 2 +- .../qmlvisual/qdeclarativespringfollow/follow.qml | 2 +- .../qdeclarativetext/baseline/parentanchor.qml | 2 +- .../qmlvisual/qdeclarativetext/elide/elide.qml | 2 +- .../qmlvisual/qdeclarativetext/elide/elide2.qml | 2 +- .../qdeclarativetext/elide/multilength.qml | 2 +- .../qmlvisual/qdeclarativetext/font/plaintext.qml | 2 +- .../qmlvisual/qdeclarativetext/font/richtext.qml | 2 +- .../qdeclarativetextedit/MultilineEdit.qml | 2 +- .../qdeclarativetextedit/cursorDelegate.qml | 2 +- .../qmlvisual/qdeclarativetextedit/qt-669.qml | 2 +- .../qdeclarativetextedit/usingMultilineEdit.qml | 2 +- .../qmlvisual/qdeclarativetextedit/wrap.qml | 2 +- .../qmlvisual/qdeclarativetextinput/LineEdit.qml | 2 +- .../qdeclarativetextinput/cursorDelegate.qml | 2 +- .../qmlvisual/qdeclarativetextinput/echoMode.qml | 2 +- .../qmlvisual/qdeclarativetextinput/hAlign.qml | 2 +- .../qdeclarativetextinput/usingLineEdit.qml | 2 +- .../declarative/qmlvisual/rect/GradientRect.qml | 2 +- tests/auto/declarative/qmlvisual/rect/MyRect.qml | 2 +- .../declarative/qmlvisual/rect/rect-painting.qml | 2 +- .../auto/declarative/qmlvisual/repeater/basic1.qml | 2 +- .../auto/declarative/qmlvisual/repeater/basic2.qml | 2 +- .../auto/declarative/qmlvisual/repeater/basic3.qml | 2 +- .../auto/declarative/qmlvisual/repeater/basic4.qml | 2 +- .../selftest_noimages/selftest_noimages.qml | 2 +- .../qmlvisual/webview/autosize/autosize.qml | 2 +- .../webview/javascript/evaluateJavaScript.qml | 2 +- .../qmlvisual/webview/javascript/windowObjects.qml | 2 +- .../qmlvisual/webview/settings/fontFamily.qml | 2 +- .../qmlvisual/webview/settings/fontSize.qml | 2 +- .../webview/settings/noAutoLoadImages.qml | 2 +- .../qmlvisual/webview/settings/setFontFamily.qml | 2 +- .../qmlvisual/webview/zooming/pageWidth.qml | 2 +- .../qmlvisual/webview/zooming/renderControl.qml | 2 +- .../qmlvisual/webview/zooming/resolution.qml | 2 +- .../qmlvisual/webview/zooming/zoomTextOnly.qml | 2 +- .../qmlvisual/webview/zooming/zooming.qml | 2 +- .../lupdate/testdata/good/parseqml/main.qml | 2 +- .../declarative/compilation/data/BoomBlock.qml | 2 +- .../benchmarks/declarative/creation/data/item.qml | 2 +- .../declarative/creation/data/qobject.qml | 2 +- .../declarative/creation/tst_creation.cpp | 2 +- .../qdeclarativecomponent/data/object.qml | 2 +- .../qdeclarativecomponent/data/object_id.qml | 2 +- .../data/samegame/BoomBlock.qml | 2 +- .../data/synthesized_properties.2.qml | 2 +- .../data/synthesized_properties.qml | 2 +- .../qdeclarativemetaproperty/data/object.qml | 2 +- .../data/synthesized_object.qml | 2 +- tests/benchmarks/declarative/qmltime/example.qml | 2 +- .../declarative/qmltime/tests/anchors/empty.qml | 2 +- .../declarative/qmltime/tests/anchors/fill.qml | 2 +- .../declarative/qmltime/tests/anchors/null.qml | 2 +- .../declarative/qmltime/tests/animation/large.qml | 2 +- .../qmltime/tests/animation/largeNoProps.qml | 2 +- .../qmltime/tests/item_creation/children.qml | 2 +- .../qmltime/tests/item_creation/data.qml | 2 +- .../qmltime/tests/item_creation/no_creation.qml | 2 +- .../qmltime/tests/item_creation/resources.qml | 2 +- .../declarative/qmltime/tests/loader/Loaded.qml | 2 +- .../qmltime/tests/loader/component_loader.qml | 2 +- .../qmltime/tests/loader/empty_loader.qml | 2 +- .../declarative/qmltime/tests/loader/no_loader.qml | 2 +- .../qmltime/tests/loader/source_loader.qml | 2 +- .../tests/positioner_creation/no_positioner.qml | 2 +- .../tests/positioner_creation/null_positioner.qml | 2 +- .../tests/positioner_creation/positioner.qml | 2 +- .../qmltime/tests/vmemetaobject/null.qml | 2 +- .../qmltime/tests/vmemetaobject/property.qml | 2 +- .../declarative/script/data/CustomObject.qml | 2 +- tests/benchmarks/declarative/script/data/block.qml | 2 +- .../declarative/script/data/global_prop.qml | 2 +- tools/qml/browser/Browser.qml | 2 +- tools/qml/startup/Logo.qml | 2 +- tools/qml/startup/startup.qml | 2 +- 1095 files changed, 1417 insertions(+), 1417 deletions(-) diff --git a/demos/declarative/calculator/Core/Button.qml b/demos/declarative/calculator/Core/Button.qml index 7b19feb..f37de48 100644 --- a/demos/declarative/calculator/Core/Button.qml +++ b/demos/declarative/calculator/Core/Button.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 BorderImage { id: button diff --git a/demos/declarative/calculator/Core/Display.qml b/demos/declarative/calculator/Core/Display.qml index 53f74c9..f928d3a 100644 --- a/demos/declarative/calculator/Core/Display.qml +++ b/demos/declarative/calculator/Core/Display.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 BorderImage { id: image diff --git a/demos/declarative/calculator/calculator.qml b/demos/declarative/calculator/calculator.qml index 68c922b..3e1c650 100644 --- a/demos/declarative/calculator/calculator.qml +++ b/demos/declarative/calculator/calculator.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "Core" import "Core/calculator.js" as CalcEngine diff --git a/demos/declarative/flickr/common/Progress.qml b/demos/declarative/flickr/common/Progress.qml index 23bffb9..b928554 100644 --- a/demos/declarative/flickr/common/Progress.qml +++ b/demos/declarative/flickr/common/Progress.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { property variant progress: 0 diff --git a/demos/declarative/flickr/common/RssModel.qml b/demos/declarative/flickr/common/RssModel.qml index b4ea3ce..0c1c834 100644 --- a/demos/declarative/flickr/common/RssModel.qml +++ b/demos/declarative/flickr/common/RssModel.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 XmlListModel { property string tags : "" diff --git a/demos/declarative/flickr/common/ScrollBar.qml b/demos/declarative/flickr/common/ScrollBar.qml index 1574915..dfe3cbf 100644 --- a/demos/declarative/flickr/common/ScrollBar.qml +++ b/demos/declarative/flickr/common/ScrollBar.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: container diff --git a/demos/declarative/flickr/common/Slider.qml b/demos/declarative/flickr/common/Slider.qml index faa2e5f..edccc7d 100644 --- a/demos/declarative/flickr/common/Slider.qml +++ b/demos/declarative/flickr/common/Slider.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: slider; width: 400; height: 16 diff --git a/demos/declarative/flickr/flickr-90.qml b/demos/declarative/flickr/flickr-90.qml index 3db44de..31b1d91 100644 --- a/demos/declarative/flickr/flickr-90.qml +++ b/demos/declarative/flickr/flickr-90.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { width: 480; height: 320 diff --git a/demos/declarative/flickr/flickr.qml b/demos/declarative/flickr/flickr.qml index 152f9f9..1533c04 100644 --- a/demos/declarative/flickr/flickr.qml +++ b/demos/declarative/flickr/flickr.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "common" as Common import "mobile" as Mobile diff --git a/demos/declarative/flickr/mobile/Button.qml b/demos/declarative/flickr/mobile/Button.qml index 6228606..74a7dbb 100644 --- a/demos/declarative/flickr/mobile/Button.qml +++ b/demos/declarative/flickr/mobile/Button.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: container diff --git a/demos/declarative/flickr/mobile/GridDelegate.qml b/demos/declarative/flickr/mobile/GridDelegate.qml index c368e95..8f01292 100644 --- a/demos/declarative/flickr/mobile/GridDelegate.qml +++ b/demos/declarative/flickr/mobile/GridDelegate.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: wrapper; width: GridView.view.cellWidth; height: GridView.view.cellHeight diff --git a/demos/declarative/flickr/mobile/ImageDetails.qml b/demos/declarative/flickr/mobile/ImageDetails.qml index 6408fc6..5dd3b4e 100644 --- a/demos/declarative/flickr/mobile/ImageDetails.qml +++ b/demos/declarative/flickr/mobile/ImageDetails.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "../common" as Common Flipable { diff --git a/demos/declarative/flickr/mobile/ListDelegate.qml b/demos/declarative/flickr/mobile/ListDelegate.qml index 9ec02e1..0773547 100644 --- a/demos/declarative/flickr/mobile/ListDelegate.qml +++ b/demos/declarative/flickr/mobile/ListDelegate.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Component { Item { diff --git a/demos/declarative/flickr/mobile/TitleBar.qml b/demos/declarative/flickr/mobile/TitleBar.qml index 60ca4dc..f283307 100644 --- a/demos/declarative/flickr/mobile/TitleBar.qml +++ b/demos/declarative/flickr/mobile/TitleBar.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: titleBar diff --git a/demos/declarative/flickr/mobile/ToolBar.qml b/demos/declarative/flickr/mobile/ToolBar.qml index b9cb915..55f19d2 100644 --- a/demos/declarative/flickr/mobile/ToolBar.qml +++ b/demos/declarative/flickr/mobile/ToolBar.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: toolbar diff --git a/demos/declarative/minehunt/MinehuntCore/Explosion.qml b/demos/declarative/minehunt/MinehuntCore/Explosion.qml index b2644ff..f04d033 100644 --- a/demos/declarative/minehunt/MinehuntCore/Explosion.qml +++ b/demos/declarative/minehunt/MinehuntCore/Explosion.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import Qt.labs.particles 1.0 Item { diff --git a/demos/declarative/minehunt/MinehuntCore/Tile.qml b/demos/declarative/minehunt/MinehuntCore/Tile.qml index 64dd63c..1853ed9 100644 --- a/demos/declarative/minehunt/MinehuntCore/Tile.qml +++ b/demos/declarative/minehunt/MinehuntCore/Tile.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Flipable { id: flipable diff --git a/demos/declarative/minehunt/minehunt.qml b/demos/declarative/minehunt/minehunt.qml index 4accb52..eb67b06 100644 --- a/demos/declarative/minehunt/minehunt.qml +++ b/demos/declarative/minehunt/minehunt.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "MinehuntCore" 1.0 Item { diff --git a/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml b/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml index 0df8155..9001033 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Component { id: albumDelegate diff --git a/demos/declarative/photoviewer/PhotoViewerCore/BusyIndicator.qml b/demos/declarative/photoviewer/PhotoViewerCore/BusyIndicator.qml index e55bf17..7b28930 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/BusyIndicator.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/BusyIndicator.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Image { id: container diff --git a/demos/declarative/photoviewer/PhotoViewerCore/Button.qml b/demos/declarative/photoviewer/PhotoViewerCore/Button.qml index 47b90c8..29f2bb7 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/Button.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/Button.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: container diff --git a/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml b/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml index decc0fe..06f8062 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: container diff --git a/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml b/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml index dadb409..5948b5d 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "script/script.js" as Script Package { diff --git a/demos/declarative/photoviewer/PhotoViewerCore/ProgressBar.qml b/demos/declarative/photoviewer/PhotoViewerCore/ProgressBar.qml index 779d342..a0756ae 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/ProgressBar.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/ProgressBar.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: container diff --git a/demos/declarative/photoviewer/PhotoViewerCore/RssModel.qml b/demos/declarative/photoviewer/PhotoViewerCore/RssModel.qml index 29bad52..15bb67f 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/RssModel.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/RssModel.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 XmlListModel { property string tags : "" diff --git a/demos/declarative/photoviewer/PhotoViewerCore/Tag.qml b/demos/declarative/photoviewer/PhotoViewerCore/Tag.qml index 5e93046..9358975 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/Tag.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/Tag.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Flipable { id: flipable diff --git a/demos/declarative/photoviewer/photoviewer.qml b/demos/declarative/photoviewer/photoviewer.qml index 3072ea2..0f59c64 100644 --- a/demos/declarative/photoviewer/photoviewer.qml +++ b/demos/declarative/photoviewer/photoviewer.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "PhotoViewerCore" Rectangle { diff --git a/demos/declarative/rssnews/content/BusyIndicator.qml b/demos/declarative/rssnews/content/BusyIndicator.qml index 13f54f2..e305cbe 100644 --- a/demos/declarative/rssnews/content/BusyIndicator.qml +++ b/demos/declarative/rssnews/content/BusyIndicator.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Image { id: container diff --git a/demos/declarative/rssnews/content/CategoryDelegate.qml b/demos/declarative/rssnews/content/CategoryDelegate.qml index edfb4bb..c4fa8cc 100644 --- a/demos/declarative/rssnews/content/CategoryDelegate.qml +++ b/demos/declarative/rssnews/content/CategoryDelegate.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: delegate diff --git a/demos/declarative/rssnews/content/NewsDelegate.qml b/demos/declarative/rssnews/content/NewsDelegate.qml index cfe9b00..cf88f4e 100644 --- a/demos/declarative/rssnews/content/NewsDelegate.qml +++ b/demos/declarative/rssnews/content/NewsDelegate.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: delegate diff --git a/demos/declarative/rssnews/content/RssFeeds.qml b/demos/declarative/rssnews/content/RssFeeds.qml index 62e7f14..37c4b69 100644 --- a/demos/declarative/rssnews/content/RssFeeds.qml +++ b/demos/declarative/rssnews/content/RssFeeds.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 ListModel { id: rssFeeds diff --git a/demos/declarative/rssnews/content/ScrollBar.qml b/demos/declarative/rssnews/content/ScrollBar.qml index e0214d2..f20f0aa 100644 --- a/demos/declarative/rssnews/content/ScrollBar.qml +++ b/demos/declarative/rssnews/content/ScrollBar.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: container diff --git a/demos/declarative/rssnews/rssnews.qml b/demos/declarative/rssnews/rssnews.qml index fb5b5a3..f6fe188 100644 --- a/demos/declarative/rssnews/rssnews.qml +++ b/demos/declarative/rssnews/rssnews.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "content" Rectangle { diff --git a/demos/declarative/samegame/SamegameCore/BoomBlock.qml b/demos/declarative/samegame/SamegameCore/BoomBlock.qml index 43050af..afda29c 100644 --- a/demos/declarative/samegame/SamegameCore/BoomBlock.qml +++ b/demos/declarative/samegame/SamegameCore/BoomBlock.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import Qt.labs.particles 1.0 Item { diff --git a/demos/declarative/samegame/SamegameCore/Button.qml b/demos/declarative/samegame/SamegameCore/Button.qml index d5979b2..7fb7b65 100644 --- a/demos/declarative/samegame/SamegameCore/Button.qml +++ b/demos/declarative/samegame/SamegameCore/Button.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: container diff --git a/demos/declarative/samegame/SamegameCore/Dialog.qml b/demos/declarative/samegame/SamegameCore/Dialog.qml index 7e64bd6..e1f3900 100644 --- a/demos/declarative/samegame/SamegameCore/Dialog.qml +++ b/demos/declarative/samegame/SamegameCore/Dialog.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: page diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml index 3e9c505..f66c40e 100644 --- a/demos/declarative/samegame/samegame.qml +++ b/demos/declarative/samegame/samegame.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "SamegameCore" import "SamegameCore/samegame.js" as Logic diff --git a/demos/declarative/snake/content/Button.qml b/demos/declarative/snake/content/Button.qml index 5d9eebe..cf4519d 100644 --- a/demos/declarative/snake/content/Button.qml +++ b/demos/declarative/snake/content/Button.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: container diff --git a/demos/declarative/snake/content/Cookie.qml b/demos/declarative/snake/content/Cookie.qml index eb57fd2..b4af9fe 100644 --- a/demos/declarative/snake/content/Cookie.qml +++ b/demos/declarative/snake/content/Cookie.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import Qt.labs.particles 1.0 Item { diff --git a/demos/declarative/snake/content/HighScoreModel.qml b/demos/declarative/snake/content/HighScoreModel.qml index 42482f8..e3a4704 100644 --- a/demos/declarative/snake/content/HighScoreModel.qml +++ b/demos/declarative/snake/content/HighScoreModel.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 // Models a high score table. // diff --git a/demos/declarative/snake/content/Link.qml b/demos/declarative/snake/content/Link.qml index 942008d..16b6e1e 100644 --- a/demos/declarative/snake/content/Link.qml +++ b/demos/declarative/snake/content/Link.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import Qt.labs.particles 1.0 Item { id:link diff --git a/demos/declarative/snake/content/Skull.qml b/demos/declarative/snake/content/Skull.qml index 0cc6186..1a3ff7e 100644 --- a/demos/declarative/snake/content/Skull.qml +++ b/demos/declarative/snake/content/Skull.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Image { property bool spawned: false diff --git a/demos/declarative/snake/snake.qml b/demos/declarative/snake/snake.qml index 4d989df..5b69217 100644 --- a/demos/declarative/snake/snake.qml +++ b/demos/declarative/snake/snake.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "content" as Content import "content/snake.js" as Logic diff --git a/demos/declarative/twitter/TwitterCore/Button.qml b/demos/declarative/twitter/TwitterCore/Button.qml index 437b013..a1fc2a2 100644 --- a/demos/declarative/twitter/TwitterCore/Button.qml +++ b/demos/declarative/twitter/TwitterCore/Button.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: container diff --git a/demos/declarative/twitter/TwitterCore/FatDelegate.qml b/demos/declarative/twitter/TwitterCore/FatDelegate.qml index 27dd300..896abbe 100644 --- a/demos/declarative/twitter/TwitterCore/FatDelegate.qml +++ b/demos/declarative/twitter/TwitterCore/FatDelegate.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Component { id: listDelegate diff --git a/demos/declarative/twitter/TwitterCore/Input.qml b/demos/declarative/twitter/TwitterCore/Input.qml index a33a995..b15f0d5 100644 --- a/demos/declarative/twitter/TwitterCore/Input.qml +++ b/demos/declarative/twitter/TwitterCore/Input.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 FocusScope { id:container diff --git a/demos/declarative/twitter/TwitterCore/Loading.qml b/demos/declarative/twitter/TwitterCore/Loading.qml index b979291..afeafa0 100644 --- a/demos/declarative/twitter/TwitterCore/Loading.qml +++ b/demos/declarative/twitter/TwitterCore/Loading.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Image { id: loading; source: "images/loading.png" diff --git a/demos/declarative/twitter/TwitterCore/MultiTitleBar.qml b/demos/declarative/twitter/TwitterCore/MultiTitleBar.qml index 29b7713..bc8e0de 100644 --- a/demos/declarative/twitter/TwitterCore/MultiTitleBar.qml +++ b/demos/declarative/twitter/TwitterCore/MultiTitleBar.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { TitleBar { id: titleBar; width: parent.width; height: 60; diff --git a/demos/declarative/twitter/TwitterCore/RssModel.qml b/demos/declarative/twitter/TwitterCore/RssModel.qml index d03cdb3..276df62 100644 --- a/demos/declarative/twitter/TwitterCore/RssModel.qml +++ b/demos/declarative/twitter/TwitterCore/RssModel.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: wrapper property variant model: xmlModel diff --git a/demos/declarative/twitter/TwitterCore/SearchView.qml b/demos/declarative/twitter/TwitterCore/SearchView.qml index 22df374..effab30 100644 --- a/demos/declarative/twitter/TwitterCore/SearchView.qml +++ b/demos/declarative/twitter/TwitterCore/SearchView.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 FocusScope { id: wrapper diff --git a/demos/declarative/twitter/TwitterCore/TitleBar.qml b/demos/declarative/twitter/TwitterCore/TitleBar.qml index 70de81d..19da491 100644 --- a/demos/declarative/twitter/TwitterCore/TitleBar.qml +++ b/demos/declarative/twitter/TwitterCore/TitleBar.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: titleBar diff --git a/demos/declarative/twitter/TwitterCore/ToolBar.qml b/demos/declarative/twitter/TwitterCore/ToolBar.qml index e18f5c6..4ef92ff 100644 --- a/demos/declarative/twitter/TwitterCore/ToolBar.qml +++ b/demos/declarative/twitter/TwitterCore/ToolBar.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: toolbar diff --git a/demos/declarative/twitter/TwitterCore/UserModel.qml b/demos/declarative/twitter/TwitterCore/UserModel.qml index d8ca804..013b827 100644 --- a/demos/declarative/twitter/TwitterCore/UserModel.qml +++ b/demos/declarative/twitter/TwitterCore/UserModel.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //This "model" gets the user information about the searched user. Mainly for the icon. diff --git a/demos/declarative/twitter/twitter.qml b/demos/declarative/twitter/twitter.qml index 6d224a2..4495523 100644 --- a/demos/declarative/twitter/twitter.qml +++ b/demos/declarative/twitter/twitter.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "TwitterCore" 1.0 as Twitter Item { diff --git a/demos/declarative/webbrowser/content/Button.qml b/demos/declarative/webbrowser/content/Button.qml index 2a2e7ef..2da1c11 100644 --- a/demos/declarative/webbrowser/content/Button.qml +++ b/demos/declarative/webbrowser/content/Button.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { property alias image: icon.source diff --git a/demos/declarative/webbrowser/content/FlickableWebView.qml b/demos/declarative/webbrowser/content/FlickableWebView.qml index fb479d2..6f4e09c 100644 --- a/demos/declarative/webbrowser/content/FlickableWebView.qml +++ b/demos/declarative/webbrowser/content/FlickableWebView.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QtWebKit 1.0 Flickable { diff --git a/demos/declarative/webbrowser/content/Header.qml b/demos/declarative/webbrowser/content/Header.qml index d3ccae3..88e3000 100644 --- a/demos/declarative/webbrowser/content/Header.qml +++ b/demos/declarative/webbrowser/content/Header.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Image { id: header diff --git a/demos/declarative/webbrowser/content/ScrollBar.qml b/demos/declarative/webbrowser/content/ScrollBar.qml index d3f272c..19309fa 100644 --- a/demos/declarative/webbrowser/content/ScrollBar.qml +++ b/demos/declarative/webbrowser/content/ScrollBar.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: container diff --git a/demos/declarative/webbrowser/content/UrlInput.qml b/demos/declarative/webbrowser/content/UrlInput.qml index 4f49821..0468b64 100644 --- a/demos/declarative/webbrowser/content/UrlInput.qml +++ b/demos/declarative/webbrowser/content/UrlInput.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: container diff --git a/demos/declarative/webbrowser/webbrowser.qml b/demos/declarative/webbrowser/webbrowser.qml index 3bff0fe..a21fa0b 100644 --- a/demos/declarative/webbrowser/webbrowser.qml +++ b/demos/declarative/webbrowser/webbrowser.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QtWebKit 1.0 import "content" diff --git a/demos/qtdemo/qmlShell.qml b/demos/qtdemo/qmlShell.qml index 24c12ae..2764865 100644 --- a/demos/qtdemo/qmlShell.qml +++ b/demos/qtdemo/qmlShell.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: main diff --git a/doc/src/declarative/modules.qdoc b/doc/src/declarative/modules.qdoc index 467b7d0..044c1e7 100644 --- a/doc/src/declarative/modules.qdoc +++ b/doc/src/declarative/modules.qdoc @@ -52,7 +52,7 @@ An \c import statement includes the module name, and possibly a version number. This can be seen in the snippet commonly found at the top of QML files: \qml - import Qt 4.7 + import QtQuick 1.0 \endqml This imports version 4.7 of the "Qt" module into the global namespace. (The QML @@ -126,7 +126,7 @@ application code. When importing an installed module, an un-quoted URI is used, with a mandatory version number: \code - import Qt 4.7 + import QtQuick 1.0 import com.nokia.qml.mymodule 1.0 \endcode @@ -181,7 +181,7 @@ By default, when a module is imported, its contents are imported into the global To import a module into a specific namespace, use the \e as keyword: \qml - import Qt 4.7 as QtLibrary + import QtQuick 1.0 as QtLibrary import "../MyComponents" as MyComponents import com.nokia.qml.mymodule 1.0 as MyModule \endqml @@ -199,7 +199,7 @@ Types from these modules can then only be used when qualified by the namespace: Multiple modules can be imported into the same namespace in the same way that multiple modules can be imported into the global namespace: \qml - import Qt 4.7 as Nokia + import QtQuick 1.0 as Nokia import Ovi 1.0 as Nokia \endqml diff --git a/doc/src/declarative/qdeclarativedebugging.qdoc b/doc/src/declarative/qdeclarativedebugging.qdoc index 64c312c..26d3b38 100644 --- a/doc/src/declarative/qdeclarativedebugging.qdoc +++ b/doc/src/declarative/qdeclarativedebugging.qdoc @@ -59,7 +59,7 @@ from QML's import loading mechanisms. For example, for a simple QML file like this: \qml -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 100; height: 100 } \endqml diff --git a/doc/src/declarative/qdeclarativedocument.qdoc b/doc/src/declarative/qdeclarativedocument.qdoc index 8ca6c11..b6af90b 100644 --- a/doc/src/declarative/qdeclarativedocument.qdoc +++ b/doc/src/declarative/qdeclarativedocument.qdoc @@ -82,7 +82,7 @@ Each instance is created with a different value for its \c text property: \o \snippet doc/src/snippets/declarative/qml-documents/qmldocuments.qml document \o \qml -import Qt 4.7 +import QtQuick 1.0 Column { spacing: 10 diff --git a/doc/src/declarative/qdeclarativei18n.qdoc b/doc/src/declarative/qdeclarativei18n.qdoc index 70a3587..620b902 100644 --- a/doc/src/declarative/qdeclarativei18n.qdoc +++ b/doc/src/declarative/qdeclarativei18n.qdoc @@ -58,7 +58,7 @@ that needs to be translated is enclosed in a call to \c qsTr(). hello.qml: \qml -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200; height: 200 diff --git a/doc/src/declarative/qdeclarativeintro.qdoc b/doc/src/declarative/qdeclarativeintro.qdoc index fa42f59..9d89edf 100644 --- a/doc/src/declarative/qdeclarativeintro.qdoc +++ b/doc/src/declarative/qdeclarativeintro.qdoc @@ -46,7 +46,7 @@ technologies like HTML and CSS, but it's not required. QML looks like this: \code -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200 diff --git a/doc/src/declarative/qmlruntime.qdoc b/doc/src/declarative/qmlruntime.qdoc index 9a84237..51f9e4d 100644 --- a/doc/src/declarative/qmlruntime.qdoc +++ b/doc/src/declarative/qmlruntime.qdoc @@ -60,7 +60,7 @@ QDeclarativeView is a QWidget-based class that is able to load QML files. For example, if there is a QML file, \c application.qml, like this: \qml - import Qt 4.7 + import QtQuick 1.0 Rectangle { width: 100; height: 100; color: "red" } \endqml diff --git a/doc/src/declarative/qmlviewer.qdoc b/doc/src/declarative/qmlviewer.qdoc index 41c4c80..81ad218 100644 --- a/doc/src/declarative/qmlviewer.qdoc +++ b/doc/src/declarative/qmlviewer.qdoc @@ -118,7 +118,7 @@ For example, this QML document refers to a \c lottoNumbers property which does not actually exist within the document: \qml -import Qt 4.7 +import QtQuick 1.0 ListView { width: 200; height: 300 @@ -131,7 +131,7 @@ If within the document's directory, there is a "dummydata" directory which contains a \c lottoNumbers.qml file like this: \qml -import Qt 4.7 +import QtQuick 1.0 ListModel { ListElement { number: 23 } @@ -146,7 +146,7 @@ Child properties are included when loaded from dummy data. The following documen refers to a \c clock.time property: \qml -import Qt 4.7 +import QtQuick 1.0 Text { text: clock.time } \endqml @@ -154,7 +154,7 @@ The text value could be filled by a \c dummydata/clock.qml file with a \c time property in the root context: \qml -import Qt 4.7 +import QtQuick 1.0 QtObject { property int time: 54321 } \endqml diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc index 6eade18..35a05d2 100644 --- a/doc/src/declarative/qtbinding.qdoc +++ b/doc/src/declarative/qtbinding.qdoc @@ -188,7 +188,7 @@ is to have a "running" property in \c main.qml. This leads to much nicer QML co \o \code // main.qml -import Qt 4.7 +import QtQuick 1.0 Rectangle { MouseArea { diff --git a/doc/src/declarative/scope.qdoc b/doc/src/declarative/scope.qdoc index 363ba8d..5501242 100644 --- a/doc/src/declarative/scope.qdoc +++ b/doc/src/declarative/scope.qdoc @@ -112,7 +112,7 @@ following example shows a simple QML file that accesses some enumeration values and calls an imported JavaScript function. \code -import Qt 4.7 +import QtQuick 1.0 import "code.js" as Code ListView { @@ -253,7 +253,7 @@ is used, the \c title property may resolve differently. \code // TitlePage.qml -import Qt 4.7 +import QtQuick 1.0 Item { property string title @@ -269,7 +269,7 @@ Item { } // TitleText.qml -import Qt 4.7 +import QtQuick 1.0 Text { property int size text: "" + title + "" @@ -285,7 +285,7 @@ to use property interfaces, like this: \code // TitlePage.qml -import Qt 4.7 +import QtQuick 1.0 Item { id: root property string title @@ -304,7 +304,7 @@ Item { } // TitleText.qml -import Qt 4.7 +import QtQuick 1.0 Text { property string title property int size diff --git a/doc/src/getting-started/gettingstartedqml.qdoc b/doc/src/getting-started/gettingstartedqml.qdoc index a5e45d9..e2d6e72 100644 --- a/doc/src/getting-started/gettingstartedqml.qdoc +++ b/doc/src/getting-started/gettingstartedqml.qdoc @@ -73,7 +73,7 @@ \snippet examples/tutorials/gettingStarted/gsQml/part0/Button.qml document - First, the \c { import Qt 4.7 } allows the qmlviewer tool to import the QML elements + First, the \c { import QtQuick 1.0 } allows the qmlviewer tool to import the QML elements we will later use. This line must exist for every QML file. Notice that the version of Qt modules is included in the import statement. @@ -209,7 +209,7 @@ \c FileMenu.qml. \code - import Qt 4.7 \\import the main Qt QML module + import QtQuick 1.0 \\import the main Qt QML module import "folderName" \\import the contents of the folder import "script.js" as Script \\import a Javascript file and name it as Script \endcode diff --git a/doc/src/snippets/declarative/SelfDestroyingRect.qml b/doc/src/snippets/declarative/SelfDestroyingRect.qml index 413c04e..f89588b 100644 --- a/doc/src/snippets/declarative/SelfDestroyingRect.qml +++ b/doc/src/snippets/declarative/SelfDestroyingRect.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: rect diff --git a/doc/src/snippets/declarative/Sprite.qml b/doc/src/snippets/declarative/Sprite.qml index 3928c4d..3bcd599 100644 --- a/doc/src/snippets/declarative/Sprite.qml +++ b/doc/src/snippets/declarative/Sprite.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 80; height: 50; color: "red" } //![0] diff --git a/doc/src/snippets/declarative/anchoranimation.qml b/doc/src/snippets/declarative/anchoranimation.qml index f149326..d8235f6 100644 --- a/doc/src/snippets/declarative/anchoranimation.qml +++ b/doc/src/snippets/declarative/anchoranimation.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { id: container diff --git a/doc/src/snippets/declarative/anchorchanges.qml b/doc/src/snippets/declarative/anchorchanges.qml index 19356d7..66c31c5 100644 --- a/doc/src/snippets/declarative/anchorchanges.qml +++ b/doc/src/snippets/declarative/anchorchanges.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: window diff --git a/doc/src/snippets/declarative/animatedimage.qml b/doc/src/snippets/declarative/animatedimage.qml index 66abbae..a9b58c5 100644 --- a/doc/src/snippets/declarative/animatedimage.qml +++ b/doc/src/snippets/declarative/animatedimage.qml @@ -42,7 +42,7 @@ // examples/declarative/imageelements/animatedimage //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: animation.width; height: animation.height + 8 diff --git a/doc/src/snippets/declarative/animation-behavioral.qml b/doc/src/snippets/declarative/animation-behavioral.qml index a4fa648..0462e9a 100644 --- a/doc/src/snippets/declarative/animation-behavioral.qml +++ b/doc/src/snippets/declarative/animation-behavioral.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { width: 100; height: 100 diff --git a/doc/src/snippets/declarative/animation-easing.qml b/doc/src/snippets/declarative/animation-easing.qml index 97f6e60..3438737 100644 --- a/doc/src/snippets/declarative/animation-easing.qml +++ b/doc/src/snippets/declarative/animation-easing.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 100; height: 100 diff --git a/doc/src/snippets/declarative/animation-elements.qml b/doc/src/snippets/declarative/animation-elements.qml index a65bd67..7843b75 100644 --- a/doc/src/snippets/declarative/animation-elements.qml +++ b/doc/src/snippets/declarative/animation-elements.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Row { diff --git a/doc/src/snippets/declarative/animation-groups.qml b/doc/src/snippets/declarative/animation-groups.qml index ba546c9..57cc8c2 100644 --- a/doc/src/snippets/declarative/animation-groups.qml +++ b/doc/src/snippets/declarative/animation-groups.qml @@ -37,7 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Row { diff --git a/doc/src/snippets/declarative/animation-propertyvaluesource.qml b/doc/src/snippets/declarative/animation-propertyvaluesource.qml index 366505c..ba56afd 100644 --- a/doc/src/snippets/declarative/animation-propertyvaluesource.qml +++ b/doc/src/snippets/declarative/animation-propertyvaluesource.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 100; height: 100 diff --git a/doc/src/snippets/declarative/animation-signalhandler.qml b/doc/src/snippets/declarative/animation-signalhandler.qml index 492c007..16f27c6 100644 --- a/doc/src/snippets/declarative/animation-signalhandler.qml +++ b/doc/src/snippets/declarative/animation-signalhandler.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: rect diff --git a/doc/src/snippets/declarative/animation-standalone.qml b/doc/src/snippets/declarative/animation-standalone.qml index c847d02..1ff4073 100644 --- a/doc/src/snippets/declarative/animation-standalone.qml +++ b/doc/src/snippets/declarative/animation-standalone.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: rect diff --git a/doc/src/snippets/declarative/animation-transitions.qml b/doc/src/snippets/declarative/animation-transitions.qml index 5b0bb84..025fc90 100644 --- a/doc/src/snippets/declarative/animation-transitions.qml +++ b/doc/src/snippets/declarative/animation-transitions.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: rect diff --git a/doc/src/snippets/declarative/behavior.qml b/doc/src/snippets/declarative/behavior.qml index 7f66e5a..7e2d1e7 100644 --- a/doc/src/snippets/declarative/behavior.qml +++ b/doc/src/snippets/declarative/behavior.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: rect diff --git a/doc/src/snippets/declarative/borderimage/borderimage-scaled.qml b/doc/src/snippets/declarative/borderimage/borderimage-scaled.qml index 0ed9943..ba30491 100644 --- a/doc/src/snippets/declarative/borderimage/borderimage-scaled.qml +++ b/doc/src/snippets/declarative/borderimage/borderimage-scaled.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: page diff --git a/doc/src/snippets/declarative/borderimage/borderimage-tiled.qml b/doc/src/snippets/declarative/borderimage/borderimage-tiled.qml index 680709d..98a4175 100644 --- a/doc/src/snippets/declarative/borderimage/borderimage-tiled.qml +++ b/doc/src/snippets/declarative/borderimage/borderimage-tiled.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: page diff --git a/doc/src/snippets/declarative/borderimage/normal-image.qml b/doc/src/snippets/declarative/borderimage/normal-image.qml index 85a7f52..f8e3c60 100644 --- a/doc/src/snippets/declarative/borderimage/normal-image.qml +++ b/doc/src/snippets/declarative/borderimage/normal-image.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: page diff --git a/doc/src/snippets/declarative/codingconventions/dotproperties.qml b/doc/src/snippets/declarative/codingconventions/dotproperties.qml index 8a173cd..98cb09c 100644 --- a/doc/src/snippets/declarative/codingconventions/dotproperties.qml +++ b/doc/src/snippets/declarative/codingconventions/dotproperties.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { diff --git a/doc/src/snippets/declarative/codingconventions/javascript-imports.qml b/doc/src/snippets/declarative/codingconventions/javascript-imports.qml index 391bf27..931349f 100644 --- a/doc/src/snippets/declarative/codingconventions/javascript-imports.qml +++ b/doc/src/snippets/declarative/codingconventions/javascript-imports.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![0] import "myscript.js" as Script diff --git a/doc/src/snippets/declarative/codingconventions/javascript.qml b/doc/src/snippets/declarative/codingconventions/javascript.qml index 90790b9..6c94626 100644 --- a/doc/src/snippets/declarative/codingconventions/javascript.qml +++ b/doc/src/snippets/declarative/codingconventions/javascript.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { diff --git a/doc/src/snippets/declarative/codingconventions/lists.qml b/doc/src/snippets/declarative/codingconventions/lists.qml index 8d2bdbc..a7f3c8f 100644 --- a/doc/src/snippets/declarative/codingconventions/lists.qml +++ b/doc/src/snippets/declarative/codingconventions/lists.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { Item { diff --git a/doc/src/snippets/declarative/codingconventions/photo.qml b/doc/src/snippets/declarative/codingconventions/photo.qml index 359a756..2eba035 100644 --- a/doc/src/snippets/declarative/codingconventions/photo.qml +++ b/doc/src/snippets/declarative/codingconventions/photo.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //! [0] Rectangle { diff --git a/doc/src/snippets/declarative/coloranimation.qml b/doc/src/snippets/declarative/coloranimation.qml index d904721..452599e 100644 --- a/doc/src/snippets/declarative/coloranimation.qml +++ b/doc/src/snippets/declarative/coloranimation.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 100; height: 100 diff --git a/doc/src/snippets/declarative/column/column.qml b/doc/src/snippets/declarative/column/column.qml index 6d378bb..45c6822 100644 --- a/doc/src/snippets/declarative/column/column.qml +++ b/doc/src/snippets/declarative/column/column.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Item { width: 310; height: 170 diff --git a/doc/src/snippets/declarative/column/vertical-positioner-transition.qml b/doc/src/snippets/declarative/column/vertical-positioner-transition.qml index 7785776..cd2fdcc 100644 --- a/doc/src/snippets/declarative/column/vertical-positioner-transition.qml +++ b/doc/src/snippets/declarative/column/vertical-positioner-transition.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //! [document] Column { diff --git a/doc/src/snippets/declarative/column/vertical-positioner.qml b/doc/src/snippets/declarative/column/vertical-positioner.qml index 86ecc55..693734b 100644 --- a/doc/src/snippets/declarative/column/vertical-positioner.qml +++ b/doc/src/snippets/declarative/column/vertical-positioner.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //! [document] Column { diff --git a/doc/src/snippets/declarative/comments.qml b/doc/src/snippets/declarative/comments.qml index aa034c6..a8e47ad 100644 --- a/doc/src/snippets/declarative/comments.qml +++ b/doc/src/snippets/declarative/comments.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 //![0] Text { diff --git a/doc/src/snippets/declarative/component.qml b/doc/src/snippets/declarative/component.qml index 84c063f..ed55803 100644 --- a/doc/src/snippets/declarative/component.qml +++ b/doc/src/snippets/declarative/component.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { width: 100; height: 100 diff --git a/doc/src/snippets/declarative/createComponent-simple.qml b/doc/src/snippets/declarative/createComponent-simple.qml index f4c240d..f052529 100644 --- a/doc/src/snippets/declarative/createComponent-simple.qml +++ b/doc/src/snippets/declarative/createComponent-simple.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { id: container diff --git a/doc/src/snippets/declarative/createComponent.qml b/doc/src/snippets/declarative/createComponent.qml index f1a7436..619c02d 100644 --- a/doc/src/snippets/declarative/createComponent.qml +++ b/doc/src/snippets/declarative/createComponent.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 import "componentCreation.js" as MyScript Rectangle { diff --git a/doc/src/snippets/declarative/createQmlObject.qml b/doc/src/snippets/declarative/createQmlObject.qml index 6a4eae8..cfcffe1 100644 --- a/doc/src/snippets/declarative/createQmlObject.qml +++ b/doc/src/snippets/declarative/createQmlObject.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: parentItem @@ -48,7 +48,7 @@ Rectangle { function createIt() { //![0] -var newObject = Qt.createQmlObject('import Qt 4.7; Rectangle {color: "red"; width: 20; height: 20}', +var newObject = Qt.createQmlObject('import QtQuick 1.0; Rectangle {color: "red"; width: 20; height: 20}', parentItem, "dynamicSnippet1"); //![0] diff --git a/doc/src/snippets/declarative/dynamicObjects-destroy.qml b/doc/src/snippets/declarative/dynamicObjects-destroy.qml index b4ae80c..665f631 100644 --- a/doc/src/snippets/declarative/dynamicObjects-destroy.qml +++ b/doc/src/snippets/declarative/dynamicObjects-destroy.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { id: container diff --git a/doc/src/snippets/declarative/flickable.qml b/doc/src/snippets/declarative/flickable.qml index a283e9a..80e7301 100644 --- a/doc/src/snippets/declarative/flickable.qml +++ b/doc/src/snippets/declarative/flickable.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Flickable { width: 200; height: 200 diff --git a/doc/src/snippets/declarative/flickableScrollbar.qml b/doc/src/snippets/declarative/flickableScrollbar.qml index fc06f63..18ea45a 100644 --- a/doc/src/snippets/declarative/flickableScrollbar.qml +++ b/doc/src/snippets/declarative/flickableScrollbar.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![0] Rectangle { diff --git a/doc/src/snippets/declarative/flipable/flipable.qml b/doc/src/snippets/declarative/flipable/flipable.qml index eaf367a..cd5da4b 100644 --- a/doc/src/snippets/declarative/flipable/flipable.qml +++ b/doc/src/snippets/declarative/flipable/flipable.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [0] -import Qt 4.7 +import QtQuick 1.0 Flipable { id: flipable diff --git a/doc/src/snippets/declarative/flow-diagram.qml b/doc/src/snippets/declarative/flow-diagram.qml index f34e3fd..c970164 100644 --- a/doc/src/snippets/declarative/flow-diagram.qml +++ b/doc/src/snippets/declarative/flow-diagram.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "lightblue" diff --git a/doc/src/snippets/declarative/flow.qml b/doc/src/snippets/declarative/flow.qml index 809627e..167cbdb 100644 --- a/doc/src/snippets/declarative/flow.qml +++ b/doc/src/snippets/declarative/flow.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "lightblue" diff --git a/doc/src/snippets/declarative/focusscopes.qml b/doc/src/snippets/declarative/focusscopes.qml index da6a850..4713c0c 100644 --- a/doc/src/snippets/declarative/focusscopes.qml +++ b/doc/src/snippets/declarative/focusscopes.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![0] Rectangle { diff --git a/doc/src/snippets/declarative/folderlistmodel.qml b/doc/src/snippets/declarative/folderlistmodel.qml index a5e0071..d1cd34b 100644 --- a/doc/src/snippets/declarative/folderlistmodel.qml +++ b/doc/src/snippets/declarative/folderlistmodel.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 import Qt.labs.folderlistmodel 1.0 ListView { diff --git a/doc/src/snippets/declarative/gradient.qml b/doc/src/snippets/declarative/gradient.qml index 4c8bd40..47165a4 100644 --- a/doc/src/snippets/declarative/gradient.qml +++ b/doc/src/snippets/declarative/gradient.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![code] Rectangle { diff --git a/doc/src/snippets/declarative/grid/grid-items.qml b/doc/src/snippets/declarative/grid/grid-items.qml index 2382d38..62a444d 100644 --- a/doc/src/snippets/declarative/grid/grid-items.qml +++ b/doc/src/snippets/declarative/grid/grid-items.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 112; height: 112 diff --git a/doc/src/snippets/declarative/grid/grid-no-spacing.qml b/doc/src/snippets/declarative/grid/grid-no-spacing.qml index 6318165..a6ca305 100644 --- a/doc/src/snippets/declarative/grid/grid-no-spacing.qml +++ b/doc/src/snippets/declarative/grid/grid-no-spacing.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 112; height: 112 diff --git a/doc/src/snippets/declarative/grid/grid-spacing.qml b/doc/src/snippets/declarative/grid/grid-spacing.qml index fb3822c..c03cdad 100644 --- a/doc/src/snippets/declarative/grid/grid-spacing.qml +++ b/doc/src/snippets/declarative/grid/grid-spacing.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 112; height: 112 diff --git a/doc/src/snippets/declarative/grid/grid.qml b/doc/src/snippets/declarative/grid/grid.qml index 4599806..837ae60 100644 --- a/doc/src/snippets/declarative/grid/grid.qml +++ b/doc/src/snippets/declarative/grid/grid.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Grid { columns: 3 diff --git a/doc/src/snippets/declarative/gridview/ContactModel.qml b/doc/src/snippets/declarative/gridview/ContactModel.qml index 9fdeb4a..c3c3962 100644 --- a/doc/src/snippets/declarative/gridview/ContactModel.qml +++ b/doc/src/snippets/declarative/gridview/ContactModel.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 ListModel { diff --git a/doc/src/snippets/declarative/gridview/gridview.qml b/doc/src/snippets/declarative/gridview/gridview.qml index cbebb0a..73e58ec 100644 --- a/doc/src/snippets/declarative/gridview/gridview.qml +++ b/doc/src/snippets/declarative/gridview/gridview.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![import] -import Qt 4.7 +import QtQuick 1.0 //![import] Rectangle { diff --git a/doc/src/snippets/declarative/image.qml b/doc/src/snippets/declarative/image.qml index 228e83a..4c66ec1 100644 --- a/doc/src/snippets/declarative/image.qml +++ b/doc/src/snippets/declarative/image.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Image { source: "pics/qtlogo.png" diff --git a/doc/src/snippets/declarative/listmodel-modify.qml b/doc/src/snippets/declarative/listmodel-modify.qml index f08137f..d85da6c 100644 --- a/doc/src/snippets/declarative/listmodel-modify.qml +++ b/doc/src/snippets/declarative/listmodel-modify.qml @@ -37,7 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200; height: 200 diff --git a/doc/src/snippets/declarative/listmodel-nested.qml b/doc/src/snippets/declarative/listmodel-nested.qml index c38ee2d..36c5d66 100644 --- a/doc/src/snippets/declarative/listmodel-nested.qml +++ b/doc/src/snippets/declarative/listmodel-nested.qml @@ -37,7 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200; height: 200 diff --git a/doc/src/snippets/declarative/listmodel-simple.qml b/doc/src/snippets/declarative/listmodel-simple.qml index e561284..c8e83eb 100644 --- a/doc/src/snippets/declarative/listmodel-simple.qml +++ b/doc/src/snippets/declarative/listmodel-simple.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200; height: 200 diff --git a/doc/src/snippets/declarative/listmodel.qml b/doc/src/snippets/declarative/listmodel.qml index 20f2074..f5b6cd6 100644 --- a/doc/src/snippets/declarative/listmodel.qml +++ b/doc/src/snippets/declarative/listmodel.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 ListModel { id: fruitModel diff --git a/doc/src/snippets/declarative/listview/ContactModel.qml b/doc/src/snippets/declarative/listview/ContactModel.qml index f48f84f..d421ffc 100644 --- a/doc/src/snippets/declarative/listview/ContactModel.qml +++ b/doc/src/snippets/declarative/listview/ContactModel.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 ListModel { ListElement { diff --git a/doc/src/snippets/declarative/listview/listview-snippet.qml b/doc/src/snippets/declarative/listview/listview-snippet.qml index d81bcbb..f2a260d 100644 --- a/doc/src/snippets/declarative/listview/listview-snippet.qml +++ b/doc/src/snippets/declarative/listview/listview-snippet.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 ListView { width: 50; height: 200 diff --git a/doc/src/snippets/declarative/listview/listview.qml b/doc/src/snippets/declarative/listview/listview.qml index 2945b2f..8ba47a8 100644 --- a/doc/src/snippets/declarative/listview/listview.qml +++ b/doc/src/snippets/declarative/listview/listview.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![import] -import Qt 4.7 +import QtQuick 1.0 //![import] Item { diff --git a/doc/src/snippets/declarative/loader/KeyReader.qml b/doc/src/snippets/declarative/loader/KeyReader.qml index 66a74fa..e53700c 100644 --- a/doc/src/snippets/declarative/loader/KeyReader.qml +++ b/doc/src/snippets/declarative/loader/KeyReader.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { Item { diff --git a/doc/src/snippets/declarative/loader/MyItem.qml b/doc/src/snippets/declarative/loader/MyItem.qml index 22c3fd3..199c64a 100644 --- a/doc/src/snippets/declarative/loader/MyItem.qml +++ b/doc/src/snippets/declarative/loader/MyItem.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myItem diff --git a/doc/src/snippets/declarative/loader/connections.qml b/doc/src/snippets/declarative/loader/connections.qml index a1cdce2..18f4259 100644 --- a/doc/src/snippets/declarative/loader/connections.qml +++ b/doc/src/snippets/declarative/loader/connections.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { width: 100; height: 100 diff --git a/doc/src/snippets/declarative/loader/focus.qml b/doc/src/snippets/declarative/loader/focus.qml index 4b4c940..4b3042a 100644 --- a/doc/src/snippets/declarative/loader/focus.qml +++ b/doc/src/snippets/declarative/loader/focus.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200; height: 200 diff --git a/doc/src/snippets/declarative/loader/simple.qml b/doc/src/snippets/declarative/loader/simple.qml index bb06ffc..556ce60 100644 --- a/doc/src/snippets/declarative/loader/simple.qml +++ b/doc/src/snippets/declarative/loader/simple.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { width: 200; height: 200 diff --git a/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml b/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml index 85071f1..e2a4ee9 100644 --- a/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml +++ b/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 100; height: 100 diff --git a/doc/src/snippets/declarative/mousearea/mousearea.qml b/doc/src/snippets/declarative/mousearea/mousearea.qml index e7764f9..7cd0a77 100644 --- a/doc/src/snippets/declarative/mousearea/mousearea.qml +++ b/doc/src/snippets/declarative/mousearea/mousearea.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [import] -import Qt 4.7 +import QtQuick 1.0 //! [import] Rectangle { diff --git a/doc/src/snippets/declarative/mousearea/mouseareadragfilter.qml b/doc/src/snippets/declarative/mousearea/mouseareadragfilter.qml index fa0682e..8f9fd47 100644 --- a/doc/src/snippets/declarative/mousearea/mouseareadragfilter.qml +++ b/doc/src/snippets/declarative/mousearea/mouseareadragfilter.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [dragfilter] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 480 diff --git a/doc/src/snippets/declarative/numberanimation.qml b/doc/src/snippets/declarative/numberanimation.qml index 19c0b0d..8f64493 100644 --- a/doc/src/snippets/declarative/numberanimation.qml +++ b/doc/src/snippets/declarative/numberanimation.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 100; height: 100 diff --git a/doc/src/snippets/declarative/parallelanimation.qml b/doc/src/snippets/declarative/parallelanimation.qml index caf4e01..0badc03 100644 --- a/doc/src/snippets/declarative/parallelanimation.qml +++ b/doc/src/snippets/declarative/parallelanimation.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: rect diff --git a/doc/src/snippets/declarative/parentanimation.qml b/doc/src/snippets/declarative/parentanimation.qml index b8a4c00..fa49d7a 100644 --- a/doc/src/snippets/declarative/parentanimation.qml +++ b/doc/src/snippets/declarative/parentanimation.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { width: 200; height: 100 diff --git a/doc/src/snippets/declarative/parentchange.qml b/doc/src/snippets/declarative/parentchange.qml index 72932b2..e73bbb3 100644 --- a/doc/src/snippets/declarative/parentchange.qml +++ b/doc/src/snippets/declarative/parentchange.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { width: 200; height: 100 diff --git a/doc/src/snippets/declarative/pathview/ContactModel.qml b/doc/src/snippets/declarative/pathview/ContactModel.qml index 62daf3d..07db8dc 100644 --- a/doc/src/snippets/declarative/pathview/ContactModel.qml +++ b/doc/src/snippets/declarative/pathview/ContactModel.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 ListModel { ListElement { diff --git a/doc/src/snippets/declarative/pathview/pathattributes.qml b/doc/src/snippets/declarative/pathview/pathattributes.qml index a45f15a..d6dacdb 100644 --- a/doc/src/snippets/declarative/pathview/pathattributes.qml +++ b/doc/src/snippets/declarative/pathview/pathattributes.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 240; height: 200 diff --git a/doc/src/snippets/declarative/pathview/pathview.qml b/doc/src/snippets/declarative/pathview/pathview.qml index e03c615..93298c4 100644 --- a/doc/src/snippets/declarative/pathview/pathview.qml +++ b/doc/src/snippets/declarative/pathview/pathview.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 240; height: 200 diff --git a/doc/src/snippets/declarative/propertyaction.qml b/doc/src/snippets/declarative/propertyaction.qml index 696c9ef..acb5c43 100644 --- a/doc/src/snippets/declarative/propertyaction.qml +++ b/doc/src/snippets/declarative/propertyaction.qml @@ -37,7 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Row { diff --git a/doc/src/snippets/declarative/propertyanimation.qml b/doc/src/snippets/declarative/propertyanimation.qml index 24efd60..1f1cbaf 100644 --- a/doc/src/snippets/declarative/propertyanimation.qml +++ b/doc/src/snippets/declarative/propertyanimation.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Row { diff --git a/doc/src/snippets/declarative/propertychanges.qml b/doc/src/snippets/declarative/propertychanges.qml index 06a3fae..00f6bfe 100644 --- a/doc/src/snippets/declarative/propertychanges.qml +++ b/doc/src/snippets/declarative/propertychanges.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![import] -import Qt 4.7 +import QtQuick 1.0 //![import] Column { diff --git a/doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml b/doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml index 48f2bdb..4aa318c 100644 --- a/doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml +++ b/doc/src/snippets/declarative/qml-data-models/dynamic-listmodel.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { width: 200; height: 250 diff --git a/doc/src/snippets/declarative/qml-data-models/listelements.qml b/doc/src/snippets/declarative/qml-data-models/listelements.qml index 2d12567..44fb056 100644 --- a/doc/src/snippets/declarative/qml-data-models/listelements.qml +++ b/doc/src/snippets/declarative/qml-data-models/listelements.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Item { width: 200; height: 250 diff --git a/doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml b/doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml index 69533c9..53f844a 100644 --- a/doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml +++ b/doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Item { width: 200; height: 250 diff --git a/doc/src/snippets/declarative/qml-documents/inline-component.qml b/doc/src/snippets/declarative/qml-documents/inline-component.qml index 45d7eb4..eef68a3 100644 --- a/doc/src/snippets/declarative/qml-documents/inline-component.qml +++ b/doc/src/snippets/declarative/qml-documents/inline-component.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 240; height: 320; diff --git a/doc/src/snippets/declarative/qml-documents/inline-text-component.qml b/doc/src/snippets/declarative/qml-documents/inline-text-component.qml index 1f3af33..593862d 100644 --- a/doc/src/snippets/declarative/qml-documents/inline-text-component.qml +++ b/doc/src/snippets/declarative/qml-documents/inline-text-component.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 240; height: 320; diff --git a/doc/src/snippets/declarative/qml-documents/non-trivial.qml b/doc/src/snippets/declarative/qml-documents/non-trivial.qml index e9cba98..ba567b5 100644 --- a/doc/src/snippets/declarative/qml-documents/non-trivial.qml +++ b/doc/src/snippets/declarative/qml-documents/non-trivial.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 240; height: 320; diff --git a/doc/src/snippets/declarative/qml-documents/qmldocuments.qml b/doc/src/snippets/declarative/qml-documents/qmldocuments.qml index a4b5589..20efc35 100644 --- a/doc/src/snippets/declarative/qml-documents/qmldocuments.qml +++ b/doc/src/snippets/declarative/qml-documents/qmldocuments.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { property alias text: textItem.text diff --git a/doc/src/snippets/declarative/qml-intro/anchors1.qml b/doc/src/snippets/declarative/qml-intro/anchors1.qml index ba6f928..077eab2 100644 --- a/doc/src/snippets/declarative/qml-intro/anchors1.qml +++ b/doc/src/snippets/declarative/qml-intro/anchors1.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myWin diff --git a/doc/src/snippets/declarative/qml-intro/anchors2.qml b/doc/src/snippets/declarative/qml-intro/anchors2.qml index ac60e1b..79f180d 100644 --- a/doc/src/snippets/declarative/qml-intro/anchors2.qml +++ b/doc/src/snippets/declarative/qml-intro/anchors2.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myWin diff --git a/doc/src/snippets/declarative/qml-intro/anchors3.qml b/doc/src/snippets/declarative/qml-intro/anchors3.qml index ab74670..db42e6b 100644 --- a/doc/src/snippets/declarative/qml-intro/anchors3.qml +++ b/doc/src/snippets/declarative/qml-intro/anchors3.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myWin diff --git a/doc/src/snippets/declarative/qml-intro/hello-world1.qml b/doc/src/snippets/declarative/qml-intro/hello-world1.qml index 55b39c6..176f4f4 100644 --- a/doc/src/snippets/declarative/qml-intro/hello-world1.qml +++ b/doc/src/snippets/declarative/qml-intro/hello-world1.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle diff --git a/doc/src/snippets/declarative/qml-intro/hello-world2.qml b/doc/src/snippets/declarative/qml-intro/hello-world2.qml index c537528..98f04ec 100644 --- a/doc/src/snippets/declarative/qml-intro/hello-world2.qml +++ b/doc/src/snippets/declarative/qml-intro/hello-world2.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle diff --git a/doc/src/snippets/declarative/qml-intro/hello-world3.qml b/doc/src/snippets/declarative/qml-intro/hello-world3.qml index 794c406..abf684c 100644 --- a/doc/src/snippets/declarative/qml-intro/hello-world3.qml +++ b/doc/src/snippets/declarative/qml-intro/hello-world3.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle diff --git a/doc/src/snippets/declarative/qml-intro/hello-world4.qml b/doc/src/snippets/declarative/qml-intro/hello-world4.qml index 7ea4bed..de794ca 100644 --- a/doc/src/snippets/declarative/qml-intro/hello-world4.qml +++ b/doc/src/snippets/declarative/qml-intro/hello-world4.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle diff --git a/doc/src/snippets/declarative/qml-intro/hello-world5.qml b/doc/src/snippets/declarative/qml-intro/hello-world5.qml index 3345882..95ec6c8 100644 --- a/doc/src/snippets/declarative/qml-intro/hello-world5.qml +++ b/doc/src/snippets/declarative/qml-intro/hello-world5.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle diff --git a/doc/src/snippets/declarative/qml-intro/number-animation1.qml b/doc/src/snippets/declarative/qml-intro/number-animation1.qml index 64ebe7a..aa5c109 100644 --- a/doc/src/snippets/declarative/qml-intro/number-animation1.qml +++ b/doc/src/snippets/declarative/qml-intro/number-animation1.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: mainRec diff --git a/doc/src/snippets/declarative/qml-intro/number-animation2.qml b/doc/src/snippets/declarative/qml-intro/number-animation2.qml index 7905002..9c6a4bc 100644 --- a/doc/src/snippets/declarative/qml-intro/number-animation2.qml +++ b/doc/src/snippets/declarative/qml-intro/number-animation2.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: mainRec diff --git a/doc/src/snippets/declarative/qml-intro/rectangle.qml b/doc/src/snippets/declarative/qml-intro/rectangle.qml index 1ce0a04..ccfa514 100644 --- a/doc/src/snippets/declarative/qml-intro/rectangle.qml +++ b/doc/src/snippets/declarative/qml-intro/rectangle.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 // This is a comment. And below myRectangle is defined. Rectangle { diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml b/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml index a1a1af9..3ff1905 100644 --- a/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml +++ b/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: mainRec diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml b/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml index f83c224..47c8d6a 100644 --- a/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml +++ b/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: mainRec diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml b/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml index 32bf59c..530907a 100644 --- a/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml +++ b/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml @@ -38,10 +38,10 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: mainRec diff --git a/doc/src/snippets/declarative/qml-intro/states1.qml b/doc/src/snippets/declarative/qml-intro/states1.qml index 6e7bab1..e63551a 100644 --- a/doc/src/snippets/declarative/qml-intro/states1.qml +++ b/doc/src/snippets/declarative/qml-intro/states1.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: mainRectangle diff --git a/doc/src/snippets/declarative/qml-intro/transformations1.qml b/doc/src/snippets/declarative/qml-intro/transformations1.qml index 7ca3aee..2fea733 100644 --- a/doc/src/snippets/declarative/qml-intro/transformations1.qml +++ b/doc/src/snippets/declarative/qml-intro/transformations1.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myWin diff --git a/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml b/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml index 341765a..425346d 100644 --- a/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml +++ b/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 300 diff --git a/doc/src/snippets/declarative/qtbinding/custompalette/main.qml b/doc/src/snippets/declarative/qtbinding/custompalette/main.qml index ea8464c..a20d9e0 100644 --- a/doc/src/snippets/declarative/qtbinding/custompalette/main.qml +++ b/doc/src/snippets/declarative/qtbinding/custompalette/main.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 240 diff --git a/doc/src/snippets/declarative/qtbinding/resources/main.qml b/doc/src/snippets/declarative/qtbinding/resources/main.qml index b12af9e..644d963 100644 --- a/doc/src/snippets/declarative/qtbinding/resources/main.qml +++ b/doc/src/snippets/declarative/qtbinding/resources/main.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Image { source: "images/background.png" diff --git a/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml b/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml index 75c0831..f894f71 100644 --- a/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml +++ b/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 300 diff --git a/doc/src/snippets/declarative/qtobject.qml b/doc/src/snippets/declarative/qtobject.qml index 581af16..e6e98c2 100644 --- a/doc/src/snippets/declarative/qtobject.qml +++ b/doc/src/snippets/declarative/qtobject.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { QtObject { diff --git a/doc/src/snippets/declarative/rectangle/rect-border-width.qml b/doc/src/snippets/declarative/rectangle/rect-border-width.qml index 3cf0831..3b2a4e5 100644 --- a/doc/src/snippets/declarative/rectangle/rect-border-width.qml +++ b/doc/src/snippets/declarative/rectangle/rect-border-width.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![0] Rectangle { diff --git a/doc/src/snippets/declarative/rectangle/rectangle-colors.qml b/doc/src/snippets/declarative/rectangle/rectangle-colors.qml index 8f306f6..df364bc 100644 --- a/doc/src/snippets/declarative/rectangle/rectangle-colors.qml +++ b/doc/src/snippets/declarative/rectangle/rectangle-colors.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { width: 100; height: 200 diff --git a/doc/src/snippets/declarative/rectangle/rectangle-gradient.qml b/doc/src/snippets/declarative/rectangle/rectangle-gradient.qml index aff5849..d727e84 100644 --- a/doc/src/snippets/declarative/rectangle/rectangle-gradient.qml +++ b/doc/src/snippets/declarative/rectangle/rectangle-gradient.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { width: 100; height: 300 diff --git a/doc/src/snippets/declarative/rectangle/rectangle-smooth.qml b/doc/src/snippets/declarative/rectangle/rectangle-smooth.qml index e1d6980..4cb1050 100644 --- a/doc/src/snippets/declarative/rectangle/rectangle-smooth.qml +++ b/doc/src/snippets/declarative/rectangle/rectangle-smooth.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400; height: 200 diff --git a/doc/src/snippets/declarative/rectangle/rectangle.qml b/doc/src/snippets/declarative/rectangle/rectangle.qml index a464cb9..7bb7c58 100644 --- a/doc/src/snippets/declarative/rectangle/rectangle.qml +++ b/doc/src/snippets/declarative/rectangle/rectangle.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 100 diff --git a/doc/src/snippets/declarative/repeaters/repeater-grid-index.qml b/doc/src/snippets/declarative/repeaters/repeater-grid-index.qml index dbf24ae..4835cfe 100644 --- a/doc/src/snippets/declarative/repeaters/repeater-grid-index.qml +++ b/doc/src/snippets/declarative/repeaters/repeater-grid-index.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400; height: 400; color: "black" diff --git a/doc/src/snippets/declarative/repeaters/repeater.qml b/doc/src/snippets/declarative/repeaters/repeater.qml index db606d0..f3a5505 100644 --- a/doc/src/snippets/declarative/repeaters/repeater.qml +++ b/doc/src/snippets/declarative/repeaters/repeater.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [import] -import Qt 4.7 +import QtQuick 1.0 //! [import] Row { diff --git a/doc/src/snippets/declarative/rotation.qml b/doc/src/snippets/declarative/rotation.qml index 4db8b4a..7366775 100644 --- a/doc/src/snippets/declarative/rotation.qml +++ b/doc/src/snippets/declarative/rotation.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //! [0] -import Qt 4.7 +import QtQuick 1.0 Row { x: 10; y: 10 diff --git a/doc/src/snippets/declarative/rotationanimation.qml b/doc/src/snippets/declarative/rotationanimation.qml index 2309d0a..c907287 100644 --- a/doc/src/snippets/declarative/rotationanimation.qml +++ b/doc/src/snippets/declarative/rotationanimation.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { width: 300; height: 300 diff --git a/doc/src/snippets/declarative/row.qml b/doc/src/snippets/declarative/row.qml index efb6190..4e4bdd3 100644 --- a/doc/src/snippets/declarative/row.qml +++ b/doc/src/snippets/declarative/row.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 320; height: 110 diff --git a/doc/src/snippets/declarative/row/row.qml b/doc/src/snippets/declarative/row/row.qml index 8096c0f..b19bdc2 100644 --- a/doc/src/snippets/declarative/row/row.qml +++ b/doc/src/snippets/declarative/row/row.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [document] -import Qt 4.7 +import QtQuick 1.0 Row { spacing: 2 diff --git a/doc/src/snippets/declarative/sequentialanimation.qml b/doc/src/snippets/declarative/sequentialanimation.qml index 1a17ae9..c8788ac 100644 --- a/doc/src/snippets/declarative/sequentialanimation.qml +++ b/doc/src/snippets/declarative/sequentialanimation.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: rect diff --git a/doc/src/snippets/declarative/smoothedanimation.qml b/doc/src/snippets/declarative/smoothedanimation.qml index edc33db..06e1555 100644 --- a/doc/src/snippets/declarative/smoothedanimation.qml +++ b/doc/src/snippets/declarative/smoothedanimation.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 800; height: 600 diff --git a/doc/src/snippets/declarative/springanimation.qml b/doc/src/snippets/declarative/springanimation.qml index fe5aeb8..2051dbe 100644 --- a/doc/src/snippets/declarative/springanimation.qml +++ b/doc/src/snippets/declarative/springanimation.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { width: 300; height: 300 diff --git a/doc/src/snippets/declarative/state-when.qml b/doc/src/snippets/declarative/state-when.qml index 6dbd099..583f3ba 100644 --- a/doc/src/snippets/declarative/state-when.qml +++ b/doc/src/snippets/declarative/state-when.qml @@ -37,7 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![0] Rectangle { id: myRect diff --git a/doc/src/snippets/declarative/state.qml b/doc/src/snippets/declarative/state.qml index 8597314..07fd21b 100644 --- a/doc/src/snippets/declarative/state.qml +++ b/doc/src/snippets/declarative/state.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRect diff --git a/doc/src/snippets/declarative/states.qml b/doc/src/snippets/declarative/states.qml index be483af..ee110aa 100644 --- a/doc/src/snippets/declarative/states.qml +++ b/doc/src/snippets/declarative/states.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRect diff --git a/doc/src/snippets/declarative/systempalette.qml b/doc/src/snippets/declarative/systempalette.qml index 5e540b9..53410a1 100644 --- a/doc/src/snippets/declarative/systempalette.qml +++ b/doc/src/snippets/declarative/systempalette.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { SystemPalette { id: myPalette; colorGroup: SystemPalette.Active } diff --git a/doc/src/snippets/declarative/text/onLinkActivated.qml b/doc/src/snippets/declarative/text/onLinkActivated.qml index 0fb236a..e9fd431 100644 --- a/doc/src/snippets/declarative/text/onLinkActivated.qml +++ b/doc/src/snippets/declarative/text/onLinkActivated.qml @@ -37,7 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 700; height: 400 diff --git a/doc/src/snippets/declarative/texteditor.qml b/doc/src/snippets/declarative/texteditor.qml index 55438f4..5596140 100644 --- a/doc/src/snippets/declarative/texteditor.qml +++ b/doc/src/snippets/declarative/texteditor.qml @@ -37,7 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![0] Flickable { diff --git a/doc/src/snippets/declarative/transition-from-to.qml b/doc/src/snippets/declarative/transition-from-to.qml index 73bf880..4fe39c5 100644 --- a/doc/src/snippets/declarative/transition-from-to.qml +++ b/doc/src/snippets/declarative/transition-from-to.qml @@ -37,7 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![0] Rectangle { diff --git a/doc/src/snippets/declarative/transition-reversible.qml b/doc/src/snippets/declarative/transition-reversible.qml index b64cf37..e3fec2f 100644 --- a/doc/src/snippets/declarative/transition-reversible.qml +++ b/doc/src/snippets/declarative/transition-reversible.qml @@ -37,7 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![0] Rectangle { diff --git a/doc/src/snippets/declarative/transition.qml b/doc/src/snippets/declarative/transition.qml index 6a8a2f5..9154c3c 100644 --- a/doc/src/snippets/declarative/transition.qml +++ b/doc/src/snippets/declarative/transition.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: rect diff --git a/doc/src/snippets/declarative/visualdatamodel.qml b/doc/src/snippets/declarative/visualdatamodel.qml index 67f9b6b..e9ad800 100644 --- a/doc/src/snippets/declarative/visualdatamodel.qml +++ b/doc/src/snippets/declarative/visualdatamodel.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200; height: 100 diff --git a/doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml b/doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml index 10bcfe8..bceaac8 100644 --- a/doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml +++ b/doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 ListView { id: view diff --git a/doc/src/snippets/declarative/workerscript.qml b/doc/src/snippets/declarative/workerscript.qml index 434a90e..95e787c 100644 --- a/doc/src/snippets/declarative/workerscript.qml +++ b/doc/src/snippets/declarative/workerscript.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 300; height: 300 diff --git a/doc/src/snippets/declarative/xmlrole.qml b/doc/src/snippets/declarative/xmlrole.qml index 9c8af89..efa59eb 100644 --- a/doc/src/snippets/declarative/xmlrole.qml +++ b/doc/src/snippets/declarative/xmlrole.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 300; height: 200 diff --git a/examples/declarative/animation/basics/color-animation.qml b/examples/declarative/animation/basics/color-animation.qml index 182bb54..809f391 100644 --- a/examples/declarative/animation/basics/color-animation.qml +++ b/examples/declarative/animation/basics/color-animation.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import Qt.labs.particles 1.0 Item { diff --git a/examples/declarative/animation/basics/property-animation.qml b/examples/declarative/animation/basics/property-animation.qml index 5149f5b..0a5b353 100644 --- a/examples/declarative/animation/basics/property-animation.qml +++ b/examples/declarative/animation/basics/property-animation.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: window diff --git a/examples/declarative/animation/behaviors/SideRect.qml b/examples/declarative/animation/behaviors/SideRect.qml index eba0817..9517421 100644 --- a/examples/declarative/animation/behaviors/SideRect.qml +++ b/examples/declarative/animation/behaviors/SideRect.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRect diff --git a/examples/declarative/animation/behaviors/behavior-example.qml b/examples/declarative/animation/behaviors/behavior-example.qml index 268d6e5..3e050ab 100644 --- a/examples/declarative/animation/behaviors/behavior-example.qml +++ b/examples/declarative/animation/behaviors/behavior-example.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 600; height: 400 diff --git a/examples/declarative/animation/easing/content/QuitButton.qml b/examples/declarative/animation/easing/content/QuitButton.qml index 9dfe9bd..cbbf916 100644 --- a/examples/declarative/animation/easing/content/QuitButton.qml +++ b/examples/declarative/animation/easing/content/QuitButton.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Image { source: "quit.png" scale: quitMouse.pressed ? 0.8 : 1.0 @@ -49,4 +49,4 @@ Image { anchors.margins: -10 onClicked: Qt.quit() } -} \ No newline at end of file +} diff --git a/examples/declarative/animation/easing/easing.qml b/examples/declarative/animation/easing/easing.qml index ffb129d..c748c23 100644 --- a/examples/declarative/animation/easing/easing.qml +++ b/examples/declarative/animation/easing/easing.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "content" Rectangle { diff --git a/examples/declarative/animation/states/states.qml b/examples/declarative/animation/states/states.qml index 4f3e28c..a9046eb 100644 --- a/examples/declarative/animation/states/states.qml +++ b/examples/declarative/animation/states/states.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: page diff --git a/examples/declarative/animation/states/transitions.qml b/examples/declarative/animation/states/transitions.qml index 6efcdba..ea73b82 100644 --- a/examples/declarative/animation/states/transitions.qml +++ b/examples/declarative/animation/states/transitions.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 /* This is exactly the same as states.qml, except that we have appended diff --git a/examples/declarative/cppextensions/imageprovider/imageprovider-example.qml b/examples/declarative/cppextensions/imageprovider/imageprovider-example.qml index 58536bf..eda9a43 100644 --- a/examples/declarative/cppextensions/imageprovider/imageprovider-example.qml +++ b/examples/declarative/cppextensions/imageprovider/imageprovider-example.qml @@ -37,7 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "ImageProviderCore" // import the plugin that registers the color image provider //![0] diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml b/examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml index 439740a..07c2f5a 100644 --- a/examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml +++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Image { width: 100 diff --git a/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/Clock.qml b/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/Clock.qml index c7d2757..f416c8b 100644 --- a/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/Clock.qml +++ b/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/Clock.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: clock diff --git a/examples/declarative/cppextensions/qgraphicslayouts/layoutitem/layoutitem.qml b/examples/declarative/cppextensions/qgraphicslayouts/layoutitem/layoutitem.qml index 571e427..5f442af 100644 --- a/examples/declarative/cppextensions/qgraphicslayouts/layoutitem/layoutitem.qml +++ b/examples/declarative/cppextensions/qgraphicslayouts/layoutitem/layoutitem.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 LayoutItem { //Sized by the layout id: resizable diff --git a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.qml b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.qml index fd3aa03..5a83937 100644 --- a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.qml +++ b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import GridLayouts 4.7 Item { diff --git a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.qml b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.qml index 24992d5..becbbfa 100644 --- a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.qml +++ b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import LinearLayouts 4.7 Item { diff --git a/examples/declarative/cppextensions/qwidgets/qwidgets.qml b/examples/declarative/cppextensions/qwidgets/qwidgets.qml index 16e9227..6ad937b 100644 --- a/examples/declarative/cppextensions/qwidgets/qwidgets.qml +++ b/examples/declarative/cppextensions/qwidgets/qwidgets.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "QWidgets" 1.0 Rectangle { diff --git a/examples/declarative/cppextensions/referenceexamples/methods/example.qml b/examples/declarative/cppextensions/referenceexamples/methods/example.qml index ea3fa5f..f3616c7 100644 --- a/examples/declarative/cppextensions/referenceexamples/methods/example.qml +++ b/examples/declarative/cppextensions/referenceexamples/methods/example.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import People 1.0 // ![0] diff --git a/examples/declarative/i18n/i18n.qml b/examples/declarative/i18n/i18n.qml index fcf24c2..8dac88d 100644 --- a/examples/declarative/i18n/i18n.qml +++ b/examples/declarative/i18n/i18n.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 // // The QML runtime automatically loads a translation from the i18n subdirectory of the root diff --git a/examples/declarative/imageelements/borderimage/borderimage.qml b/examples/declarative/imageelements/borderimage/borderimage.qml index bbe113c..53e35f9 100644 --- a/examples/declarative/imageelements/borderimage/borderimage.qml +++ b/examples/declarative/imageelements/borderimage/borderimage.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "content" Rectangle { diff --git a/examples/declarative/imageelements/borderimage/content/MyBorderImage.qml b/examples/declarative/imageelements/borderimage/content/MyBorderImage.qml index b8f8a70..96495cb 100644 --- a/examples/declarative/imageelements/borderimage/content/MyBorderImage.qml +++ b/examples/declarative/imageelements/borderimage/content/MyBorderImage.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: container diff --git a/examples/declarative/imageelements/borderimage/content/ShadowRectangle.qml b/examples/declarative/imageelements/borderimage/content/ShadowRectangle.qml index 73eb040..839ecf1 100644 --- a/examples/declarative/imageelements/borderimage/content/ShadowRectangle.qml +++ b/examples/declarative/imageelements/borderimage/content/ShadowRectangle.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { property alias color : rectangle.color diff --git a/examples/declarative/imageelements/borderimage/shadows.qml b/examples/declarative/imageelements/borderimage/shadows.qml index 4cb7c65..d547f63 100644 --- a/examples/declarative/imageelements/borderimage/shadows.qml +++ b/examples/declarative/imageelements/borderimage/shadows.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "content" Rectangle { diff --git a/examples/declarative/imageelements/image/ImageCell.qml b/examples/declarative/imageelements/image/ImageCell.qml index f8973c8..e8a6c55 100644 --- a/examples/declarative/imageelements/image/ImageCell.qml +++ b/examples/declarative/imageelements/image/ImageCell.qml @@ -37,7 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { property alias mode: image.fillMode diff --git a/examples/declarative/imageelements/image/image.qml b/examples/declarative/imageelements/image/image.qml index 719d544..f00fc18 100644 --- a/examples/declarative/imageelements/image/image.qml +++ b/examples/declarative/imageelements/image/image.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 490 diff --git a/examples/declarative/keyinteraction/focus/Core/ContextMenu.qml b/examples/declarative/keyinteraction/focus/Core/ContextMenu.qml index be32386..79273ad 100644 --- a/examples/declarative/keyinteraction/focus/Core/ContextMenu.qml +++ b/examples/declarative/keyinteraction/focus/Core/ContextMenu.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 FocusScope { id: container diff --git a/examples/declarative/keyinteraction/focus/Core/GridMenu.qml b/examples/declarative/keyinteraction/focus/Core/GridMenu.qml index 8cdec3e..263adad 100644 --- a/examples/declarative/keyinteraction/focus/Core/GridMenu.qml +++ b/examples/declarative/keyinteraction/focus/Core/GridMenu.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 FocusScope { property alias interactive: gridView.interactive diff --git a/examples/declarative/keyinteraction/focus/Core/ListMenu.qml b/examples/declarative/keyinteraction/focus/Core/ListMenu.qml index ca2e206..cefc9a3 100644 --- a/examples/declarative/keyinteraction/focus/Core/ListMenu.qml +++ b/examples/declarative/keyinteraction/focus/Core/ListMenu.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 FocusScope { clip: true diff --git a/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml b/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml index 95164f8..7b63cd8 100644 --- a/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml +++ b/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: container diff --git a/examples/declarative/keyinteraction/focus/focus.qml b/examples/declarative/keyinteraction/focus/focus.qml index da2c30d..e2115d8 100644 --- a/examples/declarative/keyinteraction/focus/focus.qml +++ b/examples/declarative/keyinteraction/focus/focus.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "Core" Rectangle { diff --git a/examples/declarative/modelviews/abstractitemmodel/view.qml b/examples/declarative/modelviews/abstractitemmodel/view.qml index 2fb4885..d1ab302 100644 --- a/examples/declarative/modelviews/abstractitemmodel/view.qml +++ b/examples/declarative/modelviews/abstractitemmodel/view.qml @@ -37,7 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![0] ListView { diff --git a/examples/declarative/modelviews/gridview/gridview-example.qml b/examples/declarative/modelviews/gridview/gridview-example.qml index aea34ff..85fefda 100644 --- a/examples/declarative/modelviews/gridview/gridview-example.qml +++ b/examples/declarative/modelviews/gridview/gridview-example.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 300; height: 400 diff --git a/examples/declarative/modelviews/listview/content/PetsModel.qml b/examples/declarative/modelviews/listview/content/PetsModel.qml index beeed1a..5220763 100644 --- a/examples/declarative/modelviews/listview/content/PetsModel.qml +++ b/examples/declarative/modelviews/listview/content/PetsModel.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 ListModel { ListElement { diff --git a/examples/declarative/modelviews/listview/content/PressAndHoldButton.qml b/examples/declarative/modelviews/listview/content/PressAndHoldButton.qml index ad6230e..d6808a4 100644 --- a/examples/declarative/modelviews/listview/content/PressAndHoldButton.qml +++ b/examples/declarative/modelviews/listview/content/PressAndHoldButton.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Image { id: container diff --git a/examples/declarative/modelviews/listview/content/RecipesModel.qml b/examples/declarative/modelviews/listview/content/RecipesModel.qml index 812cf77..6056b90 100644 --- a/examples/declarative/modelviews/listview/content/RecipesModel.qml +++ b/examples/declarative/modelviews/listview/content/RecipesModel.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 ListModel { ListElement { diff --git a/examples/declarative/modelviews/listview/content/TextButton.qml b/examples/declarative/modelviews/listview/content/TextButton.qml index 0270fdc..f26d775 100644 --- a/examples/declarative/modelviews/listview/content/TextButton.qml +++ b/examples/declarative/modelviews/listview/content/TextButton.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: container diff --git a/examples/declarative/modelviews/listview/dynamiclist.qml b/examples/declarative/modelviews/listview/dynamiclist.qml index 27ef6e0..f25f0fa 100644 --- a/examples/declarative/modelviews/listview/dynamiclist.qml +++ b/examples/declarative/modelviews/listview/dynamiclist.qml @@ -37,7 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "content" // This example shows how items can be dynamically added to and removed from diff --git a/examples/declarative/modelviews/listview/expandingdelegates.qml b/examples/declarative/modelviews/listview/expandingdelegates.qml index 2dec769..bd3d3a9 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates.qml +++ b/examples/declarative/modelviews/listview/expandingdelegates.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "content" // This example illustrates expanding a list item to show a more detailed view. diff --git a/examples/declarative/modelviews/listview/highlight.qml b/examples/declarative/modelviews/listview/highlight.qml index 5646e9f..249c73b 100644 --- a/examples/declarative/modelviews/listview/highlight.qml +++ b/examples/declarative/modelviews/listview/highlight.qml @@ -42,7 +42,7 @@ // that uses a SpringAnimation to provide custom movement when the // highlight bar is moved between items. -import Qt 4.7 +import QtQuick 1.0 import "content" Rectangle { diff --git a/examples/declarative/modelviews/listview/highlightranges.qml b/examples/declarative/modelviews/listview/highlightranges.qml index 711463a..2716ee5 100644 --- a/examples/declarative/modelviews/listview/highlightranges.qml +++ b/examples/declarative/modelviews/listview/highlightranges.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "content" Rectangle { diff --git a/examples/declarative/modelviews/listview/sections.qml b/examples/declarative/modelviews/listview/sections.qml index a9ec538..3248899 100644 --- a/examples/declarative/modelviews/listview/sections.qml +++ b/examples/declarative/modelviews/listview/sections.qml @@ -41,7 +41,7 @@ // This example shows how a ListView can be separated into sections using // the ListView.section attached property. -import Qt 4.7 +import QtQuick 1.0 //! [0] Rectangle { diff --git a/examples/declarative/modelviews/objectlistmodel/view.qml b/examples/declarative/modelviews/objectlistmodel/view.qml index 7e7c68a..fd9d149 100644 --- a/examples/declarative/modelviews/objectlistmodel/view.qml +++ b/examples/declarative/modelviews/objectlistmodel/view.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![0] ListView { diff --git a/examples/declarative/modelviews/package/Delegate.qml b/examples/declarative/modelviews/package/Delegate.qml index a38727c..57048f4 100644 --- a/examples/declarative/modelviews/package/Delegate.qml +++ b/examples/declarative/modelviews/package/Delegate.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![0] Package { diff --git a/examples/declarative/modelviews/package/view.qml b/examples/declarative/modelviews/package/view.qml index 38cc047..cbe8f06 100644 --- a/examples/declarative/modelviews/package/view.qml +++ b/examples/declarative/modelviews/package/view.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "white" diff --git a/examples/declarative/modelviews/parallax/parallax.qml b/examples/declarative/modelviews/parallax/parallax.qml index 3d7d091..0d07522 100644 --- a/examples/declarative/modelviews/parallax/parallax.qml +++ b/examples/declarative/modelviews/parallax/parallax.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "../../toys/clocks/content" // for loading the Clock element import "qml" diff --git a/examples/declarative/modelviews/parallax/qml/ParallaxView.qml b/examples/declarative/modelviews/parallax/qml/ParallaxView.qml index 724d7e0..96e3db9 100644 --- a/examples/declarative/modelviews/parallax/qml/ParallaxView.qml +++ b/examples/declarative/modelviews/parallax/qml/ParallaxView.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: root diff --git a/examples/declarative/modelviews/parallax/qml/Smiley.qml b/examples/declarative/modelviews/parallax/qml/Smiley.qml index 959c85c..cac0a17 100644 --- a/examples/declarative/modelviews/parallax/qml/Smiley.qml +++ b/examples/declarative/modelviews/parallax/qml/Smiley.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 // This is taken from the declarative animation/basics/property-animation.qml // example diff --git a/examples/declarative/modelviews/pathview/pathview-example.qml b/examples/declarative/modelviews/pathview/pathview-example.qml index 8777291..baf7575 100644 --- a/examples/declarative/modelviews/pathview/pathview-example.qml +++ b/examples/declarative/modelviews/pathview/pathview-example.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400; height: 240 diff --git a/examples/declarative/modelviews/stringlistmodel/view.qml b/examples/declarative/modelviews/stringlistmodel/view.qml index 1751a7a..0a90ee6 100644 --- a/examples/declarative/modelviews/stringlistmodel/view.qml +++ b/examples/declarative/modelviews/stringlistmodel/view.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![0] ListView { diff --git a/examples/declarative/modelviews/visualitemmodel/visualitemmodel.qml b/examples/declarative/modelviews/visualitemmodel/visualitemmodel.qml index 344ce62..15f2f11 100644 --- a/examples/declarative/modelviews/visualitemmodel/visualitemmodel.qml +++ b/examples/declarative/modelviews/visualitemmodel/visualitemmodel.qml @@ -41,7 +41,7 @@ // This example demonstrates placing items in a view using // a VisualItemModel -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "lightgray" diff --git a/examples/declarative/modelviews/webview/alerts.qml b/examples/declarative/modelviews/webview/alerts.qml index 68f7a5c..4aa4a3b 100644 --- a/examples/declarative/modelviews/webview/alerts.qml +++ b/examples/declarative/modelviews/webview/alerts.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QtWebKit 1.0 WebView { diff --git a/examples/declarative/modelviews/webview/autosize.qml b/examples/declarative/modelviews/webview/autosize.qml index 91550c1..7e10403 100644 --- a/examples/declarative/modelviews/webview/autosize.qml +++ b/examples/declarative/modelviews/webview/autosize.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QtWebKit 1.0 // The WebView size is determined by the width, height, diff --git a/examples/declarative/modelviews/webview/content/Mapping/Map.qml b/examples/declarative/modelviews/webview/content/Mapping/Map.qml index ab549b5..9a86579 100644 --- a/examples/declarative/modelviews/webview/content/Mapping/Map.qml +++ b/examples/declarative/modelviews/webview/content/Mapping/Map.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QtWebKit 1.0 Item { diff --git a/examples/declarative/modelviews/webview/googlemaps.qml b/examples/declarative/modelviews/webview/googlemaps.qml index bc9a0e3..aed0ddd 100644 --- a/examples/declarative/modelviews/webview/googlemaps.qml +++ b/examples/declarative/modelviews/webview/googlemaps.qml @@ -45,7 +45,7 @@ // API, but users from QML don't need to understand the implementation in // order to create a Map. -import Qt 4.7 +import QtQuick 1.0 import QtWebKit 1.0 import "content/Mapping" diff --git a/examples/declarative/modelviews/webview/inlinehtml.qml b/examples/declarative/modelviews/webview/inlinehtml.qml index afc8418..afc1fa9 100644 --- a/examples/declarative/modelviews/webview/inlinehtml.qml +++ b/examples/declarative/modelviews/webview/inlinehtml.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QtWebKit 1.0 // Inline HTML with loose formatting can be diff --git a/examples/declarative/modelviews/webview/newwindows.qml b/examples/declarative/modelviews/webview/newwindows.qml index 5762321..52f7a0b 100644 --- a/examples/declarative/modelviews/webview/newwindows.qml +++ b/examples/declarative/modelviews/webview/newwindows.qml @@ -43,7 +43,7 @@ // Note that to open windows from JavaScript, you will need to // allow it on WebView with settings.javascriptCanOpenWindows: true -import Qt 4.7 +import QtQuick 1.0 import QtWebKit 1.0 Grid { diff --git a/examples/declarative/positioners/Button.qml b/examples/declarative/positioners/Button.qml index 4709aa6..32e5993 100644 --- a/examples/declarative/positioners/Button.qml +++ b/examples/declarative/positioners/Button.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: page diff --git a/examples/declarative/positioners/positioners.qml b/examples/declarative/positioners/positioners.qml index 26b9ccd..6ae265e 100644 --- a/examples/declarative/positioners/positioners.qml +++ b/examples/declarative/positioners/positioners.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: page diff --git a/examples/declarative/screenorientation/Core/Bubble.qml b/examples/declarative/screenorientation/Core/Bubble.qml index 58bd13c..dea1e19 100644 --- a/examples/declarative/screenorientation/Core/Bubble.qml +++ b/examples/declarative/screenorientation/Core/Bubble.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { property bool rising: false @@ -88,4 +88,4 @@ Rectangle { } } } -} \ No newline at end of file +} diff --git a/examples/declarative/screenorientation/Core/Button.qml b/examples/declarative/screenorientation/Core/Button.qml index 11117c9..bc73118 100644 --- a/examples/declarative/screenorientation/Core/Button.qml +++ b/examples/declarative/screenorientation/Core/Button.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: button signal clicked diff --git a/examples/declarative/screenorientation/screenorientation.qml b/examples/declarative/screenorientation/screenorientation.qml index 4387266..6c3f929 100644 --- a/examples/declarative/screenorientation/screenorientation.qml +++ b/examples/declarative/screenorientation/screenorientation.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "Core" import "Core/screenorientation.js" as ScreenOrientation diff --git a/examples/declarative/sqllocalstorage/hello.qml b/examples/declarative/sqllocalstorage/hello.qml index cbfc14a..5f9b9e0 100644 --- a/examples/declarative/sqllocalstorage/hello.qml +++ b/examples/declarative/sqllocalstorage/hello.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "white" diff --git a/examples/declarative/text/fonts/availableFonts.qml b/examples/declarative/text/fonts/availableFonts.qml index 312bc38..4966a41 100644 --- a/examples/declarative/text/fonts/availableFonts.qml +++ b/examples/declarative/text/fonts/availableFonts.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 480; height: 640; color: "steelblue" diff --git a/examples/declarative/text/fonts/banner.qml b/examples/declarative/text/fonts/banner.qml index 41bc997..d722468 100644 --- a/examples/declarative/text/fonts/banner.qml +++ b/examples/declarative/text/fonts/banner.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: screen diff --git a/examples/declarative/text/fonts/fonts.qml b/examples/declarative/text/fonts/fonts.qml index 743ee79..ae48f24 100644 --- a/examples/declarative/text/fonts/fonts.qml +++ b/examples/declarative/text/fonts/fonts.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { property string myText: "The quick brown fox jumps over the lazy dog." diff --git a/examples/declarative/text/fonts/hello.qml b/examples/declarative/text/fonts/hello.qml index 60bd919..3aaf0fe 100644 --- a/examples/declarative/text/fonts/hello.qml +++ b/examples/declarative/text/fonts/hello.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: screen diff --git a/examples/declarative/text/textselection/textselection.qml b/examples/declarative/text/textselection/textselection.qml index aa958e6..f343be5 100644 --- a/examples/declarative/text/textselection/textselection.qml +++ b/examples/declarative/text/textselection/textselection.qml @@ -38,7 +38,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: editor diff --git a/examples/declarative/threading/threadedlistmodel/timedisplay.qml b/examples/declarative/threading/threadedlistmodel/timedisplay.qml index b1cce05..01411f4 100644 --- a/examples/declarative/threading/threadedlistmodel/timedisplay.qml +++ b/examples/declarative/threading/threadedlistmodel/timedisplay.qml @@ -39,7 +39,7 @@ ****************************************************************************/ // ![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "white" diff --git a/examples/declarative/threading/workerscript/workerscript.qml b/examples/declarative/threading/workerscript/workerscript.qml index e224bf1..2b03233 100644 --- a/examples/declarative/threading/workerscript/workerscript.qml +++ b/examples/declarative/threading/workerscript/workerscript.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 480; height: 320 diff --git a/examples/declarative/touchinteraction/gestures/experimental-gestures.qml b/examples/declarative/touchinteraction/gestures/experimental-gestures.qml index 500a909..6a4cb3d 100644 --- a/examples/declarative/touchinteraction/gestures/experimental-gestures.qml +++ b/examples/declarative/touchinteraction/gestures/experimental-gestures.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import Qt.labs.gestures 1.0 // Only works on platforms with Touch support. diff --git a/examples/declarative/touchinteraction/mousearea/mousearea-example.qml b/examples/declarative/touchinteraction/mousearea/mousearea-example.qml index 492ffc6..8dacc05 100644 --- a/examples/declarative/touchinteraction/mousearea/mousearea-example.qml +++ b/examples/declarative/touchinteraction/mousearea/mousearea-example.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: box diff --git a/examples/declarative/toys/clocks/clocks.qml b/examples/declarative/toys/clocks/clocks.qml index 9002fac..3354f11 100644 --- a/examples/declarative/toys/clocks/clocks.qml +++ b/examples/declarative/toys/clocks/clocks.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "content" Rectangle { diff --git a/examples/declarative/toys/clocks/content/Clock.qml b/examples/declarative/toys/clocks/content/Clock.qml index 9c732f9..09e8393 100644 --- a/examples/declarative/toys/clocks/content/Clock.qml +++ b/examples/declarative/toys/clocks/content/Clock.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: clock diff --git a/examples/declarative/toys/clocks/content/QuitButton.qml b/examples/declarative/toys/clocks/content/QuitButton.qml index 9dfe9bd..cbbf916 100644 --- a/examples/declarative/toys/clocks/content/QuitButton.qml +++ b/examples/declarative/toys/clocks/content/QuitButton.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Image { source: "quit.png" scale: quitMouse.pressed ? 0.8 : 1.0 @@ -49,4 +49,4 @@ Image { anchors.margins: -10 onClicked: Qt.quit() } -} \ No newline at end of file +} diff --git a/examples/declarative/toys/corkboards/Day.qml b/examples/declarative/toys/corkboards/Day.qml index f406f7b..78591bb 100644 --- a/examples/declarative/toys/corkboards/Day.qml +++ b/examples/declarative/toys/corkboards/Day.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Component { Item { diff --git a/examples/declarative/toys/corkboards/corkboards.qml b/examples/declarative/toys/corkboards/corkboards.qml index 9b764c9..14bc5f0 100644 --- a/examples/declarative/toys/corkboards/corkboards.qml +++ b/examples/declarative/toys/corkboards/corkboards.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 800; height: 480 diff --git a/examples/declarative/toys/dynamicscene/dynamicscene.qml b/examples/declarative/toys/dynamicscene/dynamicscene.qml index ad18698..5f14e1d 100644 --- a/examples/declarative/toys/dynamicscene/dynamicscene.qml +++ b/examples/declarative/toys/dynamicscene/dynamicscene.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import Qt.labs.particles 1.0 import "qml" @@ -188,7 +188,7 @@ Item { font.pixelSize: 14 wrapMode: TextEdit.WordWrap - text: "import Qt 4.7\nImage {\n id: smile\n x: 360 * Math.random()\n y: 180 * Math.random() \n source: 'images/face-smile.png'\n NumberAnimation on opacity { \n to: 0; duration: 1500\n }\n Component.onCompleted: smile.destroy(1500);\n}" + text: "import QtQuick 1.0\nImage {\n id: smile\n x: 360 * Math.random()\n y: 180 * Math.random() \n source: 'images/face-smile.png'\n NumberAnimation on opacity { \n to: 0; duration: 1500\n }\n Component.onCompleted: smile.destroy(1500);\n}" } } diff --git a/examples/declarative/toys/dynamicscene/qml/Button.qml b/examples/declarative/toys/dynamicscene/qml/Button.qml index 7bb0ddf..8da799e 100644 --- a/examples/declarative/toys/dynamicscene/qml/Button.qml +++ b/examples/declarative/toys/dynamicscene/qml/Button.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: container diff --git a/examples/declarative/toys/dynamicscene/qml/GenericSceneItem.qml b/examples/declarative/toys/dynamicscene/qml/GenericSceneItem.qml index fa976c1..7391412 100644 --- a/examples/declarative/toys/dynamicscene/qml/GenericSceneItem.qml +++ b/examples/declarative/toys/dynamicscene/qml/GenericSceneItem.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Image { property bool created: false diff --git a/examples/declarative/toys/dynamicscene/qml/PaletteItem.qml b/examples/declarative/toys/dynamicscene/qml/PaletteItem.qml index 1c31f71..cf5395f 100644 --- a/examples/declarative/toys/dynamicscene/qml/PaletteItem.qml +++ b/examples/declarative/toys/dynamicscene/qml/PaletteItem.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "itemCreation.js" as Code Image { diff --git a/examples/declarative/toys/dynamicscene/qml/PerspectiveItem.qml b/examples/declarative/toys/dynamicscene/qml/PerspectiveItem.qml index 9b6f243..6536df3 100644 --- a/examples/declarative/toys/dynamicscene/qml/PerspectiveItem.qml +++ b/examples/declarative/toys/dynamicscene/qml/PerspectiveItem.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Image { id: rootItem diff --git a/examples/declarative/toys/dynamicscene/qml/Sun.qml b/examples/declarative/toys/dynamicscene/qml/Sun.qml index eb24285..5b28b39 100644 --- a/examples/declarative/toys/dynamicscene/qml/Sun.qml +++ b/examples/declarative/toys/dynamicscene/qml/Sun.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Image { id: sun diff --git a/examples/declarative/toys/tic-tac-toe/content/Button.qml b/examples/declarative/toys/tic-tac-toe/content/Button.qml index 2d30a03..403d587 100644 --- a/examples/declarative/toys/tic-tac-toe/content/Button.qml +++ b/examples/declarative/toys/tic-tac-toe/content/Button.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: container diff --git a/examples/declarative/toys/tic-tac-toe/content/TicTac.qml b/examples/declarative/toys/tic-tac-toe/content/TicTac.qml index 0ca5350..7e50736 100644 --- a/examples/declarative/toys/tic-tac-toe/content/TicTac.qml +++ b/examples/declarative/toys/tic-tac-toe/content/TicTac.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { signal clicked diff --git a/examples/declarative/toys/tic-tac-toe/tic-tac-toe.qml b/examples/declarative/toys/tic-tac-toe/tic-tac-toe.qml index 12b0fda..4c1ad51 100644 --- a/examples/declarative/toys/tic-tac-toe/tic-tac-toe.qml +++ b/examples/declarative/toys/tic-tac-toe/tic-tac-toe.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "content" import "content/tic-tac-toe.js" as Logic diff --git a/examples/declarative/toys/tvtennis/tvtennis.qml b/examples/declarative/toys/tvtennis/tvtennis.qml index 53c95c0..805666d 100644 --- a/examples/declarative/toys/tvtennis/tvtennis.qml +++ b/examples/declarative/toys/tvtennis/tvtennis.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: page diff --git a/examples/declarative/tutorials/extending/chapter1-basics/app.qml b/examples/declarative/tutorials/extending/chapter1-basics/app.qml index 826bea9..85bd779 100644 --- a/examples/declarative/tutorials/extending/chapter1-basics/app.qml +++ b/examples/declarative/tutorials/extending/chapter1-basics/app.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] import Charts 1.0 -import Qt 4.7 +import QtQuick 1.0 Item { width: 300; height: 200 diff --git a/examples/declarative/tutorials/extending/chapter2-methods/app.qml b/examples/declarative/tutorials/extending/chapter2-methods/app.qml index 50051b6..185b830 100644 --- a/examples/declarative/tutorials/extending/chapter2-methods/app.qml +++ b/examples/declarative/tutorials/extending/chapter2-methods/app.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] import Charts 1.0 -import Qt 4.7 +import QtQuick 1.0 Item { width: 300; height: 200 diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/app.qml b/examples/declarative/tutorials/extending/chapter3-bindings/app.qml index e183b27..a4822d3 100644 --- a/examples/declarative/tutorials/extending/chapter3-bindings/app.qml +++ b/examples/declarative/tutorials/extending/chapter3-bindings/app.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] import Charts 1.0 -import Qt 4.7 +import QtQuick 1.0 Item { width: 300; height: 200 diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml index 6e5d3b4..80af476 100644 --- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml +++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] import Charts 1.0 -import Qt 4.7 +import QtQuick 1.0 Item { width: 300; height: 200 diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/app.qml b/examples/declarative/tutorials/extending/chapter5-listproperties/app.qml index 483332c..58b099f 100644 --- a/examples/declarative/tutorials/extending/chapter5-listproperties/app.qml +++ b/examples/declarative/tutorials/extending/chapter5-listproperties/app.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] import Charts 1.0 -import Qt 4.7 +import QtQuick 1.0 Item { width: 300; height: 200 diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/app.qml b/examples/declarative/tutorials/extending/chapter6-plugins/app.qml index 097da7e..639da94 100644 --- a/examples/declarative/tutorials/extending/chapter6-plugins/app.qml +++ b/examples/declarative/tutorials/extending/chapter6-plugins/app.qml @@ -37,7 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { width: 300; height: 200 diff --git a/examples/declarative/tutorials/helloworld/Cell.qml b/examples/declarative/tutorials/helloworld/Cell.qml index e64aa7e..76055ab 100644 --- a/examples/declarative/tutorials/helloworld/Cell.qml +++ b/examples/declarative/tutorials/helloworld/Cell.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 //![1] Item { diff --git a/examples/declarative/tutorials/helloworld/tutorial1.qml b/examples/declarative/tutorials/helloworld/tutorial1.qml index e6c4122..83b57b8 100644 --- a/examples/declarative/tutorials/helloworld/tutorial1.qml +++ b/examples/declarative/tutorials/helloworld/tutorial1.qml @@ -40,7 +40,7 @@ //![0] //![3] -import Qt 4.7 +import QtQuick 1.0 //![3] //![1] diff --git a/examples/declarative/tutorials/helloworld/tutorial2.qml b/examples/declarative/tutorials/helloworld/tutorial2.qml index 1ffde57..1bfab92 100644 --- a/examples/declarative/tutorials/helloworld/tutorial2.qml +++ b/examples/declarative/tutorials/helloworld/tutorial2.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: page diff --git a/examples/declarative/tutorials/helloworld/tutorial3.qml b/examples/declarative/tutorials/helloworld/tutorial3.qml index af2d5d2..cc06865 100644 --- a/examples/declarative/tutorials/helloworld/tutorial3.qml +++ b/examples/declarative/tutorials/helloworld/tutorial3.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: page diff --git a/examples/declarative/tutorials/samegame/samegame1/Block.qml b/examples/declarative/tutorials/samegame/samegame1/Block.qml index db1245d..b4c4399 100644 --- a/examples/declarative/tutorials/samegame/samegame1/Block.qml +++ b/examples/declarative/tutorials/samegame/samegame1/Block.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { id: block diff --git a/examples/declarative/tutorials/samegame/samegame1/Button.qml b/examples/declarative/tutorials/samegame/samegame1/Button.qml index 72b18bc..a3df028 100644 --- a/examples/declarative/tutorials/samegame/samegame1/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame1/Button.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: container diff --git a/examples/declarative/tutorials/samegame/samegame1/samegame.qml b/examples/declarative/tutorials/samegame/samegame1/samegame.qml index 01396fa..5cc13fd 100644 --- a/examples/declarative/tutorials/samegame/samegame1/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame1/samegame.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: screen diff --git a/examples/declarative/tutorials/samegame/samegame2/Block.qml b/examples/declarative/tutorials/samegame/samegame2/Block.qml index c271cf7..804c30f 100644 --- a/examples/declarative/tutorials/samegame/samegame2/Block.qml +++ b/examples/declarative/tutorials/samegame/samegame2/Block.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: block diff --git a/examples/declarative/tutorials/samegame/samegame2/Button.qml b/examples/declarative/tutorials/samegame/samegame2/Button.qml index 3bd3099..cbf1b54 100644 --- a/examples/declarative/tutorials/samegame/samegame2/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame2/Button.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: container diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame.qml b/examples/declarative/tutorials/samegame/samegame2/samegame.qml index ae1916e..11f6229 100644 --- a/examples/declarative/tutorials/samegame/samegame2/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame2/samegame.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![2] import "samegame.js" as SameGame //![2] diff --git a/examples/declarative/tutorials/samegame/samegame3/Block.qml b/examples/declarative/tutorials/samegame/samegame3/Block.qml index 673007e..784a6f4 100644 --- a/examples/declarative/tutorials/samegame/samegame3/Block.qml +++ b/examples/declarative/tutorials/samegame/samegame3/Block.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { id: block diff --git a/examples/declarative/tutorials/samegame/samegame3/Button.qml b/examples/declarative/tutorials/samegame/samegame3/Button.qml index 3bd3099..cbf1b54 100644 --- a/examples/declarative/tutorials/samegame/samegame3/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame3/Button.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: container diff --git a/examples/declarative/tutorials/samegame/samegame3/Dialog.qml b/examples/declarative/tutorials/samegame/samegame3/Dialog.qml index ed17e5f..8554d86 100644 --- a/examples/declarative/tutorials/samegame/samegame3/Dialog.qml +++ b/examples/declarative/tutorials/samegame/samegame3/Dialog.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: container diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.qml b/examples/declarative/tutorials/samegame/samegame3/samegame.qml index 2c49adc..972b778 100644 --- a/examples/declarative/tutorials/samegame/samegame3/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame3/samegame.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 import "samegame.js" as SameGame Rectangle { diff --git a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml index 8e3ca96..326b1b8 100644 --- a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml +++ b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import Qt.labs.particles 1.0 Item { diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Button.qml b/examples/declarative/tutorials/samegame/samegame4/content/Button.qml index 3bd3099..cbf1b54 100644 --- a/examples/declarative/tutorials/samegame/samegame4/content/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame4/content/Button.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: container diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml index 5c81929..c390202 100644 --- a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml +++ b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 //![0] Rectangle { diff --git a/examples/declarative/tutorials/samegame/samegame4/samegame.qml b/examples/declarative/tutorials/samegame/samegame4/samegame.qml index 4fec71b..e830635 100644 --- a/examples/declarative/tutorials/samegame/samegame4/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame4/samegame.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "content" import "content/samegame.js" as SameGame diff --git a/examples/declarative/ui-components/dialcontrol/content/Dial.qml b/examples/declarative/ui-components/dialcontrol/content/Dial.qml index ed1b04d..2f1d27a 100644 --- a/examples/declarative/ui-components/dialcontrol/content/Dial.qml +++ b/examples/declarative/ui-components/dialcontrol/content/Dial.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: root diff --git a/examples/declarative/ui-components/dialcontrol/content/QuitButton.qml b/examples/declarative/ui-components/dialcontrol/content/QuitButton.qml index 9dfe9bd..cbbf916 100644 --- a/examples/declarative/ui-components/dialcontrol/content/QuitButton.qml +++ b/examples/declarative/ui-components/dialcontrol/content/QuitButton.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Image { source: "quit.png" scale: quitMouse.pressed ? 0.8 : 1.0 @@ -49,4 +49,4 @@ Image { anchors.margins: -10 onClicked: Qt.quit() } -} \ No newline at end of file +} diff --git a/examples/declarative/ui-components/dialcontrol/dialcontrol.qml b/examples/declarative/ui-components/dialcontrol/dialcontrol.qml index ed8c7d6..c66dcdd 100644 --- a/examples/declarative/ui-components/dialcontrol/dialcontrol.qml +++ b/examples/declarative/ui-components/dialcontrol/dialcontrol.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //! [imports] -import Qt 4.7 +import QtQuick 1.0 import "content" //! [imports] diff --git a/examples/declarative/ui-components/flipable/content/Card.qml b/examples/declarative/ui-components/flipable/content/Card.qml index d22fa7d..32c4ed1 100644 --- a/examples/declarative/ui-components/flipable/content/Card.qml +++ b/examples/declarative/ui-components/flipable/content/Card.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Flipable { id: container diff --git a/examples/declarative/ui-components/flipable/flipable.qml b/examples/declarative/ui-components/flipable/flipable.qml index 0f775e5..51867f9 100644 --- a/examples/declarative/ui-components/flipable/flipable.qml +++ b/examples/declarative/ui-components/flipable/flipable.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "content" Rectangle { diff --git a/examples/declarative/ui-components/progressbar/content/ProgressBar.qml b/examples/declarative/ui-components/progressbar/content/ProgressBar.qml index f830f95..e92342a 100644 --- a/examples/declarative/ui-components/progressbar/content/ProgressBar.qml +++ b/examples/declarative/ui-components/progressbar/content/ProgressBar.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: progressbar diff --git a/examples/declarative/ui-components/progressbar/main.qml b/examples/declarative/ui-components/progressbar/main.qml index c92e586..a805a7e 100644 --- a/examples/declarative/ui-components/progressbar/main.qml +++ b/examples/declarative/ui-components/progressbar/main.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "content" Rectangle { diff --git a/examples/declarative/ui-components/scrollbar/ScrollBar.qml b/examples/declarative/ui-components/scrollbar/ScrollBar.qml index ee8e9fa..faa501a 100644 --- a/examples/declarative/ui-components/scrollbar/ScrollBar.qml +++ b/examples/declarative/ui-components/scrollbar/ScrollBar.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: scrollBar diff --git a/examples/declarative/ui-components/scrollbar/main.qml b/examples/declarative/ui-components/scrollbar/main.qml index 930c3b8..b5c1a8f 100644 --- a/examples/declarative/ui-components/scrollbar/main.qml +++ b/examples/declarative/ui-components/scrollbar/main.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 640 diff --git a/examples/declarative/ui-components/searchbox/SearchBox.qml b/examples/declarative/ui-components/searchbox/SearchBox.qml index 60fa799..685552a 100644 --- a/examples/declarative/ui-components/searchbox/SearchBox.qml +++ b/examples/declarative/ui-components/searchbox/SearchBox.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 FocusScope { id: focusScope diff --git a/examples/declarative/ui-components/searchbox/main.qml b/examples/declarative/ui-components/searchbox/main.qml index 513c298..09b1829 100644 --- a/examples/declarative/ui-components/searchbox/main.qml +++ b/examples/declarative/ui-components/searchbox/main.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: page diff --git a/examples/declarative/ui-components/slideswitch/content/Switch.qml b/examples/declarative/ui-components/slideswitch/content/Switch.qml index 9632fd6..06d7a2b 100644 --- a/examples/declarative/ui-components/slideswitch/content/Switch.qml +++ b/examples/declarative/ui-components/slideswitch/content/Switch.qml @@ -39,7 +39,7 @@ ****************************************************************************/ //![0] -import Qt 4.7 +import QtQuick 1.0 Item { id: toggleswitch diff --git a/examples/declarative/ui-components/slideswitch/slideswitch.qml b/examples/declarative/ui-components/slideswitch/slideswitch.qml index a0a0eb2..0472f9f 100644 --- a/examples/declarative/ui-components/slideswitch/slideswitch.qml +++ b/examples/declarative/ui-components/slideswitch/slideswitch.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "content" Rectangle { diff --git a/examples/declarative/ui-components/spinner/content/Spinner.qml b/examples/declarative/ui-components/spinner/content/Spinner.qml index 910efb9..853c787 100644 --- a/examples/declarative/ui-components/spinner/content/Spinner.qml +++ b/examples/declarative/ui-components/spinner/content/Spinner.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Image { property alias model: view.model diff --git a/examples/declarative/ui-components/spinner/main.qml b/examples/declarative/ui-components/spinner/main.qml index a196e72..416950f 100644 --- a/examples/declarative/ui-components/spinner/main.qml +++ b/examples/declarative/ui-components/spinner/main.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "content" Rectangle { diff --git a/examples/declarative/ui-components/tabwidget/TabWidget.qml b/examples/declarative/ui-components/tabwidget/TabWidget.qml index 30eba68..f066fd2 100644 --- a/examples/declarative/ui-components/tabwidget/TabWidget.qml +++ b/examples/declarative/ui-components/tabwidget/TabWidget.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { id: tabWidget diff --git a/examples/declarative/ui-components/tabwidget/main.qml b/examples/declarative/ui-components/tabwidget/main.qml index b9ca2a1..842ef1a 100644 --- a/examples/declarative/ui-components/tabwidget/main.qml +++ b/examples/declarative/ui-components/tabwidget/main.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 TabWidget { id: tabs diff --git a/examples/declarative/xml/xmlhttprequest/xmlhttprequest-example.qml b/examples/declarative/xml/xmlhttprequest/xmlhttprequest-example.qml index f77e1de..78f93b5 100644 --- a/examples/declarative/xml/xmlhttprequest/xmlhttprequest-example.qml +++ b/examples/declarative/xml/xmlhttprequest/xmlhttprequest-example.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 350; height: 400 diff --git a/examples/tutorials/gettingStarted/gsQml/core/button.qml b/examples/tutorials/gettingStarted/gsQml/core/button.qml index dd5dcad..0b42bd1 100644 --- a/examples/tutorials/gettingStarted/gsQml/core/button.qml +++ b/examples/tutorials/gettingStarted/gsQml/core/button.qml @@ -39,7 +39,7 @@ ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { //identifier of the item @@ -105,4 +105,4 @@ Rectangle { //Animate the scale property change Behavior on scale { NumberAnimation{ duration: 55 } } -} \ No newline at end of file +} diff --git a/examples/tutorials/gettingStarted/gsQml/core/editMenu.qml b/examples/tutorials/gettingStarted/gsQml/core/editMenu.qml index 7f47d9f..5cf8472 100644 --- a/examples/tutorials/gettingStarted/gsQml/core/editMenu.qml +++ b/examples/tutorials/gettingStarted/gsQml/core/editMenu.qml @@ -39,7 +39,7 @@ ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: editMenu @@ -102,4 +102,4 @@ Rectangle { } } } -} \ No newline at end of file +} diff --git a/examples/tutorials/gettingStarted/gsQml/core/fileDialog.qml b/examples/tutorials/gettingStarted/gsQml/core/fileDialog.qml index 425f717..7004b63 100644 --- a/examples/tutorials/gettingStarted/gsQml/core/fileDialog.qml +++ b/examples/tutorials/gettingStarted/gsQml/core/fileDialog.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id:dialog @@ -160,4 +160,4 @@ Rectangle { GradientStop { position: 1.0; color: "#03333333" } } } -} \ No newline at end of file +} diff --git a/examples/tutorials/gettingStarted/gsQml/core/fileMenu.qml b/examples/tutorials/gettingStarted/gsQml/core/fileMenu.qml index afe48c7..517c1811 100644 --- a/examples/tutorials/gettingStarted/gsQml/core/fileMenu.qml +++ b/examples/tutorials/gettingStarted/gsQml/core/fileMenu.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: fileMenu diff --git a/examples/tutorials/gettingStarted/gsQml/core/menuBar.qml b/examples/tutorials/gettingStarted/gsQml/core/menuBar.qml index 0695772..bcab2fb 100644 --- a/examples/tutorials/gettingStarted/gsQml/core/menuBar.qml +++ b/examples/tutorials/gettingStarted/gsQml/core/menuBar.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: menuBar diff --git a/examples/tutorials/gettingStarted/gsQml/core/textArea.qml b/examples/tutorials/gettingStarted/gsQml/core/textArea.qml index 6d3d214..2b327fc 100644 --- a/examples/tutorials/gettingStarted/gsQml/core/textArea.qml +++ b/examples/tutorials/gettingStarted/gsQml/core/textArea.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id:textArea @@ -84,4 +84,4 @@ Rectangle { selectByMouse: true } } -} \ No newline at end of file +} diff --git a/examples/tutorials/gettingStarted/gsQml/texteditor.qml b/examples/tutorials/gettingStarted/gsQml/texteditor.qml index 5a75e0b..b50dc25 100644 --- a/examples/tutorials/gettingStarted/gsQml/texteditor.qml +++ b/examples/tutorials/gettingStarted/gsQml/texteditor.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "core" Rectangle { diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 230169d..3c2f0a8 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -101,7 +101,7 @@ QT_BEGIN_NAMESPACE The following example moves the Y axis of the \l Rectangle elements while still allowing the \l Row element to lay the items out as if they had not been transformed: \qml - import Qt 4.7 + import QtQuick 1.0 Row { Rectangle { diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 3ac095c..6f5608a 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -1422,7 +1422,7 @@ void QDeclarativeTextEditPrivate::updateDefaultTextOption() Only relevant on platforms, which provide virtual keyboards. \code - import Qt 4.7 + import QtQuick 1.0 TextEdit { id: textEdit text: "Hello world!" @@ -1473,7 +1473,7 @@ void QDeclarativeTextEdit::openSoftwareInputPanel() Only relevant on platforms, which provide virtual keyboards. \code - import Qt 4.7 + import QtQuick 1.0 TextEdit { id: textEdit text: "Hello world!" diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 5604b82..4817999 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -651,7 +651,7 @@ void QDeclarativeTextInput::setAutoScroll(bool b) input of integers between 11 and 31 into the text input: \code - import Qt 4.7 + import QtQuick 1.0 TextInput{ validator: IntValidator{bottom: 11; top: 31;} focus: true @@ -1334,7 +1334,7 @@ void QDeclarativeTextInput::moveCursorSelection(int position) Only relevant on platforms, which provide virtual keyboards. \qml - import Qt 4.7 + import QtQuick 1.0 TextInput { id: textInput text: "Hello world!" @@ -1385,7 +1385,7 @@ void QDeclarativeTextInput::openSoftwareInputPanel() Only relevant on platforms, which provide virtual keyboards. \qml - import Qt 4.7 + import QtQuick 1.0 TextInput { id: textInput text: "Hello world!" diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index 01cd652..bbd6e11 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -142,7 +142,7 @@ public: The example below places three colored rectangles in a ListView. \code - import Qt 4.7 + import QtQuick 1.0 Rectangle { VisualItemModel { diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index 8c5fd3a..90d38b3 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -1286,7 +1286,7 @@ bool QDeclarativeCompiler::buildSubObject(Object *obj, const BindingContext &ctx int QDeclarativeCompiler::componentTypeRef() { - QDeclarativeType *t = QDeclarativeMetaType::qmlType("Qt/Component",4,7); + QDeclarativeType *t = QDeclarativeMetaType::qmlType("QtQuick/Component",1,0); for (int ii = output->types.count() - 1; ii >= 0; --ii) { if (output->types.at(ii).type == t) return ii; diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index 7f58166..b532b0c 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -78,7 +78,7 @@ class QByteArray; For example, if there is a \c main.qml file like this: \qml - import Qt 4.7 + import QtQuick 1.0 Item { width: 200 diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp index de45a95..59d5cfa 100644 --- a/src/declarative/qml/qdeclarativecontext.cpp +++ b/src/declarative/qml/qdeclarativecontext.cpp @@ -85,7 +85,7 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate() context->setContextProperty("myModel", &modelData); QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7\nListView { model: myModel }", QUrl()); + component.setData("import QtQuick 1.0\nListView { model: myModel }", QUrl()); component.create(context); \endcode @@ -112,7 +112,7 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate() context->setContextObject(&myDataSet); QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7\nListView { model: myModel }", QUrl()); + component.setData("import QtQuick 1.0\nListView { model: myModel }", QUrl()); component.create(context); \endcode diff --git a/src/declarative/qml/qdeclarativedom.cpp b/src/declarative/qml/qdeclarativedom.cpp index 1a9b501..fa79425 100644 --- a/src/declarative/qml/qdeclarativedom.cpp +++ b/src/declarative/qml/qdeclarativedom.cpp @@ -896,7 +896,7 @@ QByteArray QDeclarativeDomObject::customTypeData() const */ bool QDeclarativeDomObject::isComponent() const { - return (d->object && d->object->typeName == "Qt/Component"); + return (d->object && (d->object->typeName == "Qt/Component" || d->object->typeName == "QtQuick/Component")); } /*! diff --git a/src/declarative/qml/qdeclarativeexpression.cpp b/src/declarative/qml/qdeclarativeexpression.cpp index 6fc4df0..77a1ba4 100644 --- a/src/declarative/qml/qdeclarativeexpression.cpp +++ b/src/declarative/qml/qdeclarativeexpression.cpp @@ -202,7 +202,7 @@ QScriptValue QDeclarativeExpressionPrivate::evalInObjectScope(QDeclarativeContex For example, given a file \c main.qml like this: \qml - import Qt 4.7 + import QtQuick 1.0 Item { width: 200; height: 200 diff --git a/src/declarative/util/qdeclarativefontloader.cpp b/src/declarative/util/qdeclarativefontloader.cpp index 6879494..3e4a81a 100644 --- a/src/declarative/util/qdeclarativefontloader.cpp +++ b/src/declarative/util/qdeclarativefontloader.cpp @@ -157,7 +157,7 @@ QHash QDeclarativeFontLoaderPrivate::fonts; For example: \qml - import Qt 4.7 + import QtQuick 1.0 Column { FontLoader { id: fixedFont; name: "Courier" } diff --git a/src/declarative/util/qdeclarativetimer.cpp b/src/declarative/util/qdeclarativetimer.cpp index 56320e6..c240f22 100644 --- a/src/declarative/util/qdeclarativetimer.cpp +++ b/src/declarative/util/qdeclarativetimer.cpp @@ -82,7 +82,7 @@ public: object to access the current time. \qml - import Qt 4.7 + import QtQuick 1.0 Item { Timer { diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp index f0ed80b..24edc89 100644 --- a/src/declarative/util/qdeclarativexmllistmodel.cpp +++ b/src/declarative/util/qdeclarativexmllistmodel.cpp @@ -531,7 +531,7 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty(animationComponent.create()); @@ -685,7 +685,7 @@ void tst_qdeclarativeanimations::easingProperties() { QDeclarativeEngine engine; - QString componentStr = "import Qt 4.7\nPropertyAnimation { easing.type: \"OutBounce\"; easing.amplitude: 5.0 }"; + QString componentStr = "import QtQuick 1.0\nPropertyAnimation { easing.type: \"OutBounce\"; easing.amplitude: 5.0 }"; QDeclarativeComponent animationComponent(&engine); animationComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativePropertyAnimation *animObject = qobject_cast(animationComponent.create()); @@ -697,7 +697,7 @@ void tst_qdeclarativeanimations::easingProperties() { QDeclarativeEngine engine; - QString componentStr = "import Qt 4.7\nPropertyAnimation { easing.type: \"OutElastic\"; easing.amplitude: 5.0; easing.period: 3.0}"; + QString componentStr = "import QtQuick 1.0\nPropertyAnimation { easing.type: \"OutElastic\"; easing.amplitude: 5.0; easing.period: 3.0}"; QDeclarativeComponent animationComponent(&engine); animationComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativePropertyAnimation *animObject = qobject_cast(animationComponent.create()); @@ -710,7 +710,7 @@ void tst_qdeclarativeanimations::easingProperties() { QDeclarativeEngine engine; - QString componentStr = "import Qt 4.7\nPropertyAnimation { easing.type: \"InOutBack\"; easing.overshoot: 2 }"; + QString componentStr = "import QtQuick 1.0\nPropertyAnimation { easing.type: \"InOutBack\"; easing.overshoot: 2 }"; QDeclarativeComponent animationComponent(&engine); animationComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativePropertyAnimation *animObject = qobject_cast(animationComponent.create()); diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/binding.qml b/tests/auto/declarative/qdeclarativebehaviors/data/binding.qml index 62e6be5..a452447 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/binding.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/binding.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400 height: 400 diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/color.qml b/tests/auto/declarative/qdeclarativebehaviors/data/color.qml index e075bd0..c4b783a 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/color.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/color.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400 height: 400 diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/cpptrigger.qml b/tests/auto/declarative/qdeclarativebehaviors/data/cpptrigger.qml index c766f42..88ddfaa 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/cpptrigger.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/cpptrigger.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400 height: 400 diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/disabled.qml b/tests/auto/declarative/qdeclarativebehaviors/data/disabled.qml index e1f4699..f6cfa5e 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/disabled.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/disabled.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400 height: 400 diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/dontStart.qml b/tests/auto/declarative/qdeclarativebehaviors/data/dontStart.qml index c0f4eac..e318dd2 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/dontStart.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/dontStart.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: wrapper diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/empty.qml b/tests/auto/declarative/qdeclarativebehaviors/data/empty.qml index b58e332..6c78a84 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/empty.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/empty.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400 height: 400 diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/explicit.qml b/tests/auto/declarative/qdeclarativebehaviors/data/explicit.qml index 0b5d00b..3baa1ac 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/explicit.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/explicit.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400 height: 400 diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty.qml b/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty.qml index 6eb0729..ddb5bbd 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400 height: 400 diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty2.qml b/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty2.qml index 42b80a5..c0b71cd 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty2.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/groupProperty2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400 height: 400 diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/groupedPropertyCrash.qml b/tests/auto/declarative/qdeclarativebehaviors/data/groupedPropertyCrash.qml index c052366..8aa590b 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/groupedPropertyCrash.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/groupedPropertyCrash.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200 diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/loop.qml b/tests/auto/declarative/qdeclarativebehaviors/data/loop.qml index 9e328d6..76379c0 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/loop.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/loop.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400 height: 400 diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/nonSelecting2.qml b/tests/auto/declarative/qdeclarativebehaviors/data/nonSelecting2.qml index 5857c4d..c5c78d1 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/nonSelecting2.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/nonSelecting2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400 height: 400 diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/parent.qml b/tests/auto/declarative/qdeclarativebehaviors/data/parent.qml index e3fd77d..d19da29 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/parent.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/parent.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400 height: 400 diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/qtbug12295.qml b/tests/auto/declarative/qdeclarativebehaviors/data/qtbug12295.qml index d41add3..03b5421 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/qtbug12295.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/qtbug12295.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200 diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/reassignedAnimation.qml b/tests/auto/declarative/qdeclarativebehaviors/data/reassignedAnimation.qml index 4528cce..9fca5c3 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/reassignedAnimation.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/reassignedAnimation.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400 height: 400 diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/runningTrue.qml b/tests/auto/declarative/qdeclarativebehaviors/data/runningTrue.qml index d439875..25cdf10 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/runningTrue.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/runningTrue.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: root diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/scripttrigger.qml b/tests/auto/declarative/qdeclarativebehaviors/data/scripttrigger.qml index f2f6352..c05cdaa 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/scripttrigger.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/scripttrigger.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400 height: 400 diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/simple.qml b/tests/auto/declarative/qdeclarativebehaviors/data/simple.qml index de27f69..6ba0118 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/simple.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/simple.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400 height: 400 diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/startup.qml b/tests/auto/declarative/qdeclarativebehaviors/data/startup.qml index f3ff620..fca416c 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/startup.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/startup.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400 diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/startup2.qml b/tests/auto/declarative/qdeclarativebehaviors/data/startup2.qml index 1911cc4..eb62761 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/data/startup2.qml +++ b/tests/auto/declarative/qdeclarativebehaviors/data/startup2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 800; diff --git a/tests/auto/declarative/qdeclarativebinding/data/test-binding.qml b/tests/auto/declarative/qdeclarativebinding/data/test-binding.qml index 9c619e6..9449736 100644 --- a/tests/auto/declarative/qdeclarativebinding/data/test-binding.qml +++ b/tests/auto/declarative/qdeclarativebinding/data/test-binding.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: screen diff --git a/tests/auto/declarative/qdeclarativebinding/data/test-binding2.qml b/tests/auto/declarative/qdeclarativebinding/data/test-binding2.qml index e0f1811..3e99e2b 100644 --- a/tests/auto/declarative/qdeclarativebinding/data/test-binding2.qml +++ b/tests/auto/declarative/qdeclarativebinding/data/test-binding2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: screen diff --git a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp index c77d395..2f00f60 100644 --- a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp +++ b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp @@ -94,7 +94,7 @@ tst_qdeclarativeborderimage::tst_qdeclarativeborderimage() void tst_qdeclarativeborderimage::noSource() { - QString componentStr = "import Qt 4.7\nBorderImage { source: \"\" }"; + QString componentStr = "import QtQuick 1.0\nBorderImage { source: \"\" }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeBorderImage *obj = qobject_cast(component.create()); @@ -138,7 +138,7 @@ void tst_qdeclarativeborderimage::imageSource() if (!error.isEmpty()) QTest::ignoreMessage(QtWarningMsg, error.toUtf8()); - QString componentStr = "import Qt 4.7\nBorderImage { source: \"" + source + "\" }"; + QString componentStr = "import QtQuick 1.0\nBorderImage { source: \"" + source + "\" }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeBorderImage *obj = qobject_cast(component.create()); @@ -165,7 +165,7 @@ void tst_qdeclarativeborderimage::imageSource() void tst_qdeclarativeborderimage::clearSource() { - QString componentStr = "import Qt 4.7\nBorderImage { source: srcImage }"; + QString componentStr = "import QtQuick 1.0\nBorderImage { source: srcImage }"; QDeclarativeContext *ctxt = engine.rootContext(); ctxt->setContextProperty("srcImage", QUrl::fromLocalFile(SRCDIR "/data/colors.png")); QDeclarativeComponent component(&engine); @@ -185,7 +185,7 @@ void tst_qdeclarativeborderimage::clearSource() void tst_qdeclarativeborderimage::resized() { - QString componentStr = "import Qt 4.7\nBorderImage { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/colors.png").toString() + "\"; width: 300; height: 300 }"; + QString componentStr = "import QtQuick 1.0\nBorderImage { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/colors.png").toString() + "\"; width: 300; height: 300 }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeBorderImage *obj = qobject_cast(component.create()); @@ -200,7 +200,7 @@ void tst_qdeclarativeborderimage::resized() void tst_qdeclarativeborderimage::smooth() { - QString componentStr = "import Qt 4.7\nBorderImage { source: \"" SRCDIR "/data/colors.png\"; smooth: true; width: 300; height: 300 }"; + QString componentStr = "import QtQuick 1.0\nBorderImage { source: \"" SRCDIR "/data/colors.png\"; smooth: true; width: 300; height: 300 }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeBorderImage *obj = qobject_cast(component.create()); @@ -217,7 +217,7 @@ void tst_qdeclarativeborderimage::smooth() void tst_qdeclarativeborderimage::tileModes() { { - QString componentStr = "import Qt 4.7\nBorderImage { source: \"" SRCDIR "/data/colors.png\"; width: 100; height: 300; horizontalTileMode: BorderImage.Repeat; verticalTileMode: BorderImage.Repeat }"; + QString componentStr = "import QtQuick 1.0\nBorderImage { source: \"" SRCDIR "/data/colors.png\"; width: 100; height: 300; horizontalTileMode: BorderImage.Repeat; verticalTileMode: BorderImage.Repeat }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeBorderImage *obj = qobject_cast(component.create()); @@ -230,7 +230,7 @@ void tst_qdeclarativeborderimage::tileModes() delete obj; } { - QString componentStr = "import Qt 4.7\nBorderImage { source: \"" SRCDIR "/data/colors.png\"; width: 300; height: 150; horizontalTileMode: BorderImage.Round; verticalTileMode: BorderImage.Round }"; + QString componentStr = "import QtQuick 1.0\nBorderImage { source: \"" SRCDIR "/data/colors.png\"; width: 300; height: 150; horizontalTileMode: BorderImage.Round; verticalTileMode: BorderImage.Round }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeBorderImage *obj = qobject_cast(component.create()); @@ -257,7 +257,7 @@ void tst_qdeclarativeborderimage::sciSource() server->serveDirectory(SRCDIR "/data"); } - QString componentStr = "import Qt 4.7\nBorderImage { source: \"" + source + "\"; width: 300; height: 300 }"; + QString componentStr = "import QtQuick 1.0\nBorderImage { source: \"" + source + "\"; width: 300; height: 300 }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeBorderImage *obj = qobject_cast(component.create()); @@ -302,7 +302,7 @@ void tst_qdeclarativeborderimage::invalidSciFile() QTest::ignoreMessage(QtWarningMsg, "QDeclarativeGridScaledImage: Invalid tile rule specified. Using Stretch."); // for "Roun" QTest::ignoreMessage(QtWarningMsg, "QDeclarativeGridScaledImage: Invalid tile rule specified. Using Stretch."); // for "Repea" - QString componentStr = "import Qt 4.7\nBorderImage { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/invalid.sci").toString() +"\"; width: 300; height: 300 }"; + QString componentStr = "import QtQuick 1.0\nBorderImage { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/invalid.sci").toString() +"\"; width: 300; height: 300 }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeBorderImage *obj = qobject_cast(component.create()); @@ -320,7 +320,7 @@ void tst_qdeclarativeborderimage::pendingRemoteRequest() { QFETCH(QString, source); - QString componentStr = "import Qt 4.7\nBorderImage { source: \"" + source + "\" }"; + QString componentStr = "import QtQuick 1.0\nBorderImage { source: \"" + source + "\" }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeBorderImage *obj = qobject_cast(component.create()); diff --git a/tests/auto/declarative/qdeclarativecomponent/data/createObject.qml b/tests/auto/declarative/qdeclarativecomponent/data/createObject.qml index 4ee1e75..4a06791 100644 --- a/tests/auto/declarative/qdeclarativecomponent/data/createObject.qml +++ b/tests/auto/declarative/qdeclarativecomponent/data/createObject.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item{ id: root diff --git a/tests/auto/declarative/qdeclarativeconnection/data/connection-targetchange.qml b/tests/auto/declarative/qdeclarativeconnection/data/connection-targetchange.qml index bb9a3bc..dd92cb9 100644 --- a/tests/auto/declarative/qdeclarativeconnection/data/connection-targetchange.qml +++ b/tests/auto/declarative/qdeclarativeconnection/data/connection-targetchange.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { Component { diff --git a/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-ignored.qml b/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-ignored.qml index 764d5ab..459c346 100644 --- a/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-ignored.qml +++ b/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-ignored.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: screen diff --git a/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-notarget.qml b/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-notarget.qml index 09e7812..8eddf43 100644 --- a/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-notarget.qml +++ b/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-notarget.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: screen diff --git a/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-parent.qml b/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-parent.qml index 478503d..953347a 100644 --- a/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-parent.qml +++ b/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals-parent.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: screen diff --git a/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals.qml b/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals.qml index d4e8d7e..3702bdb 100644 --- a/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals.qml +++ b/tests/auto/declarative/qdeclarativeconnection/data/connection-unknownsignals.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: screen diff --git a/tests/auto/declarative/qdeclarativeconnection/data/test-connection.qml b/tests/auto/declarative/qdeclarativeconnection/data/test-connection.qml index 954ca97..c599083 100644 --- a/tests/auto/declarative/qdeclarativeconnection/data/test-connection.qml +++ b/tests/auto/declarative/qdeclarativeconnection/data/test-connection.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: screen; width: 50 diff --git a/tests/auto/declarative/qdeclarativeconnection/data/test-connection2.qml b/tests/auto/declarative/qdeclarativeconnection/data/test-connection2.qml index 9e5a99c..f0dbaba 100644 --- a/tests/auto/declarative/qdeclarativeconnection/data/test-connection2.qml +++ b/tests/auto/declarative/qdeclarativeconnection/data/test-connection2.qml @@ -1,3 +1,3 @@ -import Qt 4.7 +import QtQuick 1.0 Connections { id: connection; target: connection; onTargetChanged: 1 == 1 } diff --git a/tests/auto/declarative/qdeclarativeconnection/data/test-connection3.qml b/tests/auto/declarative/qdeclarativeconnection/data/test-connection3.qml index 51efde6..94c9c7c 100644 --- a/tests/auto/declarative/qdeclarativeconnection/data/test-connection3.qml +++ b/tests/auto/declarative/qdeclarativeconnection/data/test-connection3.qml @@ -1,3 +1,3 @@ -import Qt 4.7 +import QtQuick 1.0 Connections {} diff --git a/tests/auto/declarative/qdeclarativeconnection/data/trimming.qml b/tests/auto/declarative/qdeclarativeconnection/data/trimming.qml index 361474c..00507d9 100644 --- a/tests/auto/declarative/qdeclarativeconnection/data/trimming.qml +++ b/tests/auto/declarative/qdeclarativeconnection/data/trimming.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: screen; width: 50 diff --git a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp index 605cf8e..100224b 100644 --- a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp +++ b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp @@ -233,7 +233,7 @@ private: #define TEST_CONTEXT_PROPERTY(ctxt, name, value) \ { \ QDeclarativeComponent component(&engine); \ - component.setData("import Qt 4.7; QtObject { property variant test: " #name " }", QUrl()); \ + component.setData("import QtQuick 1.0; QtObject { property variant test: " #name " }", QUrl()); \ \ QObject *obj = component.create(ctxt); \ \ @@ -283,7 +283,7 @@ void tst_qdeclarativecontext::setContextProperty() // Changes in context properties { QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7; QtObject { property variant test: a }", QUrl()); + component.setData("import QtQuick 1.0; QtObject { property variant test: a }", QUrl()); QObject *obj = component.create(&ctxt2); @@ -295,7 +295,7 @@ void tst_qdeclarativecontext::setContextProperty() } { QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7; QtObject { property variant test: b }", QUrl()); + component.setData("import QtQuick 1.0; QtObject { property variant test: b }", QUrl()); QObject *obj = component.create(&ctxt2); @@ -309,7 +309,7 @@ void tst_qdeclarativecontext::setContextProperty() } { QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7; QtObject { property variant test: e.a }", QUrl()); + component.setData("import QtQuick 1.0; QtObject { property variant test: e.a }", QUrl()); QObject *obj = component.create(&ctxt2); @@ -323,7 +323,7 @@ void tst_qdeclarativecontext::setContextProperty() // New context properties { QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7; QtObject { property variant test: a }", QUrl()); + component.setData("import QtQuick 1.0; QtObject { property variant test: a }", QUrl()); QObject *obj = component.create(&ctxt2); @@ -337,7 +337,7 @@ void tst_qdeclarativecontext::setContextProperty() // Setting an object-variant context property { QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7; QtObject { id: root; property int a: 10; property int test: ctxtProp.a; property variant obj: root; }", QUrl()); + component.setData("import QtQuick 1.0; QtObject { id: root; property int a: 10; property int test: ctxtProp.a; property variant obj: root; }", QUrl()); QDeclarativeContext ctxt(engine.rootContext()); ctxt.setContextProperty("ctxtProp", QVariant()); @@ -385,7 +385,7 @@ void tst_qdeclarativecontext::setContextObject() // Changes in context properties { QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7; QtObject { property variant test: a }", QUrl()); + component.setData("import QtQuick 1.0; QtObject { property variant test: a }", QUrl()); QObject *obj = component.create(&ctxt); @@ -417,7 +417,7 @@ void tst_qdeclarativecontext::destruction() void tst_qdeclarativecontext::idAsContextProperty() { QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7; QtObject { property variant a; a: QtObject { id: myObject } }", QUrl()); + component.setData("import QtQuick 1.0; QtObject { property variant a; a: QtObject { id: myObject } }", QUrl()); QObject *obj = component.create(); QVERIFY(obj); @@ -437,7 +437,7 @@ void tst_qdeclarativecontext::idAsContextProperty() void tst_qdeclarativecontext::readOnlyContexts() { QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7; QtObject { id: me }", QUrl()); + component.setData("import QtQuick 1.0; QtObject { id: me }", QUrl()); QObject *obj = component.create(); QVERIFY(obj); diff --git a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp index adba190..4a5bdf2 100644 --- a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp +++ b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp @@ -283,7 +283,7 @@ void tst_QDeclarativeDebug::initTestCase() m_engine = new QDeclarativeEngine(this); QList qml; - qml << "import Qt 4.7\n" + qml << "import QtQuick 1.0\n" "Item {" "width: 10; height: 20; scale: blueRect.scale;" "Rectangle { id: blueRect; width: 500; height: 600; color: \"blue\"; }" @@ -294,11 +294,11 @@ void tst_QDeclarativeDebug::initTestCase() "}"; // add second component to test multiple root contexts - qml << "import Qt 4.7\n" + qml << "import QtQuick 1.0\n" "Item {}"; // and a third to test methods - qml << "import Qt 4.7\n" + qml << "import QtQuick 1.0\n" "Item {" "function myMethodNoArgs() { return 3; }\n" "function myMethod(a) { return a + 9; }\n" diff --git a/tests/auto/declarative/qdeclarativedom/data/MyComponent.qml b/tests/auto/declarative/qdeclarativedom/data/MyComponent.qml index dd9e9ea..f6760b6 100644 --- a/tests/auto/declarative/qdeclarativedom/data/MyComponent.qml +++ b/tests/auto/declarative/qdeclarativedom/data/MyComponent.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { } diff --git a/tests/auto/declarative/qdeclarativedom/data/MyItem.qml b/tests/auto/declarative/qdeclarativedom/data/MyItem.qml index dd9e9ea..f6760b6 100644 --- a/tests/auto/declarative/qdeclarativedom/data/MyItem.qml +++ b/tests/auto/declarative/qdeclarativedom/data/MyItem.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { } diff --git a/tests/auto/declarative/qdeclarativedom/data/import/Bar.qml b/tests/auto/declarative/qdeclarativedom/data/import/Bar.qml index d26b299..86a7176 100644 --- a/tests/auto/declarative/qdeclarativedom/data/import/Bar.qml +++ b/tests/auto/declarative/qdeclarativedom/data/import/Bar.qml @@ -1,2 +1,2 @@ -import Qt 4.7 +import QtQuick 1.0 diff --git a/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/Foo.qml b/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/Foo.qml index d26b299..86a7176 100644 --- a/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/Foo.qml +++ b/tests/auto/declarative/qdeclarativedom/data/importlib/sublib/Foo.qml @@ -1,2 +1,2 @@ -import Qt 4.7 +import QtQuick 1.0 diff --git a/tests/auto/declarative/qdeclarativedom/data/top.qml b/tests/auto/declarative/qdeclarativedom/data/top.qml index 6405cd2..56ea9df 100644 --- a/tests/auto/declarative/qdeclarativedom/data/top.qml +++ b/tests/auto/declarative/qdeclarativedom/data/top.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 MyComponent { width: 100 diff --git a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp index dca5205..c61be55 100644 --- a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp +++ b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp @@ -86,7 +86,7 @@ private: void tst_qdeclarativedom::loadSimple() { - QByteArray qml = "import Qt 4.7\n" + QByteArray qml = "import QtQuick 1.0\n" "Item {}"; QDeclarativeDomDocument document; @@ -97,15 +97,15 @@ void tst_qdeclarativedom::loadSimple() QVERIFY(rootObject.isValid()); QVERIFY(!rootObject.isComponent()); QVERIFY(!rootObject.isCustomType()); - QVERIFY(rootObject.objectType() == "Qt/Item"); - QVERIFY(rootObject.objectTypeMajorVersion() == 4); - QVERIFY(rootObject.objectTypeMinorVersion() == 7); + QVERIFY(rootObject.objectType() == "QtQuick/Item"); + QVERIFY(rootObject.objectTypeMajorVersion() == 1); + QVERIFY(rootObject.objectTypeMinorVersion() == 0); } // Test regular properties void tst_qdeclarativedom::loadProperties() { - QByteArray qml = "import Qt 4.7\n" + QByteArray qml = "import QtQuick 1.0\n" "Item { id : item; x : 300; visible : true }"; QDeclarativeDomDocument document; @@ -120,7 +120,7 @@ void tst_qdeclarativedom::loadProperties() QVERIFY(xProperty.propertyName() == "x"); QCOMPARE(xProperty.propertyNameParts().count(), 1); QVERIFY(xProperty.propertyNameParts().at(0) == "x"); - QCOMPARE(xProperty.position(), 32); + QCOMPARE(xProperty.position(), 37); QCOMPARE(xProperty.length(), 1); QVERIFY(xProperty.value().isLiteral()); QVERIFY(xProperty.value().toLiteral().literal() == "300"); @@ -129,7 +129,7 @@ void tst_qdeclarativedom::loadProperties() QVERIFY(visibleProperty.propertyName() == "visible"); QCOMPARE(visibleProperty.propertyNameParts().count(), 1); QVERIFY(visibleProperty.propertyNameParts().at(0) == "visible"); - QCOMPARE(visibleProperty.position(), 41); + QCOMPARE(visibleProperty.position(), 46); QCOMPARE(visibleProperty.length(), 7); QVERIFY(visibleProperty.value().isLiteral()); QVERIFY(visibleProperty.value().toLiteral().literal() == "true"); @@ -139,7 +139,7 @@ void tst_qdeclarativedom::loadProperties() void tst_qdeclarativedom::loadGroupedProperties() { { - QByteArray qml = "import Qt 4.7\n" + QByteArray qml = "import QtQuick 1.0\n" "Item { anchors.left: parent.left; anchors.right: parent.right }"; QDeclarativeDomDocument document; @@ -166,7 +166,7 @@ void tst_qdeclarativedom::loadGroupedProperties() QCOMPARE(leftProperty.propertyNameParts().count(), 2); QVERIFY(leftProperty.propertyNameParts().at(0) == "anchors"); QVERIFY(leftProperty.propertyNameParts().at(1) == "left"); - QCOMPARE(leftProperty.position(), 21); + QCOMPARE(leftProperty.position(), 26); QCOMPARE(leftProperty.length(), 12); QVERIFY(leftProperty.value().isBinding()); QVERIFY(leftProperty.value().toBinding().binding() == "parent.left"); @@ -175,14 +175,14 @@ void tst_qdeclarativedom::loadGroupedProperties() QCOMPARE(rightProperty.propertyNameParts().count(), 2); QVERIFY(rightProperty.propertyNameParts().at(0) == "anchors"); QVERIFY(rightProperty.propertyNameParts().at(1) == "right"); - QCOMPARE(rightProperty.position(), 48); + QCOMPARE(rightProperty.position(), 53); QCOMPARE(rightProperty.length(), 13); QVERIFY(rightProperty.value().isBinding()); QVERIFY(rightProperty.value().toBinding().binding() == "parent.right"); } { - QByteArray qml = "import Qt 4.7\n" + QByteArray qml = "import QtQuick 1.0\n" "Item { \n" " anchors {\n" " left: parent.left\n" @@ -214,7 +214,7 @@ void tst_qdeclarativedom::loadGroupedProperties() QCOMPARE(leftProperty.propertyNameParts().count(), 2); QVERIFY(leftProperty.propertyNameParts().at(0) == "anchors"); QVERIFY(leftProperty.propertyNameParts().at(1) == "left"); - QCOMPARE(leftProperty.position(), 44); + QCOMPARE(leftProperty.position(), 49); QCOMPARE(leftProperty.length(), 4); QVERIFY(leftProperty.value().isBinding()); QVERIFY(leftProperty.value().toBinding().binding() == "parent.left"); @@ -223,7 +223,7 @@ void tst_qdeclarativedom::loadGroupedProperties() QCOMPARE(rightProperty.propertyNameParts().count(), 2); QVERIFY(rightProperty.propertyNameParts().at(0) == "anchors"); QVERIFY(rightProperty.propertyNameParts().at(1) == "right"); - QCOMPARE(rightProperty.position(), 70); + QCOMPARE(rightProperty.position(), 75); QCOMPARE(rightProperty.length(), 5); QVERIFY(rightProperty.value().isBinding()); QVERIFY(rightProperty.value().toBinding().binding() == "parent.right"); @@ -233,7 +233,7 @@ void tst_qdeclarativedom::loadGroupedProperties() void tst_qdeclarativedom::loadChildObject() { - QByteArray qml = "import Qt 4.7\n" + QByteArray qml = "import QtQuick 1.0\n" "Item { Item {} }"; QDeclarativeDomDocument document; @@ -252,7 +252,7 @@ void tst_qdeclarativedom::loadChildObject() QDeclarativeDomObject childItem = list.values().first().toObject(); QVERIFY(childItem.isValid()); - QVERIFY(childItem.objectType() == "Qt/Item"); + QVERIFY(childItem.objectType() == "QtQuick/Item"); } void tst_qdeclarativedom::loadComposite() @@ -278,7 +278,7 @@ void tst_qdeclarativedom::loadComposite() void tst_qdeclarativedom::testValueSource() { - QByteArray qml = "import Qt 4.7\n" + QByteArray qml = "import QtQuick 1.0\n" "Rectangle { SpringAnimation on height { spring: 1.4; damping: .15; to: Math.min(Math.max(-130, value*2.2 - 130), 133); }}"; QDeclarativeEngine freshEngine; @@ -295,7 +295,7 @@ void tst_qdeclarativedom::testValueSource() QDeclarativeDomObject valueSourceObject = valueSource.object(); QVERIFY(valueSourceObject.isValid()); - QVERIFY(valueSourceObject.objectType() == "Qt/SpringAnimation"); + QVERIFY(valueSourceObject.objectType() == "QtQuick/SpringAnimation"); const QDeclarativeDomValue springValue = valueSourceObject.property("spring").value(); QVERIFY(!springValue.isInvalid()); @@ -310,7 +310,7 @@ void tst_qdeclarativedom::testValueSource() void tst_qdeclarativedom::testValueInterceptor() { - QByteArray qml = "import Qt 4.7\n" + QByteArray qml = "import QtQuick 1.0\n" "Rectangle { Behavior on height { NumberAnimation { duration: 100 } } }"; QDeclarativeEngine freshEngine; @@ -327,7 +327,7 @@ void tst_qdeclarativedom::testValueInterceptor() QDeclarativeDomObject valueInterceptorObject = valueInterceptor.object(); QVERIFY(valueInterceptorObject.isValid()); - QVERIFY(valueInterceptorObject.objectType() == "Qt/Behavior"); + QVERIFY(valueInterceptorObject.objectType() == "QtQuick/Behavior"); const QDeclarativeDomValue animationValue = valueInterceptorObject.property("animation").value(); QVERIFY(!animationValue.isInvalid()); @@ -337,7 +337,7 @@ void tst_qdeclarativedom::testValueInterceptor() // Test QDeclarativeDomDocument::imports() void tst_qdeclarativedom::loadImports() { - QByteArray qml = "import Qt 4.7\n" + QByteArray qml = "import QtQuick 1.0\n" "import importlib.sublib 1.1\n" "import importlib.sublib 1.0 as NewFoo\n" "import 'import'\n" @@ -353,9 +353,9 @@ void tst_qdeclarativedom::loadImports() QDeclarativeDomImport import = document.imports().at(0); QCOMPARE(import.type(), QDeclarativeDomImport::Library); - QCOMPARE(import.uri(), QLatin1String("Qt")); + QCOMPARE(import.uri(), QLatin1String("QtQuick")); QCOMPARE(import.qualifier(), QString()); - QCOMPARE(import.version(), QLatin1String("4.7")); + QCOMPARE(import.version(), QLatin1String("1.0")); import = document.imports().at(1); QCOMPARE(import.type(), QDeclarativeDomImport::Library); @@ -385,7 +385,7 @@ void tst_qdeclarativedom::loadImports() // Test loading a file with errors void tst_qdeclarativedom::loadErrors() { - QByteArray qml = "import Qt 4.7\n" + QByteArray qml = "import QtQuick 1.0\n" "Item {\n" " foo: 12\n" "}"; @@ -405,7 +405,7 @@ void tst_qdeclarativedom::loadErrors() // Test loading a file with syntax errors void tst_qdeclarativedom::loadSyntaxErrors() { - QByteArray qml = "import Qt 4.7\n" + QByteArray qml = "import QtQuick 1.0\n" "asdf"; QDeclarativeDomDocument document; @@ -423,7 +423,7 @@ void tst_qdeclarativedom::loadSyntaxErrors() // Test attempting to load a file with remote references void tst_qdeclarativedom::loadRemoteErrors() { - QByteArray qml = "import Qt 4.7\n" + QByteArray qml = "import QtQuick 1.0\n" "import \"http://localhost/exampleQmlScript.js\" as Script\n" "Item {\n" "}"; @@ -443,7 +443,7 @@ void tst_qdeclarativedom::loadRemoteErrors() void tst_qdeclarativedom::loadDynamicProperty() { { - QByteArray qml = "import Qt 4.7\n" + QByteArray qml = "import QtQuick 1.0\n" "Item {\n" " property int a\n" " property bool b\n" @@ -478,20 +478,20 @@ void tst_qdeclarativedom::loadDynamicProperty() QCOMPARE(d.length(), test_length); \ } \ - DP_TEST(0, a, QVariant::Int, 25, 14, "int"); - DP_TEST(1, b, QVariant::Bool, 44, 15, "bool"); - DP_TEST(2, c, QMetaType::QReal, 64, 17, "double"); - DP_TEST(3, d, QMetaType::QReal, 86, 15, "real"); - DP_TEST(4, e, QVariant::String, 106, 17, "string"); - DP_TEST(5, f, QVariant::Url, 128, 14, "url"); - DP_TEST(6, g, QVariant::Color, 147, 16, "color"); - DP_TEST(7, h, QVariant::DateTime, 168, 15, "date"); - DP_TEST(8, i, qMetaTypeId(), 188, 18, "variant"); - DP_TEST(9, j, -1, 211, 19, "QtObject"); + DP_TEST(0, a, QVariant::Int, 30, 14, "int"); + DP_TEST(1, b, QVariant::Bool, 49, 15, "bool"); + DP_TEST(2, c, QMetaType::QReal, 69, 17, "double"); + DP_TEST(3, d, QMetaType::QReal, 91, 15, "real"); + DP_TEST(4, e, QVariant::String, 111, 17, "string"); + DP_TEST(5, f, QVariant::Url, 133, 14, "url"); + DP_TEST(6, g, QVariant::Color, 152, 16, "color"); + DP_TEST(7, h, QVariant::DateTime, 173, 15, "date"); + DP_TEST(8, i, qMetaTypeId(), 193, 18, "variant"); + DP_TEST(9, j, -1, 216, 19, "QtObject"); } { - QByteArray qml = "import Qt 4.7\n" + QByteArray qml = "import QtQuick 1.0\n" "Item {\n" " property int a: 12\n" " property int b: a + 6\n" @@ -535,7 +535,7 @@ void tst_qdeclarativedom::loadComponent() { // Explicit component { - QByteArray qml = "import Qt 4.7\n" + QByteArray qml = "import QtQuick 1.0\n" "Item {\n" " Component {\n" " id: myComponent\n" @@ -564,9 +564,9 @@ void tst_qdeclarativedom::loadComponent() QDeclarativeDomComponent component = componentObject.toComponent(); QVERIFY(component.isValid()); - QVERIFY(component.objectType() == "Qt/Component"); - QVERIFY(component.objectTypeMajorVersion() == 4); - QVERIFY(component.objectTypeMinorVersion() == 7); + QVERIFY(component.objectType() == "QtQuick/Component"); + QVERIFY(component.objectTypeMajorVersion() == 1); + QVERIFY(component.objectTypeMinorVersion() == 0); QVERIFY(component.objectClassName() == "Component"); QVERIFY(component.objectId() == "myComponent"); QVERIFY(component.properties().isEmpty()); @@ -574,7 +574,7 @@ void tst_qdeclarativedom::loadComponent() QVERIFY(component.isCustomType() == false); QVERIFY(component.customTypeData() == ""); QVERIFY(component.isComponent()); - QCOMPARE(component.position(), 25); + QCOMPARE(component.position(), 30); QCOMPARE(component.length(), 57); QVERIFY(component.componentRoot().isValid()); @@ -583,7 +583,7 @@ void tst_qdeclarativedom::loadComponent() // Implicit component { - QByteArray qml = "import Qt 4.7\n" + QByteArray qml = "import QtQuick 1.0\n" "ListView {\n" " delegate: Item {}\n" "}"; @@ -604,7 +604,7 @@ void tst_qdeclarativedom::loadComponent() QDeclarativeDomComponent component = componentObject.toComponent(); QVERIFY(component.isValid()); - QVERIFY(component.objectType() == "Qt/Component"); + QVERIFY(component.objectType() == "QtQuick/Component"); QVERIFY(component.objectClassName() == "Component"); QVERIFY(component.objectId() == ""); QVERIFY(component.properties().isEmpty()); @@ -612,7 +612,7 @@ void tst_qdeclarativedom::loadComponent() QVERIFY(component.isCustomType() == false); QVERIFY(component.customTypeData() == ""); QVERIFY(component.isComponent()); - QCOMPARE(component.position(), 39); + QCOMPARE(component.position(), 44); QCOMPARE(component.length(), 7); QVERIFY(component.componentRoot().isValid()); @@ -633,7 +633,7 @@ void tst_qdeclarativedom::object_dynamicProperty() // Valid object, no dynamic properties { - QByteArray qml = "import Qt 4.7\n" + QByteArray qml = "import QtQuick 1.0\n" "Item {}"; QDeclarativeDomDocument document; @@ -648,7 +648,7 @@ void tst_qdeclarativedom::object_dynamicProperty() // Valid object, dynamic properties { - QByteArray qml = "import Qt 4.7\n" + QByteArray qml = "import QtQuick 1.0\n" "Item {\n" " property int a\n" "}"; @@ -668,7 +668,7 @@ void tst_qdeclarativedom::object_dynamicProperty() QVERIFY(p.propertyType() == QVariant::Int); QVERIFY(p.propertyTypeName() == "int"); QVERIFY(p.isDefaultProperty() == false); - QCOMPARE(p.position(), 25); + QCOMPARE(p.position(), 30); QCOMPARE(p.length(), 14); } @@ -686,7 +686,7 @@ void tst_qdeclarativedom::object_property() // Valid object - no default { - QByteArray qml = "import Qt 4.7\n" + QByteArray qml = "import QtQuick 1.0\n" "Item {\n" " x: 10\n" " y: 12\n" @@ -709,7 +709,7 @@ void tst_qdeclarativedom::object_property() QVERIFY(x.isDefaultProperty() == false); QVERIFY(x.value().isLiteral()); QVERIFY(x.value().toLiteral().literal() == "10"); - QCOMPARE(x.position(), 25); + QCOMPARE(x.position(), 30); QCOMPARE(x.length(), 1); QDeclarativeDomProperty y = rootObject.property("y"); @@ -720,13 +720,13 @@ void tst_qdeclarativedom::object_property() QVERIFY(y.isDefaultProperty() == false); QVERIFY(y.value().isLiteral()); QVERIFY(y.value().toLiteral().literal() == "12"); - QCOMPARE(y.position(), 35); + QCOMPARE(y.position(), 40); QCOMPARE(y.length(), 1); } // Valid object - with default { - QByteArray qml = "import Qt 4.7\n" + QByteArray qml = "import QtQuick 1.0\n" "Item {\n" " x: 10\n" " y: 12\n" @@ -750,7 +750,7 @@ void tst_qdeclarativedom::object_property() QVERIFY(x.isDefaultProperty() == false); QVERIFY(x.value().isLiteral()); QVERIFY(x.value().toLiteral().literal() == "10"); - QCOMPARE(x.position(), 25); + QCOMPARE(x.position(), 30); QCOMPARE(x.length(), 1); QDeclarativeDomProperty y = rootObject.property("y"); @@ -761,7 +761,7 @@ void tst_qdeclarativedom::object_property() QVERIFY(y.isDefaultProperty() == false); QVERIFY(y.value().isLiteral()); QVERIFY(y.value().toLiteral().literal() == "12"); - QCOMPARE(y.position(), 35); + QCOMPARE(y.position(), 40); QCOMPARE(y.length(), 1); QDeclarativeDomProperty data = rootObject.property("data"); @@ -771,7 +771,7 @@ void tst_qdeclarativedom::object_property() QVERIFY(data.propertyNameParts().at(0) == "data"); QVERIFY(data.isDefaultProperty() == true); QVERIFY(data.value().isList()); - QCOMPARE(data.position(), 45); + QCOMPARE(data.position(), 50); QCOMPARE(data.length(), 0); } } @@ -787,7 +787,7 @@ void tst_qdeclarativedom::object_url() // Valid builtin object { - QByteArray qml = "import Qt 4.7\n" + QByteArray qml = "import QtQuick 1.0\n" "Item {}"; QDeclarativeDomDocument document; @@ -800,7 +800,7 @@ void tst_qdeclarativedom::object_url() // Valid composite object { - QByteArray qml = "import Qt 4.7\n" + QByteArray qml = "import QtQuick 1.0\n" "MyItem {}"; QUrl myUrl = QUrl::fromLocalFile(SRCDIR "/data/main.qml"); @@ -818,7 +818,7 @@ void tst_qdeclarativedom::object_url() // Test copy constructors and operators void tst_qdeclarativedom::copy() { - QByteArray qml = "import Qt 4.7\n" + QByteArray qml = "import QtQuick 1.0\n" "MyItem {\n" " id: myItem\n" " property int a: 10\n" @@ -1193,7 +1193,7 @@ void tst_qdeclarativedom::copy() // Tests the position/length of various elements void tst_qdeclarativedom::position() { - QByteArray qml = "import Qt 4.7\n" + QByteArray qml = "import QtQuick 1.0\n" "Item {\n" " id: myItem\n" " property int a: 10\n" @@ -1215,32 +1215,32 @@ void tst_qdeclarativedom::position() // All QDeclarativeDomDynamicProperty QDeclarativeDomDynamicProperty dynProp = root.dynamicProperty("a"); - QCOMPARE(dynProp.position(), 40); + QCOMPARE(dynProp.position(), 45); QCOMPARE(dynProp.length(), 18); // All QDeclarativeDomProperty QDeclarativeDomProperty x = root.property("x"); - QCOMPARE(x.position(), 63); + QCOMPARE(x.position(), 68); QCOMPARE(x.length(), 1); QDeclarativeDomProperty y = root.property("y"); - QCOMPARE(y.position(), 73); + QCOMPARE(y.position(), 78); QCOMPARE(y.length(), 1); QDeclarativeDomProperty z = root.property("z"); - QCOMPARE(z.position(), 106); + QCOMPARE(z.position(), 111); QCOMPARE(z.length(), 1); QDeclarativeDomProperty opacity = root.property("opacity"); - QCOMPARE(opacity.position(), 127); + QCOMPARE(opacity.position(), 132); QCOMPARE(opacity.length(), 7); QDeclarativeDomProperty data = root.property("data"); - QCOMPARE(data.position(), 142); + QCOMPARE(data.position(), 147); QCOMPARE(data.length(), 0); QDeclarativeDomProperty children = root.property("children"); - QCOMPARE(children.position(), 179); + QCOMPARE(children.position(), 184); QCOMPARE(children.length(), 8); QDeclarativeDomList dataList = data.value().toList(); @@ -1249,64 +1249,64 @@ void tst_qdeclarativedom::position() QCOMPARE(childrenList.values().count(), 2); // All QDeclarativeDomObject - QCOMPARE(root.position(), 14); + QCOMPARE(root.position(), 19); QCOMPARE(root.length(), 195); QDeclarativeDomObject numberAnimation = z.value().toValueSource().object(); - QCOMPARE(numberAnimation.position(), 87); + QCOMPARE(numberAnimation.position(), 92); QCOMPARE(numberAnimation.length(), 23); QDeclarativeDomObject behavior = opacity.value().toValueInterceptor().object(); - QCOMPARE(behavior.position(), 115); + QCOMPARE(behavior.position(), 120); QCOMPARE(behavior.length(), 22); QDeclarativeDomObject component = dataList.values().at(0).toObject(); - QCOMPARE(component.position(), 142); + QCOMPARE(component.position(), 147); QCOMPARE(component.length(), 32); QDeclarativeDomObject componentRoot = component.toComponent().componentRoot(); - QCOMPARE(componentRoot.position(), 162); + QCOMPARE(componentRoot.position(), 167); QCOMPARE(componentRoot.length(), 6); QDeclarativeDomObject child1 = childrenList.values().at(0).toObject(); - QCOMPARE(child1.position(), 191); + QCOMPARE(child1.position(), 196); QCOMPARE(child1.length(), 6); QDeclarativeDomObject child2 = childrenList.values().at(1).toObject(); - QCOMPARE(child2.position(), 199); + QCOMPARE(child2.position(), 204); QCOMPARE(child2.length(), 6); // All QDeclarativeDomValue QDeclarativeDomValue xValue = x.value(); - QCOMPARE(xValue.position(), 66); + QCOMPARE(xValue.position(), 71); QCOMPARE(xValue.length(), 2); QDeclarativeDomValue yValue = y.value(); - QCOMPARE(yValue.position(), 76); + QCOMPARE(yValue.position(), 81); QCOMPARE(yValue.length(), 6); QDeclarativeDomValue zValue = z.value(); - QCOMPARE(zValue.position(), 87); + QCOMPARE(zValue.position(), 92); QCOMPARE(zValue.length(), 23); QDeclarativeDomValue opacityValue = opacity.value(); - QCOMPARE(opacityValue.position(), 115); + QCOMPARE(opacityValue.position(), 120); QCOMPARE(opacityValue.length(), 22); QDeclarativeDomValue dataValue = data.value(); - QCOMPARE(dataValue.position(), 142); + QCOMPARE(dataValue.position(), 147); QCOMPARE(dataValue.length(), 32); QDeclarativeDomValue child1Value = childrenList.values().at(0); - QCOMPARE(child1Value.position(), 191); + QCOMPARE(child1Value.position(), 196); QCOMPARE(child1Value.length(), 6); QDeclarativeDomValue child2Value = childrenList.values().at(1); - QCOMPARE(child2Value.position(), 199); + QCOMPARE(child2Value.position(), 204); QCOMPARE(child2Value.length(), 6); // All QDeclarativeDomList - QCOMPARE(childrenList.position(), 189); + QCOMPARE(childrenList.position(), 194); QCOMPARE(childrenList.length(), 18); } diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/CustomObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/CustomObject.qml index 170d027..4a42518 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/CustomObject.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/CustomObject.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string greeting: "hello world" diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/MethodsObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/MethodsObject.qml index e9a41ed..829d405 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/MethodsObject.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/MethodsObject.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { function testFunction() { return 19; } diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/NestedTypeTransientErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/NestedTypeTransientErrors.qml index 6e50b10..f542c64 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/NestedTypeTransientErrors.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/NestedTypeTransientErrors.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int b: obj.prop.a diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/ScopeObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/ScopeObject.qml index fe0492f..df494af 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/ScopeObject.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/ScopeObject.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { property int a: 3 diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/SpuriousWarning.qml b/tests/auto/declarative/qdeclarativeecmascript/data/SpuriousWarning.qml index e144de7..3427a3b 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/SpuriousWarning.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/SpuriousWarning.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { property int children: root.children.length diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/aliasPropertyAndBinding.qml b/tests/auto/declarative/qdeclarativeecmascript/data/aliasPropertyAndBinding.qml index 515f80f..da6c795 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/aliasPropertyAndBinding.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/aliasPropertyAndBinding.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import Qt.test 1.0 MyQmlObject { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/assignBasicTypes.qml b/tests/auto/declarative/qdeclarativeecmascript/data/assignBasicTypes.qml index 1cd78a5..9443c01 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/assignBasicTypes.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/assignBasicTypes.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyTypeObject { Component.onCompleted: { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/attachedPropertyScope.qml b/tests/auto/declarative/qdeclarativeecmascript/data/attachedPropertyScope.qml index f31f142..c66ef69 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/attachedPropertyScope.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/attachedPropertyScope.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import Qt.test 1.0 QtObject { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/bug.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/bug.1.qml index 88740dc..68dbcfa 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/bug.1.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/bug.1.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int a: 10 diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.2.qml index 7530396..0f23297 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.2.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/canAssignNullToQObject.2.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyQmlObject { objectProperty: MyQmlObject {} diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml b/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml index 1655905..58b7adb 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/compiled.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { //real diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/compositePropertyType.qml b/tests/auto/declarative/qdeclarativeecmascript/data/compositePropertyType.qml index 1dc0ada..1af77d5 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/compositePropertyType.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/compositePropertyType.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property CustomObject myObject diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/deferredPropertiesErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/deferredPropertiesErrors.qml index 9c46c3f..18a57ba 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/deferredPropertiesErrors.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/deferredPropertiesErrors.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyDeferredObject { value: undefined // error is resolved before complete diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/deleteLater.qml b/tests/auto/declarative/qdeclarativeecmascript/data/deleteLater.qml index 6d23e5f7..131fa6f 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/deleteLater.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/deleteLater.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { id: root diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/deletedEngine.qml b/tests/auto/declarative/qdeclarativeecmascript/data/deletedEngine.qml index 6fc1211..4de405d 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/deletedEngine.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/deletedEngine.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { function calculate() { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml index 2337e44..7ba51ef 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/deletedObject.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import Qt.test 1.0 QtObject { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/eval.qml b/tests/auto/declarative/qdeclarativeecmascript/data/eval.qml index aab39be..661cd5c 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/eval.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/eval.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool test1: false; diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning.qml b/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning.qml index 14046f0..2102821 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import Qt.test 1.0 MyQmlObject { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning2.qml index 146f6f1..c197ef8 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning2.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/exceptionProducesWarning2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import Qt.test 1.0 MyQmlObject { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/extendedObjectPropertyLookup.qml b/tests/auto/declarative/qdeclarativeecmascript/data/extendedObjectPropertyLookup.qml index dc78cd8..9738d2c 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/extendedObjectPropertyLookup.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/extendedObjectPropertyLookup.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 QtObject { property MyExtendedObject a; diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/extensionObjects.qml b/tests/auto/declarative/qdeclarativeecmascript/data/extensionObjects.qml index c57e5f8..b0e897e 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/extensionObjects.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/extensionObjects.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyExtendedObject { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/function.qml b/tests/auto/declarative/qdeclarativeecmascript/data/function.qml index 80d6ef4..6cd8751 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/function.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/function.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool test1: false; diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/functionErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/functionErrors.qml index a893fb0..2ba02d1 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/functionErrors.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/functionErrors.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { function myFunction() { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.1.qml index e3b29ae..6dcdefc 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.1.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.1.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyQmlObject { objectProperty: if(1) otherObject diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.qml b/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.qml index 4746f3f..32b8611 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/idShortcutInvalidates.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyQmlObject { objectProperty: otherObject diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/in.qml b/tests/auto/declarative/qdeclarativeecmascript/data/in.qml index 0b5b0ba..f9cccb5 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/in.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/in.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: root diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include.qml b/tests/auto/declarative/qdeclarativeecmascript/data/include.qml index 18543b2..61b0461 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/include.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/include.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import "include.js" as IncludeTest QtObject { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_callback.qml b/tests/auto/declarative/qdeclarativeecmascript/data/include_callback.qml index a39e821..1633eba 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/include_callback.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/include_callback.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import "include_callback.js" as IncludeTest QtObject { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_pragma.qml b/tests/auto/declarative/qdeclarativeecmascript/data/include_pragma.qml index 67b8cfd..a6489694 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/include_pragma.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/include_pragma.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import "include_pragma_outer.js" as Script Item { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_remote.qml b/tests/auto/declarative/qdeclarativeecmascript/data/include_remote.qml index 06bd174..0dfc74f 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/include_remote.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/include_remote.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import "include_remote.js" as IncludeTest QtObject { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_remote_missing.qml b/tests/auto/declarative/qdeclarativeecmascript/data/include_remote_missing.qml index 8e486b2..05a7399 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/include_remote_missing.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/include_remote_missing.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import "include_remote_missing.js" as IncludeTest QtObject { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/include_shared.qml b/tests/auto/declarative/qdeclarativeecmascript/data/include_shared.qml index e957018..e9f1c89 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/include_shared.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/include_shared.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import "include_shared.js" as IncludeTest QtObject { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/invokableObjectArg.qml b/tests/auto/declarative/qdeclarativeecmascript/data/invokableObjectArg.qml index d5d3329..6ab25f2 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/invokableObjectArg.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/invokableObjectArg.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyQmlObject { id: root diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/invokableObjectRet.qml b/tests/auto/declarative/qdeclarativeecmascript/data/invokableObjectRet.qml index 29d7d01..87b2d7e 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/invokableObjectRet.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/invokableObjectRet.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyQmlObject { id: root diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/jsObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/jsObject.qml index fb4fa4d..e93007a 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/jsObject.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/jsObject.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int test diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/libraryScriptAssert.qml b/tests/auto/declarative/qdeclarativeecmascript/data/libraryScriptAssert.qml index a945a16..c078942 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/libraryScriptAssert.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/libraryScriptAssert.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import "libraryScriptAssert.js" as Test QtObject { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/listProperties.qml b/tests/auto/declarative/qdeclarativeecmascript/data/listProperties.qml index 3ba4183..7b94075 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/listProperties.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/listProperties.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyQmlObject { id: root diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/listToVariant.qml b/tests/auto/declarative/qdeclarativeecmascript/data/listToVariant.qml index 697530f..7940ab8 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/listToVariant.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/listToVariant.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property variant test: children diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/methods.3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/methods.3.qml index 269bd83..1090b48 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/methods.3.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/methods.3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { function testFunction() { return 19; } diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/methods.4.qml b/tests/auto/declarative/qdeclarativeecmascript/data/methods.4.qml index 2ea9cdb..34c50d6 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/methods.4.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/methods.4.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 MethodsObject { function testFunction2() { return 17; } diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/methods.5.qml b/tests/auto/declarative/qdeclarativeecmascript/data/methods.5.qml index 0065add..bebdf3d 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/methods.5.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/methods.5.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { property alias blah: item.x diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/multiEngineObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/multiEngineObject.qml index a8cb50e..d9c63e6 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/multiEngineObject.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/multiEngineObject.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string test: thing.stringProperty diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.2.qml index 8be2d5b..9e0bcf0 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.2.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: root diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.qml b/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.qml index daa9b0b..7e7da8d 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/noSpuriousWarningsAtShutdown.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: root diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/nonscriptable.qml b/tests/auto/declarative/qdeclarativeecmascript/data/nonscriptable.qml index 024d82e..e86cc96 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/nonscriptable.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/nonscriptable.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyQmlObject { id: root diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/nullObjectBinding.qml b/tests/auto/declarative/qdeclarativeecmascript/data/nullObjectBinding.qml index 11472a0..cbd2d3e 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/nullObjectBinding.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/nullObjectBinding.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property QtObject test diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/objectsCompareAsEqual.qml b/tests/auto/declarative/qdeclarativeecmascript/data/objectsCompareAsEqual.qml index 4b51109..ef0e304 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/objectsCompareAsEqual.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/objectsCompareAsEqual.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: root diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/ownership.qml b/tests/auto/declarative/qdeclarativeecmascript/data/ownership.qml index 231c9e5..53427b7 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/ownership.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/ownership.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { Component.onCompleted: { var a = getObject(); a = null; } diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml index bef40fd..a778dcc 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/propertyAssignmentErrors.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { id: root diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qlistqobjectMethods.qml b/tests/auto/declarative/qdeclarativeecmascript/data/qlistqobjectMethods.qml index 22c4f0b..2e9e173 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/qlistqobjectMethods.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/qlistqobjectMethods.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int test: getObjects().length diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_10696.qml b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_10696.qml index cb5c4c9..02357d4 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_10696.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_10696.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string test: "aaaa" diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11600.qml b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11600.qml index 56e7885..b7bb366 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11600.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11600.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import "qtbug_11600.js" as Test QtObject { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11606.qml b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11606.qml index 6efb9c1..05c482c 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11606.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_11606.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool test: false diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtcreatorbug_1289.qml b/tests/auto/declarative/qdeclarativeecmascript/data/qtcreatorbug_1289.qml index b6d31d5..e531efc 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/qtcreatorbug_1289.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/qtcreatorbug_1289.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { id: root diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scope.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scope.2.qml index d4d7eb2..95f34d8 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/scope.2.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/scope.2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { property int a: 0 diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scope.3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scope.3.qml index 2548005..0b0770e 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/scope.3.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/scope.3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import Qt.test 1.0 MyQmlObject { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scope.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scope.qml index 7f895ff..63dba2f 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/scope.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/scope.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: root diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.qml index 5d8e29e..65697d9 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.1.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 import "scriptConnect.1.js" as Script MyQmlObject { property bool test: false diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.qml index 5681907..86ff798 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.2.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 import "scriptConnect.2.js" as Script MyQmlObject { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.3.qml index 40d8079..db2f005 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.3.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.3.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyQmlObject { property bool test: false diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.4.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.4.qml index 0356650..a2d90ff 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.4.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.4.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyQmlObject { property bool test: false diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.5.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.5.qml index 661f28e..21fac15 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.5.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.5.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyQmlObject { property bool test: false diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.qml index 36655ee..4053091 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptConnect.6.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 import "scriptConnect.6.js" as Script MyQmlObject { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml index 0cb4d79..bbe7024 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.1.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 import "scriptDisconnect.1.js" as Script MyQmlObject { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.2.qml index 05ca7a4..8a166f4 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.2.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.2.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 import "scriptDisconnect.1.js" as Script MyQmlObject { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.3.qml index 2a66bed..548f2a1 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.3.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.3.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 import "scriptDisconnect.1.js" as Script MyQmlObject { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml index 7beb84e..11b22d7 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/scriptDisconnect.4.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 import "scriptDisconnect.1.js" as Script MyQmlObject { diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/sharedAttachedObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/sharedAttachedObject.qml index 817391d..2d090b8 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/sharedAttachedObject.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/sharedAttachedObject.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyQmlObject { id: root diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/shutdownErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/shutdownErrors.qml index 823096b..7a6aba7 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/shutdownErrors.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/shutdownErrors.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { property int test: myObject.object.a diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/signalTriggeredBindings.qml b/tests/auto/declarative/qdeclarativeecmascript/data/signalTriggeredBindings.qml index a2fb4d0..8410d33 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/signalTriggeredBindings.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/signalTriggeredBindings.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyQmlObject { property real base: 50 diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/strictlyEquals.qml b/tests/auto/declarative/qdeclarativeecmascript/data/strictlyEquals.qml index ec49a95..2932c778 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/strictlyEquals.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/strictlyEquals.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool test1: (a === true) diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.2.qml index a36b4c0..1e5afdf 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.2.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { id: root diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.qml index 26d9596..60d39fa 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/transientErrors.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property variant obj: nested diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/variantsAssignedUndefined.qml b/tests/auto/declarative/qdeclarativeecmascript/data/variantsAssignedUndefined.qml index 46e18e5..849dfad 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/data/variantsAssignedUndefined.qml +++ b/tests/auto/declarative/qdeclarativeecmascript/data/variantsAssignedUndefined.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool runTest: false diff --git a/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp b/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp index 56ebd73..092c83e 100644 --- a/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp +++ b/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp @@ -200,7 +200,7 @@ void tst_qdeclarativeengine::clearComponentCache() { QFile file("temp.qml"); QVERIFY(file.open(QIODevice::WriteOnly)); - file.write("import Qt 4.7\nQtObject {\nproperty int test: 10\n}\n"); + file.write("import QtQuick 1.0\nQtObject {\nproperty int test: 10\n}\n"); file.close(); } @@ -217,7 +217,7 @@ void tst_qdeclarativeengine::clearComponentCache() { QFile file("temp.qml"); QVERIFY(file.open(QIODevice::WriteOnly)); - file.write("import Qt 4.7\nQtObject {\nproperty int test: 11\n}\n"); + file.write("import QtQuick 1.0\nQtObject {\nproperty int test: 11\n}\n"); file.close(); } @@ -256,7 +256,7 @@ void tst_qdeclarativeengine::outputWarningsToStandardError() QCOMPARE(engine.outputWarningsToStandardError(), true); QDeclarativeComponent c(&engine); - c.setData("import Qt 4.7; QtObject { property int a: undefined }", QUrl()); + c.setData("import QtQuick 1.0; QtObject { property int a: undefined }", QUrl()); QVERIFY(c.isReady() == true); @@ -313,7 +313,7 @@ void tst_qdeclarativeengine::objectOwnership() { QDeclarativeEngine engine; QDeclarativeComponent c(&engine); - c.setData("import Qt 4.7; QtObject { property QtObject object: QtObject {} }", QUrl()); + c.setData("import QtQuick 1.0; QtObject { property QtObject object: QtObject {} }", QUrl()); QObject *o = c.create(); QVERIFY(o != 0); diff --git a/tests/auto/declarative/qdeclarativeflickable/data/flickable01.qml b/tests/auto/declarative/qdeclarativeflickable/data/flickable01.qml index 45272e3..c53ae3f 100644 --- a/tests/auto/declarative/qdeclarativeflickable/data/flickable01.qml +++ b/tests/auto/declarative/qdeclarativeflickable/data/flickable01.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Flickable { } diff --git a/tests/auto/declarative/qdeclarativeflickable/data/flickable02.qml b/tests/auto/declarative/qdeclarativeflickable/data/flickable02.qml index 2550fcc..98925ae 100644 --- a/tests/auto/declarative/qdeclarativeflickable/data/flickable02.qml +++ b/tests/auto/declarative/qdeclarativeflickable/data/flickable02.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Flickable { width: 100; height: 100 diff --git a/tests/auto/declarative/qdeclarativeflickable/data/flickable03.qml b/tests/auto/declarative/qdeclarativeflickable/data/flickable03.qml index 27fe653..a3e92fe 100644 --- a/tests/auto/declarative/qdeclarativeflickable/data/flickable03.qml +++ b/tests/auto/declarative/qdeclarativeflickable/data/flickable03.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Flickable { width: 100; height: 100 diff --git a/tests/auto/declarative/qdeclarativeflickable/data/flickable04.qml b/tests/auto/declarative/qdeclarativeflickable/data/flickable04.qml index a840a01..fcc683a 100644 --- a/tests/auto/declarative/qdeclarativeflickable/data/flickable04.qml +++ b/tests/auto/declarative/qdeclarativeflickable/data/flickable04.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Flickable { property bool ok: false diff --git a/tests/auto/declarative/qdeclarativeflickable/data/flickableqgraphicswidget.qml b/tests/auto/declarative/qdeclarativeflickable/data/flickableqgraphicswidget.qml index 8e95a94..6cbf12c 100644 --- a/tests/auto/declarative/qdeclarativeflickable/data/flickableqgraphicswidget.qml +++ b/tests/auto/declarative/qdeclarativeflickable/data/flickableqgraphicswidget.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Flickable { width: 100; height: 100 diff --git a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp index e7ded8a..25edb36 100644 --- a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp +++ b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp @@ -162,7 +162,7 @@ void tst_qdeclarativeflickable::properties() void tst_qdeclarativeflickable::boundsBehavior() { QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7; Flickable { boundsBehavior: Flickable.StopAtBounds }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0; Flickable { boundsBehavior: Flickable.StopAtBounds }", QUrl::fromLocalFile("")); QDeclarativeFlickable *flickable = qobject_cast(component.create()); QSignalSpy spy(flickable, SIGNAL(boundsBehaviorChanged())); @@ -191,7 +191,7 @@ void tst_qdeclarativeflickable::boundsBehavior() void tst_qdeclarativeflickable::maximumFlickVelocity() { QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7; Flickable { maximumFlickVelocity: 1.0; }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0; Flickable { maximumFlickVelocity: 1.0; }", QUrl::fromLocalFile("")); QDeclarativeFlickable *flickable = qobject_cast(component.create()); QSignalSpy spy(flickable, SIGNAL(maximumFlickVelocityChanged())); @@ -208,7 +208,7 @@ void tst_qdeclarativeflickable::maximumFlickVelocity() void tst_qdeclarativeflickable::flickDeceleration() { QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7; Flickable { flickDeceleration: 1.0; }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0; Flickable { flickDeceleration: 1.0; }", QUrl::fromLocalFile("")); QDeclarativeFlickable *flickable = qobject_cast(component.create()); QSignalSpy spy(flickable, SIGNAL(flickDecelerationChanged())); @@ -225,7 +225,7 @@ void tst_qdeclarativeflickable::flickDeceleration() void tst_qdeclarativeflickable::pressDelay() { QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7; Flickable { pressDelay: 100; }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0; Flickable { pressDelay: 100; }", QUrl::fromLocalFile("")); QDeclarativeFlickable *flickable = qobject_cast(component.create()); QSignalSpy spy(flickable, SIGNAL(pressDelayChanged())); @@ -242,7 +242,7 @@ void tst_qdeclarativeflickable::pressDelay() void tst_qdeclarativeflickable::flickableDirection() { QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7; Flickable { flickableDirection: Flickable.VerticalFlick; }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0; Flickable { flickableDirection: Flickable.VerticalFlick; }", QUrl::fromLocalFile("")); QDeclarativeFlickable *flickable = qobject_cast(component.create()); QSignalSpy spy(flickable, SIGNAL(flickableDirectionChanged())); diff --git a/tests/auto/declarative/qdeclarativeflipable/data/crash.qml b/tests/auto/declarative/qdeclarativeflipable/data/crash.qml index fb369a6..bc5229b 100644 --- a/tests/auto/declarative/qdeclarativeflipable/data/crash.qml +++ b/tests/auto/declarative/qdeclarativeflipable/data/crash.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Flipable { transform: Rotation { diff --git a/tests/auto/declarative/qdeclarativeflipable/data/flipable-abort.qml b/tests/auto/declarative/qdeclarativeflipable/data/flipable-abort.qml index 41463fe..69ff4a2 100644 --- a/tests/auto/declarative/qdeclarativeflipable/data/flipable-abort.qml +++ b/tests/auto/declarative/qdeclarativeflipable/data/flipable-abort.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { Flipable { diff --git a/tests/auto/declarative/qdeclarativeflipable/data/test-flipable.qml b/tests/auto/declarative/qdeclarativeflipable/data/test-flipable.qml index 5ddf09d..02b69e0 100644 --- a/tests/auto/declarative/qdeclarativeflipable/data/test-flipable.qml +++ b/tests/auto/declarative/qdeclarativeflipable/data/test-flipable.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Flipable { id: flipable diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/chain.qml b/tests/auto/declarative/qdeclarativefocusscope/data/chain.qml index 42b50cf..a40bc2c 100644 --- a/tests/auto/declarative/qdeclarativefocusscope/data/chain.qml +++ b/tests/auto/declarative/qdeclarativefocusscope/data/chain.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: root diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/forcefocus.qml b/tests/auto/declarative/qdeclarativefocusscope/data/forcefocus.qml index 9144854..708e899 100644 --- a/tests/auto/declarative/qdeclarativefocusscope/data/forcefocus.qml +++ b/tests/auto/declarative/qdeclarativefocusscope/data/forcefocus.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 800; height: 600 diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/signalEmission.qml b/tests/auto/declarative/qdeclarativefocusscope/data/signalEmission.qml index 07601c7..5850791 100644 --- a/tests/auto/declarative/qdeclarativefocusscope/data/signalEmission.qml +++ b/tests/auto/declarative/qdeclarativefocusscope/data/signalEmission.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200 diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/test.qml b/tests/auto/declarative/qdeclarativefocusscope/data/test.qml index 55be103..5983c19 100644 --- a/tests/auto/declarative/qdeclarativefocusscope/data/test.qml +++ b/tests/auto/declarative/qdeclarativefocusscope/data/test.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "white" diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/test2.qml b/tests/auto/declarative/qdeclarativefocusscope/data/test2.qml index 5ed701d..8c0b3b4 100644 --- a/tests/auto/declarative/qdeclarativefocusscope/data/test2.qml +++ b/tests/auto/declarative/qdeclarativefocusscope/data/test2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "white" diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/test3.qml b/tests/auto/declarative/qdeclarativefocusscope/data/test3.qml index c6d112f..2e025cb 100644 --- a/tests/auto/declarative/qdeclarativefocusscope/data/test3.qml +++ b/tests/auto/declarative/qdeclarativefocusscope/data/test3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "white" diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/test4.qml b/tests/auto/declarative/qdeclarativefocusscope/data/test4.qml index 3c6d3bd..7192dee 100644 --- a/tests/auto/declarative/qdeclarativefocusscope/data/test4.qml +++ b/tests/auto/declarative/qdeclarativefocusscope/data/test4.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "white" diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/test5.qml b/tests/auto/declarative/qdeclarativefocusscope/data/test5.qml index 4417d5f..01dada5 100644 --- a/tests/auto/declarative/qdeclarativefocusscope/data/test5.qml +++ b/tests/auto/declarative/qdeclarativefocusscope/data/test5.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "white" diff --git a/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp b/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp index 8765426..158ee51 100644 --- a/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp +++ b/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp @@ -87,7 +87,7 @@ tst_qdeclarativefontloader::tst_qdeclarativefontloader() : void tst_qdeclarativefontloader::noFont() { - QString componentStr = "import Qt 4.7\nFontLoader { }"; + QString componentStr = "import QtQuick 1.0\nFontLoader { }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeFontLoader *fontObject = qobject_cast(component.create()); @@ -102,7 +102,7 @@ void tst_qdeclarativefontloader::noFont() void tst_qdeclarativefontloader::namedFont() { - QString componentStr = "import Qt 4.7\nFontLoader { name: \"Helvetica\" }"; + QString componentStr = "import QtQuick 1.0\nFontLoader { name: \"Helvetica\" }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeFontLoader *fontObject = qobject_cast(component.create()); @@ -115,7 +115,7 @@ void tst_qdeclarativefontloader::namedFont() void tst_qdeclarativefontloader::localFont() { - QString componentStr = "import Qt 4.7\nFontLoader { source: \"" SRCDIR "/data/tarzeau_ocr_a.ttf\" }"; + QString componentStr = "import QtQuick 1.0\nFontLoader { source: \"" SRCDIR "/data/tarzeau_ocr_a.ttf\" }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeFontLoader *fontObject = qobject_cast(component.create()); @@ -128,7 +128,7 @@ void tst_qdeclarativefontloader::localFont() void tst_qdeclarativefontloader::failLocalFont() { - QString componentStr = "import Qt 4.7\nFontLoader { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/dummy.ttf").toString() + "\" }"; + QString componentStr = "import QtQuick 1.0\nFontLoader { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/dummy.ttf").toString() + "\" }"; QTest::ignoreMessage(QtWarningMsg, QString("file::2:1: QML FontLoader: Cannot load font: \"" + QUrl::fromLocalFile(SRCDIR "/data/dummy.ttf").toString() + "\"").toUtf8().constData()); QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); @@ -142,7 +142,7 @@ void tst_qdeclarativefontloader::failLocalFont() void tst_qdeclarativefontloader::webFont() { - QString componentStr = "import Qt 4.7\nFontLoader { source: \"http://localhost:14448/tarzeau_ocr_a.ttf\" }"; + QString componentStr = "import QtQuick 1.0\nFontLoader { source: \"http://localhost:14448/tarzeau_ocr_a.ttf\" }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); @@ -158,7 +158,7 @@ void tst_qdeclarativefontloader::redirWebFont() { server.addRedirect("olddir/oldname.ttf","../tarzeau_ocr_a.ttf"); - QString componentStr = "import Qt 4.7\nFontLoader { source: \"http://localhost:14448/olddir/oldname.ttf\" }"; + QString componentStr = "import QtQuick 1.0\nFontLoader { source: \"http://localhost:14448/olddir/oldname.ttf\" }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); @@ -172,7 +172,7 @@ void tst_qdeclarativefontloader::redirWebFont() void tst_qdeclarativefontloader::failWebFont() { - QString componentStr = "import Qt 4.7\nFontLoader { source: \"http://localhost:14448/nonexist.ttf\" }"; + QString componentStr = "import QtQuick 1.0\nFontLoader { source: \"http://localhost:14448/nonexist.ttf\" }"; QTest::ignoreMessage(QtWarningMsg, "file::2:1: QML FontLoader: Cannot load font: \"http://localhost:14448/nonexist.ttf\""); QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); @@ -186,7 +186,7 @@ void tst_qdeclarativefontloader::failWebFont() void tst_qdeclarativefontloader::changeFont() { - QString componentStr = "import Qt 4.7\nFontLoader { source: font }"; + QString componentStr = "import QtQuick 1.0\nFontLoader { source: font }"; QDeclarativeContext *ctxt = engine.rootContext(); ctxt->setContextProperty("font", QUrl::fromLocalFile(SRCDIR "/data/tarzeau_ocr_a.ttf")); QDeclarativeComponent component(&engine); diff --git a/tests/auto/declarative/qdeclarativegridview/data/displaygrid.qml b/tests/auto/declarative/qdeclarativegridview/data/displaygrid.qml index 9c3c847..93f39ff 100644 --- a/tests/auto/declarative/qdeclarativegridview/data/displaygrid.qml +++ b/tests/auto/declarative/qdeclarativegridview/data/displaygrid.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 240 diff --git a/tests/auto/declarative/qdeclarativegridview/data/footer.qml b/tests/auto/declarative/qdeclarativegridview/data/footer.qml index 170b2b5..ad69a25 100644 --- a/tests/auto/declarative/qdeclarativegridview/data/footer.qml +++ b/tests/auto/declarative/qdeclarativegridview/data/footer.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 240 diff --git a/tests/auto/declarative/qdeclarativegridview/data/gridview-enforcerange.qml b/tests/auto/declarative/qdeclarativegridview/data/gridview-enforcerange.qml index 2fe173f..5719f43 100644 --- a/tests/auto/declarative/qdeclarativegridview/data/gridview-enforcerange.qml +++ b/tests/auto/declarative/qdeclarativegridview/data/gridview-enforcerange.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 240 diff --git a/tests/auto/declarative/qdeclarativegridview/data/gridview-initCurrent.qml b/tests/auto/declarative/qdeclarativegridview/data/gridview-initCurrent.qml index a5d651d..421f810 100644 --- a/tests/auto/declarative/qdeclarativegridview/data/gridview-initCurrent.qml +++ b/tests/auto/declarative/qdeclarativegridview/data/gridview-initCurrent.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { property int current: grid.currentIndex diff --git a/tests/auto/declarative/qdeclarativegridview/data/gridview1.qml b/tests/auto/declarative/qdeclarativegridview/data/gridview1.qml index 3d826dd..77c94ba 100644 --- a/tests/auto/declarative/qdeclarativegridview/data/gridview1.qml +++ b/tests/auto/declarative/qdeclarativegridview/data/gridview1.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: root diff --git a/tests/auto/declarative/qdeclarativegridview/data/gridview2.qml b/tests/auto/declarative/qdeclarativegridview/data/gridview2.qml index 772255d..7559a7f 100644 --- a/tests/auto/declarative/qdeclarativegridview/data/gridview2.qml +++ b/tests/auto/declarative/qdeclarativegridview/data/gridview2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 GridView { anchors.fill: parent diff --git a/tests/auto/declarative/qdeclarativegridview/data/gridview3.qml b/tests/auto/declarative/qdeclarativegridview/data/gridview3.qml index f108e3d..ab4ceeb 100644 --- a/tests/auto/declarative/qdeclarativegridview/data/gridview3.qml +++ b/tests/auto/declarative/qdeclarativegridview/data/gridview3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 GridView { anchors.fill: parent diff --git a/tests/auto/declarative/qdeclarativegridview/data/manual-highlight.qml b/tests/auto/declarative/qdeclarativegridview/data/manual-highlight.qml index 510fcc5..7bb2c95 100644 --- a/tests/auto/declarative/qdeclarativegridview/data/manual-highlight.qml +++ b/tests/auto/declarative/qdeclarativegridview/data/manual-highlight.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { diff --git a/tests/auto/declarative/qdeclarativegridview/data/propertychangestest.qml b/tests/auto/declarative/qdeclarativegridview/data/propertychangestest.qml index 8e4e178..10df234 100644 --- a/tests/auto/declarative/qdeclarativegridview/data/propertychangestest.qml +++ b/tests/auto/declarative/qdeclarativegridview/data/propertychangestest.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 360; height: 120; color: "white" diff --git a/tests/auto/declarative/qdeclarativegridview/data/setindex.qml b/tests/auto/declarative/qdeclarativegridview/data/setindex.qml index 93ef69b..36bf67d 100644 --- a/tests/auto/declarative/qdeclarativegridview/data/setindex.qml +++ b/tests/auto/declarative/qdeclarativegridview/data/setindex.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200 diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp index 5fd373c..975cf8f 100644 --- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp +++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp @@ -852,10 +852,10 @@ void tst_QDeclarativeGridView::componentChanges() QTRY_VERIFY(gridView); QDeclarativeComponent component(canvas->engine()); - component.setData("import Qt 4.7; Rectangle { color: \"blue\"; }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0; Rectangle { color: \"blue\"; }", QUrl::fromLocalFile("")); QDeclarativeComponent delegateComponent(canvas->engine()); - delegateComponent.setData("import Qt 4.7; Text { text: 'Name: ' + name }", QUrl::fromLocalFile("")); + delegateComponent.setData("import QtQuick 1.0; Text { text: 'Name: ' + name }", QUrl::fromLocalFile("")); QSignalSpy highlightSpy(gridView, SIGNAL(highlightChanged())); QSignalSpy delegateSpy(gridView, SIGNAL(delegateChanged())); diff --git a/tests/auto/declarative/qdeclarativeimage/data/aspectratio.qml b/tests/auto/declarative/qdeclarativeimage/data/aspectratio.qml index 402d33e..739299d 100644 --- a/tests/auto/declarative/qdeclarativeimage/data/aspectratio.qml +++ b/tests/auto/declarative/qdeclarativeimage/data/aspectratio.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Image { source: "heart.png" diff --git a/tests/auto/declarative/qdeclarativeimage/data/tiling.qml b/tests/auto/declarative/qdeclarativeimage/data/tiling.qml index 32839bb..49715ab 100644 --- a/tests/auto/declarative/qdeclarativeimage/data/tiling.qml +++ b/tests/auto/declarative/qdeclarativeimage/data/tiling.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 800; height: 600 diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp index 2686127..6fce2ad 100644 --- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp +++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp @@ -97,7 +97,7 @@ tst_qdeclarativeimage::tst_qdeclarativeimage() void tst_qdeclarativeimage::noSource() { - QString componentStr = "import Qt 4.7\nImage { source: \"\" }"; + QString componentStr = "import QtQuick 1.0\nImage { source: \"\" }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeImage *obj = qobject_cast(component.create()); @@ -154,7 +154,7 @@ void tst_qdeclarativeimage::imageSource() if (!error.isEmpty()) QTest::ignoreMessage(QtWarningMsg, error.toUtf8()); - QString componentStr = "import Qt 4.7\nImage { source: \"" + source + "\"; asynchronous: " + QString componentStr = "import QtQuick 1.0\nImage { source: \"" + source + "\"; asynchronous: " + (async ? QLatin1String("true") : QLatin1String("false")) + " }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); @@ -184,7 +184,7 @@ void tst_qdeclarativeimage::imageSource() void tst_qdeclarativeimage::clearSource() { - QString componentStr = "import Qt 4.7\nImage { source: srcImage }"; + QString componentStr = "import QtQuick 1.0\nImage { source: srcImage }"; QDeclarativeContext *ctxt = engine.rootContext(); ctxt->setContextProperty("srcImage", QUrl::fromLocalFile(SRCDIR "/data/colors.png")); QDeclarativeComponent component(&engine); @@ -206,7 +206,7 @@ void tst_qdeclarativeimage::clearSource() void tst_qdeclarativeimage::resized() { - QString componentStr = "import Qt 4.7\nImage { source: \"" SRCDIR "/data/colors.png\"; width: 300; height: 300 }"; + QString componentStr = "import QtQuick 1.0\nImage { source: \"" SRCDIR "/data/colors.png\"; width: 300; height: 300 }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeImage *obj = qobject_cast(component.create()); @@ -241,7 +241,7 @@ void tst_qdeclarativeimage::preserveAspectRatio() void tst_qdeclarativeimage::smooth() { - QString componentStr = "import Qt 4.7\nImage { source: \"" SRCDIR "/data/colors.png\"; smooth: true; width: 300; height: 300 }"; + QString componentStr = "import QtQuick 1.0\nImage { source: \"" SRCDIR "/data/colors.png\"; smooth: true; width: 300; height: 300 }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeImage *obj = qobject_cast(component.create()); @@ -257,7 +257,7 @@ void tst_qdeclarativeimage::smooth() void tst_qdeclarativeimage::svg() { QString src = QUrl::fromLocalFile(SRCDIR "/data/heart.svg").toString(); - QString componentStr = "import Qt 4.7\nImage { source: \"" + src + "\"; sourceSize.width: 300; sourceSize.height: 300 }"; + QString componentStr = "import QtQuick 1.0\nImage { source: \"" + src + "\"; sourceSize.width: 300; sourceSize.height: 300 }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeImage *obj = qobject_cast(component.create()); @@ -292,7 +292,7 @@ void tst_qdeclarativeimage::big() // have to build a 400 MB image. That would be a bug in the JPEG loader. QString src = QUrl::fromLocalFile(SRCDIR "/data/big.jpeg").toString(); - QString componentStr = "import Qt 4.7\nImage { source: \"" + src + "\"; width: 100; sourceSize.height: 256 }"; + QString componentStr = "import QtQuick 1.0\nImage { source: \"" + src + "\"; width: 100; sourceSize.height: 256 }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); @@ -354,7 +354,7 @@ void tst_qdeclarativeimage::noLoading() server.serveDirectory(SRCDIR "/data"); server.addRedirect("oldcolors.png", SERVER_ADDR "/colors.png"); - QString componentStr = "import Qt 4.7\nImage { source: srcImage }"; + QString componentStr = "import QtQuick 1.0\nImage { source: srcImage }"; QDeclarativeContext *ctxt = engine.rootContext(); ctxt->setContextProperty("srcImage", QUrl::fromLocalFile(SRCDIR "/data/heart.png")); QDeclarativeComponent component(&engine); diff --git a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp index d38160d..cd12e3a 100644 --- a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp +++ b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp @@ -192,7 +192,7 @@ void tst_qdeclarativeimageprovider::runTest(bool async, QDeclarativeImageProvide engine.addImageProvider("test", provider); QVERIFY(engine.imageProvider("test") != 0); - QString componentStr = "import Qt 4.7\nImage { source: \"" + source + "\"; " + QString componentStr = "import QtQuick 1.0\nImage { source: \"" + source + "\"; " + (async ? "asynchronous: true; " : "") + properties + " }"; QDeclarativeComponent component(&engine); @@ -271,7 +271,7 @@ void tst_qdeclarativeimageprovider::requestPixmap_async() QVERIFY(engine.imageProvider("test") != 0); // pixmaps are loaded synchronously regardless of 'asynchronous' value - QString componentStr = "import Qt 4.7\nImage { asynchronous: true; source: \"image://test/pixmap-async-test.png\" }"; + QString componentStr = "import QtQuick 1.0\nImage { asynchronous: true; source: \"image://test/pixmap-async-test.png\" }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeImage *obj = qobject_cast(component.create()); @@ -298,7 +298,7 @@ void tst_qdeclarativeimageprovider::removeProvider() QVERIFY(engine.imageProvider("test") != 0); // add provider, confirm it works - QString componentStr = "import Qt 4.7\nImage { source: \"" + newImageFileName() + "\" }"; + QString componentStr = "import QtQuick 1.0\nImage { source: \"" + newImageFileName() + "\" }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeImage *obj = qobject_cast(component.create()); @@ -359,7 +359,7 @@ void tst_qdeclarativeimageprovider::threadTest() engine.addImageProvider("test_thread", provider); QVERIFY(engine.imageProvider("test_thread") != 0); - QString componentStr = "import Qt 4.7\nItem { \n" + QString componentStr = "import QtQuick 1.0\nItem { \n" "Image { source: \"image://test_thread/blue\"; asynchronous: true; }\n" "Image { source: \"image://test_thread/red\"; asynchronous: true; }\n" "Image { source: \"image://test_thread/green\"; asynchronous: true; }\n" diff --git a/tests/auto/declarative/qdeclarativeinfo/data/NestedObject.qml b/tests/auto/declarative/qdeclarativeinfo/data/NestedObject.qml index 30e8274..a2afb61 100644 --- a/tests/auto/declarative/qdeclarativeinfo/data/NestedObject.qml +++ b/tests/auto/declarative/qdeclarativeinfo/data/NestedObject.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property variant nested diff --git a/tests/auto/declarative/qdeclarativeinfo/data/nestedQmlObject.qml b/tests/auto/declarative/qdeclarativeinfo/data/nestedQmlObject.qml index 9bd8571..f3516c6 100644 --- a/tests/auto/declarative/qdeclarativeinfo/data/nestedQmlObject.qml +++ b/tests/auto/declarative/qdeclarativeinfo/data/nestedQmlObject.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property variant nested diff --git a/tests/auto/declarative/qdeclarativeinfo/data/qmlObject.qml b/tests/auto/declarative/qdeclarativeinfo/data/qmlObject.qml index 9bb6be7..937cd64 100644 --- a/tests/auto/declarative/qdeclarativeinfo/data/qmlObject.qml +++ b/tests/auto/declarative/qdeclarativeinfo/data/qmlObject.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property variant nested diff --git a/tests/auto/declarative/qdeclarativeitem/data/childrenProperty.qml b/tests/auto/declarative/qdeclarativeitem/data/childrenProperty.qml index 5958004..fab2367 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/childrenProperty.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/childrenProperty.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: root diff --git a/tests/auto/declarative/qdeclarativeitem/data/childrenRect.qml b/tests/auto/declarative/qdeclarativeitem/data/childrenRect.qml index f351b53..84f362f 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/childrenRect.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/childrenRect.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400 diff --git a/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug.qml b/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug.qml index 4a2f056..2ab73a1 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400 diff --git a/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug2.qml b/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug2.qml index 225d8d4..d67ad0e 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug2.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width:360; diff --git a/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug3.qml b/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug3.qml index 54b5b68..9d8e1e8 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug3.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 300 diff --git a/tests/auto/declarative/qdeclarativeitem/data/keynavigationtest.qml b/tests/auto/declarative/qdeclarativeitem/data/keynavigationtest.qml index 87e64c5..229f969 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/keynavigationtest.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/keynavigationtest.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Grid { columns: 2 diff --git a/tests/auto/declarative/qdeclarativeitem/data/keyspriority.qml b/tests/auto/declarative/qdeclarativeitem/data/keyspriority.qml index 171536b..375a6b6 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/keyspriority.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/keyspriority.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import Test 1.0 KeyTestItem { diff --git a/tests/auto/declarative/qdeclarativeitem/data/keystest.qml b/tests/auto/declarative/qdeclarativeitem/data/keystest.qml index 8ff3e87..aedccd9 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/keystest.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/keystest.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { focus: true diff --git a/tests/auto/declarative/qdeclarativeitem/data/mapCoordinates.qml b/tests/auto/declarative/qdeclarativeitem/data/mapCoordinates.qml index 4a92e9d..bb20ecc 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/mapCoordinates.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/mapCoordinates.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: root; objectName: "root" diff --git a/tests/auto/declarative/qdeclarativeitem/data/mouseFocus.qml b/tests/auto/declarative/qdeclarativeitem/data/mouseFocus.qml index a562b8b..afa5397 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/mouseFocus.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/mouseFocus.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QGraphicsWidget { size: "200x100" diff --git a/tests/auto/declarative/qdeclarativeitem/data/propertychanges.qml b/tests/auto/declarative/qdeclarativeitem/data/propertychanges.qml index dd86453..f1ea933 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/propertychanges.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/propertychanges.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { Item { diff --git a/tests/auto/declarative/qdeclarativeitem/data/resourcesProperty.qml b/tests/auto/declarative/qdeclarativeitem/data/resourcesProperty.qml index 852f242..e82cd02 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/resourcesProperty.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/resourcesProperty.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: root diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp index 6b28c53..e9dad6b 100644 --- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp +++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp @@ -436,7 +436,7 @@ void tst_QDeclarativeItem::keyNavigation() void tst_QDeclarativeItem::smooth() { QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7; Item { smooth: false; }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0; Item { smooth: false; }", QUrl::fromLocalFile("")); QDeclarativeItem *item = qobject_cast(component.create()); QSignalSpy spy(item, SIGNAL(smoothChanged(bool))); @@ -465,7 +465,7 @@ void tst_QDeclarativeItem::smooth() void tst_QDeclarativeItem::clip() { QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7\nItem { clip: false\n }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0\nItem { clip: false\n }", QUrl::fromLocalFile("")); QDeclarativeItem *item = qobject_cast(component.create()); QSignalSpy spy(item, SIGNAL(clipChanged(bool))); @@ -572,7 +572,7 @@ void tst_QDeclarativeItem::transforms() QFETCH(QByteArray, qml); QFETCH(QMatrix, matrix); QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7\nItem { transform: "+qml+"}", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0\nItem { transform: "+qml+"}", QUrl::fromLocalFile("")); QDeclarativeItem *item = qobject_cast(component.create()); QVERIFY(item); QCOMPARE(item->sceneMatrix(), matrix); diff --git a/tests/auto/declarative/qdeclarativelanguage/data/Alias.qml b/tests/auto/declarative/qdeclarativelanguage/data/Alias.qml index deb84a8..6a33def 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/Alias.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/Alias.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { id: root diff --git a/tests/auto/declarative/qdeclarativelanguage/data/Alias2.qml b/tests/auto/declarative/qdeclarativelanguage/data/Alias2.qml index db205f1..919f5d8 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/Alias2.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/Alias2.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 QtObject { property variant other diff --git a/tests/auto/declarative/qdeclarativelanguage/data/Alias3.qml b/tests/auto/declarative/qdeclarativelanguage/data/Alias3.qml index 04f5ba3..3f73538 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/Alias3.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/Alias3.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 QtObject { property alias obj : otherObj diff --git a/tests/auto/declarative/qdeclarativelanguage/data/Alias4.qml b/tests/auto/declarative/qdeclarativelanguage/data/Alias4.qml index 80414ac..428790d 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/Alias4.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/Alias4.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 Alias3 {} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/ComponentComposite.qml b/tests/auto/declarative/qdeclarativelanguage/data/ComponentComposite.qml index 4c78cd7..9349a93 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/ComponentComposite.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/ComponentComposite.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Component { QtObject {} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/CompositeType.qml b/tests/auto/declarative/qdeclarativelanguage/data/CompositeType.qml index 61e6146..cf32b45 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/CompositeType.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/CompositeType.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { } diff --git a/tests/auto/declarative/qdeclarativelanguage/data/CompositeType3.qml b/tests/auto/declarative/qdeclarativelanguage/data/CompositeType3.qml index 0275e21..0687ce3 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/CompositeType3.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/CompositeType3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int a diff --git a/tests/auto/declarative/qdeclarativelanguage/data/DynamicPropertiesNestedType.qml b/tests/auto/declarative/qdeclarativelanguage/data/DynamicPropertiesNestedType.qml index 9746ab0..5de8a4a 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/DynamicPropertiesNestedType.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/DynamicPropertiesNestedType.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int super_a: 10 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/HelperAlias.qml b/tests/auto/declarative/qdeclarativelanguage/data/HelperAlias.qml index 23d6ed9..3a7022b 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/HelperAlias.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/HelperAlias.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 QtObject { property variant child diff --git a/tests/auto/declarative/qdeclarativelanguage/data/LocalLast.qml b/tests/auto/declarative/qdeclarativelanguage/data/LocalLast.qml index 8c953cb..f63283e 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/LocalLast.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/LocalLast.qml @@ -1,2 +1,2 @@ -import Qt 4.7 +import QtQuick 1.0 Text {} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/NestedAlias.qml b/tests/auto/declarative/qdeclarativelanguage/data/NestedAlias.qml index fdf4800..8aaddac 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/NestedAlias.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/NestedAlias.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property QtObject o1 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/NestedErrorsType.qml b/tests/auto/declarative/qdeclarativelanguage/data/NestedErrorsType.qml index ee02335..0ba4bd6 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/NestedErrorsType.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/NestedErrorsType.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { x: "You can't assign a string to a real!" diff --git a/tests/auto/declarative/qdeclarativelanguage/data/OnCompletedType.qml b/tests/auto/declarative/qdeclarativelanguage/data/OnCompletedType.qml index 5373959..c2ac5c8 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/OnCompletedType.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/OnCompletedType.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyQmlObject { property int a: Math.max(10, 9) diff --git a/tests/auto/declarative/qdeclarativelanguage/data/OnDestructionType.qml b/tests/auto/declarative/qdeclarativelanguage/data/OnDestructionType.qml index d5c6979..c3d0e1e 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/OnDestructionType.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/OnDestructionType.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyQmlObject { property int a: Math.max(10, 9) diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.1.qml index 291d47a..44167af 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/alias.1.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.1.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 QtObject { id: root diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.3.qml index 787eb77..7e5559a 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/alias.3.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property variant other diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.5.qml index bbd1901..0c839ee 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/alias.5.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.5.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import Test 1.0 QtObject { diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.6.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.6.qml index 2d99b64..663e8d0 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/alias.6.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.6.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property QtObject o; diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.7.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.7.qml index 4ceff3d..ec5536e 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/alias.7.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.7.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property QtObject object diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.8.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.8.qml index 5bf8702..d480611 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/alias.8.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.8.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property variant other diff --git a/tests/auto/declarative/qdeclarativelanguage/data/alias.9.qml b/tests/auto/declarative/qdeclarativelanguage/data/alias.9.qml index b8c71e1..0a49ad5 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/alias.9.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/alias.9.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property variant other diff --git a/tests/auto/declarative/qdeclarativelanguage/data/aliasPropertiesAndSignals.qml b/tests/auto/declarative/qdeclarativelanguage/data/aliasPropertiesAndSignals.qml index 59afe58..f04b1f6 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/aliasPropertiesAndSignals.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/aliasPropertiesAndSignals.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { id: root diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignCompositeToType.qml b/tests/auto/declarative/qdeclarativelanguage/data/assignCompositeToType.qml index 1009df7..ed214ff 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/assignCompositeToType.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/assignCompositeToType.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import Test 1.0 QtObject { diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml b/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml index bac704e..ab6f3df 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/assignLiteralToVariant.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property variant test1: 1 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignObjectToVariant.qml b/tests/auto/declarative/qdeclarativelanguage/data/assignObjectToVariant.qml index 2b1ef76..aab7ed2 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/assignObjectToVariant.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/assignObjectToVariant.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 QtObject { property variant a; diff --git a/tests/auto/declarative/qdeclarativelanguage/data/assignToNamespace.qml b/tests/auto/declarative/qdeclarativelanguage/data/assignToNamespace.qml index 2f49418..3cde2e8 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/assignToNamespace.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/assignToNamespace.qml @@ -1,4 +1,4 @@ -import Qt 4.7 as Qt47 +import QtQuick 1.0 as Qt47 Qt47.QtObject { Qt47: 10 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/attachedProperties.qml b/tests/auto/declarative/qdeclarativelanguage/data/attachedProperties.qml index 3a78170..1e93225 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/attachedProperties.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/attachedProperties.qml @@ -1,6 +1,6 @@ import Test 1.0 import Test 1.0 as Namespace -import Qt 4.7 +import QtQuick 1.0 QtObject { MyQmlObject.value: 10 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.1.qml index 730fffd..f4f66dd 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/component.1.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/component.1.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Component { } diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.2.qml index 7e7dd0f..7d677b5 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/component.2.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/component.2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: myId diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.3.qml index f0d5f71..1b9af8b 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/component.3.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/component.3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { Component { diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.4.qml index 521adbc..806613c 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/component.4.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/component.4.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Component { QtObject {} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.5.qml index 9c3938b..e94022a 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/component.5.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/component.5.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Component { x: 10 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.6.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.6.qml index 9208722..8f81a5a 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/component.6.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/component.6.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Component { id: QtObject {} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.7.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.7.qml index b81e0c3..94bf189 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/component.7.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/component.7.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Component { property int a diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.8.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.8.qml index 0b00890..69990ca 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/component.8.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/component.8.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Component { signal a diff --git a/tests/auto/declarative/qdeclarativelanguage/data/component.9.qml b/tests/auto/declarative/qdeclarativelanguage/data/component.9.qml index c5f93c9..5db9815 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/component.9.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/component.9.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Component { function a() {} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/componentCompositeType.qml b/tests/auto/declarative/qdeclarativelanguage/data/componentCompositeType.qml index 725069e..d04da62 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/componentCompositeType.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/componentCompositeType.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property variant test diff --git a/tests/auto/declarative/qdeclarativelanguage/data/crash2.qml b/tests/auto/declarative/qdeclarativelanguage/data/crash2.qml index f11abd9..6ac71ee 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/crash2.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/crash2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { objectName: "Hello" + "World" diff --git a/tests/auto/declarative/qdeclarativelanguage/data/customOnProperty.qml b/tests/auto/declarative/qdeclarativelanguage/data/customOnProperty.qml index 438e8e9..c1e4790 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/customOnProperty.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/customOnProperty.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int on diff --git a/tests/auto/declarative/qdeclarativelanguage/data/customParserIdNotAllowed.qml b/tests/auto/declarative/qdeclarativelanguage/data/customParserIdNotAllowed.qml index 902b598..50bc2ae 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/customParserIdNotAllowed.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/customParserIdNotAllowed.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 ListModel { ListElement { a: 10 } ListElement { id: foo; a: 12 } diff --git a/tests/auto/declarative/qdeclarativelanguage/data/customParserTypes.qml b/tests/auto/declarative/qdeclarativelanguage/data/customParserTypes.qml index 3230e49..4cf6827 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/customParserTypes.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/customParserTypes.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 ListModel { ListElement { a: 10 } ListElement { a: 12 } diff --git a/tests/auto/declarative/qdeclarativelanguage/data/declaredPropertyValues.qml b/tests/auto/declarative/qdeclarativelanguage/data/declaredPropertyValues.qml index c241861..f15373f 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/declaredPropertyValues.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/declaredPropertyValues.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int a: 10 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.qml b/tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.qml index 0cd0338..d98dfdb 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/defaultGrouped.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyTypeObject { grouped { diff --git a/tests/auto/declarative/qdeclarativelanguage/data/defaultPropertyListOrder.qml b/tests/auto/declarative/qdeclarativelanguage/data/defaultPropertyListOrder.qml index b4203b5..87dc3d3 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/defaultPropertyListOrder.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/defaultPropertyListOrder.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyContainer { QtObject { diff --git a/tests/auto/declarative/qdeclarativelanguage/data/destroyedSignal.qml b/tests/auto/declarative/qdeclarativelanguage/data/destroyedSignal.qml index 54d080a..ba65d78 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/destroyedSignal.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/destroyedSignal.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { onDestroyed: print("Hello World!") diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dontDoubleCallClassBegin.qml b/tests/auto/declarative/qdeclarativelanguage/data/dontDoubleCallClassBegin.qml index df048cc..0cdbdd7 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/dontDoubleCallClassBegin.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/dontDoubleCallClassBegin.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { property QtObject object: DontDoubleCallClassBeginItem {} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.1.qml index c0ed52c..2b6dd5d 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.1.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.1.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { default property QtObject a diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.2.qml index 1f46b96..7d11d99 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.2.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int a diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.3.qml index cf49062..b0f2828 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.3.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { signal a diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.4.qml index a14ec4c..e28cad3 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.4.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.4.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { function a() {} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.5.qml index ea77cfd..8e4acc0 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.5.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicMeta.5.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property UnknownType a diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicObject.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicObject.1.qml index a1be43a..cdad72b 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/dynamicObject.1.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicObject.1.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyCustomParserType { propa: a + 10 propb: Math.min(a, 10) diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.2.qml index df3de20..c03ec49 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.2.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.2.qml @@ -1,5 +1,5 @@ -import Qt 4.7 -import Qt 4.7 as Qt47 +import QtQuick 1.0 +import QtQuick 1.0 as Qt47 Qt.QtObject { property Qt47.QtObject objectProperty diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.qml index c997356..ed25c4b 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicObjectProperties.qml @@ -1,6 +1,6 @@ import Test 1.0 -import Qt 4.7 -import Qt 4.7 as Qt47 +import QtQuick 1.0 +import QtQuick 1.0 as Qt47 QtObject { property QtObject objectProperty diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml index 6bcae0f..782adef 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicProperties.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 QtObject { default property int intProperty : 10 property bool boolProperty: false diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicPropertiesNested.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicPropertiesNested.qml index cceb44b..64848fe 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/dynamicPropertiesNested.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicPropertiesNested.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 DynamicPropertiesNestedType { property int a: 13 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/dynamicSignalsAndSlots.qml b/tests/auto/declarative/qdeclarativelanguage/data/dynamicSignalsAndSlots.qml index 9aa5e86..78978db 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/dynamicSignalsAndSlots.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/dynamicSignalsAndSlots.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { signal signal1 function slot1() {} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/enumTypes.qml b/tests/auto/declarative/qdeclarativelanguage/data/enumTypes.qml index 6b5b451..3eda661 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/enumTypes.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/enumTypes.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Font { } diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNamespaceConflict.qml b/tests/auto/declarative/qdeclarativelanguage/data/importNamespaceConflict.qml index 3b80f0b..39e3846 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/importNamespaceConflict.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/importNamespaceConflict.qml @@ -1,4 +1,4 @@ import Test 1.0 as Rectangle -import Qt 4.7 +import QtQuick 1.0 Rectangle { } diff --git a/tests/auto/declarative/qdeclarativelanguage/data/importNonExist.qml b/tests/auto/declarative/qdeclarativelanguage/data/importNonExist.qml index 483cfec..9589692 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/importNonExist.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/importNonExist.qml @@ -1,5 +1,5 @@ // imports... import "will-not-be-found" -import Qt 4.7 +import QtQuick 1.0 Rectangle { } diff --git a/tests/auto/declarative/qdeclarativelanguage/data/inlineQmlComponents.qml b/tests/auto/declarative/qdeclarativelanguage/data/inlineQmlComponents.qml index 1ebec1b..a52bd23 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/inlineQmlComponents.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/inlineQmlComponents.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyContainer { Component { id: myComponent diff --git a/tests/auto/declarative/qdeclarativelanguage/data/interfaceProperty.qml b/tests/auto/declarative/qdeclarativelanguage/data/interfaceProperty.qml index 6a47536..444e234 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/interfaceProperty.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/interfaceProperty.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyQmlObject { interfaceProperty: MyQmlObject {} } diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.1.qml index 985fb94..13bdb12 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.1.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.1.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property alias a diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.2.qml index a2ac91c..b6378c3 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.2.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAlias.2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property alias a: 10 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.1.qml index 84d39df..c6dc44c 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.1.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.1.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 QtObject { MyQmlObject.foo: 10 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.10.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.10.qml index 40e3926..4942c21 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.10.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.10.qml @@ -1,5 +1,5 @@ import Test 1.0 as Namespace -import Qt 4.7 +import QtQuick 1.0 QtObject { Namespace.MadeUpClass.foo: 10 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.11.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.11.qml index 28f8220..e1fc8c1 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.11.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.11.qml @@ -1,5 +1,5 @@ import Test 1.0 as Namespace -import Qt 4.7 +import QtQuick 1.0 QtObject { Namespace.madeUpClass.foo: 10 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.2.qml index f45f88f..6938122 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.2.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.2.qml @@ -1,5 +1,5 @@ import Test 1.0 as Namespace -import Qt 4.7 +import QtQuick 1.0 QtObject { Namespace.MyQmlObject.foo: 10 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.3.qml index 64bc8bd..842600f 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.3.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.3.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 QtObject { MyQmlObject: 10 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.4.qml index ee3dedb..6f372a6 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.4.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.4.qml @@ -1,5 +1,5 @@ import Test 1.0 as Namespace -import Qt 4.7 +import QtQuick 1.0 QtObject { Namespace.MyQmlObject: 10 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.5.qml index 66cad2d..07eb6f3 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.5.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.5.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 QtObject { MyQmlObject: QtObject {} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.6.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.6.qml index 90d80bc..b725674 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.6.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.6.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 QtObject { Test.MyQmlObject: QtObject {} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.7.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.7.qml index 5293d55..50004ed 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.7.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.7.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 QtObject { MyTypeObject.foo: 10 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.8.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.8.qml index 6f319c1..7cdf5cd 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.8.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.8.qml @@ -1,5 +1,5 @@ import Test 1.0 as Namespace -import Qt 4.7 +import QtQuick 1.0 QtObject { Namespace.MyTypeObject.foo: 10 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.9.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.9.qml index b7e1302..503e9fa 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.9.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidAttachedProperty.9.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 QtObject { MadeUpClass.foo: 10 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.qml index 671f5ab..94afb16 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.1.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property variant o; diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.2.qml index f897cc8..d4fbf42 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.2.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidGroupedProperty.2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int o; diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.errors.txt index a65f5fd..034e937 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.errors.txt +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.errors.txt @@ -1 +1 @@ -2:18:Invalid import qualifier ID +2:23:Invalid import qualifier ID diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.qml index 00fc81b..580a0f3 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidImportID.qml @@ -1,4 +1,4 @@ -import Qt 4.7 -import Qt 4.7 as qt +import QtQuick 1.0 +import QtQuick 1.0 as qt QtObject {} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/invalidProperty.qml b/tests/auto/declarative/qdeclarativelanguage/data/invalidProperty.qml index 6077de4..bd26bc5 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/invalidProperty.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/invalidProperty.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int parseInt diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest.qml b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest.qml index 303b5a5..9985d33 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest.qml @@ -1,2 +1,2 @@ -import Qt 4.7 as Qt47 +import QtQuick 1.0 as Qt47 Qt47.Rectangle {} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest2.qml b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest2.qml index 8c953cb..f63283e 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest2.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/InstalledTest2.qml @@ -1,2 +1,2 @@ -import Qt 4.7 +import QtQuick 1.0 Text {} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/LocalLast.qml b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/LocalLast.qml index d09dea7..7f491eb 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/LocalLast.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/LocalLast.qml @@ -1,2 +1,2 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle {} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/PrivateType.qml b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/PrivateType.qml index 62e41a9..03bf25b 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/PrivateType.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest/PrivateType.qml @@ -1,2 +1,2 @@ -import Qt 4.7 +import QtQuick 1.0 Image {} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/InstalledTest.qml b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/InstalledTest.qml index 303b5a5..9985d33 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/InstalledTest.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/InstalledTest.qml @@ -1,2 +1,2 @@ -import Qt 4.7 as Qt47 +import QtQuick 1.0 as Qt47 Qt47.Rectangle {} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/InstalledTest2.qml b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/InstalledTest2.qml index 8c953cb..f63283e 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/InstalledTest2.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/lib/com/nokia/installedtest0/InstalledTest2.qml @@ -1,2 +1,2 @@ -import Qt 4.7 +import QtQuick 1.0 Text {} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.1.qml index 6c628e4..c02dd33 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.1.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/listAssignment.1.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyContainer { containerChildren: QtObject {} } diff --git a/tests/auto/declarative/qdeclarativelanguage/data/listItemDeleteSelf.qml b/tests/auto/declarative/qdeclarativelanguage/data/listItemDeleteSelf.qml index 0393382..85abbdc 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/listItemDeleteSelf.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/listItemDeleteSelf.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { ListModel { diff --git a/tests/auto/declarative/qdeclarativelanguage/data/listProperties.qml b/tests/auto/declarative/qdeclarativelanguage/data/listProperties.qml index 3027722..1f60951 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/listProperties.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/listProperties.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property list listProperty diff --git a/tests/auto/declarative/qdeclarativelanguage/data/method.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/method.1.qml index a2d8799..a3f97f8 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/method.1.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/method.1.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { function MyMethod() {} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/missingSignal.qml b/tests/auto/declarative/qdeclarativelanguage/data/missingSignal.qml index 1a417a9..e0e8442 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/missingSignal.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/missingSignal.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 QtObject { onClicked: console.log("Hello world!") } diff --git a/tests/auto/declarative/qdeclarativelanguage/data/nestedErrors.qml b/tests/auto/declarative/qdeclarativelanguage/data/nestedErrors.qml index 0aa3405..bbd05a1 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/nestedErrors.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/nestedErrors.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { NestedErrorsType {} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/noCreation.qml b/tests/auto/declarative/qdeclarativelanguage/data/noCreation.qml index 077abe1..548b7b8 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/noCreation.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/noCreation.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Keys { } diff --git a/tests/auto/declarative/qdeclarativelanguage/data/onCompleted.qml b/tests/auto/declarative/qdeclarativelanguage/data/onCompleted.qml index 71a7d26..e75f904 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/onCompleted.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/onCompleted.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyTypeObject { // We set a and b to ensure that onCompleted is executed after bindings and diff --git a/tests/auto/declarative/qdeclarativelanguage/data/onDestruction.qml b/tests/auto/declarative/qdeclarativelanguage/data/onDestruction.qml index 1b1eef9..77fe2ff 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/onDestruction.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/onDestruction.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyTypeObject { // We set a and b to ensure that onCompleted is executed after bindings and diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/property.1.qml index b3384d4..0b46ceb 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/property.1.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/property.1.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property blah a; diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/property.2.qml index 1ba9b17..3ff1686 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/property.2.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/property.2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property invalidmodifier a; diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/property.3.qml index 261e7e3..b219120 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/property.3.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/property.3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property invalidmodifier a; diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/property.4.qml index 0a0f969..bfadc9d 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/property.4.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/property.4.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { readonly property int a diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.5.qml b/tests/auto/declarative/qdeclarativelanguage/data/property.5.qml index 0340f79..1bb4850 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/property.5.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/property.5.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { readonly property int a: value diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.6.qml b/tests/auto/declarative/qdeclarativelanguage/data/property.6.qml index aad9e07..b5b3f42 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/property.6.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/property.6.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int Hello diff --git a/tests/auto/declarative/qdeclarativelanguage/data/property.7.qml b/tests/auto/declarative/qdeclarativelanguage/data/property.7.qml index 0246b2f..f9ec68a 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/property.7.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/property.7.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int Hello: 10 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.1.qml index d038ba3..dea52c9 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.1.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.1.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 QtObject { } diff --git a/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.2.qml index 1eab9f6..18c65c3 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.2.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/qmlAttachedPropertiesObjectMethod.2.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 QtObject { MyQmlObject.value: 10 } diff --git a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.qml index cfe255a..c70a55c 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/readOnly.3.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 QtObject { property variant child diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/signal.1.qml index 63fd74f..7d1a9db 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/signal.1.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/signal.1.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { signal mySignal(nontype a) diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/signal.2.qml index c11ce17..e7780a0 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/signal.2.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/signal.2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { signal mySignal(,) diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/signal.3.qml index 771ea50..4289bce 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/signal.3.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/signal.3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { signal mySignal(a) diff --git a/tests/auto/declarative/qdeclarativelanguage/data/signal.4.qml b/tests/auto/declarative/qdeclarativelanguage/data/signal.4.qml index 37c938a..6ce417d 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/signal.4.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/signal.4.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { signal MySignal diff --git a/tests/auto/declarative/qdeclarativelanguage/data/subdir/Test.qml b/tests/auto/declarative/qdeclarativelanguage/data/subdir/Test.qml index 1421361..0b054d0 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/subdir/Test.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/subdir/Test.qml @@ -1,2 +1,2 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { } diff --git a/tests/auto/declarative/qdeclarativelanguage/data/subdir/subsubdir/SubTest.qml b/tests/auto/declarative/qdeclarativelanguage/data/subdir/subsubdir/SubTest.qml index 1421361..0b054d0 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/subdir/subsubdir/SubTest.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/subdir/subsubdir/SubTest.qml @@ -1,2 +1,2 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { } diff --git a/tests/auto/declarative/qdeclarativelanguage/data/variantNotify.qml b/tests/auto/declarative/qdeclarativelanguage/data/variantNotify.qml index e7aaf16..cc3f1c2 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/variantNotify.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/variantNotify.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int notifyCount: 0 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.16.qml b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.16.qml index 1ddccc0..0699d67 100644 --- a/tests/auto/declarative/qdeclarativelanguage/data/wrongType.16.qml +++ b/tests/auto/declarative/qdeclarativelanguage/data/wrongType.16.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyQmlObject { qmlobjectProperty: QtObject {} } diff --git a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/LocalInternal.qml b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/LocalInternal.qml index d5a61ae..289cd21 100644 --- a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/LocalInternal.qml +++ b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/LocalInternal.qml @@ -1,3 +1,3 @@ -import Qt 4.7 +import QtQuick 1.0 Image { source: "pics/blue.png" } diff --git a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/Test.qml b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/Test.qml index 1421361..0b054d0 100644 --- a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/Test.qml +++ b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/Test.qml @@ -1,2 +1,2 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { } diff --git a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/UndeclaredLocal.qml b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/UndeclaredLocal.qml index d5a61ae..289cd21 100644 --- a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/UndeclaredLocal.qml +++ b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/UndeclaredLocal.qml @@ -1,3 +1,3 @@ -import Qt 4.7 +import QtQuick 1.0 Image { source: "pics/blue.png" } diff --git a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/subdir/SubTest.qml b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/subdir/SubTest.qml index 43aeb74..76d11dc 100644 --- a/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/subdir/SubTest.qml +++ b/tests/auto/declarative/qdeclarativelanguage/qtest/declarative/qmllanguage/subdir/SubTest.qml @@ -1,3 +1,3 @@ -import Qt 4.7 +import QtQuick 1.0 Text {} diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp index 1825991..f811555 100644 --- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp @@ -1384,12 +1384,12 @@ void tst_qdeclarativelanguage::importsLocal_data() << "QDeclarativeRectangle" << ""; QTest::newRow("local import second") - << "import Qt 4.7\nimport \"subdir\"\n" + << "import QtQuick 1.0\nimport \"subdir\"\n" "Test {}" << "QDeclarativeRectangle" << ""; QTest::newRow("local import subsubdir") - << "import Qt 4.7\nimport \"subdir/subsubdir\"\n" + << "import QtQuick 1.0\nimport \"subdir/subsubdir\"\n" "SubTest {}" << "QDeclarativeRectangle" << ""; @@ -1603,24 +1603,24 @@ void tst_qdeclarativelanguage::importsOrder_data() QTest::newRow("installed import versus builtin 1") << "import com.nokia.installedtest 1.5\n" - "import Qt 4.7\n" + "import QtQuick 1.0\n" "Rectangle {}" << (!qmlCheckTypes()?"QDeclarativeRectangle":"") << (!qmlCheckTypes()?"":"Rectangle is ambiguous. Found in Qt and in lib/com/nokia/installedtest"); QTest::newRow("installed import versus builtin 2") << - "import Qt 4.7\n" + "import QtQuick 1.0\n" "import com.nokia.installedtest 1.5\n" "Rectangle {}" << (!qmlCheckTypes()?"QDeclarativeText":"") << (!qmlCheckTypes()?"":"Rectangle is ambiguous. Found in lib/com/nokia/installedtest and in Qt"); QTest::newRow("namespaces cannot be overridden by types 1") << - "import Qt 4.7 as Rectangle\n" + "import QtQuick 1.0 as Rectangle\n" "import com.nokia.installedtest 1.5\n" "Rectangle {}" << "" << "Namespace Rectangle cannot be used as a type"; QTest::newRow("namespaces cannot be overridden by types 2") << - "import Qt 4.7 as Rectangle\n" + "import QtQuick 1.0 as Rectangle\n" "import com.nokia.installedtest 1.5\n" "Rectangle.Image {}" << "QDeclarativeImage" @@ -1675,7 +1675,7 @@ void tst_qdeclarativelanguage::qmlAttachedPropertiesObjectMethod() void tst_qdeclarativelanguage::crash1() { QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7\nComponent {}", QUrl()); + component.setData("import QtQuick 1.0\nComponent {}", QUrl()); } void tst_qdeclarativelanguage::crash2() diff --git a/tests/auto/declarative/qdeclarativelayoutitem/data/layoutItem.qml b/tests/auto/declarative/qdeclarativelayoutitem/data/layoutItem.qml index ee881a2..3497133 100644 --- a/tests/auto/declarative/qdeclarativelayoutitem/data/layoutItem.qml +++ b/tests/auto/declarative/qdeclarativelayoutitem/data/layoutItem.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 LayoutItem {//Sized by the layout id: resizable diff --git a/tests/auto/declarative/qdeclarativelistmodel/data/enumerate.qml b/tests/auto/declarative/qdeclarativelistmodel/data/enumerate.qml index 296cb9c..93697f3 100644 --- a/tests/auto/declarative/qdeclarativelistmodel/data/enumerate.qml +++ b/tests/auto/declarative/qdeclarativelistmodel/data/enumerate.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { property string result diff --git a/tests/auto/declarative/qdeclarativelistmodel/data/model.qml b/tests/auto/declarative/qdeclarativelistmodel/data/model.qml index f8a9175..bfd547e 100644 --- a/tests/auto/declarative/qdeclarativelistmodel/data/model.qml +++ b/tests/auto/declarative/qdeclarativelistmodel/data/model.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: item diff --git a/tests/auto/declarative/qdeclarativelistmodel/data/multipleroles.qml b/tests/auto/declarative/qdeclarativelistmodel/data/multipleroles.qml index b8f2f32..cc6d9de 100644 --- a/tests/auto/declarative/qdeclarativelistmodel/data/multipleroles.qml +++ b/tests/auto/declarative/qdeclarativelistmodel/data/multipleroles.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 ListView { width: 100 height: 250 @@ -22,4 +22,4 @@ ListView { rounded: false } } -} \ No newline at end of file +} diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp index 31cb545..b433570 100644 --- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp +++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp @@ -149,7 +149,7 @@ void tst_qdeclarativelistmodel::static_i18n() { QString expect = QString::fromUtf8("na\303\257ve"); - QString componentStr = "import Qt 4.7\nListModel { ListElement { prop1: \""+expect+"\"; prop2: QT_TR_NOOP(\""+expect+"\") } }"; + QString componentStr = "import QtQuick 1.0\nListModel { ListElement { prop1: \""+expect+"\"; prop2: QT_TR_NOOP(\""+expect+"\") } }"; QDeclarativeEngine engine; QDeclarativeComponent component(&engine); component.setData(componentStr.toUtf8(), QUrl::fromLocalFile("")); @@ -172,7 +172,7 @@ void tst_qdeclarativelistmodel::static_nestedElements() QString elementsStr = elements.join(",\n") + "\n"; QString componentStr = - "import Qt 4.7\n" + "import QtQuick 1.0\n" "ListModel {\n" " ListElement {\n" " attributes: [\n"; @@ -549,7 +549,7 @@ void tst_qdeclarativelistmodel::static_types() QFETCH(QString, qml); QFETCH(QVariant, value); - qml = "import Qt 4.7\nListModel { " + qml + " }"; + qml = "import QtQuick 1.0\nListModel { " + qml + " }"; QDeclarativeEngine engine; QDeclarativeComponent component(&engine); @@ -598,47 +598,47 @@ void tst_qdeclarativelistmodel::error_data() QTest::addColumn("error"); QTest::newRow("id not allowed in ListElement") - << "import Qt 4.7\nListModel { ListElement { id: fred } }" + << "import QtQuick 1.0\nListModel { ListElement { id: fred } }" << "ListElement: cannot use reserved \"id\" property"; QTest::newRow("id allowed in ListModel") - << "import Qt 4.7\nListModel { id:model }" + << "import QtQuick 1.0\nListModel { id:model }" << ""; QTest::newRow("random properties not allowed in ListModel") - << "import Qt 4.7\nListModel { foo:123 }" + << "import QtQuick 1.0\nListModel { foo:123 }" << "ListModel: undefined property 'foo'"; QTest::newRow("random properties allowed in ListElement") - << "import Qt 4.7\nListModel { ListElement { foo:123 } }" + << "import QtQuick 1.0\nListModel { ListElement { foo:123 } }" << ""; QTest::newRow("bindings not allowed in ListElement") - << "import Qt 4.7\nRectangle { id: rect; ListModel { ListElement { foo: rect.color } } }" + << "import QtQuick 1.0\nRectangle { id: rect; ListModel { ListElement { foo: rect.color } } }" << "ListElement: cannot use script for property value"; QTest::newRow("random object list properties allowed in ListElement") - << "import Qt 4.7\nListModel { ListElement { foo: [ ListElement { bar: 123 } ] } }" + << "import QtQuick 1.0\nListModel { ListElement { foo: [ ListElement { bar: 123 } ] } }" << ""; QTest::newRow("default properties not allowed in ListElement") - << "import Qt 4.7\nListModel { ListElement { Item { } } }" + << "import QtQuick 1.0\nListModel { ListElement { Item { } } }" << "ListElement: cannot contain nested elements"; QTest::newRow("QML elements not allowed in ListElement") - << "import Qt 4.7\nListModel { ListElement { a: Item { } } }" + << "import QtQuick 1.0\nListModel { ListElement { a: Item { } } }" << "ListElement: cannot contain nested elements"; QTest::newRow("qualified ListElement supported") - << "import Qt 4.7 as Foo\nFoo.ListModel { Foo.ListElement { a: 123 } }" + << "import QtQuick 1.0 as Foo\nFoo.ListModel { Foo.ListElement { a: 123 } }" << ""; QTest::newRow("qualified ListElement required") - << "import Qt 4.7 as Foo\nFoo.ListModel { ListElement { a: 123 } }" + << "import QtQuick 1.0 as Foo\nFoo.ListModel { ListElement { a: 123 } }" << "ListElement is not a type"; QTest::newRow("unknown qualified ListElement not allowed") - << "import Qt 4.7\nListModel { Foo.ListElement { a: 123 } }" + << "import QtQuick 1.0\nListModel { Foo.ListElement { a: 123 } }" << "Foo.ListElement - Foo is not a namespace"; } @@ -700,7 +700,7 @@ void tst_qdeclarativelistmodel::get() QDeclarativeEngine eng; QDeclarativeComponent component(&eng); component.setData( - "import Qt 4.7\n" + "import QtQuick 1.0\n" "ListModel { \n" "ListElement { roleA: 100 }\n" "ListElement { roleA: 200; roleB: 400 } \n" @@ -813,7 +813,7 @@ void tst_qdeclarativelistmodel::get_nested() QDeclarativeEngine eng; QDeclarativeComponent component(&eng); component.setData( - "import Qt 4.7\n" + "import QtQuick 1.0\n" "ListModel { \n" "ListElement {\n" "listRoleA: [\n" diff --git a/tests/auto/declarative/qdeclarativelistreference/data/MyType.qml b/tests/auto/declarative/qdeclarativelistreference/data/MyType.qml index 0275e21..0687ce3 100644 --- a/tests/auto/declarative/qdeclarativelistreference/data/MyType.qml +++ b/tests/auto/declarative/qdeclarativelistreference/data/MyType.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int a diff --git a/tests/auto/declarative/qdeclarativelistreference/data/engineTypes.qml b/tests/auto/declarative/qdeclarativelistreference/data/engineTypes.qml index 1ab5692..9ddc763 100644 --- a/tests/auto/declarative/qdeclarativelistreference/data/engineTypes.qml +++ b/tests/auto/declarative/qdeclarativelistreference/data/engineTypes.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property list myList diff --git a/tests/auto/declarative/qdeclarativelistreference/data/variantToList.qml b/tests/auto/declarative/qdeclarativelistreference/data/variantToList.qml index 13de975..39a49e8 100644 --- a/tests/auto/declarative/qdeclarativelistreference/data/variantToList.qml +++ b/tests/auto/declarative/qdeclarativelistreference/data/variantToList.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property list myList; diff --git a/tests/auto/declarative/qdeclarativelistview/data/displaylist.qml b/tests/auto/declarative/qdeclarativelistview/data/displaylist.qml index defd13e..487b70e 100644 --- a/tests/auto/declarative/qdeclarativelistview/data/displaylist.qml +++ b/tests/auto/declarative/qdeclarativelistview/data/displaylist.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 240 diff --git a/tests/auto/declarative/qdeclarativelistview/data/footer.qml b/tests/auto/declarative/qdeclarativelistview/data/footer.qml index 11cbe16..4cbd33b 100644 --- a/tests/auto/declarative/qdeclarativelistview/data/footer.qml +++ b/tests/auto/declarative/qdeclarativelistview/data/footer.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 240 diff --git a/tests/auto/declarative/qdeclarativelistview/data/itemlist.qml b/tests/auto/declarative/qdeclarativelistview/data/itemlist.qml index 9ea5953..fca2901 100644 --- a/tests/auto/declarative/qdeclarativelistview/data/itemlist.qml +++ b/tests/auto/declarative/qdeclarativelistview/data/itemlist.qml @@ -1,7 +1,7 @@ // This example demonstrates placing items in a view using // a VisualItemModel -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "lightgray" diff --git a/tests/auto/declarative/qdeclarativelistview/data/listview-enforcerange.qml b/tests/auto/declarative/qdeclarativelistview/data/listview-enforcerange.qml index 939a4d5..49dbcb3 100644 --- a/tests/auto/declarative/qdeclarativelistview/data/listview-enforcerange.qml +++ b/tests/auto/declarative/qdeclarativelistview/data/listview-enforcerange.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 240 diff --git a/tests/auto/declarative/qdeclarativelistview/data/listview-initCurrent.qml b/tests/auto/declarative/qdeclarativelistview/data/listview-initCurrent.qml index f3c2910..2c4cfab 100644 --- a/tests/auto/declarative/qdeclarativelistview/data/listview-initCurrent.qml +++ b/tests/auto/declarative/qdeclarativelistview/data/listview-initCurrent.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { property int current: list.currentIndex diff --git a/tests/auto/declarative/qdeclarativelistview/data/listview-sections.qml b/tests/auto/declarative/qdeclarativelistview/data/listview-sections.qml index 9a5ea55..283678b 100644 --- a/tests/auto/declarative/qdeclarativelistview/data/listview-sections.qml +++ b/tests/auto/declarative/qdeclarativelistview/data/listview-sections.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 240 diff --git a/tests/auto/declarative/qdeclarativelistview/data/listviewtest.qml b/tests/auto/declarative/qdeclarativelistview/data/listviewtest.qml index d5d3365..534540f 100644 --- a/tests/auto/declarative/qdeclarativelistview/data/listviewtest.qml +++ b/tests/auto/declarative/qdeclarativelistview/data/listviewtest.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 240 diff --git a/tests/auto/declarative/qdeclarativelistview/data/manual-highlight.qml b/tests/auto/declarative/qdeclarativelistview/data/manual-highlight.qml index 4913ebe..d8cfd9a 100644 --- a/tests/auto/declarative/qdeclarativelistview/data/manual-highlight.qml +++ b/tests/auto/declarative/qdeclarativelistview/data/manual-highlight.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { diff --git a/tests/auto/declarative/qdeclarativelistview/data/propertychangestest.qml b/tests/auto/declarative/qdeclarativelistview/data/propertychangestest.qml index 300fcb5..04bec59 100644 --- a/tests/auto/declarative/qdeclarativelistview/data/propertychangestest.qml +++ b/tests/auto/declarative/qdeclarativelistview/data/propertychangestest.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 180; height: 120; color: "white" diff --git a/tests/auto/declarative/qdeclarativelistview/data/strictlyenforcerange.qml b/tests/auto/declarative/qdeclarativelistview/data/strictlyenforcerange.qml index 6fc41fa..bb77a77 100644 --- a/tests/auto/declarative/qdeclarativelistview/data/strictlyenforcerange.qml +++ b/tests/auto/declarative/qdeclarativelistview/data/strictlyenforcerange.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 ListView { id: list diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp index cd17fad..6452bae 100644 --- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp +++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp @@ -1416,10 +1416,10 @@ void tst_QDeclarativeListView::componentChanges() QTRY_VERIFY(listView); QDeclarativeComponent component(canvas->engine()); - component.setData("import Qt 4.7; Rectangle { color: \"blue\"; }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0; Rectangle { color: \"blue\"; }", QUrl::fromLocalFile("")); QDeclarativeComponent delegateComponent(canvas->engine()); - delegateComponent.setData("import Qt 4.7; Text { text: 'Name: ' + name }", QUrl::fromLocalFile("")); + delegateComponent.setData("import QtQuick 1.0; Text { text: 'Name: ' + name }", QUrl::fromLocalFile("")); QSignalSpy highlightSpy(listView, SIGNAL(highlightChanged())); QSignalSpy delegateSpy(listView, SIGNAL(delegateChanged())); diff --git a/tests/auto/declarative/qdeclarativeloader/data/AnchoredLoader.qml b/tests/auto/declarative/qdeclarativeloader/data/AnchoredLoader.qml index 5d02dae..7654c07 100644 --- a/tests/auto/declarative/qdeclarativeloader/data/AnchoredLoader.qml +++ b/tests/auto/declarative/qdeclarativeloader/data/AnchoredLoader.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 300 diff --git a/tests/auto/declarative/qdeclarativeloader/data/BlueRect.qml b/tests/auto/declarative/qdeclarativeloader/data/BlueRect.qml index f202fc8..d2da64d 100644 --- a/tests/auto/declarative/qdeclarativeloader/data/BlueRect.qml +++ b/tests/auto/declarative/qdeclarativeloader/data/BlueRect.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { objectName: "blue" diff --git a/tests/auto/declarative/qdeclarativeloader/data/GraphicsWidget250x250.qml b/tests/auto/declarative/qdeclarativeloader/data/GraphicsWidget250x250.qml index 3b851c1..139657b 100644 --- a/tests/auto/declarative/qdeclarativeloader/data/GraphicsWidget250x250.qml +++ b/tests/auto/declarative/qdeclarativeloader/data/GraphicsWidget250x250.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QGraphicsWidget { size: "250x250" diff --git a/tests/auto/declarative/qdeclarativeloader/data/GreenRect.qml b/tests/auto/declarative/qdeclarativeloader/data/GreenRect.qml index 9b8f770..5aeb81e 100644 --- a/tests/auto/declarative/qdeclarativeloader/data/GreenRect.qml +++ b/tests/auto/declarative/qdeclarativeloader/data/GreenRect.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 100; height: 100 diff --git a/tests/auto/declarative/qdeclarativeloader/data/NoResize.qml b/tests/auto/declarative/qdeclarativeloader/data/NoResize.qml index 72cd3b9..bb1030e 100644 --- a/tests/auto/declarative/qdeclarativeloader/data/NoResize.qml +++ b/tests/auto/declarative/qdeclarativeloader/data/NoResize.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { width: 200; height: 80 diff --git a/tests/auto/declarative/qdeclarativeloader/data/NoResizeGraphicsWidget.qml b/tests/auto/declarative/qdeclarativeloader/data/NoResizeGraphicsWidget.qml index 0cff506..5a31eff 100644 --- a/tests/auto/declarative/qdeclarativeloader/data/NoResizeGraphicsWidget.qml +++ b/tests/auto/declarative/qdeclarativeloader/data/NoResizeGraphicsWidget.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { width: 200 diff --git a/tests/auto/declarative/qdeclarativeloader/data/Rect120x60.qml b/tests/auto/declarative/qdeclarativeloader/data/Rect120x60.qml index d808c51..5a35284 100644 --- a/tests/auto/declarative/qdeclarativeloader/data/Rect120x60.qml +++ b/tests/auto/declarative/qdeclarativeloader/data/Rect120x60.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 120 diff --git a/tests/auto/declarative/qdeclarativeloader/data/SetSourceComponent.qml b/tests/auto/declarative/qdeclarativeloader/data/SetSourceComponent.qml index d99dd01..fa2d3cb 100644 --- a/tests/auto/declarative/qdeclarativeloader/data/SetSourceComponent.qml +++ b/tests/auto/declarative/qdeclarativeloader/data/SetSourceComponent.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { function clear() { diff --git a/tests/auto/declarative/qdeclarativeloader/data/SizeGraphicsWidgetToLoader.qml b/tests/auto/declarative/qdeclarativeloader/data/SizeGraphicsWidgetToLoader.qml index 81610ad..a855947 100644 --- a/tests/auto/declarative/qdeclarativeloader/data/SizeGraphicsWidgetToLoader.qml +++ b/tests/auto/declarative/qdeclarativeloader/data/SizeGraphicsWidgetToLoader.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Loader { width: 200 diff --git a/tests/auto/declarative/qdeclarativeloader/data/SizeLoaderToGraphicsWidget.qml b/tests/auto/declarative/qdeclarativeloader/data/SizeLoaderToGraphicsWidget.qml index a801a42..b6fd57f 100644 --- a/tests/auto/declarative/qdeclarativeloader/data/SizeLoaderToGraphicsWidget.qml +++ b/tests/auto/declarative/qdeclarativeloader/data/SizeLoaderToGraphicsWidget.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Loader { source: "GraphicsWidget250x250.qml" diff --git a/tests/auto/declarative/qdeclarativeloader/data/SizeToItem.qml b/tests/auto/declarative/qdeclarativeloader/data/SizeToItem.qml index 77aa8d9..36ce991 100644 --- a/tests/auto/declarative/qdeclarativeloader/data/SizeToItem.qml +++ b/tests/auto/declarative/qdeclarativeloader/data/SizeToItem.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Loader { source: "Rect120x60.qml" diff --git a/tests/auto/declarative/qdeclarativeloader/data/SizeToLoader.qml b/tests/auto/declarative/qdeclarativeloader/data/SizeToLoader.qml index 0098927..4fa945b 100644 --- a/tests/auto/declarative/qdeclarativeloader/data/SizeToLoader.qml +++ b/tests/auto/declarative/qdeclarativeloader/data/SizeToLoader.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Loader { width: 200; height: 80 diff --git a/tests/auto/declarative/qdeclarativeloader/data/VmeError.qml b/tests/auto/declarative/qdeclarativeloader/data/VmeError.qml index 633f03d..a36c246 100644 --- a/tests/auto/declarative/qdeclarativeloader/data/VmeError.qml +++ b/tests/auto/declarative/qdeclarativeloader/data/VmeError.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 100; height: 100; color: "red" diff --git a/tests/auto/declarative/qdeclarativeloader/data/crash.qml b/tests/auto/declarative/qdeclarativeloader/data/crash.qml index db9abca..c7a4407 100644 --- a/tests/auto/declarative/qdeclarativeloader/data/crash.qml +++ b/tests/auto/declarative/qdeclarativeloader/data/crash.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400 diff --git a/tests/auto/declarative/qdeclarativeloader/data/differentorigin.qml b/tests/auto/declarative/qdeclarativeloader/data/differentorigin.qml index b32558b..043ce55 100644 --- a/tests/auto/declarative/qdeclarativeloader/data/differentorigin.qml +++ b/tests/auto/declarative/qdeclarativeloader/data/differentorigin.qml @@ -1,3 +1,3 @@ -import Qt 4.7 +import QtQuick 1.0 Loader { source: "http://evil.place/evil.qml" } diff --git a/tests/auto/declarative/qdeclarativeloader/data/nonItem.qml b/tests/auto/declarative/qdeclarativeloader/data/nonItem.qml index 5ce003d..1d0ab5c 100644 --- a/tests/auto/declarative/qdeclarativeloader/data/nonItem.qml +++ b/tests/auto/declarative/qdeclarativeloader/data/nonItem.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Loader { sourceComponent: QtObject {} diff --git a/tests/auto/declarative/qdeclarativeloader/data/sameorigin-load.qml b/tests/auto/declarative/qdeclarativeloader/data/sameorigin-load.qml index 812c1be..dbea969 100644 --- a/tests/auto/declarative/qdeclarativeloader/data/sameorigin-load.qml +++ b/tests/auto/declarative/qdeclarativeloader/data/sameorigin-load.qml @@ -1,3 +1,3 @@ -import Qt 4.7 +import QtQuick 1.0 Item { } diff --git a/tests/auto/declarative/qdeclarativeloader/data/sameorigin.qml b/tests/auto/declarative/qdeclarativeloader/data/sameorigin.qml index 91732a1..8ba13a0 100644 --- a/tests/auto/declarative/qdeclarativeloader/data/sameorigin.qml +++ b/tests/auto/declarative/qdeclarativeloader/data/sameorigin.qml @@ -1,3 +1,3 @@ -import Qt 4.7 +import QtQuick 1.0 Loader { source: "sameorigin-load.qml" } diff --git a/tests/auto/declarative/qdeclarativeloader/data/vmeErrors.qml b/tests/auto/declarative/qdeclarativeloader/data/vmeErrors.qml index ae33e00..cfced31 100644 --- a/tests/auto/declarative/qdeclarativeloader/data/vmeErrors.qml +++ b/tests/auto/declarative/qdeclarativeloader/data/vmeErrors.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Loader { source: "VmeError.qml" diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp index b62392d..8d04616 100644 --- a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp +++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp @@ -102,7 +102,7 @@ tst_QDeclarativeLoader::tst_QDeclarativeLoader() void tst_QDeclarativeLoader::url() { QDeclarativeComponent component(&engine); - component.setData(QByteArray("import Qt 4.7\nLoader { property int did_load: 0; onLoaded: did_load=123; source: \"Rect120x60.qml\" }"), TEST_FILE("")); + component.setData(QByteArray("import QtQuick 1.0\nLoader { property int did_load: 0; onLoaded: did_load=123; source: \"Rect120x60.qml\" }"), TEST_FILE("")); QDeclarativeLoader *loader = qobject_cast(component.create()); QVERIFY(loader != 0); QVERIFY(loader->item()); @@ -140,7 +140,7 @@ void tst_QDeclarativeLoader::invalidUrl() QTest::ignoreMessage(QtWarningMsg, QString(QUrl::fromLocalFile(SRCDIR "/data/IDontExist.qml").toString() + ": File not found").toUtf8().constData()); QDeclarativeComponent component(&engine); - component.setData(QByteArray("import Qt 4.7\nLoader { source: \"IDontExist.qml\" }"), TEST_FILE("")); + component.setData(QByteArray("import QtQuick 1.0\nLoader { source: \"IDontExist.qml\" }"), TEST_FILE("")); QDeclarativeLoader *loader = qobject_cast(component.create()); QVERIFY(loader != 0); QVERIFY(loader->item() == 0); @@ -156,7 +156,7 @@ void tst_QDeclarativeLoader::clear() { QDeclarativeComponent component(&engine); component.setData(QByteArray( - "import Qt 4.7\n" + "import QtQuick 1.0\n" " Loader { id: loader\n" " source: 'Rect120x60.qml'\n" " Timer { interval: 200; running: true; onTriggered: loader.source = '' }\n" @@ -220,7 +220,7 @@ void tst_QDeclarativeLoader::clear() void tst_QDeclarativeLoader::urlToComponent() { QDeclarativeComponent component(&engine); - component.setData(QByteArray("import Qt 4.7\n" + component.setData(QByteArray("import QtQuick 1.0\n" "Loader {\n" " id: loader\n" " Component { id: myComp; Rectangle { width: 10; height: 10 } }\n" @@ -445,7 +445,7 @@ void tst_QDeclarativeLoader::networkRequestUrl() server.serveDirectory(SRCDIR "/data"); QDeclarativeComponent component(&engine); - component.setData(QByteArray("import Qt 4.7\nLoader { property int did_load : 0; source: \"http://127.0.0.1:14450/Rect120x60.qml\"; onLoaded: did_load=123 }"), QUrl::fromLocalFile(SRCDIR "/dummy.qml")); + component.setData(QByteArray("import QtQuick 1.0\nLoader { property int did_load : 0; source: \"http://127.0.0.1:14450/Rect120x60.qml\"; onLoaded: did_load=123 }"), QUrl::fromLocalFile(SRCDIR "/dummy.qml")); if (component.isError()) qDebug() << component.errors(); QDeclarativeLoader *loader = qobject_cast(component.create()); @@ -470,7 +470,7 @@ void tst_QDeclarativeLoader::networkComponent() QDeclarativeComponent component(&engine); component.setData(QByteArray( - "import Qt 4.7\n" + "import QtQuick 1.0\n" "import \"http://127.0.0.1:14450/\" as NW\n" "Item {\n" " Component { id: comp; NW.SlowRect {} }\n" @@ -502,7 +502,7 @@ void tst_QDeclarativeLoader::failNetworkRequest() QTest::ignoreMessage(QtWarningMsg, "http://127.0.0.1:14450/IDontExist.qml: File not found"); QDeclarativeComponent component(&engine); - component.setData(QByteArray("import Qt 4.7\nLoader { property int did_load: 123; source: \"http://127.0.0.1:14450/IDontExist.qml\"; onLoaded: did_load=456 }"), QUrl::fromLocalFile("http://127.0.0.1:14450/dummy.qml")); + component.setData(QByteArray("import QtQuick 1.0\nLoader { property int did_load: 123; source: \"http://127.0.0.1:14450/IDontExist.qml\"; onLoaded: did_load=456 }"), QUrl::fromLocalFile("http://127.0.0.1:14450/dummy.qml")); QDeclarativeLoader *loader = qobject_cast(component.create()); QVERIFY(loader != 0); diff --git a/tests/auto/declarative/qdeclarativemousearea/data/clickandhold.qml b/tests/auto/declarative/qdeclarativemousearea/data/clickandhold.qml index f926daa..a6409e2 100644 --- a/tests/auto/declarative/qdeclarativemousearea/data/clickandhold.qml +++ b/tests/auto/declarative/qdeclarativemousearea/data/clickandhold.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: root diff --git a/tests/auto/declarative/qdeclarativemousearea/data/doubleclick.qml b/tests/auto/declarative/qdeclarativemousearea/data/doubleclick.qml index 9cddf1b..2348444 100644 --- a/tests/auto/declarative/qdeclarativemousearea/data/doubleclick.qml +++ b/tests/auto/declarative/qdeclarativemousearea/data/doubleclick.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: root diff --git a/tests/auto/declarative/qdeclarativemousearea/data/dragging.qml b/tests/auto/declarative/qdeclarativemousearea/data/dragging.qml index a28f049..dd89efb 100644 --- a/tests/auto/declarative/qdeclarativemousearea/data/dragging.qml +++ b/tests/auto/declarative/qdeclarativemousearea/data/dragging.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: whiteRect width: 200 diff --git a/tests/auto/declarative/qdeclarativemousearea/data/dragproperties.qml b/tests/auto/declarative/qdeclarativemousearea/data/dragproperties.qml index ba15250..7baefd5 100644 --- a/tests/auto/declarative/qdeclarativemousearea/data/dragproperties.qml +++ b/tests/auto/declarative/qdeclarativemousearea/data/dragproperties.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: whiteRect width: 200 diff --git a/tests/auto/declarative/qdeclarativemousearea/data/dragreset.qml b/tests/auto/declarative/qdeclarativemousearea/data/dragreset.qml index 789125b..c6d2e20 100644 --- a/tests/auto/declarative/qdeclarativemousearea/data/dragreset.qml +++ b/tests/auto/declarative/qdeclarativemousearea/data/dragreset.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: whiteRect width: 200 diff --git a/tests/auto/declarative/qdeclarativemousearea/data/rejectEvent.qml b/tests/auto/declarative/qdeclarativemousearea/data/rejectEvent.qml index c01e938..fc8292d 100644 --- a/tests/auto/declarative/qdeclarativemousearea/data/rejectEvent.qml +++ b/tests/auto/declarative/qdeclarativemousearea/data/rejectEvent.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: root diff --git a/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnClick.qml b/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnClick.qml index 6008499..b77f743 100644 --- a/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnClick.qml +++ b/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnClick.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "#ffffff" diff --git a/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnResize.qml b/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnResize.qml index 2a2b905..6571d8b 100644 --- a/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnResize.qml +++ b/tests/auto/declarative/qdeclarativemousearea/data/updateMousePosOnResize.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "#ffffff" diff --git a/tests/auto/declarative/qdeclarativeparticles/data/particlemotiontest.qml b/tests/auto/declarative/qdeclarativeparticles/data/particlemotiontest.qml index ec8f452..dad9746 100644 --- a/tests/auto/declarative/qdeclarativeparticles/data/particlemotiontest.qml +++ b/tests/auto/declarative/qdeclarativeparticles/data/particlemotiontest.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import Qt.labs.particles 1.0 Rectangle { diff --git a/tests/auto/declarative/qdeclarativeparticles/data/particlestest.qml b/tests/auto/declarative/qdeclarativeparticles/data/particlestest.qml index af15665..c76fe9b 100644 --- a/tests/auto/declarative/qdeclarativeparticles/data/particlestest.qml +++ b/tests/auto/declarative/qdeclarativeparticles/data/particlestest.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import Qt.labs.particles 1.0 Rectangle{ diff --git a/tests/auto/declarative/qdeclarativepathview/data/datamodel.qml b/tests/auto/declarative/qdeclarativepathview/data/datamodel.qml index fb3c910..1322025 100644 --- a/tests/auto/declarative/qdeclarativepathview/data/datamodel.qml +++ b/tests/auto/declarative/qdeclarativepathview/data/datamodel.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 PathView { id: pathview diff --git a/tests/auto/declarative/qdeclarativepathview/data/displaypath.qml b/tests/auto/declarative/qdeclarativepathview/data/displaypath.qml index c82914f..88dfc57 100644 --- a/tests/auto/declarative/qdeclarativepathview/data/displaypath.qml +++ b/tests/auto/declarative/qdeclarativepathview/data/displaypath.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 240 diff --git a/tests/auto/declarative/qdeclarativepathview/data/emptymodel.qml b/tests/auto/declarative/qdeclarativepathview/data/emptymodel.qml index 177c405..4deb45f 100644 --- a/tests/auto/declarative/qdeclarativepathview/data/emptymodel.qml +++ b/tests/auto/declarative/qdeclarativepathview/data/emptymodel.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 PathView { model: emptyModel diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathUpdateOnStartChanged.qml b/tests/auto/declarative/qdeclarativepathview/data/pathUpdateOnStartChanged.qml index ce0f0c9..bd732ab 100644 --- a/tests/auto/declarative/qdeclarativepathview/data/pathUpdateOnStartChanged.qml +++ b/tests/auto/declarative/qdeclarativepathview/data/pathUpdateOnStartChanged.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 800 diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathtest.qml b/tests/auto/declarative/qdeclarativepathview/data/pathtest.qml index caa1586..b13c006 100644 --- a/tests/auto/declarative/qdeclarativepathview/data/pathtest.qml +++ b/tests/auto/declarative/qdeclarativepathview/data/pathtest.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Path { startX: 120; startY: 100 diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathview0.qml b/tests/auto/declarative/qdeclarativepathview/data/pathview0.qml index ff6f224..04c7717 100644 --- a/tests/auto/declarative/qdeclarativepathview/data/pathview0.qml +++ b/tests/auto/declarative/qdeclarativepathview/data/pathview0.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: root diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathview1.qml b/tests/auto/declarative/qdeclarativepathview/data/pathview1.qml index c3d2f91..d1ac517 100644 --- a/tests/auto/declarative/qdeclarativepathview/data/pathview1.qml +++ b/tests/auto/declarative/qdeclarativepathview/data/pathview1.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 PathView { } diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathview2.qml b/tests/auto/declarative/qdeclarativepathview/data/pathview2.qml index 2ce66a2..1e1e893 100644 --- a/tests/auto/declarative/qdeclarativepathview/data/pathview2.qml +++ b/tests/auto/declarative/qdeclarativepathview/data/pathview2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 PathView { id: photoPathView diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathview3.qml b/tests/auto/declarative/qdeclarativepathview/data/pathview3.qml index 066c531..cd1ba03 100644 --- a/tests/auto/declarative/qdeclarativepathview/data/pathview3.qml +++ b/tests/auto/declarative/qdeclarativepathview/data/pathview3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 PathView { id: photoPathView diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathview_package.qml b/tests/auto/declarative/qdeclarativepathview/data/pathview_package.qml index 082da13..f9157bd 100644 --- a/tests/auto/declarative/qdeclarativepathview/data/pathview_package.qml +++ b/tests/auto/declarative/qdeclarativepathview/data/pathview_package.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { width: 800; height: 600 diff --git a/tests/auto/declarative/qdeclarativepathview/data/propertychanges.qml b/tests/auto/declarative/qdeclarativepathview/data/propertychanges.qml index 6cc9d2a..c0cc855 100644 --- a/tests/auto/declarative/qdeclarativepathview/data/propertychanges.qml +++ b/tests/auto/declarative/qdeclarativepathview/data/propertychanges.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 350; height: 220; color: "white" diff --git a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp index cbfbfbd..3b5d438 100644 --- a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp +++ b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp @@ -687,7 +687,7 @@ void tst_QDeclarativePathView::componentChanges() QVERIFY(pathView); QDeclarativeComponent delegateComponent(canvas->engine()); - delegateComponent.setData("import Qt 4.7; Text { text: 'Name: ' + name }", QUrl::fromLocalFile("")); + delegateComponent.setData("import QtQuick 1.0; Text { text: 'Name: ' + name }", QUrl::fromLocalFile("")); QSignalSpy delegateSpy(pathView, SIGNAL(delegateChanged())); diff --git a/tests/auto/declarative/qdeclarativepositioners/data/flow-testimplicitsize.qml b/tests/auto/declarative/qdeclarativepositioners/data/flow-testimplicitsize.qml index 6dd108e..51c8134 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/flow-testimplicitsize.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/flow-testimplicitsize.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 300; height: 200; @@ -13,4 +13,4 @@ Rectangle { Rectangle { color: "red"; width: 100; height: 50 } Rectangle { color: "blue"; width: 100; height: 50 } } -} \ No newline at end of file +} diff --git a/tests/auto/declarative/qdeclarativepositioners/data/flowtest.qml b/tests/auto/declarative/qdeclarativepositioners/data/flowtest.qml index 3ba015d..2810234 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/flowtest.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/flowtest.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { width: 90 diff --git a/tests/auto/declarative/qdeclarativepositioners/data/grid-animated.qml b/tests/auto/declarative/qdeclarativepositioners/data/grid-animated.qml index 3a56be6..e13f078 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/grid-animated.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/grid-animated.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { width: 640 diff --git a/tests/auto/declarative/qdeclarativepositioners/data/grid-spacing.qml b/tests/auto/declarative/qdeclarativepositioners/data/grid-spacing.qml index e098812..f037330 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/grid-spacing.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/grid-spacing.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { width: 640 diff --git a/tests/auto/declarative/qdeclarativepositioners/data/grid-toptobottom.qml b/tests/auto/declarative/qdeclarativepositioners/data/grid-toptobottom.qml index 8799366..5d4c337 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/grid-toptobottom.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/grid-toptobottom.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { width: 640 diff --git a/tests/auto/declarative/qdeclarativepositioners/data/gridtest.qml b/tests/auto/declarative/qdeclarativepositioners/data/gridtest.qml index ab7238a..f3b17dd 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/gridtest.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/gridtest.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { width: 640 diff --git a/tests/auto/declarative/qdeclarativepositioners/data/gridzerocolumns.qml b/tests/auto/declarative/qdeclarativepositioners/data/gridzerocolumns.qml index 8e11f4e..169f974 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/gridzerocolumns.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/gridzerocolumns.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { width: 640 diff --git a/tests/auto/declarative/qdeclarativepositioners/data/horizontal-animated.qml b/tests/auto/declarative/qdeclarativepositioners/data/horizontal-animated.qml index 20a6258..5b064cd 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/horizontal-animated.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/horizontal-animated.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { width: 640 diff --git a/tests/auto/declarative/qdeclarativepositioners/data/horizontal-spacing.qml b/tests/auto/declarative/qdeclarativepositioners/data/horizontal-spacing.qml index 0e368c1..2b46bca 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/horizontal-spacing.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/horizontal-spacing.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { width: 640 diff --git a/tests/auto/declarative/qdeclarativepositioners/data/horizontal.qml b/tests/auto/declarative/qdeclarativepositioners/data/horizontal.qml index 71ad6ec..919cecc 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/horizontal.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/horizontal.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { width: 640 diff --git a/tests/auto/declarative/qdeclarativepositioners/data/propertychangestest.qml b/tests/auto/declarative/qdeclarativepositioners/data/propertychangestest.qml index a53ff82..3c95c4c 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/propertychangestest.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/propertychangestest.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Grid { id: myGrid diff --git a/tests/auto/declarative/qdeclarativepositioners/data/repeatertest.qml b/tests/auto/declarative/qdeclarativepositioners/data/repeatertest.qml index 531d716..1cba598 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/repeatertest.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/repeatertest.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { width: 640 diff --git a/tests/auto/declarative/qdeclarativepositioners/data/vertical-animated.qml b/tests/auto/declarative/qdeclarativepositioners/data/vertical-animated.qml index 1499c1e..8899ac8 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/vertical-animated.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/vertical-animated.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { width: 640 diff --git a/tests/auto/declarative/qdeclarativepositioners/data/vertical-spacing.qml b/tests/auto/declarative/qdeclarativepositioners/data/vertical-spacing.qml index f7e853a..5578961 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/vertical-spacing.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/vertical-spacing.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { width: 640 diff --git a/tests/auto/declarative/qdeclarativepositioners/data/vertical.qml b/tests/auto/declarative/qdeclarativepositioners/data/vertical.qml index 9e3d6ab..310d791 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/vertical.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/vertical.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { width: 640 diff --git a/tests/auto/declarative/qdeclarativepositioners/data/verticalqgraphicswidget.qml b/tests/auto/declarative/qdeclarativepositioners/data/verticalqgraphicswidget.qml index c9c8607..c320714 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/verticalqgraphicswidget.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/verticalqgraphicswidget.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { width: 640 diff --git a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp index 887be50..57a8354 100644 --- a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp +++ b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp @@ -694,80 +694,80 @@ void tst_QDeclarativePositioners::test_conflictinganchors() QDeclarativeEngine engine; QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7\nColumn { Item {} }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0\nColumn { Item {} }", QUrl::fromLocalFile("")); QDeclarativeItem *item = qobject_cast(component.create()); QVERIFY(item); QVERIFY(warningMessage.isEmpty()); - component.setData("import Qt 4.7\nRow { Item {} }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0\nRow { Item {} }", QUrl::fromLocalFile("")); item = qobject_cast(component.create()); QVERIFY(item); QVERIFY(warningMessage.isEmpty()); - component.setData("import Qt 4.7\nGrid { Item {} }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0\nGrid { Item {} }", QUrl::fromLocalFile("")); item = qobject_cast(component.create()); QVERIFY(item); QVERIFY(warningMessage.isEmpty()); - component.setData("import Qt 4.7\nFlow { Item {} }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0\nFlow { Item {} }", QUrl::fromLocalFile("")); item = qobject_cast(component.create()); QVERIFY(item); QVERIFY(warningMessage.isEmpty()); - component.setData("import Qt 4.7\nColumn { Item { anchors.top: parent.top } }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0\nColumn { Item { anchors.top: parent.top } }", QUrl::fromLocalFile("")); item = qobject_cast(component.create()); QVERIFY(item); QCOMPARE(warningMessage, QString("file::2:1: QML Column: Cannot specify top, bottom, verticalCenter, fill or centerIn anchors for items inside Column")); warningMessage.clear(); - component.setData("import Qt 4.7\nColumn { Item { anchors.centerIn: parent } }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0\nColumn { Item { anchors.centerIn: parent } }", QUrl::fromLocalFile("")); item = qobject_cast(component.create()); QVERIFY(item); QCOMPARE(warningMessage, QString("file::2:1: QML Column: Cannot specify top, bottom, verticalCenter, fill or centerIn anchors for items inside Column")); warningMessage.clear(); - component.setData("import Qt 4.7\nColumn { Item { anchors.left: parent.left } }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0\nColumn { Item { anchors.left: parent.left } }", QUrl::fromLocalFile("")); item = qobject_cast(component.create()); QVERIFY(item); QVERIFY(warningMessage.isEmpty()); warningMessage.clear(); - component.setData("import Qt 4.7\nRow { Item { anchors.left: parent.left } }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0\nRow { Item { anchors.left: parent.left } }", QUrl::fromLocalFile("")); item = qobject_cast(component.create()); QVERIFY(item); QCOMPARE(warningMessage, QString("file::2:1: QML Row: Cannot specify left, right, horizontalCenter, fill or centerIn anchors for items inside Row")); warningMessage.clear(); - component.setData("import Qt 4.7\nRow { Item { anchors.fill: parent } }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0\nRow { Item { anchors.fill: parent } }", QUrl::fromLocalFile("")); item = qobject_cast(component.create()); QVERIFY(item); QCOMPARE(warningMessage, QString("file::2:1: QML Row: Cannot specify left, right, horizontalCenter, fill or centerIn anchors for items inside Row")); warningMessage.clear(); - component.setData("import Qt 4.7\nRow { Item { anchors.top: parent.top } }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0\nRow { Item { anchors.top: parent.top } }", QUrl::fromLocalFile("")); item = qobject_cast(component.create()); QVERIFY(item); QVERIFY(warningMessage.isEmpty()); warningMessage.clear(); - component.setData("import Qt 4.7\nGrid { Item { anchors.horizontalCenter: parent.horizontalCenter } }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0\nGrid { Item { anchors.horizontalCenter: parent.horizontalCenter } }", QUrl::fromLocalFile("")); item = qobject_cast(component.create()); QVERIFY(item); QCOMPARE(warningMessage, QString("file::2:1: QML Grid: Cannot specify anchors for items inside Grid")); warningMessage.clear(); - component.setData("import Qt 4.7\nGrid { Item { anchors.centerIn: parent } }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0\nGrid { Item { anchors.centerIn: parent } }", QUrl::fromLocalFile("")); item = qobject_cast(component.create()); QVERIFY(item); QCOMPARE(warningMessage, QString("file::2:1: QML Grid: Cannot specify anchors for items inside Grid")); warningMessage.clear(); - component.setData("import Qt 4.7\nFlow { Item { anchors.verticalCenter: parent.verticalCenter } }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0\nFlow { Item { anchors.verticalCenter: parent.verticalCenter } }", QUrl::fromLocalFile("")); item = qobject_cast(component.create()); QVERIFY(item); QCOMPARE(warningMessage, QString("file::2:1: QML Flow: Cannot specify anchors for items inside Flow")); - component.setData("import Qt 4.7\nFlow { Item { anchors.fill: parent } }", QUrl::fromLocalFile("")); + component.setData("import QtQuick 1.0\nFlow { Item { anchors.fill: parent } }", QUrl::fromLocalFile("")); item = qobject_cast(component.create()); QVERIFY(item); QCOMPARE(warningMessage, QString("file::2:1: QML Flow: Cannot specify anchors for items inside Flow")); diff --git a/tests/auto/declarative/qdeclarativeproperty/data/TestType.qml b/tests/auto/declarative/qdeclarativeproperty/data/TestType.qml index 2177ae2..cef86b4 100644 --- a/tests/auto/declarative/qdeclarativeproperty/data/TestType.qml +++ b/tests/auto/declarative/qdeclarativeproperty/data/TestType.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int a: 10 diff --git a/tests/auto/declarative/qdeclarativeproperty/data/readSynthesizedObject.qml b/tests/auto/declarative/qdeclarativeproperty/data/readSynthesizedObject.qml index 0918e86..a91d3ed 100644 --- a/tests/auto/declarative/qdeclarativeproperty/data/readSynthesizedObject.qml +++ b/tests/auto/declarative/qdeclarativeproperty/data/readSynthesizedObject.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property TestType test diff --git a/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp b/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp index f1d3bf0..c825e85 100644 --- a/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp +++ b/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp @@ -138,7 +138,7 @@ void tst_QDeclarativePropertyMap::changed() QDeclarativeContext *ctxt = engine.rootContext(); ctxt->setContextProperty(QLatin1String("testdata"), &map); QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7\nText { text: { testdata.key1 = 'Hello World'; 'X' } }", + component.setData("import QtQuick 1.0\nText { text: { testdata.key1 = 'Hello World'; 'X' } }", QUrl::fromLocalFile("")); QVERIFY(component.isReady()); QDeclarativeText *txt = qobject_cast(component.create()); @@ -179,7 +179,7 @@ void tst_QDeclarativePropertyMap::crashBug() context.setContextProperty("map", &map); QDeclarativeComponent c(&engine); - c.setData("import Qt 4.7\nBinding { target: map; property: \"myProp\"; value: 10 + 23 }",QUrl()); + c.setData("import QtQuick 1.0\nBinding { target: map; property: \"myProp\"; value: 10 + 23 }",QUrl()); QObject *obj = c.create(&context); delete obj; } diff --git a/tests/auto/declarative/qdeclarativeqt/data/atob.qml b/tests/auto/declarative/qdeclarativeqt/data/atob.qml index 8355fa5..f74aae8 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/atob.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/atob.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string test1: Qt.atob() diff --git a/tests/auto/declarative/qdeclarativeqt/data/btoa.qml b/tests/auto/declarative/qdeclarativeqt/data/btoa.qml index c2993ff..63b58c0 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/btoa.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/btoa.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string test1: Qt.btoa() diff --git a/tests/auto/declarative/qdeclarativeqt/data/consoleLog.qml b/tests/auto/declarative/qdeclarativeqt/data/consoleLog.qml index aa9e92a..fe47f3f 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/consoleLog.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/consoleLog.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { Component.onCompleted: { diff --git a/tests/auto/declarative/qdeclarativeqt/data/createComponent.qml b/tests/auto/declarative/qdeclarativeqt/data/createComponent.qml index f966931..9d0dd34 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/createComponent.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/createComponent.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool emptyArg: false diff --git a/tests/auto/declarative/qdeclarativeqt/data/createComponentData.qml b/tests/auto/declarative/qdeclarativeqt/data/createComponentData.qml index dc3e0d3..6ac470e 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/createComponentData.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/createComponentData.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int test: 1913 diff --git a/tests/auto/declarative/qdeclarativeqt/data/createComponent_lib.qml b/tests/auto/declarative/qdeclarativeqt/data/createComponent_lib.qml index 33203c7..5b8c1b1 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/createComponent_lib.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/createComponent_lib.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import "createComponent_lib.js" as Test Item { diff --git a/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml b/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml index ca3ff22..8c35ebf 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/createQmlObject.qml @@ -1,14 +1,14 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: root // errors resulting in exceptions property QtObject incorrectArgCount1: Qt.createQmlObject() - property QtObject incorrectArgCount2: Qt.createQmlObject("import Qt 4.7\nQtObject{}", root, "main.qml", 10) - property QtObject noParent: Qt.createQmlObject("import Qt 4.7\nQtObject{\nproperty int test: 13}", 0) - property QtObject notAvailable: Qt.createQmlObject("import Qt 4.7\nQtObject{Blah{}}", root) - property QtObject errors: Qt.createQmlObject("import Qt 4.7\nQtObject{\nproperty int test: 13\nproperty int test: 13\n}", root, "main.qml") + property QtObject incorrectArgCount2: Qt.createQmlObject("import QtQuick 1.0\nQtObject{}", root, "main.qml", 10) + property QtObject noParent: Qt.createQmlObject("import QtQuick 1.0\nQtObject{\nproperty int test: 13}", 0) + property QtObject notAvailable: Qt.createQmlObject("import QtQuick 1.0\nQtObject{Blah{}}", root) + property QtObject errors: Qt.createQmlObject("import QtQuick 1.0\nQtObject{\nproperty int test: 13\nproperty int test: 13\n}", root, "main.qml") property bool emptyArg: false @@ -18,14 +18,14 @@ Item { // errors resulting in nulls emptyArg = (Qt.createQmlObject("", root) == null); try { - Qt.createQmlObject("import Qt 4.7\nQtObject{property int test\nonTestChanged: QtObject{}\n}", root) + Qt.createQmlObject("import QtQuick 1.0\nQtObject{property int test\nonTestChanged: QtObject{}\n}", root) } catch (error) { console.log("RunTimeError: ",error.message); } - var o = Qt.createQmlObject("import Qt 4.7\nQtObject{\nproperty int test: 13\n}", root); + var o = Qt.createQmlObject("import QtQuick 1.0\nQtObject{\nproperty int test: 13\n}", root); success = (o.test == 13); - Qt.createQmlObject("import Qt 4.7\nItem {}\n", root); + Qt.createQmlObject("import QtQuick 1.0\nItem {}\n", root); } } diff --git a/tests/auto/declarative/qdeclarativeqt/data/darker.qml b/tests/auto/declarative/qdeclarativeqt/data/darker.qml index 738095d..d2ef866 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/darker.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/darker.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property variant test1: Qt.darker(Qt.rgba(1, 0.8, 0.3)) diff --git a/tests/auto/declarative/qdeclarativeqt/data/enums.qml b/tests/auto/declarative/qdeclarativeqt/data/enums.qml index a0190cc..aec6f63 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/enums.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/enums.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int test1: Qt.Key_Escape diff --git a/tests/auto/declarative/qdeclarativeqt/data/fontFamilies.qml b/tests/auto/declarative/qdeclarativeqt/data/fontFamilies.qml index e66c7be..c9f50d4 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/fontFamilies.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/fontFamilies.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property variant test1: Qt.fontFamilies(10) diff --git a/tests/auto/declarative/qdeclarativeqt/data/formatting.qml b/tests/auto/declarative/qdeclarativeqt/data/formatting.qml index 7f48639..35c6a29 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/formatting.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/formatting.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property date date1: "2008-12-24" diff --git a/tests/auto/declarative/qdeclarativeqt/data/hsla.qml b/tests/auto/declarative/qdeclarativeqt/data/hsla.qml index 4ca67a3..3bcc791 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/hsla.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/hsla.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property color test1: Qt.hsla(1, 0, 0, 0.8); diff --git a/tests/auto/declarative/qdeclarativeqt/data/isQtObject.qml b/tests/auto/declarative/qdeclarativeqt/data/isQtObject.qml index 0f573c4..37b952d 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/isQtObject.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/isQtObject.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { id: root diff --git a/tests/auto/declarative/qdeclarativeqt/data/lighter.qml b/tests/auto/declarative/qdeclarativeqt/data/lighter.qml index ddaf78d..67f0d0f 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/lighter.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/lighter.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property variant test1: Qt.lighter(Qt.rgba(1, 0.8, 0.3)) diff --git a/tests/auto/declarative/qdeclarativeqt/data/md5.qml b/tests/auto/declarative/qdeclarativeqt/data/md5.qml index 07f719b..32e90c0 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/md5.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/md5.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string test1: Qt.md5() diff --git a/tests/auto/declarative/qdeclarativeqt/data/openUrlExternally.qml b/tests/auto/declarative/qdeclarativeqt/data/openUrlExternally.qml index 3ceb05d..c9fb25e 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/openUrlExternally.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/openUrlExternally.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { Component.onCompleted: Qt.openUrlExternally("test:url") diff --git a/tests/auto/declarative/qdeclarativeqt/data/point.qml b/tests/auto/declarative/qdeclarativeqt/data/point.qml index 0ada2d5..8b0188e 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/point.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/point.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property variant test1: Qt.point(19, 34); diff --git a/tests/auto/declarative/qdeclarativeqt/data/rect.qml b/tests/auto/declarative/qdeclarativeqt/data/rect.qml index fd38628..872bf50 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/rect.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/rect.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property variant test1: Qt.rect(10, 13, 100, 109) diff --git a/tests/auto/declarative/qdeclarativeqt/data/rgba.qml b/tests/auto/declarative/qdeclarativeqt/data/rgba.qml index 16606cd..bbafc6d 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/rgba.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/rgba.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property color test1: Qt.rgba(1, 0, 0, 0.8); diff --git a/tests/auto/declarative/qdeclarativeqt/data/size.qml b/tests/auto/declarative/qdeclarativeqt/data/size.qml index afcfb62..8e102eb 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/size.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/size.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property variant test1: Qt.size(19, 34); diff --git a/tests/auto/declarative/qdeclarativeqt/data/tint.qml b/tests/auto/declarative/qdeclarativeqt/data/tint.qml index 25e7051..f873886 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/tint.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/tint.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property color test1: Qt.tint("red", "blue"); diff --git a/tests/auto/declarative/qdeclarativeqt/data/vector.qml b/tests/auto/declarative/qdeclarativeqt/data/vector.qml index b7708f5..f494fe0 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/vector.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/vector.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property variant test1: Qt.vector3d(1, 0, 0.9); diff --git a/tests/auto/declarative/qdeclarativerepeater/data/intmodel.qml b/tests/auto/declarative/qdeclarativerepeater/data/intmodel.qml index 9cd03c4..85e1608 100644 --- a/tests/auto/declarative/qdeclarativerepeater/data/intmodel.qml +++ b/tests/auto/declarative/qdeclarativerepeater/data/intmodel.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: container diff --git a/tests/auto/declarative/qdeclarativerepeater/data/itemlist.qml b/tests/auto/declarative/qdeclarativerepeater/data/itemlist.qml index 4810736..590a9cd 100644 --- a/tests/auto/declarative/qdeclarativerepeater/data/itemlist.qml +++ b/tests/auto/declarative/qdeclarativerepeater/data/itemlist.qml @@ -1,7 +1,7 @@ // This example demonstrates placing items in a view using // a VisualItemModel -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: root diff --git a/tests/auto/declarative/qdeclarativerepeater/data/objlist.qml b/tests/auto/declarative/qdeclarativerepeater/data/objlist.qml index e1bd2e2..b47b042 100644 --- a/tests/auto/declarative/qdeclarativerepeater/data/objlist.qml +++ b/tests/auto/declarative/qdeclarativerepeater/data/objlist.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: container diff --git a/tests/auto/declarative/qdeclarativerepeater/data/properties.qml b/tests/auto/declarative/qdeclarativerepeater/data/properties.qml index 34bbde0..689a103 100644 --- a/tests/auto/declarative/qdeclarativerepeater/data/properties.qml +++ b/tests/auto/declarative/qdeclarativerepeater/data/properties.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Row { Repeater { diff --git a/tests/auto/declarative/qdeclarativerepeater/data/repeater1.qml b/tests/auto/declarative/qdeclarativerepeater/data/repeater1.qml index 3047435..2456b6d 100644 --- a/tests/auto/declarative/qdeclarativerepeater/data/repeater1.qml +++ b/tests/auto/declarative/qdeclarativerepeater/data/repeater1.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: container diff --git a/tests/auto/declarative/qdeclarativerepeater/data/repeater2.qml b/tests/auto/declarative/qdeclarativerepeater/data/repeater2.qml index 7f2f85a..02ef810 100644 --- a/tests/auto/declarative/qdeclarativerepeater/data/repeater2.qml +++ b/tests/auto/declarative/qdeclarativerepeater/data/repeater2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 240 diff --git a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp index 360d90f..91a4d68 100644 --- a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp +++ b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp @@ -397,7 +397,7 @@ void tst_QDeclarativeRepeater::properties() QSignalSpy delegateSpy(repeater, SIGNAL(delegateChanged())); QDeclarativeComponent rectComponent(&engine); - rectComponent.setData("import Qt 4.7; Rectangle {}", QUrl::fromLocalFile("")); + rectComponent.setData("import QtQuick 1.0; Rectangle {}", QUrl::fromLocalFile("")); repeater->setDelegate(&rectComponent); QCOMPARE(delegateSpy.count(),1); diff --git a/tests/auto/declarative/qdeclarativescriptdebugging/data/backtrace1.qml b/tests/auto/declarative/qdeclarativescriptdebugging/data/backtrace1.qml index ad627ef..9096c32 100644 --- a/tests/auto/declarative/qdeclarativescriptdebugging/data/backtrace1.qml +++ b/tests/auto/declarative/qdeclarativescriptdebugging/data/backtrace1.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import Qt.test 1.0 import "backtrace1.js" as Script diff --git a/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation1.qml b/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation1.qml index 1de5f16..3a2c4e3 100644 --- a/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation1.qml +++ b/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation1.qml @@ -1,3 +1,3 @@ -import Qt 4.7 +import QtQuick 1.0 SmoothedAnimation {} diff --git a/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation2.qml b/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation2.qml index 544e7e9..47935d4 100644 --- a/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation2.qml +++ b/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 SmoothedAnimation { to: 10; duration: 300; reversingMode: SmoothedAnimation.Immediate diff --git a/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation3.qml b/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation3.qml index c1f3af0..fe44cce 100644 --- a/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation3.qml +++ b/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimation3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 SmoothedAnimation { to: 10; velocity: 250; reversingMode: SmoothedAnimation.Sync diff --git a/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationBehavior.qml b/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationBehavior.qml index 3afeb7b..6561122 100644 --- a/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationBehavior.qml +++ b/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationBehavior.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400; height: 400; color: "blue" diff --git a/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationValueSource.qml b/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationValueSource.qml index 53429e2..5036d5f 100644 --- a/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationValueSource.qml +++ b/tests/auto/declarative/qdeclarativesmoothedanimation/data/smoothedanimationValueSource.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 300; height: 300; diff --git a/tests/auto/declarative/qdeclarativespringanimation/data/springanimation1.qml b/tests/auto/declarative/qdeclarativespringanimation/data/springanimation1.qml index 07587bd..8890a78 100644 --- a/tests/auto/declarative/qdeclarativespringanimation/data/springanimation1.qml +++ b/tests/auto/declarative/qdeclarativespringanimation/data/springanimation1.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 SpringAnimation { } diff --git a/tests/auto/declarative/qdeclarativespringanimation/data/springanimation2.qml b/tests/auto/declarative/qdeclarativespringanimation/data/springanimation2.qml index 562f44a..de75bb0 100644 --- a/tests/auto/declarative/qdeclarativespringanimation/data/springanimation2.qml +++ b/tests/auto/declarative/qdeclarativespringanimation/data/springanimation2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 SpringAnimation { to: 1.44; velocity: 0.9 diff --git a/tests/auto/declarative/qdeclarativespringanimation/data/springanimation3.qml b/tests/auto/declarative/qdeclarativespringanimation/data/springanimation3.qml index 9f70bf4..b68d769 100644 --- a/tests/auto/declarative/qdeclarativespringanimation/data/springanimation3.qml +++ b/tests/auto/declarative/qdeclarativespringanimation/data/springanimation3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 SpringAnimation { to: 1.44; velocity: 0.9 diff --git a/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp b/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp index f92d7e8..b71ed91 100644 --- a/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp +++ b/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp @@ -201,7 +201,7 @@ void tst_qdeclarativesqldatabase::testQml() QFETCH(QString, jsfile); QString qml= - "import Qt 4.7\n" + "import QtQuick 1.0\n" "import \""+jsfile+"\" as JS\n" "Text { text: JS.test() }"; diff --git a/tests/auto/declarative/qdeclarativestates/data/ExtendedRectangle.qml b/tests/auto/declarative/qdeclarativestates/data/ExtendedRectangle.qml index 28e083c..d91f504 100644 --- a/tests/auto/declarative/qdeclarativestates/data/ExtendedRectangle.qml +++ b/tests/auto/declarative/qdeclarativestates/data/ExtendedRectangle.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: extendedRect objectName: "extendedRect" diff --git a/tests/auto/declarative/qdeclarativestates/data/Implementation/MyType.qml b/tests/auto/declarative/qdeclarativestates/data/Implementation/MyType.qml index 1872de8..6ad3b4a 100644 --- a/tests/auto/declarative/qdeclarativestates/data/Implementation/MyType.qml +++ b/tests/auto/declarative/qdeclarativestates/data/Implementation/MyType.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { Column { diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges1.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges1.qml index e9c9d67..fad2708 100644 --- a/tests/auto/declarative/qdeclarativestates/data/anchorChanges1.qml +++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges1.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: container diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges2.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges2.qml index cee2ce5..e1d4d66 100644 --- a/tests/auto/declarative/qdeclarativestates/data/anchorChanges2.qml +++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200; height: 200 diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges3.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges3.qml index 54dc34b..116b844 100644 --- a/tests/auto/declarative/qdeclarativestates/data/anchorChanges3.qml +++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: container diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges4.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges4.qml index 885c3ce..eaff373 100644 --- a/tests/auto/declarative/qdeclarativestates/data/anchorChanges4.qml +++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges4.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200; height: 200 diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChanges5.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChanges5.qml index c3db72e..ea7b251 100644 --- a/tests/auto/declarative/qdeclarativestates/data/anchorChanges5.qml +++ b/tests/auto/declarative/qdeclarativestates/data/anchorChanges5.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200; height: 200 diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorChangesCrash.qml b/tests/auto/declarative/qdeclarativestates/data/anchorChangesCrash.qml index 861ef8f..ca96da8 100644 --- a/tests/auto/declarative/qdeclarativestates/data/anchorChangesCrash.qml +++ b/tests/auto/declarative/qdeclarativestates/data/anchorChangesCrash.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: container diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorRewindBug.qml b/tests/auto/declarative/qdeclarativestates/data/anchorRewindBug.qml index e6b6020..6277111 100644 --- a/tests/auto/declarative/qdeclarativestates/data/anchorRewindBug.qml +++ b/tests/auto/declarative/qdeclarativestates/data/anchorRewindBug.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: container color: "red" @@ -34,4 +34,4 @@ Rectangle { opacity: 0 } } -} \ No newline at end of file +} diff --git a/tests/auto/declarative/qdeclarativestates/data/anchorRewindBug2.qml b/tests/auto/declarative/qdeclarativestates/data/anchorRewindBug2.qml index 4ed2815..d8b02e9 100644 --- a/tests/auto/declarative/qdeclarativestates/data/anchorRewindBug2.qml +++ b/tests/auto/declarative/qdeclarativestates/data/anchorRewindBug2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: root diff --git a/tests/auto/declarative/qdeclarativestates/data/attachedPropertyChanges.qml b/tests/auto/declarative/qdeclarativestates/data/attachedPropertyChanges.qml index e17823b..2cad050 100644 --- a/tests/auto/declarative/qdeclarativestates/data/attachedPropertyChanges.qml +++ b/tests/auto/declarative/qdeclarativestates/data/attachedPropertyChanges.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 Item { id: item diff --git a/tests/auto/declarative/qdeclarativestates/data/autoStateAtStartupRestoreBug.qml b/tests/auto/declarative/qdeclarativestates/data/autoStateAtStartupRestoreBug.qml index 37e1e5a..ccd126f 100644 --- a/tests/auto/declarative/qdeclarativestates/data/autoStateAtStartupRestoreBug.qml +++ b/tests/auto/declarative/qdeclarativestates/data/autoStateAtStartupRestoreBug.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: root diff --git a/tests/auto/declarative/qdeclarativestates/data/basicBinding.qml b/tests/auto/declarative/qdeclarativestates/data/basicBinding.qml index d559691..2060f03 100644 --- a/tests/auto/declarative/qdeclarativestates/data/basicBinding.qml +++ b/tests/auto/declarative/qdeclarativestates/data/basicBinding.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle diff --git a/tests/auto/declarative/qdeclarativestates/data/basicBinding2.qml b/tests/auto/declarative/qdeclarativestates/data/basicBinding2.qml index a429b24..a329da3 100644 --- a/tests/auto/declarative/qdeclarativestates/data/basicBinding2.qml +++ b/tests/auto/declarative/qdeclarativestates/data/basicBinding2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle diff --git a/tests/auto/declarative/qdeclarativestates/data/basicBinding3.qml b/tests/auto/declarative/qdeclarativestates/data/basicBinding3.qml index 26405d9..cb054d2 100644 --- a/tests/auto/declarative/qdeclarativestates/data/basicBinding3.qml +++ b/tests/auto/declarative/qdeclarativestates/data/basicBinding3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle diff --git a/tests/auto/declarative/qdeclarativestates/data/basicBinding4.qml b/tests/auto/declarative/qdeclarativestates/data/basicBinding4.qml index 153a2c1..7a740e5 100644 --- a/tests/auto/declarative/qdeclarativestates/data/basicBinding4.qml +++ b/tests/auto/declarative/qdeclarativestates/data/basicBinding4.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle diff --git a/tests/auto/declarative/qdeclarativestates/data/basicChanges.qml b/tests/auto/declarative/qdeclarativestates/data/basicChanges.qml index fca7916..08ce787 100644 --- a/tests/auto/declarative/qdeclarativestates/data/basicChanges.qml +++ b/tests/auto/declarative/qdeclarativestates/data/basicChanges.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle width: 100; height: 100 diff --git a/tests/auto/declarative/qdeclarativestates/data/basicChanges2.qml b/tests/auto/declarative/qdeclarativestates/data/basicChanges2.qml index 72bd23e..ab97ba1 100644 --- a/tests/auto/declarative/qdeclarativestates/data/basicChanges2.qml +++ b/tests/auto/declarative/qdeclarativestates/data/basicChanges2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle width: 100; height: 100 diff --git a/tests/auto/declarative/qdeclarativestates/data/basicChanges3.qml b/tests/auto/declarative/qdeclarativestates/data/basicChanges3.qml index 4fb1274..73ac34d 100644 --- a/tests/auto/declarative/qdeclarativestates/data/basicChanges3.qml +++ b/tests/auto/declarative/qdeclarativestates/data/basicChanges3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle width: 100; height: 100 diff --git a/tests/auto/declarative/qdeclarativestates/data/basicChanges4.qml b/tests/auto/declarative/qdeclarativestates/data/basicChanges4.qml index b2f02c9..b5df922 100644 --- a/tests/auto/declarative/qdeclarativestates/data/basicChanges4.qml +++ b/tests/auto/declarative/qdeclarativestates/data/basicChanges4.qml @@ -1,5 +1,5 @@ import Qt.test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyRectangle { id: rect diff --git a/tests/auto/declarative/qdeclarativestates/data/basicExtension.qml b/tests/auto/declarative/qdeclarativestates/data/basicExtension.qml index abfe71a..58c9fbe 100644 --- a/tests/auto/declarative/qdeclarativestates/data/basicExtension.qml +++ b/tests/auto/declarative/qdeclarativestates/data/basicExtension.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle width: 100; height: 100 diff --git a/tests/auto/declarative/qdeclarativestates/data/deleting.qml b/tests/auto/declarative/qdeclarativestates/data/deleting.qml index a8a66cb..d1b3fd3 100644 --- a/tests/auto/declarative/qdeclarativestates/data/deleting.qml +++ b/tests/auto/declarative/qdeclarativestates/data/deleting.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle width: 100; height: 100 diff --git a/tests/auto/declarative/qdeclarativestates/data/deletingState.qml b/tests/auto/declarative/qdeclarativestates/data/deletingState.qml index fadb7d9..654e09c 100644 --- a/tests/auto/declarative/qdeclarativestates/data/deletingState.qml +++ b/tests/auto/declarative/qdeclarativestates/data/deletingState.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle width: 100; height: 100 diff --git a/tests/auto/declarative/qdeclarativestates/data/editProperties.qml b/tests/auto/declarative/qdeclarativestates/data/editProperties.qml index 4cb1ddd..08d0209 100644 --- a/tests/auto/declarative/qdeclarativestates/data/editProperties.qml +++ b/tests/auto/declarative/qdeclarativestates/data/editProperties.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle diff --git a/tests/auto/declarative/qdeclarativestates/data/explicit.qml b/tests/auto/declarative/qdeclarativestates/data/explicit.qml index 718b169..4267319 100644 --- a/tests/auto/declarative/qdeclarativestates/data/explicit.qml +++ b/tests/auto/declarative/qdeclarativestates/data/explicit.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle property color sourceColor: "blue" diff --git a/tests/auto/declarative/qdeclarativestates/data/extendsBug.qml b/tests/auto/declarative/qdeclarativestates/data/extendsBug.qml index a3c4827..a4b77b1 100644 --- a/tests/auto/declarative/qdeclarativestates/data/extendsBug.qml +++ b/tests/auto/declarative/qdeclarativestates/data/extendsBug.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200 diff --git a/tests/auto/declarative/qdeclarativestates/data/fakeExtension.qml b/tests/auto/declarative/qdeclarativestates/data/fakeExtension.qml index 44397b5..a98c96b 100644 --- a/tests/auto/declarative/qdeclarativestates/data/fakeExtension.qml +++ b/tests/auto/declarative/qdeclarativestates/data/fakeExtension.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle width: 100; height: 100 diff --git a/tests/auto/declarative/qdeclarativestates/data/illegalObj.qml b/tests/auto/declarative/qdeclarativestates/data/illegalObj.qml index 26d0f50..e644432 100644 --- a/tests/auto/declarative/qdeclarativestates/data/illegalObj.qml +++ b/tests/auto/declarative/qdeclarativestates/data/illegalObj.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myItem diff --git a/tests/auto/declarative/qdeclarativestates/data/illegalTempState.qml b/tests/auto/declarative/qdeclarativestates/data/illegalTempState.qml index 13cab18..c04b03c 100644 --- a/tests/auto/declarative/qdeclarativestates/data/illegalTempState.qml +++ b/tests/auto/declarative/qdeclarativestates/data/illegalTempState.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: card diff --git a/tests/auto/declarative/qdeclarativestates/data/legalTempState.qml b/tests/auto/declarative/qdeclarativestates/data/legalTempState.qml index f757da0..4d500d9 100644 --- a/tests/auto/declarative/qdeclarativestates/data/legalTempState.qml +++ b/tests/auto/declarative/qdeclarativestates/data/legalTempState.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: card diff --git a/tests/auto/declarative/qdeclarativestates/data/nonExistantProp.qml b/tests/auto/declarative/qdeclarativestates/data/nonExistantProp.qml index db9b017..4973b82c 100644 --- a/tests/auto/declarative/qdeclarativestates/data/nonExistantProp.qml +++ b/tests/auto/declarative/qdeclarativestates/data/nonExistantProp.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle diff --git a/tests/auto/declarative/qdeclarativestates/data/parentChange1.qml b/tests/auto/declarative/qdeclarativestates/data/parentChange1.qml index 8b0e3bf..2f7e80e 100644 --- a/tests/auto/declarative/qdeclarativestates/data/parentChange1.qml +++ b/tests/auto/declarative/qdeclarativestates/data/parentChange1.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400; height: 400 diff --git a/tests/auto/declarative/qdeclarativestates/data/parentChange2.qml b/tests/auto/declarative/qdeclarativestates/data/parentChange2.qml index 3a14dbe..bdd0c6c 100644 --- a/tests/auto/declarative/qdeclarativestates/data/parentChange2.qml +++ b/tests/auto/declarative/qdeclarativestates/data/parentChange2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: newParent diff --git a/tests/auto/declarative/qdeclarativestates/data/parentChange3.qml b/tests/auto/declarative/qdeclarativestates/data/parentChange3.qml index 17c07e8..55f3ead 100644 --- a/tests/auto/declarative/qdeclarativestates/data/parentChange3.qml +++ b/tests/auto/declarative/qdeclarativestates/data/parentChange3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400; height: 400 diff --git a/tests/auto/declarative/qdeclarativestates/data/parentChange4.qml b/tests/auto/declarative/qdeclarativestates/data/parentChange4.qml index 11d0831..ae05b05 100644 --- a/tests/auto/declarative/qdeclarativestates/data/parentChange4.qml +++ b/tests/auto/declarative/qdeclarativestates/data/parentChange4.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400; height: 400 diff --git a/tests/auto/declarative/qdeclarativestates/data/parentChange5.qml b/tests/auto/declarative/qdeclarativestates/data/parentChange5.qml index 329d277..32a0b91 100644 --- a/tests/auto/declarative/qdeclarativestates/data/parentChange5.qml +++ b/tests/auto/declarative/qdeclarativestates/data/parentChange5.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400; height: 400 diff --git a/tests/auto/declarative/qdeclarativestates/data/parentChange6.qml b/tests/auto/declarative/qdeclarativestates/data/parentChange6.qml index be92aba..70ad894 100644 --- a/tests/auto/declarative/qdeclarativestates/data/parentChange6.qml +++ b/tests/auto/declarative/qdeclarativestates/data/parentChange6.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400; height: 400 diff --git a/tests/auto/declarative/qdeclarativestates/data/propertyErrors.qml b/tests/auto/declarative/qdeclarativestates/data/propertyErrors.qml index 8f9a7f2..3ab3c32 100644 --- a/tests/auto/declarative/qdeclarativestates/data/propertyErrors.qml +++ b/tests/auto/declarative/qdeclarativestates/data/propertyErrors.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle width: 100; height: 100 diff --git a/tests/auto/declarative/qdeclarativestates/data/reset.qml b/tests/auto/declarative/qdeclarativestates/data/reset.qml index 5725320..8799c97 100644 --- a/tests/auto/declarative/qdeclarativestates/data/reset.qml +++ b/tests/auto/declarative/qdeclarativestates/data/reset.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 640 diff --git a/tests/auto/declarative/qdeclarativestates/data/restoreEntryValues.qml b/tests/auto/declarative/qdeclarativestates/data/restoreEntryValues.qml index 621adf0..dfd7c17 100644 --- a/tests/auto/declarative/qdeclarativestates/data/restoreEntryValues.qml +++ b/tests/auto/declarative/qdeclarativestates/data/restoreEntryValues.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle width: 100; height: 100 diff --git a/tests/auto/declarative/qdeclarativestates/data/returnToBase.qml b/tests/auto/declarative/qdeclarativestates/data/returnToBase.qml index e342331..a0d053c 100644 --- a/tests/auto/declarative/qdeclarativestates/data/returnToBase.qml +++ b/tests/auto/declarative/qdeclarativestates/data/returnToBase.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: theRect diff --git a/tests/auto/declarative/qdeclarativestates/data/script.qml b/tests/auto/declarative/qdeclarativestates/data/script.qml index cdb6be1..630aaf0 100644 --- a/tests/auto/declarative/qdeclarativestates/data/script.qml +++ b/tests/auto/declarative/qdeclarativestates/data/script.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRectangle width: 100; height: 100 diff --git a/tests/auto/declarative/qdeclarativestates/data/signalOverride.qml b/tests/auto/declarative/qdeclarativestates/data/signalOverride.qml index c4ab96c..0eaf547 100644 --- a/tests/auto/declarative/qdeclarativestates/data/signalOverride.qml +++ b/tests/auto/declarative/qdeclarativestates/data/signalOverride.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import Qt.test 1.0 MyRectangle { diff --git a/tests/auto/declarative/qdeclarativestates/data/signalOverride2.qml b/tests/auto/declarative/qdeclarativestates/data/signalOverride2.qml index 65a8cea..ef26ff1 100644 --- a/tests/auto/declarative/qdeclarativestates/data/signalOverride2.qml +++ b/tests/auto/declarative/qdeclarativestates/data/signalOverride2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import Qt.test 1.0 MyRectangle { diff --git a/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash.qml b/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash.qml index 8a0b51a..8e9b698 100644 --- a/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash.qml +++ b/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import Qt.test 1.0 MyRectangle { diff --git a/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash2.qml b/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash2.qml index 2215ee4..74df943 100644 --- a/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash2.qml +++ b/tests/auto/declarative/qdeclarativestates/data/signalOverrideCrash2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myRect diff --git a/tests/auto/declarative/qdeclarativestates/data/unnamedWhen.qml b/tests/auto/declarative/qdeclarativestates/data/unnamedWhen.qml index a70840c..4425b4d 100644 --- a/tests/auto/declarative/qdeclarativestates/data/unnamedWhen.qml +++ b/tests/auto/declarative/qdeclarativestates/data/unnamedWhen.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: theRect diff --git a/tests/auto/declarative/qdeclarativestates/data/urlResolution.qml b/tests/auto/declarative/qdeclarativestates/data/urlResolution.qml index 8995b56..743f540 100644 --- a/tests/auto/declarative/qdeclarativestates/data/urlResolution.qml +++ b/tests/auto/declarative/qdeclarativestates/data/urlResolution.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import "Implementation" Rectangle { diff --git a/tests/auto/declarative/qdeclarativestates/data/whenOrdering.qml b/tests/auto/declarative/qdeclarativestates/data/whenOrdering.qml index 08d0795..48aef5a 100644 --- a/tests/auto/declarative/qdeclarativestates/data/whenOrdering.qml +++ b/tests/auto/declarative/qdeclarativestates/data/whenOrdering.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { property bool condition1: false diff --git a/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp b/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp index dd1fd7a..b8f5851 100644 --- a/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp +++ b/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp @@ -75,7 +75,7 @@ tst_qdeclarativesystempalette::tst_qdeclarativesystempalette() void tst_qdeclarativesystempalette::activePalette() { - QString componentStr = "import Qt 4.7\nSystemPalette { }"; + QString componentStr = "import QtQuick 1.0\nSystemPalette { }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeSystemPalette *object = qobject_cast(component.create()); @@ -104,7 +104,7 @@ void tst_qdeclarativesystempalette::activePalette() void tst_qdeclarativesystempalette::inactivePalette() { - QString componentStr = "import Qt 4.7\nSystemPalette { colorGroup: SystemPalette.Inactive }"; + QString componentStr = "import QtQuick 1.0\nSystemPalette { colorGroup: SystemPalette.Inactive }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeSystemPalette *object = qobject_cast(component.create()); @@ -134,7 +134,7 @@ void tst_qdeclarativesystempalette::inactivePalette() void tst_qdeclarativesystempalette::disabledPalette() { - QString componentStr = "import Qt 4.7\nSystemPalette { colorGroup: SystemPalette.Disabled }"; + QString componentStr = "import QtQuick 1.0\nSystemPalette { colorGroup: SystemPalette.Disabled }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeSystemPalette *object = qobject_cast(component.create()); @@ -164,7 +164,7 @@ void tst_qdeclarativesystempalette::disabledPalette() void tst_qdeclarativesystempalette::paletteChanged() { - QString componentStr = "import Qt 4.7\nSystemPalette { }"; + QString componentStr = "import QtQuick 1.0\nSystemPalette { }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeSystemPalette *object = qobject_cast(component.create()); diff --git a/tests/auto/declarative/qdeclarativetext/data/alignments.qml b/tests/auto/declarative/qdeclarativetext/data/alignments.qml index 762e2b6..25105f6 100644 --- a/tests/auto/declarative/qdeclarativetext/data/alignments.qml +++ b/tests/auto/declarative/qdeclarativetext/data/alignments.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: top diff --git a/tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocal.qml b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocal.qml index 877222f..ee9b95a 100644 --- a/tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocal.qml +++ b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocal.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Text { text: "" diff --git a/tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocalError.qml b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocalError.qml index abc7077..4dc0d3e 100644 --- a/tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocalError.qml +++ b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesLocalError.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Text { text: "" diff --git a/tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemote.qml b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemote.qml index b6ca3e3..438f4a0 100644 --- a/tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemote.qml +++ b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemote.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Text { text: "" diff --git a/tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemoteError.qml b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemoteError.qml index fbfce9a..c24bf24 100644 --- a/tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemoteError.qml +++ b/tests/auto/declarative/qdeclarativetext/data/embeddedImagesRemoteError.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Text { text: "" diff --git a/tests/auto/declarative/qdeclarativetext/data/rotated.qml b/tests/auto/declarative/qdeclarativetext/data/rotated.qml index 01eec44..1e893b9 100644 --- a/tests/auto/declarative/qdeclarativetext/data/rotated.qml +++ b/tests/auto/declarative/qdeclarativetext/data/rotated.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width : 200 diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp index f683d98..d6c37ae 100644 --- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp +++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp @@ -184,7 +184,7 @@ void tst_qdeclarativetext::text() { { QDeclarativeComponent textComponent(&engine); - textComponent.setData("import Qt 4.7\nText { text: \"\" }", QUrl::fromLocalFile("")); + textComponent.setData("import QtQuick 1.0\nText { text: \"\" }", QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); QVERIFY(textObject != 0); @@ -196,7 +196,7 @@ void tst_qdeclarativetext::text() for (int i = 0; i < standard.size(); i++) { - QString componentStr = "import Qt 4.7\nText { text: \"" + standard.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nText { text: \"" + standard.at(i) + "\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); @@ -209,7 +209,7 @@ void tst_qdeclarativetext::text() for (int i = 0; i < richText.size(); i++) { - QString componentStr = "import Qt 4.7\nText { text: \"" + richText.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nText { text: \"" + richText.at(i) + "\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -226,7 +226,7 @@ void tst_qdeclarativetext::width() // uses Font metrics to find the width for standard and document to find the width for rich { QDeclarativeComponent textComponent(&engine); - textComponent.setData("import Qt 4.7\nText { text: \"\" }", QUrl::fromLocalFile("")); + textComponent.setData("import QtQuick 1.0\nText { text: \"\" }", QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); QVERIFY(textObject != 0); @@ -242,7 +242,7 @@ void tst_qdeclarativetext::width() qreal metricWidth = fm.size(Qt::TextExpandTabs && Qt::TextShowMnemonic, standard.at(i)).width(); metricWidth = qCeil(metricWidth); - QString componentStr = "import Qt 4.7\nText { text: \"" + standard.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nText { text: \"" + standard.at(i) + "\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -263,7 +263,7 @@ void tst_qdeclarativetext::width() int documentWidth = document.idealWidth(); - QString componentStr = "import Qt 4.7\nText { text: \"" + richText.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nText { text: \"" + richText.at(i) + "\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -280,7 +280,7 @@ void tst_qdeclarativetext::wrap() // for specified width and wrap set true { QDeclarativeComponent textComponent(&engine); - textComponent.setData("import Qt 4.7\nText { text: \"Hello\"; wrapMode: Text.WordWrap; width: 300 }", QUrl::fromLocalFile("")); + textComponent.setData("import QtQuick 1.0\nText { text: \"Hello\"; wrapMode: Text.WordWrap; width: 300 }", QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); textHeight = textObject->height(); @@ -291,7 +291,7 @@ void tst_qdeclarativetext::wrap() for (int i = 0; i < standard.size(); i++) { - QString componentStr = "import Qt 4.7\nText { wrapMode: Text.WordWrap; width: 30; text: \"" + standard.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nText { wrapMode: Text.WordWrap; width: 30; text: \"" + standard.at(i) + "\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -307,7 +307,7 @@ void tst_qdeclarativetext::wrap() for (int i = 0; i < richText.size(); i++) { - QString componentStr = "import Qt 4.7\nText { wrapMode: Text.WordWrap; width: 30; text: \"" + richText.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nText { wrapMode: Text.WordWrap; width: 30; text: \"" + richText.at(i) + "\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -324,7 +324,7 @@ void tst_qdeclarativetext::wrap() // richtext again with a fixed height for (int i = 0; i < richText.size(); i++) { - QString componentStr = "import Qt 4.7\nText { wrapMode: Text.WordWrap; width: 30; height: 50; text: \"" + richText.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nText { wrapMode: Text.WordWrap; width: 30; height: 50; text: \"" + richText.at(i) + "\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -349,7 +349,7 @@ void tst_qdeclarativetext::elide() { QDeclarativeComponent textComponent(&engine); - textComponent.setData(("import Qt 4.7\nText { text: \"\"; "+elide+" width: 100 }").toLatin1(), QUrl::fromLocalFile("")); + textComponent.setData(("import QtQuick 1.0\nText { text: \"\"; "+elide+" width: 100 }").toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); QCOMPARE(textObject->elideMode(), m); @@ -358,7 +358,7 @@ void tst_qdeclarativetext::elide() for (int i = 0; i < standard.size(); i++) { - QString componentStr = "import Qt 4.7\nText { "+elide+" width: 100; text: \"" + standard.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nText { "+elide+" width: 100; text: \"" + standard.at(i) + "\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -370,7 +370,7 @@ void tst_qdeclarativetext::elide() // richtext - does nothing for (int i = 0; i < richText.size(); i++) { - QString componentStr = "import Qt 4.7\nText { "+elide+" width: 100; text: \"" + richText.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nText { "+elide+" width: 100; text: \"" + richText.at(i) + "\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -385,7 +385,7 @@ void tst_qdeclarativetext::textFormat() { { QDeclarativeComponent textComponent(&engine); - textComponent.setData("import Qt 4.7\nText { text: \"Hello\"; textFormat: Text.RichText }", QUrl::fromLocalFile("")); + textComponent.setData("import QtQuick 1.0\nText { text: \"Hello\"; textFormat: Text.RichText }", QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); QVERIFY(textObject != 0); @@ -393,7 +393,7 @@ void tst_qdeclarativetext::textFormat() } { QDeclarativeComponent textComponent(&engine); - textComponent.setData("import Qt 4.7\nText { text: \"Hello\"; textFormat: Text.PlainText }", QUrl::fromLocalFile("")); + textComponent.setData("import QtQuick 1.0\nText { text: \"Hello\"; textFormat: Text.PlainText }", QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); QVERIFY(textObject != 0); @@ -471,7 +471,7 @@ void tst_qdeclarativetext::horizontalAlignment() { for (int j=0; j < horizontalAlignmentmentStrings.size(); j++) { - QString componentStr = "import Qt 4.7\nText { horizontalAlignment: \"" + horizontalAlignmentmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nText { horizontalAlignment: \"" + horizontalAlignmentmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -484,7 +484,7 @@ void tst_qdeclarativetext::horizontalAlignment() { for (int j=0; j < horizontalAlignmentmentStrings.size(); j++) { - QString componentStr = "import Qt 4.7\nText { horizontalAlignment: \"" + horizontalAlignmentmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nText { horizontalAlignment: \"" + horizontalAlignmentmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -503,7 +503,7 @@ void tst_qdeclarativetext::verticalAlignment() { for (int j=0; j < verticalAlignmentmentStrings.size(); j++) { - QString componentStr = "import Qt 4.7\nText { verticalAlignment: \"" + verticalAlignmentmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nText { verticalAlignment: \"" + verticalAlignmentmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -517,7 +517,7 @@ void tst_qdeclarativetext::verticalAlignment() { for (int j=0; j < verticalAlignmentmentStrings.size(); j++) { - QString componentStr = "import Qt 4.7\nText { verticalAlignment: \"" + verticalAlignmentmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nText { verticalAlignment: \"" + verticalAlignmentmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -533,7 +533,7 @@ void tst_qdeclarativetext::font() { //test size, then bold, then italic, then family { - QString componentStr = "import Qt 4.7\nText { font.pointSize: 40; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nText { font.pointSize: 40; text: \"Hello World\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -544,7 +544,7 @@ void tst_qdeclarativetext::font() } { - QString componentStr = "import Qt 4.7\nText { font.pixelSize: 40; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nText { font.pixelSize: 40; text: \"Hello World\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -555,7 +555,7 @@ void tst_qdeclarativetext::font() } { - QString componentStr = "import Qt 4.7\nText { font.bold: true; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nText { font.bold: true; text: \"Hello World\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -565,7 +565,7 @@ void tst_qdeclarativetext::font() } { - QString componentStr = "import Qt 4.7\nText { font.italic: true; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nText { font.italic: true; text: \"Hello World\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -575,7 +575,7 @@ void tst_qdeclarativetext::font() } { - QString componentStr = "import Qt 4.7\nText { font.family: \"Helvetica\"; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nText { font.family: \"Helvetica\"; text: \"Hello World\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -586,7 +586,7 @@ void tst_qdeclarativetext::font() } { - QString componentStr = "import Qt 4.7\nText { font.family: \"\"; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nText { font.family: \"\"; text: \"Hello World\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -600,7 +600,7 @@ void tst_qdeclarativetext::style() //test style for (int i = 0; i < styles.size(); i++) { - QString componentStr = "import Qt 4.7\nText { style: \"" + styleStrings.at(i) + "\"; styleColor: \"white\"; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nText { style: \"" + styleStrings.at(i) + "\"; styleColor: \"white\"; text: \"Hello World\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -608,7 +608,7 @@ void tst_qdeclarativetext::style() QCOMPARE((int)textObject->style(), (int)styles.at(i)); QCOMPARE(textObject->styleColor(), QColor("white")); } - QString componentStr = "import Qt 4.7\nText { text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nText { text: \"Hello World\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -626,7 +626,7 @@ void tst_qdeclarativetext::color() //test style for (int i = 0; i < colorStrings.size(); i++) { - QString componentStr = "import Qt 4.7\nText { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nText { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -637,7 +637,7 @@ void tst_qdeclarativetext::color() for (int i = 0; i < colorStrings.size(); i++) { - QString componentStr = "import Qt 4.7\nText { styleColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nText { styleColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -651,7 +651,7 @@ void tst_qdeclarativetext::color() { for (int j = 0; j < colorStrings.size(); j++) { - QString componentStr = "import Qt 4.7\nText { color: \"" + colorStrings.at(i) + "\"; styleColor: \"" + colorStrings.at(j) + "\"; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nText { color: \"" + colorStrings.at(i) + "\"; styleColor: \"" + colorStrings.at(j) + "\"; text: \"Hello World\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -665,7 +665,7 @@ void tst_qdeclarativetext::color() QColor testColor("#001234"); testColor.setAlpha(170); - QString componentStr = "import Qt 4.7\nText { color: \"" + colorStr + "\"; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nText { color: \"" + colorStr + "\"; text: \"Hello World\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -679,14 +679,14 @@ void tst_qdeclarativetext::smooth() for (int i = 0; i < standard.size(); i++) { { - QString componentStr = "import Qt 4.7\nText { smooth: true; text: \"" + standard.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nText { smooth: true; text: \"" + standard.at(i) + "\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); QCOMPARE(textObject->smooth(), true); } { - QString componentStr = "import Qt 4.7\nText { text: \"" + standard.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nText { text: \"" + standard.at(i) + "\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -696,14 +696,14 @@ void tst_qdeclarativetext::smooth() for (int i = 0; i < richText.size(); i++) { { - QString componentStr = "import Qt 4.7\nText { smooth: true; text: \"" + richText.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nText { smooth: true; text: \"" + richText.at(i) + "\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); QCOMPARE(textObject->smooth(), true); } { - QString componentStr = "import Qt 4.7\nText { text: \"" + richText.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nText { text: \"" + richText.at(i) + "\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -715,7 +715,7 @@ void tst_qdeclarativetext::smooth() void tst_qdeclarativetext::weight() { { - QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\" }"; + QString componentStr = "import QtQuick 1.0\nText { text: \"Hello world!\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -724,7 +724,7 @@ void tst_qdeclarativetext::weight() QCOMPARE((int)textObject->font().weight(), (int)QDeclarativeFontValueType::Normal); } { - QString componentStr = "import Qt 4.7\nText { font.weight: \"Bold\"; text: \"Hello world!\" }"; + QString componentStr = "import QtQuick 1.0\nText { font.weight: \"Bold\"; text: \"Hello world!\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -737,7 +737,7 @@ void tst_qdeclarativetext::weight() void tst_qdeclarativetext::underline() { { - QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\" }"; + QString componentStr = "import QtQuick 1.0\nText { text: \"Hello world!\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -746,7 +746,7 @@ void tst_qdeclarativetext::underline() QCOMPARE(textObject->font().underline(), false); } { - QString componentStr = "import Qt 4.7\nText { font.underline: true; text: \"Hello world!\" }"; + QString componentStr = "import QtQuick 1.0\nText { font.underline: true; text: \"Hello world!\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -759,7 +759,7 @@ void tst_qdeclarativetext::underline() void tst_qdeclarativetext::overline() { { - QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\" }"; + QString componentStr = "import QtQuick 1.0\nText { text: \"Hello world!\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -768,7 +768,7 @@ void tst_qdeclarativetext::overline() QCOMPARE(textObject->font().overline(), false); } { - QString componentStr = "import Qt 4.7\nText { font.overline: true; text: \"Hello world!\" }"; + QString componentStr = "import QtQuick 1.0\nText { font.overline: true; text: \"Hello world!\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -781,7 +781,7 @@ void tst_qdeclarativetext::overline() void tst_qdeclarativetext::strikeout() { { - QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\" }"; + QString componentStr = "import QtQuick 1.0\nText { text: \"Hello world!\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -790,7 +790,7 @@ void tst_qdeclarativetext::strikeout() QCOMPARE(textObject->font().strikeOut(), false); } { - QString componentStr = "import Qt 4.7\nText { font.strikeout: true; text: \"Hello world!\" }"; + QString componentStr = "import QtQuick 1.0\nText { font.strikeout: true; text: \"Hello world!\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -803,7 +803,7 @@ void tst_qdeclarativetext::strikeout() void tst_qdeclarativetext::capitalization() { { - QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\" }"; + QString componentStr = "import QtQuick 1.0\nText { text: \"Hello world!\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -812,7 +812,7 @@ void tst_qdeclarativetext::capitalization() QCOMPARE((int)textObject->font().capitalization(), (int)QDeclarativeFontValueType::MixedCase); } { - QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.capitalization: \"AllUppercase\" }"; + QString componentStr = "import QtQuick 1.0\nText { text: \"Hello world!\"; font.capitalization: \"AllUppercase\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -821,7 +821,7 @@ void tst_qdeclarativetext::capitalization() QCOMPARE((int)textObject->font().capitalization(), (int)QDeclarativeFontValueType::AllUppercase); } { - QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.capitalization: \"AllLowercase\" }"; + QString componentStr = "import QtQuick 1.0\nText { text: \"Hello world!\"; font.capitalization: \"AllLowercase\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -830,7 +830,7 @@ void tst_qdeclarativetext::capitalization() QCOMPARE((int)textObject->font().capitalization(), (int)QDeclarativeFontValueType::AllLowercase); } { - QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.capitalization: \"SmallCaps\" }"; + QString componentStr = "import QtQuick 1.0\nText { text: \"Hello world!\"; font.capitalization: \"SmallCaps\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -839,7 +839,7 @@ void tst_qdeclarativetext::capitalization() QCOMPARE((int)textObject->font().capitalization(), (int)QDeclarativeFontValueType::SmallCaps); } { - QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.capitalization: \"Capitalize\" }"; + QString componentStr = "import QtQuick 1.0\nText { text: \"Hello world!\"; font.capitalization: \"Capitalize\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -852,7 +852,7 @@ void tst_qdeclarativetext::capitalization() void tst_qdeclarativetext::letterSpacing() { { - QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\" }"; + QString componentStr = "import QtQuick 1.0\nText { text: \"Hello world!\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -861,7 +861,7 @@ void tst_qdeclarativetext::letterSpacing() QCOMPARE(textObject->font().letterSpacing(), 0.0); } { - QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.letterSpacing: -2 }"; + QString componentStr = "import QtQuick 1.0\nText { text: \"Hello world!\"; font.letterSpacing: -2 }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -870,7 +870,7 @@ void tst_qdeclarativetext::letterSpacing() QCOMPARE(textObject->font().letterSpacing(), -2.); } { - QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.letterSpacing: 3 }"; + QString componentStr = "import QtQuick 1.0\nText { text: \"Hello world!\"; font.letterSpacing: 3 }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -883,7 +883,7 @@ void tst_qdeclarativetext::letterSpacing() void tst_qdeclarativetext::wordSpacing() { { - QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\" }"; + QString componentStr = "import QtQuick 1.0\nText { text: \"Hello world!\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -892,7 +892,7 @@ void tst_qdeclarativetext::wordSpacing() QCOMPARE(textObject->font().wordSpacing(), 0.0); } { - QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.wordSpacing: -50 }"; + QString componentStr = "import QtQuick 1.0\nText { text: \"Hello world!\"; font.wordSpacing: -50 }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -901,7 +901,7 @@ void tst_qdeclarativetext::wordSpacing() QCOMPARE(textObject->font().wordSpacing(), -50.); } { - QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\"; font.wordSpacing: 200 }"; + QString componentStr = "import QtQuick 1.0\nText { text: \"Hello world!\"; font.wordSpacing: 200 }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); @@ -949,7 +949,7 @@ public slots: void tst_qdeclarativetext::clickLink() { { - QString componentStr = "import Qt 4.7\nText { text: \"Hello world!\" }"; + QString componentStr = "import QtQuick 1.0\nText { text: \"Hello world!\" }"; QDeclarativeComponent textComponent(&engine); textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeText *textObject = qobject_cast(textComponent.create()); diff --git a/tests/auto/declarative/qdeclarativetextedit/data/alignments.qml b/tests/auto/declarative/qdeclarativetextedit/data/alignments.qml index 9281a06..bc977fc 100644 --- a/tests/auto/declarative/qdeclarativetextedit/data/alignments.qml +++ b/tests/auto/declarative/qdeclarativetextedit/data/alignments.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: top diff --git a/tests/auto/declarative/qdeclarativetextedit/data/cursorTest.qml b/tests/auto/declarative/qdeclarativetextedit/data/cursorTest.qml index 586e606..c7c21fc 100644 --- a/tests/auto/declarative/qdeclarativetextedit/data/cursorTest.qml +++ b/tests/auto/declarative/qdeclarativetextedit/data/cursorTest.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 300; height: 300; color: "white" TextEdit { text: "Hello world!"; id: textEditObject; objectName: "textEditObject" diff --git a/tests/auto/declarative/qdeclarativetextedit/data/geometrySignals.qml b/tests/auto/declarative/qdeclarativetextedit/data/geometrySignals.qml index b39ba5b..fe2ae12 100644 --- a/tests/auto/declarative/qdeclarativetextedit/data/geometrySignals.qml +++ b/tests/auto/declarative/qdeclarativetextedit/data/geometrySignals.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { width: 400; height: 500; diff --git a/tests/auto/declarative/qdeclarativetextedit/data/http/ErrItem.qml b/tests/auto/declarative/qdeclarativetextedit/data/http/ErrItem.qml index b5c807e..fa7dbd1 100644 --- a/tests/auto/declarative/qdeclarativetextedit/data/http/ErrItem.qml +++ b/tests/auto/declarative/qdeclarativetextedit/data/http/ErrItem.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item{ Fungus{ diff --git a/tests/auto/declarative/qdeclarativetextedit/data/http/NormItem.qml b/tests/auto/declarative/qdeclarativetextedit/data/http/NormItem.qml index df843d8..4989193 100644 --- a/tests/auto/declarative/qdeclarativetextedit/data/http/NormItem.qml +++ b/tests/auto/declarative/qdeclarativetextedit/data/http/NormItem.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { objectName: "delegateOkay" diff --git a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTest.qml b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTest.qml index 1b41f8f..724c058 100644 --- a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTest.qml +++ b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTest.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 300; height: 300; color: "white" resources: [ diff --git a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail1.qml b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail1.qml index 51be3cf..6dcf785 100644 --- a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail1.qml +++ b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail1.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 300; height: 300; color: "white" resources: [ diff --git a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail2.qml b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail2.qml index 30c3fbd..5f441d0 100644 --- a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail2.qml +++ b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestFail2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 300; height: 300; color: "white" resources: [ diff --git a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestPass.qml b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestPass.qml index a1ca58a..95f5d87 100644 --- a/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestPass.qml +++ b/tests/auto/declarative/qdeclarativetextedit/data/http/cursorHttpTestPass.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 300; height: 300; color: "white" resources: [ diff --git a/tests/auto/declarative/qdeclarativetextedit/data/httpfail/FailItem.qml b/tests/auto/declarative/qdeclarativetextedit/data/httpfail/FailItem.qml index 8dfac48..466eb9d 100644 --- a/tests/auto/declarative/qdeclarativetextedit/data/httpfail/FailItem.qml +++ b/tests/auto/declarative/qdeclarativetextedit/data/httpfail/FailItem.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { Rectangle { } diff --git a/tests/auto/declarative/qdeclarativetextedit/data/httpslow/WaitItem.qml b/tests/auto/declarative/qdeclarativetextedit/data/httpslow/WaitItem.qml index 8dfac48..466eb9d 100644 --- a/tests/auto/declarative/qdeclarativetextedit/data/httpslow/WaitItem.qml +++ b/tests/auto/declarative/qdeclarativetextedit/data/httpslow/WaitItem.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { Rectangle { } diff --git a/tests/auto/declarative/qdeclarativetextedit/data/inputmethodhints.qml b/tests/auto/declarative/qdeclarativetextedit/data/inputmethodhints.qml index 8067edb..7df17f2 100644 --- a/tests/auto/declarative/qdeclarativetextedit/data/inputmethodhints.qml +++ b/tests/auto/declarative/qdeclarativetextedit/data/inputmethodhints.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 TextEdit { text: "Hello world!" diff --git a/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_default.qml b/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_default.qml index f1cf86c..22a9871 100644 --- a/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_default.qml +++ b/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_default.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 TextEdit { focus: true diff --git a/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_false.qml b/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_false.qml index f1cf86c..22a9871 100644 --- a/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_false.qml +++ b/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_false.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 TextEdit { focus: true diff --git a/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_true.qml b/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_true.qml index 90383b9..d61da46 100644 --- a/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_true.qml +++ b/tests/auto/declarative/qdeclarativetextedit/data/mouseselection_true.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 TextEdit { focus: true diff --git a/tests/auto/declarative/qdeclarativetextedit/data/navigation.qml b/tests/auto/declarative/qdeclarativetextedit/data/navigation.qml index 7772687..9ee8a93 100644 --- a/tests/auto/declarative/qdeclarativetextedit/data/navigation.qml +++ b/tests/auto/declarative/qdeclarativetextedit/data/navigation.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { property variant myInput: input diff --git a/tests/auto/declarative/qdeclarativetextedit/data/readOnly.qml b/tests/auto/declarative/qdeclarativetextedit/data/readOnly.qml index a68e4b4..36177d3 100644 --- a/tests/auto/declarative/qdeclarativetextedit/data/readOnly.qml +++ b/tests/auto/declarative/qdeclarativetextedit/data/readOnly.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { property variant myInput: input diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index 84f4230..472c5ef 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -184,7 +184,7 @@ void tst_qdeclarativetextedit::text() { { QDeclarativeComponent texteditComponent(&engine); - texteditComponent.setData("import Qt 4.7\nTextEdit { text: \"\" }", QUrl()); + texteditComponent.setData("import QtQuick 1.0\nTextEdit { text: \"\" }", QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); QVERIFY(textEditObject != 0); @@ -193,7 +193,7 @@ void tst_qdeclarativetextedit::text() for (int i = 0; i < standard.size(); i++) { - QString componentStr = "import Qt 4.7\nTextEdit { text: \"" + standard.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { text: \"" + standard.at(i) + "\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -204,7 +204,7 @@ void tst_qdeclarativetextedit::text() for (int i = 0; i < richText.size(); i++) { - QString componentStr = "import Qt 4.7\nTextEdit { text: \"" + richText.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { text: \"" + richText.at(i) + "\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -224,7 +224,7 @@ void tst_qdeclarativetextedit::width() // uses Font metrics to find the width for standard and document to find the width for rich { QDeclarativeComponent texteditComponent(&engine); - texteditComponent.setData("import Qt 4.7\nTextEdit { text: \"\" }", QUrl()); + texteditComponent.setData("import QtQuick 1.0\nTextEdit { text: \"\" }", QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); QVERIFY(textEditObject != 0); @@ -238,7 +238,7 @@ void tst_qdeclarativetextedit::width() qreal metricWidth = fm.size(Qt::TextExpandTabs && Qt::TextShowMnemonic, standard.at(i)).width(); metricWidth = ceil(metricWidth); - QString componentStr = "import Qt 4.7\nTextEdit { text: \"" + standard.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { text: \"" + standard.at(i) + "\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -255,7 +255,7 @@ void tst_qdeclarativetextedit::width() int documentWidth = ceil(document.idealWidth()); - QString componentStr = "import Qt 4.7\nTextEdit { text: \"" + richText.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { text: \"" + richText.at(i) + "\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -270,7 +270,7 @@ void tst_qdeclarativetextedit::wrap() // for specified width and wrap set true { QDeclarativeComponent texteditComponent(&engine); - texteditComponent.setData("import Qt 4.7\nTextEdit { text: \"\"; wrapMode: TextEdit.WordWrap; width: 300 }", QUrl()); + texteditComponent.setData("import QtQuick 1.0\nTextEdit { text: \"\"; wrapMode: TextEdit.WordWrap; width: 300 }", QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); QVERIFY(textEditObject != 0); @@ -279,7 +279,7 @@ void tst_qdeclarativetextedit::wrap() for (int i = 0; i < standard.size(); i++) { - QString componentStr = "import Qt 4.7\nTextEdit { wrapMode: TextEdit.WordWrap; width: 300; text: \"" + standard.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { wrapMode: TextEdit.WordWrap; width: 300; text: \"" + standard.at(i) + "\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -290,7 +290,7 @@ void tst_qdeclarativetextedit::wrap() for (int i = 0; i < richText.size(); i++) { - QString componentStr = "import Qt 4.7\nTextEdit { wrapMode: TextEdit.WordWrap; width: 300; text: \"" + richText.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { wrapMode: TextEdit.WordWrap; width: 300; text: \"" + richText.at(i) + "\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -305,7 +305,7 @@ void tst_qdeclarativetextedit::textFormat() { { QDeclarativeComponent textComponent(&engine); - textComponent.setData("import Qt 4.7\nTextEdit { text: \"Hello\"; textFormat: Text.RichText }", QUrl::fromLocalFile("")); + textComponent.setData("import QtQuick 1.0\nTextEdit { text: \"Hello\"; textFormat: Text.RichText }", QUrl::fromLocalFile("")); QDeclarativeTextEdit *textObject = qobject_cast(textComponent.create()); QVERIFY(textObject != 0); @@ -313,7 +313,7 @@ void tst_qdeclarativetextedit::textFormat() } { QDeclarativeComponent textComponent(&engine); - textComponent.setData("import Qt 4.7\nTextEdit { text: \"Hello\"; textFormat: Text.PlainText }", QUrl::fromLocalFile("")); + textComponent.setData("import QtQuick 1.0\nTextEdit { text: \"Hello\"; textFormat: Text.PlainText }", QUrl::fromLocalFile("")); QDeclarativeTextEdit *textObject = qobject_cast(textComponent.create()); QVERIFY(textObject != 0); @@ -381,7 +381,7 @@ void tst_qdeclarativetextedit::hAlign() { for (int j=0; j < hAlignmentStrings.size(); j++) { - QString componentStr = "import Qt 4.7\nTextEdit { horizontalAlignment: \"" + hAlignmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { horizontalAlignment: \"" + hAlignmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -395,7 +395,7 @@ void tst_qdeclarativetextedit::hAlign() { for (int j=0; j < hAlignmentStrings.size(); j++) { - QString componentStr = "import Qt 4.7\nTextEdit { horizontalAlignment: \"" + hAlignmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { horizontalAlignment: \"" + hAlignmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -415,7 +415,7 @@ void tst_qdeclarativetextedit::vAlign() { for (int j=0; j < vAlignmentStrings.size(); j++) { - QString componentStr = "import Qt 4.7\nTextEdit { verticalAlignment: \"" + vAlignmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { verticalAlignment: \"" + vAlignmentStrings.at(j) + "\"; text: \"" + standard.at(i) + "\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -429,7 +429,7 @@ void tst_qdeclarativetextedit::vAlign() { for (int j=0; j < vAlignmentStrings.size(); j++) { - QString componentStr = "import Qt 4.7\nTextEdit { verticalAlignment: \"" + vAlignmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { verticalAlignment: \"" + vAlignmentStrings.at(j) + "\"; text: \"" + richText.at(i) + "\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -445,7 +445,7 @@ void tst_qdeclarativetextedit::font() { //test size, then bold, then italic, then family { - QString componentStr = "import Qt 4.7\nTextEdit { font.pointSize: 40; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { font.pointSize: 40; text: \"Hello World\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -457,7 +457,7 @@ void tst_qdeclarativetextedit::font() } { - QString componentStr = "import Qt 4.7\nTextEdit { font.bold: true; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { font.bold: true; text: \"Hello World\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -468,7 +468,7 @@ void tst_qdeclarativetextedit::font() } { - QString componentStr = "import Qt 4.7\nTextEdit { font.italic: true; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { font.italic: true; text: \"Hello World\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -479,7 +479,7 @@ void tst_qdeclarativetextedit::font() } { - QString componentStr = "import Qt 4.7\nTextEdit { font.family: \"Helvetica\"; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { font.family: \"Helvetica\"; text: \"Hello World\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -491,7 +491,7 @@ void tst_qdeclarativetextedit::font() } { - QString componentStr = "import Qt 4.7\nTextEdit { font.family: \"\"; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { font.family: \"\"; text: \"Hello World\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -505,7 +505,7 @@ void tst_qdeclarativetextedit::color() { //test initial color { - QString componentStr = "import Qt 4.7\nTextEdit { text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { text: \"Hello World\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -523,7 +523,7 @@ void tst_qdeclarativetextedit::color() //test normal for (int i = 0; i < colorStrings.size(); i++) { - QString componentStr = "import Qt 4.7\nTextEdit { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -535,7 +535,7 @@ void tst_qdeclarativetextedit::color() //test selection for (int i = 0; i < colorStrings.size(); i++) { - QString componentStr = "import Qt 4.7\nTextEdit { selectionColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { selectionColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -546,7 +546,7 @@ void tst_qdeclarativetextedit::color() //test selected text for (int i = 0; i < colorStrings.size(); i++) { - QString componentStr = "import Qt 4.7\nTextEdit { selectedTextColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { selectedTextColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -559,7 +559,7 @@ void tst_qdeclarativetextedit::color() QColor testColor("#001234"); testColor.setAlpha(170); - QString componentStr = "import Qt 4.7\nTextEdit { color: \"" + colorStr + "\"; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { color: \"" + colorStr + "\"; text: \"Hello World\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -572,7 +572,7 @@ void tst_qdeclarativetextedit::color() void tst_qdeclarativetextedit::textMargin() { for(qreal i=0; i<=10; i+=0.3){ - QString componentStr = "import Qt 4.7\nTextEdit { textMargin: " + QString::number(i) + "; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { textMargin: " + QString::number(i) + "; text: \"Hello World\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -584,7 +584,7 @@ void tst_qdeclarativetextedit::textMargin() void tst_qdeclarativetextedit::persistentSelection() { { - QString componentStr = "import Qt 4.7\nTextEdit { persistentSelection: true; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { persistentSelection: true; text: \"Hello World\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -593,7 +593,7 @@ void tst_qdeclarativetextedit::persistentSelection() } { - QString componentStr = "import Qt 4.7\nTextEdit { persistentSelection: false; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { persistentSelection: false; text: \"Hello World\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -605,7 +605,7 @@ void tst_qdeclarativetextedit::persistentSelection() void tst_qdeclarativetextedit::focusOnPress() { { - QString componentStr = "import Qt 4.7\nTextEdit { activeFocusOnPress: true; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { activeFocusOnPress: true; text: \"Hello World\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -614,7 +614,7 @@ void tst_qdeclarativetextedit::focusOnPress() } { - QString componentStr = "import Qt 4.7\nTextEdit { activeFocusOnPress: false; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { activeFocusOnPress: false; text: \"Hello World\" }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -626,7 +626,7 @@ void tst_qdeclarativetextedit::focusOnPress() void tst_qdeclarativetextedit::selection() { QString testStr = standard[0];//TODO: What should happen for multiline/rich text? - QString componentStr = "import Qt 4.7\nTextEdit { text: \""+ testStr +"\"; }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { text: \""+ testStr +"\"; }"; QDeclarativeComponent texteditComponent(&engine); texteditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEditObject = qobject_cast(texteditComponent.create()); @@ -866,7 +866,7 @@ void tst_qdeclarativetextedit::copyAndPaste() { } #endif - QString componentStr = "import Qt 4.7\nTextEdit { text: \"Hello world!\" }"; + QString componentStr = "import QtQuick 1.0\nTextEdit { text: \"Hello world!\" }"; QDeclarativeComponent textEditComponent(&engine); textEditComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextEdit *textEdit = qobject_cast(textEditComponent.create()); diff --git a/tests/auto/declarative/qdeclarativetextinput/data/cursorTest.qml b/tests/auto/declarative/qdeclarativetextinput/data/cursorTest.qml index f0d1be5..73085c1 100644 --- a/tests/auto/declarative/qdeclarativetextinput/data/cursorTest.qml +++ b/tests/auto/declarative/qdeclarativetextinput/data/cursorTest.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 300; height: 300; color: "white" TextInput { text: "Hello world!"; id: textInputObject; objectName: "textInputObject" diff --git a/tests/auto/declarative/qdeclarativetextinput/data/echoMode.qml b/tests/auto/declarative/qdeclarativetextinput/data/echoMode.qml index 66a2017..0320872 100644 --- a/tests/auto/declarative/qdeclarativetextinput/data/echoMode.qml +++ b/tests/auto/declarative/qdeclarativetextinput/data/echoMode.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { property QtObject myInput: input diff --git a/tests/auto/declarative/qdeclarativetextinput/data/geometrySignals.qml b/tests/auto/declarative/qdeclarativetextinput/data/geometrySignals.qml index a9b50fe..353d0e2 100644 --- a/tests/auto/declarative/qdeclarativetextinput/data/geometrySignals.qml +++ b/tests/auto/declarative/qdeclarativetextinput/data/geometrySignals.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { width: 400; height: 500; diff --git a/tests/auto/declarative/qdeclarativetextinput/data/horizontalAlignment.qml b/tests/auto/declarative/qdeclarativetextinput/data/horizontalAlignment.qml index b97f18e..3114c48 100644 --- a/tests/auto/declarative/qdeclarativetextinput/data/horizontalAlignment.qml +++ b/tests/auto/declarative/qdeclarativetextinput/data/horizontalAlignment.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: top diff --git a/tests/auto/declarative/qdeclarativetextinput/data/inputmethods.qml b/tests/auto/declarative/qdeclarativetextinput/data/inputmethods.qml index 405ee22..5063892 100644 --- a/tests/auto/declarative/qdeclarativetextinput/data/inputmethods.qml +++ b/tests/auto/declarative/qdeclarativetextinput/data/inputmethods.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 TextInput { text: "Hello world!" diff --git a/tests/auto/declarative/qdeclarativetextinput/data/masks.qml b/tests/auto/declarative/qdeclarativetextinput/data/masks.qml index 141c243..c75764a 100644 --- a/tests/auto/declarative/qdeclarativetextinput/data/masks.qml +++ b/tests/auto/declarative/qdeclarativetextinput/data/masks.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 TextInput{ focus: true diff --git a/tests/auto/declarative/qdeclarativetextinput/data/maxLength.qml b/tests/auto/declarative/qdeclarativetextinput/data/maxLength.qml index c3d5994..95902bb 100644 --- a/tests/auto/declarative/qdeclarativetextinput/data/maxLength.qml +++ b/tests/auto/declarative/qdeclarativetextinput/data/maxLength.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 TextInput{ focus: true diff --git a/tests/auto/declarative/qdeclarativetextinput/data/navigation.qml b/tests/auto/declarative/qdeclarativetextinput/data/navigation.qml index 58866b7..af1b140 100644 --- a/tests/auto/declarative/qdeclarativetextinput/data/navigation.qml +++ b/tests/auto/declarative/qdeclarativetextinput/data/navigation.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { property variant myInput: input diff --git a/tests/auto/declarative/qdeclarativetextinput/data/positionAt.qml b/tests/auto/declarative/qdeclarativetextinput/data/positionAt.qml index 2800351..cbbf33d 100644 --- a/tests/auto/declarative/qdeclarativetextinput/data/positionAt.qml +++ b/tests/auto/declarative/qdeclarativetextinput/data/positionAt.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 TextInput{ focus: true diff --git a/tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml b/tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml index b10ea81..f173649 100644 --- a/tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml +++ b/tests/auto/declarative/qdeclarativetextinput/data/readOnly.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { property variant myInput: input diff --git a/tests/auto/declarative/qdeclarativetextinput/data/validators.qml b/tests/auto/declarative/qdeclarativetextinput/data/validators.qml index 4b1ba27..e26bcb3 100644 --- a/tests/auto/declarative/qdeclarativetextinput/data/validators.qml +++ b/tests/auto/declarative/qdeclarativetextinput/data/validators.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { property variant intInput: intInput diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index 7450d35..76e0102 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -144,7 +144,7 @@ void tst_qdeclarativetextinput::text() { { QDeclarativeComponent textinputComponent(&engine); - textinputComponent.setData("import Qt 4.7\nTextInput { text: \"\" }", QUrl()); + textinputComponent.setData("import QtQuick 1.0\nTextInput { text: \"\" }", QUrl()); QDeclarativeTextInput *textinputObject = qobject_cast(textinputComponent.create()); QVERIFY(textinputObject != 0); @@ -155,7 +155,7 @@ void tst_qdeclarativetextinput::text() for (int i = 0; i < standard.size(); i++) { - QString componentStr = "import Qt 4.7\nTextInput { text: \"" + standard.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nTextInput { text: \"" + standard.at(i) + "\" }"; QDeclarativeComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextInput *textinputObject = qobject_cast(textinputComponent.create()); @@ -173,7 +173,7 @@ void tst_qdeclarativetextinput::width() // uses Font metrics to find the width for standard { QDeclarativeComponent textinputComponent(&engine); - textinputComponent.setData("import Qt 4.7\nTextInput { text: \"\" }", QUrl()); + textinputComponent.setData("import QtQuick 1.0\nTextInput { text: \"\" }", QUrl()); QDeclarativeTextInput *textinputObject = qobject_cast(textinputComponent.create()); QVERIFY(textinputObject != 0); @@ -188,7 +188,7 @@ void tst_qdeclarativetextinput::width() QFontMetricsF fm(f); qreal metricWidth = fm.width(standard.at(i)); - QString componentStr = "import Qt 4.7\nTextInput { text: \"" + standard.at(i) + "\" }"; + QString componentStr = "import QtQuick 1.0\nTextInput { text: \"" + standard.at(i) + "\" }"; QDeclarativeComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextInput *textinputObject = qobject_cast(textinputComponent.create()); @@ -205,7 +205,7 @@ void tst_qdeclarativetextinput::font() { //test size, then bold, then italic, then family { - QString componentStr = "import Qt 4.7\nTextInput { font.pointSize: 40; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextInput { font.pointSize: 40; text: \"Hello World\" }"; QDeclarativeComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextInput *textinputObject = qobject_cast(textinputComponent.create()); @@ -219,7 +219,7 @@ void tst_qdeclarativetextinput::font() } { - QString componentStr = "import Qt 4.7\nTextInput { font.bold: true; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextInput { font.bold: true; text: \"Hello World\" }"; QDeclarativeComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextInput *textinputObject = qobject_cast(textinputComponent.create()); @@ -232,7 +232,7 @@ void tst_qdeclarativetextinput::font() } { - QString componentStr = "import Qt 4.7\nTextInput { font.italic: true; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextInput { font.italic: true; text: \"Hello World\" }"; QDeclarativeComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextInput *textinputObject = qobject_cast(textinputComponent.create()); @@ -245,7 +245,7 @@ void tst_qdeclarativetextinput::font() } { - QString componentStr = "import Qt 4.7\nTextInput { font.family: \"Helvetica\"; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextInput { font.family: \"Helvetica\"; text: \"Hello World\" }"; QDeclarativeComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextInput *textinputObject = qobject_cast(textinputComponent.create()); @@ -259,7 +259,7 @@ void tst_qdeclarativetextinput::font() } { - QString componentStr = "import Qt 4.7\nTextInput { font.family: \"\"; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextInput { font.family: \"\"; text: \"Hello World\" }"; QDeclarativeComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextInput *textinputObject = qobject_cast(textinputComponent.create()); @@ -276,7 +276,7 @@ void tst_qdeclarativetextinput::color() //test color for (int i = 0; i < colorStrings.size(); i++) { - QString componentStr = "import Qt 4.7\nTextInput { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextInput { color: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; QDeclarativeComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextInput *textinputObject = qobject_cast(textinputComponent.create()); @@ -289,7 +289,7 @@ void tst_qdeclarativetextinput::color() //test selection color for (int i = 0; i < colorStrings.size(); i++) { - QString componentStr = "import Qt 4.7\nTextInput { selectionColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextInput { selectionColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; QDeclarativeComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextInput *textinputObject = qobject_cast(textinputComponent.create()); @@ -302,7 +302,7 @@ void tst_qdeclarativetextinput::color() //test selected text color for (int i = 0; i < colorStrings.size(); i++) { - QString componentStr = "import Qt 4.7\nTextInput { selectedTextColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextInput { selectedTextColor: \"" + colorStrings.at(i) + "\"; text: \"Hello World\" }"; QDeclarativeComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextInput *textinputObject = qobject_cast(textinputComponent.create()); @@ -317,7 +317,7 @@ void tst_qdeclarativetextinput::color() QColor testColor("#001234"); testColor.setAlpha(170); - QString componentStr = "import Qt 4.7\nTextInput { color: \"" + colorStr + "\"; text: \"Hello World\" }"; + QString componentStr = "import QtQuick 1.0\nTextInput { color: \"" + colorStr + "\"; text: \"Hello World\" }"; QDeclarativeComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextInput *textinputObject = qobject_cast(textinputComponent.create()); @@ -332,7 +332,7 @@ void tst_qdeclarativetextinput::color() void tst_qdeclarativetextinput::selection() { QString testStr = standard[0]; - QString componentStr = "import Qt 4.7\nTextInput { text: \""+ testStr +"\"; }"; + QString componentStr = "import QtQuick 1.0\nTextInput { text: \""+ testStr +"\"; }"; QDeclarativeComponent textinputComponent(&engine); textinputComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextInput *textinputObject = qobject_cast(textinputComponent.create()); @@ -509,7 +509,7 @@ void tst_qdeclarativetextinput::maxLength() void tst_qdeclarativetextinput::masks() { //Not a comprehensive test of the possible masks, that's done elsewhere (QLineEdit) - //QString componentStr = "import Qt 4.7\nTextInput { inputMask: 'HHHHhhhh'; }"; + //QString componentStr = "import QtQuick 1.0\nTextInput { inputMask: 'HHHHhhhh'; }"; QDeclarativeView *canvas = createView(SRCDIR "/data/masks.qml"); canvas->show(); canvas->setFocus(); @@ -713,7 +713,7 @@ void tst_qdeclarativetextinput::copyAndPaste() { } #endif - QString componentStr = "import Qt 4.7\nTextInput { text: \"Hello world!\" }"; + QString componentStr = "import QtQuick 1.0\nTextInput { text: \"Hello world!\" }"; QDeclarativeComponent textInputComponent(&engine); textInputComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextInput *textInput = qobject_cast(textInputComponent.create()); @@ -771,7 +771,7 @@ void tst_qdeclarativetextinput::copyAndPaste() { void tst_qdeclarativetextinput::passwordCharacter() { - QString componentStr = "import Qt 4.7\nTextInput { text: \"Hello world!\"; font.family: \"Helvetica\"; echoMode: TextInput.Password }"; + QString componentStr = "import QtQuick 1.0\nTextInput { text: \"Hello world!\"; font.family: \"Helvetica\"; echoMode: TextInput.Password }"; QDeclarativeComponent textInputComponent(&engine); textInputComponent.setData(componentStr.toLatin1(), QUrl()); QDeclarativeTextInput *textInput = qobject_cast(textInputComponent.create()); diff --git a/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp b/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp index f49cbd0..8c3e618 100644 --- a/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp +++ b/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp @@ -100,7 +100,7 @@ void tst_qdeclarativetimer::notRepeating() { QDeclarativeEngine engine; QDeclarativeComponent component(&engine); - component.setData(QByteArray("import Qt 4.7\nTimer { interval: 100; running: true }"), QUrl::fromLocalFile("")); + component.setData(QByteArray("import QtQuick 1.0\nTimer { interval: 100; running: true }"), QUrl::fromLocalFile("")); QDeclarativeTimer *timer = qobject_cast(component.create()); QVERIFY(timer != 0); QVERIFY(timer->isRunning()); @@ -121,7 +121,7 @@ void tst_qdeclarativetimer::notRepeatingStart() { QDeclarativeEngine engine; QDeclarativeComponent component(&engine); - component.setData(QByteArray("import Qt 4.7\nTimer { interval: 100 }"), QUrl::fromLocalFile("")); + component.setData(QByteArray("import QtQuick 1.0\nTimer { interval: 100 }"), QUrl::fromLocalFile("")); QDeclarativeTimer *timer = qobject_cast(component.create()); QVERIFY(timer != 0); QVERIFY(!timer->isRunning()); @@ -146,7 +146,7 @@ void tst_qdeclarativetimer::repeat() { QDeclarativeEngine engine; QDeclarativeComponent component(&engine); - component.setData(QByteArray("import Qt 4.7\nTimer { interval: 100; repeat: true; running: true }"), QUrl::fromLocalFile("")); + component.setData(QByteArray("import QtQuick 1.0\nTimer { interval: 100; repeat: true; running: true }"), QUrl::fromLocalFile("")); QDeclarativeTimer *timer = qobject_cast(component.create()); QVERIFY(timer != 0); @@ -188,7 +188,7 @@ void tst_qdeclarativetimer::triggeredOnStart() { QDeclarativeEngine engine; QDeclarativeComponent component(&engine); - component.setData(QByteArray("import Qt 4.7\nTimer { interval: 100; running: true; triggeredOnStart: true }"), QUrl::fromLocalFile("")); + component.setData(QByteArray("import QtQuick 1.0\nTimer { interval: 100; running: true; triggeredOnStart: true }"), QUrl::fromLocalFile("")); QDeclarativeTimer *timer = qobject_cast(component.create()); QVERIFY(timer != 0); QVERIFY(timer->triggeredOnStart()); @@ -223,7 +223,7 @@ void tst_qdeclarativetimer::triggeredOnStartRepeat() { QDeclarativeEngine engine; QDeclarativeComponent component(&engine); - component.setData(QByteArray("import Qt 4.7\nTimer { interval: 100; running: true; triggeredOnStart: true; repeat: true }"), QUrl::fromLocalFile("")); + component.setData(QByteArray("import QtQuick 1.0\nTimer { interval: 100; running: true; triggeredOnStart: true; repeat: true }"), QUrl::fromLocalFile("")); QDeclarativeTimer *timer = qobject_cast(component.create()); QVERIFY(timer != 0); @@ -247,7 +247,7 @@ void tst_qdeclarativetimer::noTriggerIfNotRunning() QDeclarativeEngine engine; QDeclarativeComponent component(&engine); component.setData(QByteArray( - "import Qt 4.7\n" + "import QtQuick 1.0\n" "Item { property bool ok: true\n" "Timer { id: t1; interval: 100; repeat: true; running: true; onTriggered: if (!running) ok=false }" "Timer { interval: 10; running: true; onTriggered: t1.running=false }" @@ -265,7 +265,7 @@ void tst_qdeclarativetimer::changeDuration() { QDeclarativeEngine engine; QDeclarativeComponent component(&engine); - component.setData(QByteArray("import Qt 4.7\nTimer { interval: 200; repeat: true; running: true }"), QUrl::fromLocalFile("")); + component.setData(QByteArray("import QtQuick 1.0\nTimer { interval: 200; repeat: true; running: true }"), QUrl::fromLocalFile("")); QDeclarativeTimer *timer = qobject_cast(component.create()); QVERIFY(timer != 0); @@ -301,7 +301,7 @@ void tst_qdeclarativetimer::restart() { QDeclarativeEngine engine; QDeclarativeComponent component(&engine); - component.setData(QByteArray("import Qt 4.7\nTimer { interval: 500; repeat: true; running: true }"), QUrl::fromLocalFile("")); + component.setData(QByteArray("import QtQuick 1.0\nTimer { interval: 500; repeat: true; running: true }"), QUrl::fromLocalFile("")); QDeclarativeTimer *timer = qobject_cast(component.create()); QVERIFY(timer != 0); @@ -328,7 +328,7 @@ void tst_qdeclarativetimer::parentProperty() { QDeclarativeEngine engine; QDeclarativeComponent component(&engine); - component.setData(QByteArray("import Qt 4.7\nItem { Timer { objectName: \"timer\"; running: parent.visible } }"), QUrl::fromLocalFile("")); + component.setData(QByteArray("import QtQuick 1.0\nItem { Timer { objectName: \"timer\"; running: parent.visible } }"), QUrl::fromLocalFile("")); QDeclarativeItem *item = qobject_cast(component.create()); QVERIFY(item != 0); QDeclarativeTimer *timer = item->findChild("timer"); diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.1.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.1.qml index 52591b1..e2e6962 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.1.qml +++ b/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.1.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: root diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.2.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.2.qml index 35005fe..0e09ff9 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.2.qml +++ b/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: root diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.3.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.3.qml index 4ae45a4..1f6646e 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.3.qml +++ b/tests/auto/declarative/qdeclarativevaluetypes/data/conflicting.3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: root diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.qml index 69b5bfd..391caba 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.qml +++ b/tests/auto/declarative/qdeclarativevaluetypes/data/deletedObject.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 import "deletedObject.js" as JS MyTypeObject { diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.3.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.3.qml index b6767b0..082aed1 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.3.qml +++ b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.3.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyTypeObject { font.capitalization: Font.AllUppercase diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.4.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.4.qml index 4227ebf..e5d9ab2 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.4.qml +++ b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.4.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 as MyQt +import QtQuick 1.0 as MyQt MyTypeObject { font.capitalization: MyQt.Font.AllUppercase diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.5.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.5.qml index a66e9d6..8ec508c 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/data/enums.5.qml +++ b/tests/auto/declarative/qdeclarativevaluetypes/data/enums.5.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 as MyQt +import QtQuick 1.0 as MyQt MyTypeObject { MyQt.Component.onCompleted: { diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.5.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.5.qml index cc51c31..2fdfddb 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.5.qml +++ b/tests/auto/declarative/qdeclarativevaluetypes/data/font_write.5.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import Test 1.0 Item { diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/returnValues.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/returnValues.qml index 0615300..f1c1855 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/data/returnValues.qml +++ b/tests/auto/declarative/qdeclarativevaluetypes/data/returnValues.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyTypeObject { property bool test1: false; diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/scriptAccess.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/scriptAccess.qml index e962ab0..9299c8b 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/data/scriptAccess.qml +++ b/tests/auto/declarative/qdeclarativevaluetypes/data/scriptAccess.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import Test 1.0 MyTypeObject { diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror4.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror4.qml index 045fc51..fc41ecf 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror4.qml +++ b/tests/auto/declarative/qdeclarativevaluetypes/data/sizereadonly_writeerror4.qml @@ -1,5 +1,5 @@ import Test 1.0 -import Qt 4.7 +import QtQuick 1.0 MyTypeObject { Component.onCompleted: { diff --git a/tests/auto/declarative/qdeclarativevaluetypes/data/varAssignment.qml b/tests/auto/declarative/qdeclarativevaluetypes/data/varAssignment.qml index e4715ab..ff80ff8 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/data/varAssignment.qml +++ b/tests/auto/declarative/qdeclarativevaluetypes/data/varAssignment.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int x; diff --git a/tests/auto/declarative/qdeclarativeview/data/resizemodedeclarativeitem.qml b/tests/auto/declarative/qdeclarativeview/data/resizemodedeclarativeitem.qml index 27c8454..e5501a1 100644 --- a/tests/auto/declarative/qdeclarativeview/data/resizemodedeclarativeitem.qml +++ b/tests/auto/declarative/qdeclarativeview/data/resizemodedeclarativeitem.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { width: 200 height: 200 diff --git a/tests/auto/declarative/qdeclarativeview/data/resizemodegraphicswidget.qml b/tests/auto/declarative/qdeclarativeview/data/resizemodegraphicswidget.qml index 964810c..f270908 100644 --- a/tests/auto/declarative/qdeclarativeview/data/resizemodegraphicswidget.qml +++ b/tests/auto/declarative/qdeclarativeview/data/resizemodegraphicswidget.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QGraphicsWidget { width: 200 height: 200 diff --git a/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml b/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml index 57db82d..fb34312 100644 --- a/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml +++ b/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "black" width: (runtime.orientation == Orientation.Landscape || runtime.orientation == Orientation.LandscapeInverted) ? 300 : 200 diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/data/datalist.qml b/tests/auto/declarative/qdeclarativevisualdatamodel/data/datalist.qml index c5e945a..ebf1eea 100644 --- a/tests/auto/declarative/qdeclarativevisualdatamodel/data/datalist.qml +++ b/tests/auto/declarative/qdeclarativevisualdatamodel/data/datalist.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 ListView { width: 100 diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/data/objectlist.qml b/tests/auto/declarative/qdeclarativevisualdatamodel/data/objectlist.qml index d030222..4134259 100644 --- a/tests/auto/declarative/qdeclarativevisualdatamodel/data/objectlist.qml +++ b/tests/auto/declarative/qdeclarativevisualdatamodel/data/objectlist.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 ListView { width: 100 diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/data/singlerole1.qml b/tests/auto/declarative/qdeclarativevisualdatamodel/data/singlerole1.qml index 7ea74f2..d72e128 100644 --- a/tests/auto/declarative/qdeclarativevisualdatamodel/data/singlerole1.qml +++ b/tests/auto/declarative/qdeclarativevisualdatamodel/data/singlerole1.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 ListView { width: 100 diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/data/singlerole2.qml b/tests/auto/declarative/qdeclarativevisualdatamodel/data/singlerole2.qml index 6654d6b..b9e666c 100644 --- a/tests/auto/declarative/qdeclarativevisualdatamodel/data/singlerole2.qml +++ b/tests/auto/declarative/qdeclarativevisualdatamodel/data/singlerole2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 ListView { width: 100 diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/data/visualdatamodel.qml b/tests/auto/declarative/qdeclarativevisualdatamodel/data/visualdatamodel.qml index d70f82b..a5c44d0 100644 --- a/tests/auto/declarative/qdeclarativevisualdatamodel/data/visualdatamodel.qml +++ b/tests/auto/declarative/qdeclarativevisualdatamodel/data/visualdatamodel.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 VisualDataModel { function setRoot() { diff --git a/tests/auto/declarative/qdeclarativewebview/data/basic.qml b/tests/auto/declarative/qdeclarativewebview/data/basic.qml index ff5d3fd..73330cd 100644 --- a/tests/auto/declarative/qdeclarativewebview/data/basic.qml +++ b/tests/auto/declarative/qdeclarativewebview/data/basic.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import QtWebKit 1.0 WebView { diff --git a/tests/auto/declarative/qdeclarativewebview/data/elements.qml b/tests/auto/declarative/qdeclarativewebview/data/elements.qml index 3adfff8..b86dd9d 100644 --- a/tests/auto/declarative/qdeclarativewebview/data/elements.qml +++ b/tests/auto/declarative/qdeclarativewebview/data/elements.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import QtWebKit 1.0 WebView { diff --git a/tests/auto/declarative/qdeclarativewebview/data/javaScript.qml b/tests/auto/declarative/qdeclarativewebview/data/javaScript.qml index 9f07a51..527e3b9 100644 --- a/tests/auto/declarative/qdeclarativewebview/data/javaScript.qml +++ b/tests/auto/declarative/qdeclarativewebview/data/javaScript.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import QtWebKit 1.0 WebView { diff --git a/tests/auto/declarative/qdeclarativewebview/data/loadError.qml b/tests/auto/declarative/qdeclarativewebview/data/loadError.qml index a0cc4c8..baab1a0 100644 --- a/tests/auto/declarative/qdeclarativewebview/data/loadError.qml +++ b/tests/auto/declarative/qdeclarativewebview/data/loadError.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import QtWebKit 1.0 WebView { diff --git a/tests/auto/declarative/qdeclarativewebview/data/newwindows.qml b/tests/auto/declarative/qdeclarativewebview/data/newwindows.qml index e5967b5..e66631d 100644 --- a/tests/auto/declarative/qdeclarativewebview/data/newwindows.qml +++ b/tests/auto/declarative/qdeclarativewebview/data/newwindows.qml @@ -1,6 +1,6 @@ // Demonstrates opening new WebViews from HTML -import Qt 4.7 +import QtQuick 1.0 import QtWebKit 1.0 Grid { diff --git a/tests/auto/declarative/qdeclarativewebview/data/propertychanges.qml b/tests/auto/declarative/qdeclarativewebview/data/propertychanges.qml index 569f4a5..db06887 100644 --- a/tests/auto/declarative/qdeclarativewebview/data/propertychanges.qml +++ b/tests/auto/declarative/qdeclarativewebview/data/propertychanges.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import QtWebKit 1.0 Item { diff --git a/tests/auto/declarative/qdeclarativewebview/data/sethtml.qml b/tests/auto/declarative/qdeclarativewebview/data/sethtml.qml index 1edd436..7889704 100644 --- a/tests/auto/declarative/qdeclarativewebview/data/sethtml.qml +++ b/tests/auto/declarative/qdeclarativewebview/data/sethtml.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import QtWebKit 1.0 WebView { diff --git a/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp b/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp index 2bded6b..1f460a3 100644 --- a/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp +++ b/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp @@ -454,7 +454,7 @@ void tst_qdeclarativewebview::newWindowComponent() QTRY_COMPARE(wv->property("progress").toDouble(), 1.0); QDeclarativeComponent substituteComponent(&engine); - substituteComponent.setData("import Qt 4.7; WebView { objectName: 'newWebView'; url: 'basic.html'; }", QUrl::fromLocalFile("")); + substituteComponent.setData("import QtQuick 1.0; WebView { objectName: 'newWebView'; url: 'basic.html'; }", QUrl::fromLocalFile("")); QSignalSpy newWindowComponentSpy(wv, SIGNAL(newWindowComponentChanged())); wv->setProperty("newWindowComponent", QVariant::fromValue(&substituteComponent)); diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/BaseWorker.qml b/tests/auto/declarative/qdeclarativeworkerscript/data/BaseWorker.qml index e06afa2..b419c83 100644 --- a/tests/auto/declarative/qdeclarativeworkerscript/data/BaseWorker.qml +++ b/tests/auto/declarative/qdeclarativeworkerscript/data/BaseWorker.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 WorkerScript { id: worker diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/worker.qml b/tests/auto/declarative/qdeclarativeworkerscript/data/worker.qml index 1a20098..0c439c4 100644 --- a/tests/auto/declarative/qdeclarativeworkerscript/data/worker.qml +++ b/tests/auto/declarative/qdeclarativeworkerscript/data/worker.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 BaseWorker { source: "script.js" diff --git a/tests/auto/declarative/qdeclarativeworkerscript/data/worker_pragma.qml b/tests/auto/declarative/qdeclarativeworkerscript/data/worker_pragma.qml index 3b720ef..a8800ad 100644 --- a/tests/auto/declarative/qdeclarativeworkerscript/data/worker_pragma.qml +++ b/tests/auto/declarative/qdeclarativeworkerscript/data/worker_pragma.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 BaseWorker { source: "script_pragma.js" diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml index 24e4071..0196586 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string urlDummy diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml index e78ce63..aeea278 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_opened.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string url: "testdocument.html" diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml index 79d1355..fffc3d9 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/abort_unsent.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string url: "testdocument.html" diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.qml index 81d8e1d..5d5dd12 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/attr.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool xmlTest: false diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/callbackException.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/callbackException.qml index cee07d6..ec6902d 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/callbackException.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/callbackException.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { id: obj diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.qml index 49bfebd..be60664 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/cdata.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool xmlTest: false diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/constructor.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/constructor.qml index ab033a5..0050f91 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/constructor.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/constructor.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool calledAsConstructor diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/defaultState.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/defaultState.qml index d66f283..77b2b94 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/defaultState.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/defaultState.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int readyState diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/document.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/document.qml index 1df43ef..faf3af0 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/document.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/document.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool xmlTest: false diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/domExceptionCodes.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/domExceptionCodes.qml index 827ff3f..0f32a64 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/domExceptionCodes.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/domExceptionCodes.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int index_size_err: DOMException.INDEX_SIZE_ERR diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/element.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/element.qml index e7a3fb4..daec950 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/element.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/element.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool xmlTest: false diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml index 157ae81..686e7e5 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string url diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_args.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_args.qml index 7008224..e8b7b77 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_args.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_args.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool exceptionThrown: false diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_sent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_sent.qml index ff58710..1d4883e 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_sent.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_sent.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool test: false diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_unsent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_unsent.qml index d6256ed..360286d 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_unsent.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getAllResponseHeaders_unsent.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool test: false diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml index 0f3cdef..f37545e 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string url diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_args.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_args.qml index a7a8bba..61ce9c6 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_args.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_args.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool exceptionThrown: false diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_sent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_sent.qml index fc0f757..7cd91a2 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_sent.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_sent.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool test: false diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_unsent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_unsent.qml index c5507a8..983ea1b 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_unsent.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/getResponseHeader_unsent.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool test: false diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/instanceStateValues.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/instanceStateValues.qml index d3cc845..79e06d4 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/instanceStateValues.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/instanceStateValues.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int unsent diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/invalidMethodUsage.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/invalidMethodUsage.qml index 8c603a4..68f22f5 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/invalidMethodUsage.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/invalidMethodUsage.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool onreadystatechange: false diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml index 24bde60..4bb5b1d 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string url diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.1.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.1.qml index 86a6ac9..da6eb14 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.1.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.1.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool exceptionThrown: false diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.2.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.2.qml index 198219c..f003292 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.2.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_arg_count.2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool exceptionThrown: false diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_invalid_method.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_invalid_method.qml index dacc484..b87823d 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_invalid_method.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_invalid_method.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool exceptionThrown: false diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_sync.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_sync.qml index d38380b..9f8f309 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_sync.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_sync.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool exceptionThrown: false diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml index 2c072e4..2bec344 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_user.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string url diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_username.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_username.qml index 825ad60..70f2fa6 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_username.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_username.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string url diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectError.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectError.qml index cb8f869..f009ab7 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectError.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectError.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string url diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectRecur.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectRecur.qml index f895a8c..86337c4 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectRecur.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirectRecur.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string url diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirects.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirects.qml index 268966e..cd125ad 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirects.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/redirects.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string url diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml index 22a9b96..da229f6 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseText.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string url diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseXML_invalid.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseXML_invalid.qml index d754921..393ff09 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseXML_invalid.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/responseXML_invalid.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool xmlNull: false diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml index 8f69a94..fd1c424 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_alreadySent.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool dataOK: false diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml index 7ab53d3..3dd851e 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.1.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string url diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml index 3a48e28..fb18936 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string url diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml index c68b821..9f2383e 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string url diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml index 8fee2cd..410820e 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.4.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string url diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml index ea214fa..f56c51b 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.5.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string url diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml index 524622c..d44864c 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.6.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string url diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml index a4828cd..427d9f4 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_data.7.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string url diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml index a1f46e2..c98555c 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_ignoreData.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string reqType diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_unsent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_unsent.qml index 0efa40a..badd729 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_unsent.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/send_unsent.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool test: false diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml index b252f4a..5afab09 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string url diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_args.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_args.qml index e83cb72..4558f0e 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_args.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_args.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool exceptionThrown: false diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml index 3f9041c..b15318c 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_illegalName.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string url diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml index b15b404..3b9a91e 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_sent.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string url diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_unsent.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_unsent.qml index aadc580..327fa7f 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_unsent.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/setRequestHeader_unsent.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool test: false diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/staticStateValues.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/staticStateValues.qml index 97d42ac..bc22d87 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/staticStateValues.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/staticStateValues.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int unsent: XMLHttpRequest.UNSENT diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml index e28add2..7aa0874 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/status.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string url diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml index a44c6ba..d42e0cc 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/statusText.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property string url diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/text.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/text.qml index 63bfb08..e8c8731 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/text.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/text.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool xmlTest: false diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml b/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml index 85bff29..0f9da30 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/data/utf16.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { property bool dataOK: false diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/model.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/model.qml index 8354193..fdacb6c 100644 --- a/tests/auto/declarative/qdeclarativexmllistmodel/data/model.qml +++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/model.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 XmlListModel { source: "model.xml" diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/model2.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/model2.qml index 09077b6..e56aafa 100644 --- a/tests/auto/declarative/qdeclarativexmllistmodel/data/model2.qml +++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/model2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 XmlListModel { source: "model.xml" diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/propertychanges.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/propertychanges.qml index b014aa3..ed674ce 100644 --- a/tests/auto/declarative/qdeclarativexmllistmodel/data/propertychanges.qml +++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/propertychanges.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 XmlListModel { source: "model.xml" diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/recipes.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/recipes.qml index 59b8ddc..6345101 100644 --- a/tests/auto/declarative/qdeclarativexmllistmodel/data/recipes.qml +++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/recipes.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 XmlListModel { source: "recipes.xml" diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/roleErrors.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/roleErrors.qml index a905963..a0d846f 100644 --- a/tests/auto/declarative/qdeclarativexmllistmodel/data/roleErrors.qml +++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/roleErrors.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 XmlListModel { source: "model.xml" diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/roleKeys.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/roleKeys.qml index eaf5f0a..d90cd61 100644 --- a/tests/auto/declarative/qdeclarativexmllistmodel/data/roleKeys.qml +++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/roleKeys.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 XmlListModel { query: "/data/item" diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/unique.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/unique.qml index 3aa7b1f3..dab8ffa 100644 --- a/tests/auto/declarative/qdeclarativexmllistmodel/data/unique.qml +++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/unique.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 XmlListModel { source: "model.xml" diff --git a/tests/auto/declarative/qmlvisual/ListView/basic1.qml b/tests/auto/declarative/qmlvisual/ListView/basic1.qml index c67aaaa..d55c997 100644 --- a/tests/auto/declarative/qmlvisual/ListView/basic1.qml +++ b/tests/auto/declarative/qmlvisual/ListView/basic1.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "blue" diff --git a/tests/auto/declarative/qmlvisual/ListView/basic2.qml b/tests/auto/declarative/qmlvisual/ListView/basic2.qml index 73c1b9a..31c802d 100644 --- a/tests/auto/declarative/qmlvisual/ListView/basic2.qml +++ b/tests/auto/declarative/qmlvisual/ListView/basic2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "blue" diff --git a/tests/auto/declarative/qmlvisual/ListView/basic3.qml b/tests/auto/declarative/qmlvisual/ListView/basic3.qml index 44f74a5..be39ca1 100644 --- a/tests/auto/declarative/qmlvisual/ListView/basic3.qml +++ b/tests/auto/declarative/qmlvisual/ListView/basic3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "blue" diff --git a/tests/auto/declarative/qmlvisual/ListView/basic4.qml b/tests/auto/declarative/qmlvisual/ListView/basic4.qml index e5d097b..906af63 100644 --- a/tests/auto/declarative/qmlvisual/ListView/basic4.qml +++ b/tests/auto/declarative/qmlvisual/ListView/basic4.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "blue" diff --git a/tests/auto/declarative/qmlvisual/ListView/itemlist.qml b/tests/auto/declarative/qmlvisual/ListView/itemlist.qml index 2a00397..7e5d634 100644 --- a/tests/auto/declarative/qmlvisual/ListView/itemlist.qml +++ b/tests/auto/declarative/qmlvisual/ListView/itemlist.qml @@ -1,7 +1,7 @@ // This example demonstrates placing items in a view using // a VisualItemModel -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "lightgray" diff --git a/tests/auto/declarative/qmlvisual/ListView/listview.qml b/tests/auto/declarative/qmlvisual/ListView/listview.qml index 6e0b47a..341311d 100644 --- a/tests/auto/declarative/qmlvisual/ListView/listview.qml +++ b/tests/auto/declarative/qmlvisual/ListView/listview.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 600; height: 300; color: "white" diff --git a/tests/auto/declarative/qmlvisual/Package_Views/packageviews.qml b/tests/auto/declarative/qmlvisual/Package_Views/packageviews.qml index 9db0f0d..99379f1 100644 --- a/tests/auto/declarative/qmlvisual/Package_Views/packageviews.qml +++ b/tests/auto/declarative/qmlvisual/Package_Views/packageviews.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: root diff --git a/tests/auto/declarative/qmlvisual/animation/bindinganimation/bindinganimation.qml b/tests/auto/declarative/qmlvisual/animation/bindinganimation/bindinganimation.qml index 406e10b..611eaf5 100644 --- a/tests/auto/declarative/qmlvisual/animation/bindinganimation/bindinganimation.qml +++ b/tests/auto/declarative/qmlvisual/animation/bindinganimation/bindinganimation.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "blue" diff --git a/tests/auto/declarative/qmlvisual/animation/colorAnimation/colorAnimation-visual.qml b/tests/auto/declarative/qmlvisual/animation/colorAnimation/colorAnimation-visual.qml index 49730fc..235ad9d 100644 --- a/tests/auto/declarative/qmlvisual/animation/colorAnimation/colorAnimation-visual.qml +++ b/tests/auto/declarative/qmlvisual/animation/colorAnimation/colorAnimation-visual.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: mainrect diff --git a/tests/auto/declarative/qmlvisual/animation/easing/easing.qml b/tests/auto/declarative/qmlvisual/animation/easing/easing.qml index d42f069..35b568a 100644 --- a/tests/auto/declarative/qmlvisual/animation/easing/easing.qml +++ b/tests/auto/declarative/qmlvisual/animation/easing/easing.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: item diff --git a/tests/auto/declarative/qmlvisual/animation/loop/loop.qml b/tests/auto/declarative/qmlvisual/animation/loop/loop.qml index 78fbc68..6f62582 100644 --- a/tests/auto/declarative/qmlvisual/animation/loop/loop.qml +++ b/tests/auto/declarative/qmlvisual/animation/loop/loop.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: wrapper diff --git a/tests/auto/declarative/qmlvisual/animation/parallelAnimation/parallelAnimation-visual.qml b/tests/auto/declarative/qmlvisual/animation/parallelAnimation/parallelAnimation-visual.qml index 7e0374c..9a75763 100644 --- a/tests/auto/declarative/qmlvisual/animation/parallelAnimation/parallelAnimation-visual.qml +++ b/tests/auto/declarative/qmlvisual/animation/parallelAnimation/parallelAnimation-visual.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 /* This test verifies that a single animation animating two properties is visually the same as two diff --git a/tests/auto/declarative/qmlvisual/animation/parentAnimation/parentAnimation-visual.qml b/tests/auto/declarative/qmlvisual/animation/parentAnimation/parentAnimation-visual.qml index b30281d..42cec3a 100644 --- a/tests/auto/declarative/qmlvisual/animation/parentAnimation/parentAnimation-visual.qml +++ b/tests/auto/declarative/qmlvisual/animation/parentAnimation/parentAnimation-visual.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 /* This test shows a green rectangle moving and growing from the upper-left corner diff --git a/tests/auto/declarative/qmlvisual/animation/parentAnimation2/parentAnimation2.qml b/tests/auto/declarative/qmlvisual/animation/parentAnimation2/parentAnimation2.qml index dfab108..f497943 100644 --- a/tests/auto/declarative/qmlvisual/animation/parentAnimation2/parentAnimation2.qml +++ b/tests/auto/declarative/qmlvisual/animation/parentAnimation2/parentAnimation2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 /* Blue rect fills (with 10px margin) screen, then red, then green, then screen again. diff --git a/tests/auto/declarative/qmlvisual/animation/pauseAnimation/pauseAnimation-visual.qml b/tests/auto/declarative/qmlvisual/animation/pauseAnimation/pauseAnimation-visual.qml index cc9a639..1b315b2 100644 --- a/tests/auto/declarative/qmlvisual/animation/pauseAnimation/pauseAnimation-visual.qml +++ b/tests/auto/declarative/qmlvisual/animation/pauseAnimation/pauseAnimation-visual.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 /* This test shows a bouncing logo. diff --git a/tests/auto/declarative/qmlvisual/animation/propertyAction/propertyAction-visual.qml b/tests/auto/declarative/qmlvisual/animation/propertyAction/propertyAction-visual.qml index 89c2c5b..6c3e52d 100644 --- a/tests/auto/declarative/qmlvisual/animation/propertyAction/propertyAction-visual.qml +++ b/tests/auto/declarative/qmlvisual/animation/propertyAction/propertyAction-visual.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 /* This test starts with a red rectangle at 0,0. It should animate a color change to blue, diff --git a/tests/auto/declarative/qmlvisual/animation/qtbug10586/qtbug10586.qml b/tests/auto/declarative/qmlvisual/animation/qtbug10586/qtbug10586.qml index f1a3ef7..9ccebfa 100644 --- a/tests/auto/declarative/qmlvisual/animation/qtbug10586/qtbug10586.qml +++ b/tests/auto/declarative/qmlvisual/animation/qtbug10586/qtbug10586.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200 diff --git a/tests/auto/declarative/qmlvisual/animation/qtbug13398/qtbug13398.qml b/tests/auto/declarative/qmlvisual/animation/qtbug13398/qtbug13398.qml index 8f388bc..93ecd2e 100644 --- a/tests/auto/declarative/qmlvisual/animation/qtbug13398/qtbug13398.qml +++ b/tests/auto/declarative/qmlvisual/animation/qtbug13398/qtbug13398.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { width: 300 diff --git a/tests/auto/declarative/qmlvisual/animation/reanchor/reanchor.qml b/tests/auto/declarative/qmlvisual/animation/reanchor/reanchor.qml index 7a10db1..e0a5a6d 100644 --- a/tests/auto/declarative/qmlvisual/animation/reanchor/reanchor.qml +++ b/tests/auto/declarative/qmlvisual/animation/reanchor/reanchor.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: container diff --git a/tests/auto/declarative/qmlvisual/animation/scriptAction/scriptAction-visual.qml b/tests/auto/declarative/qmlvisual/animation/scriptAction/scriptAction-visual.qml index 5008356..1427c9d 100644 --- a/tests/auto/declarative/qmlvisual/animation/scriptAction/scriptAction-visual.qml +++ b/tests/auto/declarative/qmlvisual/animation/scriptAction/scriptAction-visual.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 /* This test starts with a red rectangle at 0,0. It should animate moving 50 pixels right, diff --git a/tests/auto/declarative/qmlvisual/fillmode/fillmode.qml b/tests/auto/declarative/qmlvisual/fillmode/fillmode.qml index 817ccc0..2ac98da 100644 --- a/tests/auto/declarative/qmlvisual/fillmode/fillmode.qml +++ b/tests/auto/declarative/qmlvisual/fillmode/fillmode.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 /* This is a static display test of the various Image fill modes. See the png file in the data diff --git a/tests/auto/declarative/qmlvisual/focusscope/test.qml b/tests/auto/declarative/qmlvisual/focusscope/test.qml index 24b4b99..6b2ee25 100644 --- a/tests/auto/declarative/qmlvisual/focusscope/test.qml +++ b/tests/auto/declarative/qmlvisual/focusscope/test.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "white" diff --git a/tests/auto/declarative/qmlvisual/focusscope/test2.qml b/tests/auto/declarative/qmlvisual/focusscope/test2.qml index 19c8bed..4df75cf 100644 --- a/tests/auto/declarative/qmlvisual/focusscope/test2.qml +++ b/tests/auto/declarative/qmlvisual/focusscope/test2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "white" diff --git a/tests/auto/declarative/qmlvisual/focusscope/test3.qml b/tests/auto/declarative/qmlvisual/focusscope/test3.qml index 7535c31..184763a 100644 --- a/tests/auto/declarative/qmlvisual/focusscope/test3.qml +++ b/tests/auto/declarative/qmlvisual/focusscope/test3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "white" diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/animated-smooth.qml b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/animated-smooth.qml index fdb4da3..8c21cee 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/animated-smooth.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/animated-smooth.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import "content" Rectangle { diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/animated.qml b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/animated.qml index 730aeca..fb5cac0 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/animated.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/animated.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import "content" Rectangle { diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/borders.qml b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/borders.qml index 8956128..1a8b7a5 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/borders.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/borders.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: page diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/content/MyBorderImage.qml b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/content/MyBorderImage.qml index ce0c38c..f4ead54 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/content/MyBorderImage.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativeborderimage/content/MyBorderImage.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { property alias horizontalMode: image.horizontalTileMode diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/flickable-horizontal.qml b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/flickable-horizontal.qml index 175a891..8aa2389 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/flickable-horizontal.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/flickable-horizontal.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "lightSteelBlue" diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/flickable-vertical.qml b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/flickable-vertical.qml index d845353..5f43f95 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/flickable-vertical.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/flickable-vertical.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "lightSteelBlue" diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflipable/test-flipable.qml b/tests/auto/declarative/qmlvisual/qdeclarativeflipable/test-flipable.qml index da76ff9..8a178b3 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativeflipable/test-flipable.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativeflipable/test-flipable.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400; height: 240 diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflipable/test_flipable_resize.qml b/tests/auto/declarative/qmlvisual/qdeclarativeflipable/test_flipable_resize.qml index fa68753..8aeb6c8 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativeflipable/test_flipable_resize.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativeflipable/test_flipable_resize.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { //realWindow width: 370 height: 480 diff --git a/tests/auto/declarative/qmlvisual/qdeclarativegridview/gridview.qml b/tests/auto/declarative/qmlvisual/qdeclarativegridview/gridview.qml index 1b0bd65..c79e19f 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativegridview/gridview.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativegridview/gridview.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 300; height: 400; color: "black" diff --git a/tests/auto/declarative/qmlvisual/qdeclarativegridview/gridview2.qml b/tests/auto/declarative/qmlvisual/qdeclarativegridview/gridview2.qml index 30e2424..811e0e4 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativegridview/gridview2.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativegridview/gridview2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 300; height: 400; color: "black" diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/drag.qml b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/drag.qml index 6762645..99c898e 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/drag.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/drag.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 /* this test shows a blue box being dragged around -- first roughly tracing the diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-flickable.qml b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-flickable.qml index e223f5e..70ea78c 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-flickable.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-flickable.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 400; height: 480 diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-visual.qml b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-visual.qml index a686188..540866f 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-visual.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/mousearea-visual.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 /* This test displays 6 red rects -- 4 in the top row, 2 in the bottom. diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeparticles/particles.qml b/tests/auto/declarative/qmlvisual/qdeclarativeparticles/particles.qml index 1b64376..b36a220 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativeparticles/particles.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativeparticles/particles.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import Qt.labs.particles 1.0 Rectangle { diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview-2.qml b/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview-2.qml index aed6380..38368d4 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview-2.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview-2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 800; height: 450 diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml b/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml index e6e1a70..ce516ac 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 800; height: 450 diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepositioners/dynamic.qml b/tests/auto/declarative/qmlvisual/qdeclarativepositioners/dynamic.qml index 5981b12..8da3602 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativepositioners/dynamic.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativepositioners/dynamic.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { width: 400; height: 400; diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepositioners/usingRepeater.qml b/tests/auto/declarative/qmlvisual/qdeclarativepositioners/usingRepeater.qml index 91895c2..c318a99 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativepositioners/usingRepeater.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativepositioners/usingRepeater.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item{ width: 200; height: 600 diff --git a/tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedanimation.qml b/tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedanimation.qml index d17233e..ac0c141 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedanimation.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedanimation.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 800; height: 240; color: "gray" diff --git a/tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedfollow.qml b/tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedfollow.qml index 63dba47..720d2e6 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedfollow.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativesmoothedanimation/smoothedfollow.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 800; height: 720; color: "gray" diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/clock.qml b/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/clock.qml index c64497a..44c4dcd 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/clock.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/clock.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: clock diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/follow.qml b/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/follow.qml index 05b93df..0097449 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/follow.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativespringfollow/follow.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "#ffffff" diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/parentanchor.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/parentanchor.qml index f04aa66..ec1f8b3 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/parentanchor.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/parentanchor.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: s; width: 600; height: 100; color: "lightsteelblue" diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide.qml index a4bf452..b96ecb3 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: childrenRect.width diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide2.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide2.qml index 1058b04..edf0cb5 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide2.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 500 diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/multilength.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/multilength.qml index 2b9c85c..6698421 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/multilength.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/multilength.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 500 diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml index e268a60..25db179 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/plaintext.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: s; width: 800; height: 1000; color: "lightsteelblue" diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml index a883b9c..31b0e69 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/font/richtext.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: s; width: 800; height: 1000; color: "lightsteelblue" diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/MultilineEdit.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/MultilineEdit.qml index 53538cb..c987568 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/MultilineEdit.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/MultilineEdit.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id:lineedit diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/cursorDelegate.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/cursorDelegate.qml index 686dd2c..c0eeb82 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/cursorDelegate.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/cursorDelegate.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { resources: [ Component { id: cursorA diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/qt-669.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/qt-669.qml index 277b9fc..b5bb102 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/qt-669.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/qt-669.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { Component { id: testableCursor diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/usingMultilineEdit.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/usingMultilineEdit.qml index 47b48d8..4cf7e97 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/usingMultilineEdit.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/usingMultilineEdit.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle{ width: 600 diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml index a1dc5bf..4afe417 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/wrap.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { height:400 diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml index e863262..74c16e2 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id:lineedit diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/cursorDelegate.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/cursorDelegate.qml index 1de2f4f..973462a 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/cursorDelegate.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/cursorDelegate.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { resources: [ Component { id: cursorA diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/echoMode.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/echoMode.qml index 5a12e2e..5d11403 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/echoMode.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/echoMode.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item{ height: 50; width: 200 diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/hAlign.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/hAlign.qml index 08df173..17e13fd 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/hAlign.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/hAlign.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item{ width:600; diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/usingLineEdit.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/usingLineEdit.qml index 2465866..318af0f 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/usingLineEdit.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/usingLineEdit.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle{ width: 600 diff --git a/tests/auto/declarative/qmlvisual/rect/GradientRect.qml b/tests/auto/declarative/qmlvisual/rect/GradientRect.qml index 0272f84..dea5377 100644 --- a/tests/auto/declarative/qmlvisual/rect/GradientRect.qml +++ b/tests/auto/declarative/qmlvisual/rect/GradientRect.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: rect diff --git a/tests/auto/declarative/qmlvisual/rect/MyRect.qml b/tests/auto/declarative/qmlvisual/rect/MyRect.qml index 7a315e8..a595f7d 100644 --- a/tests/auto/declarative/qmlvisual/rect/MyRect.qml +++ b/tests/auto/declarative/qmlvisual/rect/MyRect.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: rect diff --git a/tests/auto/declarative/qmlvisual/rect/rect-painting.qml b/tests/auto/declarative/qmlvisual/rect/rect-painting.qml index 6abb03d..3c5d90c 100644 --- a/tests/auto/declarative/qmlvisual/rect/rect-painting.qml +++ b/tests/auto/declarative/qmlvisual/rect/rect-painting.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 900; height: 500 diff --git a/tests/auto/declarative/qmlvisual/repeater/basic1.qml b/tests/auto/declarative/qmlvisual/repeater/basic1.qml index 3d31324..7f1ba84 100644 --- a/tests/auto/declarative/qmlvisual/repeater/basic1.qml +++ b/tests/auto/declarative/qmlvisual/repeater/basic1.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "blue" diff --git a/tests/auto/declarative/qmlvisual/repeater/basic2.qml b/tests/auto/declarative/qmlvisual/repeater/basic2.qml index 9cad9eb..b10420c 100644 --- a/tests/auto/declarative/qmlvisual/repeater/basic2.qml +++ b/tests/auto/declarative/qmlvisual/repeater/basic2.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "blue" diff --git a/tests/auto/declarative/qmlvisual/repeater/basic3.qml b/tests/auto/declarative/qmlvisual/repeater/basic3.qml index 6346412..a296801 100644 --- a/tests/auto/declarative/qmlvisual/repeater/basic3.qml +++ b/tests/auto/declarative/qmlvisual/repeater/basic3.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "blue" diff --git a/tests/auto/declarative/qmlvisual/repeater/basic4.qml b/tests/auto/declarative/qmlvisual/repeater/basic4.qml index 817d438..fa85835 100644 --- a/tests/auto/declarative/qmlvisual/repeater/basic4.qml +++ b/tests/auto/declarative/qmlvisual/repeater/basic4.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color: "blue" diff --git a/tests/auto/declarative/qmlvisual/selftest_noimages/selftest_noimages.qml b/tests/auto/declarative/qmlvisual/selftest_noimages/selftest_noimages.qml index cd4dab1..3ef2a66 100644 --- a/tests/auto/declarative/qmlvisual/selftest_noimages/selftest_noimages.qml +++ b/tests/auto/declarative/qmlvisual/selftest_noimages/selftest_noimages.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Text { property string error: "not pressed" text: (new Date()).valueOf() diff --git a/tests/auto/declarative/qmlvisual/webview/autosize/autosize.qml b/tests/auto/declarative/qmlvisual/webview/autosize/autosize.qml index c4a502e..b6280a6 100644 --- a/tests/auto/declarative/qmlvisual/webview/autosize/autosize.qml +++ b/tests/auto/declarative/qmlvisual/webview/autosize/autosize.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import org.webkit 1.0 // The WebView size is determined by the width, height, diff --git a/tests/auto/declarative/qmlvisual/webview/javascript/evaluateJavaScript.qml b/tests/auto/declarative/qmlvisual/webview/javascript/evaluateJavaScript.qml index 4a72d7f..bee2618 100644 --- a/tests/auto/declarative/qmlvisual/webview/javascript/evaluateJavaScript.qml +++ b/tests/auto/declarative/qmlvisual/webview/javascript/evaluateJavaScript.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import org.webkit 1.0 Column { diff --git a/tests/auto/declarative/qmlvisual/webview/javascript/windowObjects.qml b/tests/auto/declarative/qmlvisual/webview/javascript/windowObjects.qml index 4006b47..9e22e20 100644 --- a/tests/auto/declarative/qmlvisual/webview/javascript/windowObjects.qml +++ b/tests/auto/declarative/qmlvisual/webview/javascript/windowObjects.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import org.webkit 1.0 Column { diff --git a/tests/auto/declarative/qmlvisual/webview/settings/fontFamily.qml b/tests/auto/declarative/qmlvisual/webview/settings/fontFamily.qml index 2f68f24..68acced 100644 --- a/tests/auto/declarative/qmlvisual/webview/settings/fontFamily.qml +++ b/tests/auto/declarative/qmlvisual/webview/settings/fontFamily.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import org.webkit 1.0 WebView { diff --git a/tests/auto/declarative/qmlvisual/webview/settings/fontSize.qml b/tests/auto/declarative/qmlvisual/webview/settings/fontSize.qml index c017cd9..4a0db01 100644 --- a/tests/auto/declarative/qmlvisual/webview/settings/fontSize.qml +++ b/tests/auto/declarative/qmlvisual/webview/settings/fontSize.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import org.webkit 1.0 Grid { diff --git a/tests/auto/declarative/qmlvisual/webview/settings/noAutoLoadImages.qml b/tests/auto/declarative/qmlvisual/webview/settings/noAutoLoadImages.qml index 4f8d3b2..3d50664 100644 --- a/tests/auto/declarative/qmlvisual/webview/settings/noAutoLoadImages.qml +++ b/tests/auto/declarative/qmlvisual/webview/settings/noAutoLoadImages.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import org.webkit 1.0 Grid { diff --git a/tests/auto/declarative/qmlvisual/webview/settings/setFontFamily.qml b/tests/auto/declarative/qmlvisual/webview/settings/setFontFamily.qml index 42220e4..ae5ddd2 100644 --- a/tests/auto/declarative/qmlvisual/webview/settings/setFontFamily.qml +++ b/tests/auto/declarative/qmlvisual/webview/settings/setFontFamily.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import org.webkit 1.0 WebView { diff --git a/tests/auto/declarative/qmlvisual/webview/zooming/pageWidth.qml b/tests/auto/declarative/qmlvisual/webview/zooming/pageWidth.qml index c9e3c02..1617bda 100644 --- a/tests/auto/declarative/qmlvisual/webview/zooming/pageWidth.qml +++ b/tests/auto/declarative/qmlvisual/webview/zooming/pageWidth.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import org.webkit 1.0 WebView { diff --git a/tests/auto/declarative/qmlvisual/webview/zooming/renderControl.qml b/tests/auto/declarative/qmlvisual/webview/zooming/renderControl.qml index 8174606..e46f726 100644 --- a/tests/auto/declarative/qmlvisual/webview/zooming/renderControl.qml +++ b/tests/auto/declarative/qmlvisual/webview/zooming/renderControl.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import org.webkit 1.0 Rectangle { diff --git a/tests/auto/declarative/qmlvisual/webview/zooming/resolution.qml b/tests/auto/declarative/qmlvisual/webview/zooming/resolution.qml index b2638f9..e9189db 100644 --- a/tests/auto/declarative/qmlvisual/webview/zooming/resolution.qml +++ b/tests/auto/declarative/qmlvisual/webview/zooming/resolution.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import org.webkit 1.0 WebView { diff --git a/tests/auto/declarative/qmlvisual/webview/zooming/zoomTextOnly.qml b/tests/auto/declarative/qmlvisual/webview/zooming/zoomTextOnly.qml index bf7f9ff..52222be 100644 --- a/tests/auto/declarative/qmlvisual/webview/zooming/zoomTextOnly.qml +++ b/tests/auto/declarative/qmlvisual/webview/zooming/zoomTextOnly.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import org.webkit 1.0 WebView { diff --git a/tests/auto/declarative/qmlvisual/webview/zooming/zooming.qml b/tests/auto/declarative/qmlvisual/webview/zooming/zooming.qml index 5b4dd7a..dc973c2 100644 --- a/tests/auto/declarative/qmlvisual/webview/zooming/zooming.qml +++ b/tests/auto/declarative/qmlvisual/webview/zooming/zooming.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 import org.webkit 1.0 // Note that zooming is better done using zoomFactor and careful diff --git a/tests/auto/linguist/lupdate/testdata/good/parseqml/main.qml b/tests/auto/linguist/lupdate/testdata/good/parseqml/main.qml index 172bd65..768a4e2 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parseqml/main.qml +++ b/tests/auto/linguist/lupdate/testdata/good/parseqml/main.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 QtObject { function translate() { diff --git a/tests/benchmarks/declarative/compilation/data/BoomBlock.qml b/tests/benchmarks/declarative/compilation/data/BoomBlock.qml index 3f43579..b757900 100644 --- a/tests/benchmarks/declarative/compilation/data/BoomBlock.qml +++ b/tests/benchmarks/declarative/compilation/data/BoomBlock.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import Qt.labs.particles 1.0 Item { diff --git a/tests/benchmarks/declarative/creation/data/item.qml b/tests/benchmarks/declarative/creation/data/item.qml index f1a7dbc..a6223d0 100644 --- a/tests/benchmarks/declarative/creation/data/item.qml +++ b/tests/benchmarks/declarative/creation/data/item.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { Item {} diff --git a/tests/benchmarks/declarative/creation/data/qobject.qml b/tests/benchmarks/declarative/creation/data/qobject.qml index bc6b152..33aeb57 100644 --- a/tests/benchmarks/declarative/creation/data/qobject.qml +++ b/tests/benchmarks/declarative/creation/data/qobject.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 QtObject { } diff --git a/tests/benchmarks/declarative/creation/tst_creation.cpp b/tests/benchmarks/declarative/creation/tst_creation.cpp index 94a67fd..6bf7943 100644 --- a/tests/benchmarks/declarative/creation/tst_creation.cpp +++ b/tests/benchmarks/declarative/creation/tst_creation.cpp @@ -130,7 +130,7 @@ void tst_creation::qobject_cpp() void tst_creation::qobject_qml() { QDeclarativeComponent component(&engine); - component.setData("import Qt 4.7\nQtObject {}", QUrl()); + component.setData("import QtQuick 1.0\nQtObject {}", QUrl()); QObject *obj = component.create(); delete obj; diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml index df0d5b2..e484ef7 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml +++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/object.qml @@ -39,6 +39,6 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 QtObject {} diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml index 399aa78..3ce3296 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml +++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/object_id.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 QtObject { id: blah diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml index 4b1d81c..073ed90 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml +++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/samegame/BoomBlock.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import Qt.labs.particles 1.0 Item { id:block diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml index 5d67d25..6cf304c 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml +++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.2.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int a diff --git a/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml b/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml index a22ba25..c4fc05c 100644 --- a/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml +++ b/tests/benchmarks/declarative/qdeclarativecomponent/data/synthesized_properties.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 QtObject { property int a diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml b/tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml index 8c2f46b..90145e8 100644 --- a/tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml +++ b/tests/benchmarks/declarative/qdeclarativemetaproperty/data/object.qml @@ -39,6 +39,6 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item {} diff --git a/tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml b/tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml index 45748f5..29dfbe5 100644 --- a/tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml +++ b/tests/benchmarks/declarative/qdeclarativemetaproperty/data/synthesized_object.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { property int blah diff --git a/tests/benchmarks/declarative/qmltime/example.qml b/tests/benchmarks/declarative/qmltime/example.qml index dca1429..4b6de1d 100644 --- a/tests/benchmarks/declarative/qmltime/example.qml +++ b/tests/benchmarks/declarative/qmltime/example.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QmlTime 1.0 as QmlTime Item { diff --git a/tests/benchmarks/declarative/qmltime/tests/anchors/empty.qml b/tests/benchmarks/declarative/qmltime/tests/anchors/empty.qml index 6d8be03..f9418f8 100644 --- a/tests/benchmarks/declarative/qmltime/tests/anchors/empty.qml +++ b/tests/benchmarks/declarative/qmltime/tests/anchors/empty.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QmlTime 1.0 as QmlTime Item { diff --git a/tests/benchmarks/declarative/qmltime/tests/anchors/fill.qml b/tests/benchmarks/declarative/qmltime/tests/anchors/fill.qml index 5371c3d..ef6839f 100644 --- a/tests/benchmarks/declarative/qmltime/tests/anchors/fill.qml +++ b/tests/benchmarks/declarative/qmltime/tests/anchors/fill.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QmlTime 1.0 as QmlTime Item { diff --git a/tests/benchmarks/declarative/qmltime/tests/anchors/null.qml b/tests/benchmarks/declarative/qmltime/tests/anchors/null.qml index bb43dc6..b719001 100644 --- a/tests/benchmarks/declarative/qmltime/tests/anchors/null.qml +++ b/tests/benchmarks/declarative/qmltime/tests/anchors/null.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QmlTime 1.0 as QmlTime Item { diff --git a/tests/benchmarks/declarative/qmltime/tests/animation/large.qml b/tests/benchmarks/declarative/qmltime/tests/animation/large.qml index 11bb6ba..d109313 100644 --- a/tests/benchmarks/declarative/qmltime/tests/animation/large.qml +++ b/tests/benchmarks/declarative/qmltime/tests/animation/large.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QmlTime 1.0 as QmlTime Item { diff --git a/tests/benchmarks/declarative/qmltime/tests/animation/largeNoProps.qml b/tests/benchmarks/declarative/qmltime/tests/animation/largeNoProps.qml index d40627f..6c055dc 100644 --- a/tests/benchmarks/declarative/qmltime/tests/animation/largeNoProps.qml +++ b/tests/benchmarks/declarative/qmltime/tests/animation/largeNoProps.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QmlTime 1.0 as QmlTime Item { diff --git a/tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml b/tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml index 0499201..eed5339 100644 --- a/tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml +++ b/tests/benchmarks/declarative/qmltime/tests/item_creation/children.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QmlTime 1.0 as QmlTime Item { diff --git a/tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml b/tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml index 9064bc2..cc27f04 100644 --- a/tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml +++ b/tests/benchmarks/declarative/qmltime/tests/item_creation/data.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QmlTime 1.0 as QmlTime Item { diff --git a/tests/benchmarks/declarative/qmltime/tests/item_creation/no_creation.qml b/tests/benchmarks/declarative/qmltime/tests/item_creation/no_creation.qml index d27b2b6..7f8909d 100644 --- a/tests/benchmarks/declarative/qmltime/tests/item_creation/no_creation.qml +++ b/tests/benchmarks/declarative/qmltime/tests/item_creation/no_creation.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QmlTime 1.0 as QmlTime Item { diff --git a/tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml b/tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml index 0867d0b..05e287b 100644 --- a/tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml +++ b/tests/benchmarks/declarative/qmltime/tests/item_creation/resources.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QmlTime 1.0 as QmlTime Item { diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/Loaded.qml b/tests/benchmarks/declarative/qmltime/tests/loader/Loaded.qml index 416e0ea..7199a50 100644 --- a/tests/benchmarks/declarative/qmltime/tests/loader/Loaded.qml +++ b/tests/benchmarks/declarative/qmltime/tests/loader/Loaded.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { Rectangle {} diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/component_loader.qml b/tests/benchmarks/declarative/qmltime/tests/loader/component_loader.qml index f610eb0..a668423 100644 --- a/tests/benchmarks/declarative/qmltime/tests/loader/component_loader.qml +++ b/tests/benchmarks/declarative/qmltime/tests/loader/component_loader.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QmlTime 1.0 as QmlTime Item { diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/empty_loader.qml b/tests/benchmarks/declarative/qmltime/tests/loader/empty_loader.qml index 334e1b4..7070d91 100644 --- a/tests/benchmarks/declarative/qmltime/tests/loader/empty_loader.qml +++ b/tests/benchmarks/declarative/qmltime/tests/loader/empty_loader.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QmlTime 1.0 as QmlTime Item { diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/no_loader.qml b/tests/benchmarks/declarative/qmltime/tests/loader/no_loader.qml index 507ed34..7bf14de 100644 --- a/tests/benchmarks/declarative/qmltime/tests/loader/no_loader.qml +++ b/tests/benchmarks/declarative/qmltime/tests/loader/no_loader.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QmlTime 1.0 as QmlTime Item { diff --git a/tests/benchmarks/declarative/qmltime/tests/loader/source_loader.qml b/tests/benchmarks/declarative/qmltime/tests/loader/source_loader.qml index 1092a9f..2b95d60 100644 --- a/tests/benchmarks/declarative/qmltime/tests/loader/source_loader.qml +++ b/tests/benchmarks/declarative/qmltime/tests/loader/source_loader.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QmlTime 1.0 as QmlTime Item { diff --git a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml index a125c54..417ec94 100644 --- a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml +++ b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/no_positioner.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QmlTime 1.0 as QmlTime Item { diff --git a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml index 18c8fb4..3e9a076 100644 --- a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml +++ b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/null_positioner.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QmlTime 1.0 as QmlTime Item { diff --git a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml index 2668c4c..d87aa32 100644 --- a/tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml +++ b/tests/benchmarks/declarative/qmltime/tests/positioner_creation/positioner.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QmlTime 1.0 as QmlTime Item { diff --git a/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/null.qml b/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/null.qml index 424f768..dc2fcb4 100644 --- a/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/null.qml +++ b/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/null.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QmlTime 1.0 as QmlTime Item { diff --git a/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/property.qml b/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/property.qml index f803b82..3adefbc 100644 --- a/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/property.qml +++ b/tests/benchmarks/declarative/qmltime/tests/vmemetaobject/property.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import QmlTime 1.0 as QmlTime Item { diff --git a/tests/benchmarks/declarative/script/data/CustomObject.qml b/tests/benchmarks/declarative/script/data/CustomObject.qml index 1656453..97f6d39 100644 --- a/tests/benchmarks/declarative/script/data/CustomObject.qml +++ b/tests/benchmarks/declarative/script/data/CustomObject.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 QtObject { property real prop1: 0 diff --git a/tests/benchmarks/declarative/script/data/block.qml b/tests/benchmarks/declarative/script/data/block.qml index f7b2ab3..4575050 100644 --- a/tests/benchmarks/declarative/script/data/block.qml +++ b/tests/benchmarks/declarative/script/data/block.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { width: 200; height: 200 diff --git a/tests/benchmarks/declarative/script/data/global_prop.qml b/tests/benchmarks/declarative/script/data/global_prop.qml index 4fb7ee7..29bbb7d 100644 --- a/tests/benchmarks/declarative/script/data/global_prop.qml +++ b/tests/benchmarks/declarative/script/data/global_prop.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import "global.js" as Program Rectangle { diff --git a/tools/qml/browser/Browser.qml b/tools/qml/browser/Browser.qml index ff2bb47..45fe84c 100644 --- a/tools/qml/browser/Browser.qml +++ b/tools/qml/browser/Browser.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 import Qt.labs.folderlistmodel 1.0 Rectangle { diff --git a/tools/qml/startup/Logo.qml b/tools/qml/startup/Logo.qml index 8d9708d..aa5648f 100644 --- a/tools/qml/startup/Logo.qml +++ b/tools/qml/startup/Logo.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: myApp diff --git a/tools/qml/startup/startup.qml b/tools/qml/startup/startup.qml index ddc7217..9ca50a3 100644 --- a/tools/qml/startup/startup.qml +++ b/tools/qml/startup/startup.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Rectangle { id: treatsApp -- cgit v0.12 From c2c367ebeb039c42cb4fec50b2b6495624837978 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Wed, 29 Sep 2010 12:14:44 +1000 Subject: Add test for Qt 4.7 module Task-number: QTBUG-13799 Reviewed-by: Martin Jones (cherry picked from commit 6f35701275ab0cd80daec45b3407725b10571693) --- tests/auto/declarative/declarative.pro | 3 +- .../declarative/moduleqt47/data/importqt47.qml | 80 ++++++++++++++++++++++ tests/auto/declarative/moduleqt47/moduleqt47.pro | 16 +++++ .../auto/declarative/moduleqt47/tst_moduleqt47.cpp | 79 +++++++++++++++++++++ .../tst_qdeclarativelanguage.cpp | 6 ++ 5 files changed, 183 insertions(+), 1 deletion(-) create mode 100644 tests/auto/declarative/moduleqt47/data/importqt47.qml create mode 100644 tests/auto/declarative/moduleqt47/moduleqt47.pro create mode 100644 tests/auto/declarative/moduleqt47/tst_moduleqt47.cpp diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro index a7fb3b8..f0fcfa9 100644 --- a/tests/auto/declarative/declarative.pro +++ b/tests/auto/declarative/declarative.pro @@ -69,7 +69,8 @@ SUBDIRS += \ qdeclarativexmlhttprequest \ qdeclarativexmllistmodel \ qmlvisual \ - qpacketprotocol + qpacketprotocol \ + moduleqt47 contains(QT_CONFIG, webkit) { SUBDIRS += \ diff --git a/tests/auto/declarative/moduleqt47/data/importqt47.qml b/tests/auto/declarative/moduleqt47/data/importqt47.qml new file mode 100644 index 0000000..0a1b533 --- /dev/null +++ b/tests/auto/declarative/moduleqt47/data/importqt47.qml @@ -0,0 +1,80 @@ +import Qt 4.7 + +Item { + QtObject {} + + Component { Item {} } + + // Util + states: [ + State { + name: "bob" + AnchorChanges {} + ParentChange {} + StateChangeScript {} + PropertyChanges {} + } + ] + transitions: [ + Transition { + AnchorAnimation {} + ColorAnimation {} + SmoothedAnimation {} + NumberAnimation {} + ParallelAnimation {} + ParentAnimation {} + PauseAnimation {} + PropertyAnimation {} + RotationAnimation {} + ScriptAction {} + SequentialAnimation {} + SpringAnimation {} + Vector3dAnimation {} + } + ] + + Behavior on x {} + Binding {} + Connections {} + FontLoader {} + ListModel { ListElement {} } + SystemPalette {} + Timer {} + + // graphic items + BorderImage {} + Column {} + MouseArea {} + Flickable {} + Flipable {} + Flow {} + FocusPanel {} + FocusScope {} + Rectangle { gradient: Gradient { GradientStop {} } } + Grid {} + GridView {} + Image {} + ListView {} + Loader {} + PathView { + path: Path { + PathLine {} + PathCubic {} + PathPercent {} + PathQuad {} + PathAttribute {} + } + } + Repeater {} + Rotation {} + Row {} + Translate {} + Scale {} + Text {} + TextEdit {} + TextInput {} + VisualItemModel {} + VisualDataModel {} + + Keys.onPressed: console.log("Press") +} diff --git a/tests/auto/declarative/moduleqt47/moduleqt47.pro b/tests/auto/declarative/moduleqt47/moduleqt47.pro new file mode 100644 index 0000000..4ee634e --- /dev/null +++ b/tests/auto/declarative/moduleqt47/moduleqt47.pro @@ -0,0 +1,16 @@ +load(qttest_p4) +contains(QT_CONFIG,declarative): QT += declarative gui +macx:CONFIG -= app_bundle + +SOURCES += tst_moduleqt47.cpp + +symbian: { + importFiles.sources = data + importFiles.path = . + DEPLOYMENT = importFiles +} else { + DEFINES += SRCDIR=\\\"$$PWD\\\" +} + +CONFIG += parallel_test + diff --git a/tests/auto/declarative/moduleqt47/tst_moduleqt47.cpp b/tests/auto/declarative/moduleqt47/tst_moduleqt47.cpp new file mode 100644 index 0000000..c1896a7 --- /dev/null +++ b/tests/auto/declarative/moduleqt47/tst_moduleqt47.cpp @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include +#include + +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + +class tst_moduleqt47 : public QObject +{ + Q_OBJECT +public: + tst_moduleqt47(); + +private slots: + void create(); + +private: + QDeclarativeEngine engine; +}; + +tst_moduleqt47::tst_moduleqt47() +{ +} + +void tst_moduleqt47::create() +{ + QDeclarativeEngine engine; + QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/importqt47.qml")); + QObject *obj = qobject_cast(c.create()); + + QVERIFY(obj != 0); + delete obj; +} + +QTEST_MAIN(tst_moduleqt47) + +#include "tst_moduleqt47.moc" diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp index f811555..c6b2302 100644 --- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp @@ -1715,6 +1715,9 @@ void tst_qdeclarativelanguage::initTestCase() { registerTypes(); + // Registering the TestType class in other modules should have no adverse effects + qmlRegisterType("com.nokia.TestPre", 1, 0, "Test"); + qmlRegisterType("com.nokia.Test", 0, 0, "TestTP"); qmlRegisterType("com.nokia.Test", 1, 0, "Test"); qmlRegisterType("com.nokia.Test", 1, 5, "Test"); @@ -1722,6 +1725,9 @@ void tst_qdeclarativelanguage::initTestCase() qmlRegisterType("com.nokia.Test", 1, 9, "OldTest"); qmlRegisterType("com.nokia.Test", 1, 12, "Test"); + // Registering the TestType class in other modules should have no adverse effects + qmlRegisterType("com.nokia.TestPost", 1, 0, "Test"); + // Create locale-specific file // For POSIX, this will just be data/I18nType.qml, since POSIX is 7-bit // For iso8859-1 locale, this will just be data/I18nType?????.qml where ????? is 5 8-bit characters -- cgit v0.12 From 6fd7f7933f12414979b19e34bad1bf17c4b6e2bf Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Wed, 29 Sep 2010 12:19:37 +1000 Subject: Replace "import Qt 4.7" with "import QtQuick 1.0" Task-number: QTBUG-13799 (cherry picked from commit 1f43e68c4ca5b28444b046deff1658b1b4b1923d) --- tests/auto/declarative/qdeclarativeitem/data/transformCrash.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/declarative/qdeclarativeitem/data/transformCrash.qml b/tests/auto/declarative/qdeclarativeitem/data/transformCrash.qml index ab7fa84..35c1a9a 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/transformCrash.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/transformCrash.qml @@ -1,4 +1,4 @@ -import Qt 4.7 +import QtQuick 1.0 Item { id: wrapper -- cgit v0.12 From 75c41435a05b383ca96647ae45df9ceca3fa3852 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Wed, 29 Sep 2010 13:48:42 +1000 Subject: Document "import QtQuick 1.0" change Task-number: QTBUG-13799 (cherry picked from commit 1ab457d5db184c53d9857a7b425051e5aa5ff2e0) --- doc/src/declarative/declarativeui.qdoc | 1 + doc/src/declarative/whatsnew.qdoc | 55 ++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 doc/src/declarative/whatsnew.qdoc diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc index cb326a3..a8df4b1 100644 --- a/doc/src/declarative/declarativeui.qdoc +++ b/doc/src/declarative/declarativeui.qdoc @@ -73,6 +73,7 @@ Module. \section1 Getting Started \list +\o \l{What's new in Qt Quick} \o \l{Introduction to the QML language} \o \l{QML for Qt Programmers} \o \l{Getting Started Programming with QML} diff --git a/doc/src/declarative/whatsnew.qdoc b/doc/src/declarative/whatsnew.qdoc new file mode 100644 index 0000000..f8d1d0e --- /dev/null +++ b/doc/src/declarative/whatsnew.qdoc @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in a +** written agreement between you and Nokia. +** +** GNU Free Documentation License +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of this +** file. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! +\title What's new in Qt Quick +\page qtquick-whatsnew.html + +\section1 4.7.1 + +\section2 QtQuick namespace + +In prior Qt releases, all the Qt Quick elements were available in the \e Qt namespace. +Starting with Qt 4.7.1, the elements are also available in the \e QtQuick namespace, +which improves naming consistency, and allows the development of Qt Quick to occur at +a faster rate than Qt's usual minor release schedule. + +The change for developers is very simple - where you previously wrote \e {import Qt 4.7}, +just replace it with \e {import QtQuick 1.0}, like this: + +\code +import QtQuick 1.0 + +Text { + text: "Welcome to QtQuick 1.0!" +} +\endcode + +\e {import Qt 4.7} continues to work so existing applications wont break even if they +aren't updated, but it is recommended that all import statements be modified to the new +form. +*/ -- cgit v0.12 From c39da05c8d8b97141bf03507f6d0412e6371863c Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Wed, 29 Sep 2010 14:16:27 +1000 Subject: Autotest that new "import Qt 4.7"s aren't added accidentally Task-number: QTBUG-13799 (cherry picked from commit f7a439a0a00b0bdd6ebeff8bfd5ee2285eab1398) --- .../auto/declarative/moduleqt47/tst_moduleqt47.cpp | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/tests/auto/declarative/moduleqt47/tst_moduleqt47.cpp b/tests/auto/declarative/moduleqt47/tst_moduleqt47.cpp index c1896a7..feae417 100644 --- a/tests/auto/declarative/moduleqt47/tst_moduleqt47.cpp +++ b/tests/auto/declarative/moduleqt47/tst_moduleqt47.cpp @@ -39,6 +39,7 @@ ** ****************************************************************************/ #include +#include #include #include @@ -56,12 +57,20 @@ public: private slots: void create(); + void accidentalImport_data(); + void accidentalImport(); + private: + QStringList findFiles(const QDir &d); + QDeclarativeEngine engine; + QStringList excludedFiles; }; tst_moduleqt47::tst_moduleqt47() { + excludedFiles << "tests/auto/declarative/moduleqt47/data/importqt47.qml" + << "doc/src/declarative/whatsnew.qdoc"; } void tst_moduleqt47::create() @@ -74,6 +83,54 @@ void tst_moduleqt47::create() delete obj; } +QStringList tst_moduleqt47::findFiles(const QDir &d) +{ + QStringList rv; + + QStringList files = d.entryList(QStringList() << QLatin1String("*.qml") << QLatin1String("*.qdoc"), QDir::Files); + foreach (const QString &file, files) { + + QString absFile = d.absoluteFilePath(file); + + bool skip = false; + for (int ii = 0; !skip && ii < excludedFiles.count(); ++ii) + skip = (absFile.endsWith(excludedFiles.at(ii))); + + if (!skip) + rv << absFile; + } + + QStringList dirs = d.entryList(QDir::Dirs | QDir::NoDotAndDotDot | QDir::NoSymLinks); + foreach (const QString &dir, dirs) { + QDir sub = d; + sub.cd(dir); + rv << findFiles(sub); + } + + return rv; +} + +void tst_moduleqt47::accidentalImport_data() +{ + QTest::addColumn("file"); + QStringList files = findFiles(QDir(SRCDIR "/../../../../")); + + foreach(const QString &file, files) + QTest::newRow(qPrintable(file)) << file; +} + +void tst_moduleqt47::accidentalImport() +{ + QFETCH(QString, file); + + QFile f(file); + if (!f.open(QIODevice::ReadOnly)) + return; + QByteArray data = f.readAll(); + + QVERIFY(!data.contains("import Qt 4")); +} + QTEST_MAIN(tst_moduleqt47) #include "tst_moduleqt47.moc" -- cgit v0.12 From 39f6657f74d78e5b856121310cf060a02bc1c352 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Mon, 27 Sep 2010 16:10:52 +0200 Subject: Add export to QDeclarativeBasePositioner Bauhaus needs this export to manage layouts. (cherry picked from commit 858469445ceb745c70dad9cd4f913acc34683e15) --- src/declarative/graphicsitems/qdeclarativepositioners_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/graphicsitems/qdeclarativepositioners_p.h b/src/declarative/graphicsitems/qdeclarativepositioners_p.h index f9ecc0a..15b91e5 100644 --- a/src/declarative/graphicsitems/qdeclarativepositioners_p.h +++ b/src/declarative/graphicsitems/qdeclarativepositioners_p.h @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QDeclarativeBasePositionerPrivate; -class Q_AUTOTEST_EXPORT QDeclarativeBasePositioner : public QDeclarativeItem +class Q_DECLARATIVE_EXPORT QDeclarativeBasePositioner : public QDeclarativeItem { Q_OBJECT -- cgit v0.12 From 0d31b86d1fd0fdbcc95c80ce91f505a2c8b0bc26 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Thu, 30 Sep 2010 17:23:27 +0200 Subject: Use setParentItem() instead of setParentItemHelper if componentComplete is true This ensures that if the component has already been completed, itemChange() is called. This is required to modify QDeclarativePositions in the visual editor, while keeping a legal state. Without this patch notifications are missing and the Positioner keeps track of already deleted children. This resulted in a crash. Reviewed-by: Thomas Hartmann (cherry picked from commit 1f8bb573f06234a3d13fb57de5eb644824d5024f) --- .../graphicsitems/qdeclarativeflickable.cpp | 24 +++++++++++++++++----- src/declarative/graphicsitems/qdeclarativeitem.cpp | 19 +++++++++++++---- 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index 84b0ccf..29879fe 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -1046,10 +1046,16 @@ void QDeclarativeFlickable::cancelFlick() void QDeclarativeFlickablePrivate::data_append(QDeclarativeListProperty *prop, QObject *o) { QGraphicsObject *i = qobject_cast(o); - if (i) - i->setParentItem(static_cast(prop->data)->contentItem); - else + if (i) { + QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(i); + if (static_cast(d)->componentComplete) { + i->setParentItem(static_cast(prop->data)->contentItem); + } else { + d->setParentItemHelper(static_cast(prop->data)->contentItem, 0, 0); + } + } else { o->setParent(prop->object); + } } static inline int children_count_helper(QGraphicsObject *object) @@ -1071,8 +1077,16 @@ static inline void children_clear_helper(QGraphicsObject *object) { QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(object); int childCount = d->children.count(); - for (int index = 0 ;index < childCount; index++) - QGraphicsItemPrivate::get(d->children.at(0))->setParentItemHelper(0, /*newParentVariant=*/0, /*thisPointerVariant=*/0); + if (static_cast(d)->componentComplete) { + for (int index = 0 ;index < childCount; index++) { + d->children.at(0)->setParentItem(0); + } + } else { + for (int index = 0 ;index < childCount; index++) { + QGraphicsItemPrivate::get(d->children.at(0))->setParentItemHelper(0, /*newParentVariant=*/0, /*thisPointerVariant=*/0); + } + } + } int QDeclarativeFlickablePrivate::data_count(QDeclarativeListProperty *prop) diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 3c2f0a8..830f8e3 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -1614,7 +1614,13 @@ void QDeclarativeItemPrivate::data_append(QDeclarativeListProperty *pro while (mo && mo != &QGraphicsObject::staticMetaObject) mo = mo->d.superdata; if (mo) { - QGraphicsItemPrivate::get(static_cast(o))->setParentItemHelper(that, 0, 0); + QGraphicsObject *graphicsObject = static_cast(o); + QDeclarativeItemPrivate *contentItemPrivate = static_cast(QGraphicsItemPrivate::get(graphicsObject)); + if (contentItemPrivate->componentComplete) { + graphicsObject->setParentItem(that); + } else { + contentItemPrivate->setParentItemHelper(that, /*newParentVariant=*/0, /*thisPointerVariant=*/0); + } } else { o->setParent(that); } @@ -1637,10 +1643,15 @@ static inline QObject *children_at_helper(QDeclarativeListProperty *pro static inline void children_clear_helper(QDeclarativeListProperty *prop) { - QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(static_cast(prop->object)); + QDeclarativeItemPrivate *d = static_cast(QGraphicsItemPrivate::get(static_cast(prop->object))); int childCount = d->children.count(); - for (int index = 0 ;index < childCount; index++) - QGraphicsItemPrivate::get(d->children.at(0))->setParentItemHelper(0, /*newParentVariant=*/0, /*thisPointerVariant=*/0); + if (d->componentComplete) { + for (int index = 0 ;index < childCount; index++) + d->children.at(0)->setParentItem(0); + } else { + for (int index = 0 ;index < childCount; index++) + QGraphicsItemPrivate::get(d->children.at(0))->setParentItemHelper(0, /*newParentVariant=*/0, /*thisPointerVariant=*/0); + } } int QDeclarativeItemPrivate::data_count(QDeclarativeListProperty *prop) -- cgit v0.12 From 8ece6273489f8fe032ad3da30468ee65fe55573f Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Thu, 30 Sep 2010 16:27:25 +0200 Subject: Add sendParentChangeNotification to QGraphicsItem Fixes crash in creator. If flag is true notifications are sent. It is important that positioners work correctly and don't leak. Reviewed-By: Alexis Menard (cherry picked from commit 3b43389b78925ce87d660c343c925fa280b91e11) --- src/gui/graphicsview/qgraphicsitem.cpp | 16 +++++++++++++--- src/gui/graphicsview/qgraphicsitem_p.h | 4 +++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index b404692..3b18c31 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -7669,7 +7669,12 @@ void QGraphicsObject::updateMicroFocus() void QGraphicsItemPrivate::children_append(QDeclarativeListProperty *list, QGraphicsObject *item) { - QGraphicsItemPrivate::get(item)->setParentItemHelper(static_cast(list->object), /*newParentVariant=*/0, /*thisPointerVariant=*/0); + QGraphicsObject *graphicsObject = static_cast(list->object); + if (QGraphicsItemPrivate::get(graphicsObject)->sendParentChangeNotification) { + item->setParentItem(graphicsObject); + } else { + QGraphicsItemPrivate::get(item)->setParentItemHelper(graphicsObject, 0, 0); + } } int QGraphicsItemPrivate::children_count(QDeclarativeListProperty *list) @@ -7691,8 +7696,13 @@ void QGraphicsItemPrivate::children_clear(QDeclarativeListProperty(list->object)); int childCount = d->children.count(); - for (int index = 0; index < childCount; index++) - QGraphicsItemPrivate::get(d->children.at(0))->setParentItemHelper(0, /*newParentVariant=*/0, /*thisPointerVariant=*/0); + if (d->sendParentChangeNotification) { + for (int index = 0; index < childCount; index++) + d->children.at(0)->setParentItem(0); + } else { + for (int index = 0; index < childCount; index++) + QGraphicsItemPrivate::get(d->children.at(0))->setParentItemHelper(0, 0, 0); + } } /*! diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index 77e4054..c8a7699 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -238,6 +238,7 @@ public: pendingPolish(0), mayHaveChildWithGraphicsEffect(0), isDeclarativeItem(0), + sendParentChangeNotification(0), globalStackingOrder(-1), q_ptr(0) { @@ -584,7 +585,8 @@ public: quint32 pendingPolish : 1; quint32 mayHaveChildWithGraphicsEffect : 1; quint32 isDeclarativeItem : 1; - quint32 padding : 23; + quint32 sendParentChangeNotification : 1; + quint32 padding : 22; // Optional stacking order int globalStackingOrder; -- cgit v0.12 From ed1d7b364640d5d937a865bffdeb8db3808b86dc Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Wed, 4 Aug 2010 14:15:35 +0200 Subject: Add breakpad support Breakpad is a portable crash handler. It sends the raw crash information to a server for analysis. This analysis needs debug information. Consequently, we compile with debug info even in release mode if qt-breakpad integration is requested (via an environment variable). Reviewed-by: ossi (cherry picked from commit 1a99cdbb36334e17c34b38dd5df1bdd70167b42a) --- mkspecs/common/g++.conf | 2 + mkspecs/common/mac-g++.conf | 3 ++ mkspecs/features/default_post.prf | 88 +++++++++++++++++++++++++++++++++++++++ mkspecs/win32-msvc2003/qmake.conf | 3 ++ mkspecs/win32-msvc2005/qmake.conf | 3 ++ mkspecs/win32-msvc2008/qmake.conf | 3 ++ mkspecs/win32-msvc2010/qmake.conf | 3 ++ 7 files changed, 105 insertions(+) diff --git a/mkspecs/common/g++.conf b/mkspecs/common/g++.conf index d3db24a..0d511fc 100644 --- a/mkspecs/common/g++.conf +++ b/mkspecs/common/g++.conf @@ -8,6 +8,7 @@ QMAKE_CFLAGS_DEPS += -M QMAKE_CFLAGS_WARN_ON += -Wall -W QMAKE_CFLAGS_WARN_OFF += -w QMAKE_CFLAGS_RELEASE += -O2 +QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -g QMAKE_CFLAGS_DEBUG += -g QMAKE_CFLAGS_SHLIB += -fPIC QMAKE_CFLAGS_STATIC_LIB += -fPIC @@ -22,6 +23,7 @@ QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB diff --git a/mkspecs/common/mac-g++.conf b/mkspecs/common/mac-g++.conf index 446547d..29b7408 100644 --- a/mkspecs/common/mac-g++.conf +++ b/mkspecs/common/mac-g++.conf @@ -10,6 +10,7 @@ QMAKE_CFLAGS_DEPS += -M QMAKE_CFLAGS_WARN_ON += -Wall -W QMAKE_CFLAGS_WARN_OFF += -w QMAKE_CFLAGS_RELEASE += -O2 +QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -g -gdwarf-2 QMAKE_CFLAGS_DEBUG += -g QMAKE_CFLAGS_SHLIB += -fPIC QMAKE_CFLAGS_STATIC_LIB += -fPIC @@ -33,6 +34,7 @@ QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB @@ -52,6 +54,7 @@ QMAKE_LINK_C = $$QMAKE_CC QMAKE_LINK_C_SHLIB = $$QMAKE_CC QMAKE_LFLAGS += -headerpad_max_install_names QMAKE_LFLAGS_RELEASE += +QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO += -g -gdwarf-2 QMAKE_LFLAGS_DEBUG += QMAKE_LFLAGS_APP += QMAKE_LFLAGS_SHLIB += -single_module -dynamiclib diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index d844385..59a5e86 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -1,3 +1,15 @@ +QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH) +!isEmpty(QT_BREAKPAD_ROOT_PATH): \ # quick test first whether requested ... + !staticlib:!static:CONFIG(release, debug|release):contains(TEMPLATE, .*(app|lib)): \ # is it applicable? + !contains(TARGET, .*phony_target.*): \ # monster hack, you don't really see this here, right? ;) + system($$QT_BREAKPAD_ROOT_PATH/qtbreakpadsymbols --breakpad-exists) { # do we really have it? + CONFIG += breakpad + CONFIG -= no_debug_info separate_debug_info + QMAKE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO + QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO + QMAKE_LFLAGS_RELEASE = $$QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO +} + CONFIG(debug, debug|release):load(debug) else:load(release) debug_and_release:load(debug_and_release) @@ -6,6 +18,82 @@ incredibuild_xge { CONFIG = incredibuild_xge $$CONFIG } +breakpad { + !contains(DESTDIR, (/|.:[/\\\\]).*):TARGET_BASEPATH = $${OUT_PWD}/ + !isEmpty(DESTDIR):TARGET_BASEPATH = $${TARGET_BASEPATH}$${DESTDIR}/ + + win32 { + TARGET_BASEPATH ~= s,/,\\, + contains(TEMPLATE, .*lib) { + isEmpty(TARGET_VERSION_EXT):!isEmpty(VERSION) { + TARGET_VERSION_EXT = $$section(VERSION, ., 0, 0) + isEqual(TARGET_VERSION_EXT, 0):unset(TARGET_VERSION_EXT) + } + TARGET_EXT = .dll + } else { + TARGET_EXT = .exe + } + + DEBUGFILENAME = $${TARGET_BASEPATH}$${TARGET}$${TARGET_VERSION_EXT}$${TARGET_EXT} + PDBFILENAME = $${TARGET_BASEPATH}$${TARGET}$${TARGET_VERSION_EXT}.pdb + DEBUGFILENAME ~= s,/,\\, + PDBFILENAME ~= s,/,\\, + QMAKE_CLEAN += $$PDBFILENAME # for the debug case it is hardcoded in qmake + } else { + contains(TEMPLATE, .*lib):LIBPREFIX = lib + + macx { + equals(TEMPLATE, lib) { + lib_bundle { + TARGET_FILENAME = $${TARGET_BASEPATH}$${TARGET}.framework/$${TARGET} + } else { + TARGET_FILENAME = $${TARGET_BASEPATH}$${LIBPREFIX}$${TARGET} + !plugin { + TEMP_VERSION = $$section(VERSION, ., 0, 0) + isEmpty(TEMP_VERSION):TEMP_VERSION = 1 + TARGET_FILENAME = $${TARGET_FILENAME}.$${TEMP_VERSION} + } + TARGET_FILENAME = $${TARGET_FILENAME}.$${QMAKE_EXTENSION_SHLIB} + } + } else { + app_bundle { + TARGET_FILENAME = $${TARGET_BASEPATH}$${TARGET}.app/Contents/MacOS/$${TARGET} + } else { + TARGET_FILENAME = $${TARGET_BASEPATH}$${TARGET} + } + } + DEBUGFILENAME = $$TARGET_FILENAME + } else { + equals(TEMPLATE, lib) { + plugin { + TARGET_FILENAME = $${TARGET_BASEPATH}$${LIBPREFIX}$${TARGET}.so + } else { + TEMP_VERSION = $$VERSION + isEmpty(TEMP_VERSION):TEMP_VERSION = 1.0.0 + TARGET_FILENAME = $${TARGET_BASEPATH}$${LIBPREFIX}$${TARGET}.so.$${TEMP_VERSION} + } + } else { + TARGET_BASEPATH = $${TARGET_BASEPATH}$${TARGET} + } + DEBUGFILENAME = $$TARGET_BASEPATH + } + } + + PROJECTPATH = $$OUT_PWD + win32:PROJECTPATH ~= s,/,\\, + + !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$QMAKE_POST_LINK$$escape_expand(\\n\\t) + QMAKE_POST_LINK += $$quote($${QT_BREAKPAD_ROOT_PATH}$${DIR_SEPARATOR}qtbreakpadsymbols \"$$DEBUGFILENAME\" \"$$PROJECTPATH\") + !isEmpty(QMAKE_STRIP):QMAKE_POST_LINK = $$quote($$QMAKE_POST_LINK$$escape_expand(\\n\\t)$$QMAKE_STRIP \"$$DEBUGFILENAME\") + + unset(TARGET_BASEPATH) + unset(TARGET_FILENAME) + unset(SYMBOLFILENAME) + unset(TARGET_EXT) + unset(TARGET_VERSION_EXT) + unset(TEMP_VERSION) +} + QMAKE_INCDIR += $$QMAKE_INCDIR_POST QMAKE_LIBDIR += $$QMAKE_LIBDIR_POST diff --git a/mkspecs/win32-msvc2003/qmake.conf b/mkspecs/win32-msvc2003/qmake.conf index 0230b30..63d1ffd 100644 --- a/mkspecs/win32-msvc2003/qmake.conf +++ b/mkspecs/win32-msvc2003/qmake.conf @@ -20,6 +20,7 @@ QMAKE_CFLAGS = -nologo -Zm300 QMAKE_CFLAGS_WARN_ON = -W3 QMAKE_CFLAGS_WARN_OFF = -W0 QMAKE_CFLAGS_RELEASE = -O2 -MD +QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi QMAKE_CFLAGS_DEBUG = -Zi -MDd QMAKE_CFLAGS_YACC = @@ -28,6 +29,7 @@ QMAKE_CXXFLAGS = $$QMAKE_CFLAGS QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189 QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_STL_ON = -EHsc @@ -51,6 +53,7 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< QMAKE_LINK = link QMAKE_LFLAGS = /NOLOGO QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO +QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /INCREMENTAL:NO /DEBUG QMAKE_LFLAGS_DEBUG = /DEBUG QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS diff --git a/mkspecs/win32-msvc2005/qmake.conf b/mkspecs/win32-msvc2005/qmake.conf index 0406fd0..265d028 100644 --- a/mkspecs/win32-msvc2005/qmake.conf +++ b/mkspecs/win32-msvc2005/qmake.conf @@ -20,6 +20,7 @@ QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t- QMAKE_CFLAGS_WARN_ON = -W3 QMAKE_CFLAGS_WARN_OFF = -W0 QMAKE_CFLAGS_RELEASE = -O2 -MD +QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi QMAKE_CFLAGS_DEBUG = -Zi -MDd QMAKE_CFLAGS_YACC = QMAKE_CFLAGS_LTCG = -GL @@ -29,6 +30,7 @@ QMAKE_CXXFLAGS = $$QMAKE_CFLAGS QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189 QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG @@ -53,6 +55,7 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< QMAKE_LINK = link QMAKE_LFLAGS = /NOLOGO QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO +QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /INCREMENTAL:NO /DEBUG QMAKE_LFLAGS_DEBUG = /DEBUG QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS \"/MANIFESTDEPENDENCY:type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\' processorArchitecture=\'*\'\" diff --git a/mkspecs/win32-msvc2008/qmake.conf b/mkspecs/win32-msvc2008/qmake.conf index 9a69aaa..1432645 100644 --- a/mkspecs/win32-msvc2008/qmake.conf +++ b/mkspecs/win32-msvc2008/qmake.conf @@ -20,6 +20,7 @@ QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t- QMAKE_CFLAGS_WARN_ON = -W3 QMAKE_CFLAGS_WARN_OFF = -W0 QMAKE_CFLAGS_RELEASE = -O2 -MD +QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi QMAKE_CFLAGS_DEBUG = -Zi -MDd QMAKE_CFLAGS_YACC = QMAKE_CFLAGS_LTCG = -GL @@ -30,6 +31,7 @@ QMAKE_CXXFLAGS = $$QMAKE_CFLAGS QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189 QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG @@ -55,6 +57,7 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< QMAKE_LINK = link QMAKE_LFLAGS = /NOLOGO QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO +QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /INCREMENTAL:NO /DEBUG QMAKE_LFLAGS_DEBUG = /DEBUG QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS \"/MANIFESTDEPENDENCY:type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\' processorArchitecture=\'*\'\" diff --git a/mkspecs/win32-msvc2010/qmake.conf b/mkspecs/win32-msvc2010/qmake.conf index 8331c14..84086e2 100644 --- a/mkspecs/win32-msvc2010/qmake.conf +++ b/mkspecs/win32-msvc2010/qmake.conf @@ -20,6 +20,7 @@ QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t- QMAKE_CFLAGS_WARN_ON = -W3 QMAKE_CFLAGS_WARN_OFF = -W0 QMAKE_CFLAGS_RELEASE = -O2 -MD +QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi QMAKE_CFLAGS_DEBUG = -Zi -MDd QMAKE_CFLAGS_YACC = QMAKE_CFLAGS_LTCG = -GL @@ -30,6 +31,7 @@ QMAKE_CXXFLAGS = $$QMAKE_CFLAGS QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189 QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG @@ -55,6 +57,7 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< QMAKE_LINK = link QMAKE_LFLAGS = /NOLOGO QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO +QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /INCREMENTAL:NO /DEBUG QMAKE_LFLAGS_DEBUG = /DEBUG QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS \"/MANIFESTDEPENDENCY:type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\' processorArchitecture=\'*\'\" -- cgit v0.12 From c0a6aede4d259ac6c998fb3067b09a80f037483e Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Wed, 22 Sep 2010 19:58:18 +0200 Subject: Qmake: Fix wrong path in the breakpad post link step Reviewed-By: Oswald Buddenhagen (cherry picked from commit 7412ac5b38d83b627a372a525f271c225f9c1f70) --- mkspecs/features/default_post.prf | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index 59a5e86..09c6587 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -45,32 +45,32 @@ breakpad { macx { equals(TEMPLATE, lib) { lib_bundle { - TARGET_FILENAME = $${TARGET_BASEPATH}$${TARGET}.framework/$${TARGET} + TARGET_BASEPATH = $${TARGET_BASEPATH}$${TARGET}.framework/$${TARGET} } else { - TARGET_FILENAME = $${TARGET_BASEPATH}$${LIBPREFIX}$${TARGET} + TARGET_BASEPATH = $${TARGET_BASEPATH}$${LIBPREFIX}$${TARGET} !plugin { TEMP_VERSION = $$section(VERSION, ., 0, 0) isEmpty(TEMP_VERSION):TEMP_VERSION = 1 - TARGET_FILENAME = $${TARGET_FILENAME}.$${TEMP_VERSION} + TARGET_BASEPATH = $${TARGET_BASEPATH}.$${TEMP_VERSION} } - TARGET_FILENAME = $${TARGET_FILENAME}.$${QMAKE_EXTENSION_SHLIB} + TARGET_BASEPATH = $${TARGET_BASEPATH}.$${QMAKE_EXTENSION_SHLIB} } } else { app_bundle { - TARGET_FILENAME = $${TARGET_BASEPATH}$${TARGET}.app/Contents/MacOS/$${TARGET} + TARGET_BASEPATH = $${TARGET_BASEPATH}$${TARGET}.app/Contents/MacOS/$${TARGET} } else { - TARGET_FILENAME = $${TARGET_BASEPATH}$${TARGET} + TARGET_BASEPATH = $${TARGET_BASEPATH}$${TARGET} } } - DEBUGFILENAME = $$TARGET_FILENAME + DEBUGFILENAME = $$TARGET_BASEPATH } else { equals(TEMPLATE, lib) { plugin { - TARGET_FILENAME = $${TARGET_BASEPATH}$${LIBPREFIX}$${TARGET}.so + TARGET_BASEPATH = $${TARGET_BASEPATH}$${LIBPREFIX}$${TARGET}.so } else { TEMP_VERSION = $$VERSION isEmpty(TEMP_VERSION):TEMP_VERSION = 1.0.0 - TARGET_FILENAME = $${TARGET_BASEPATH}$${LIBPREFIX}$${TARGET}.so.$${TEMP_VERSION} + TARGET_BASEPATH = $${TARGET_BASEPATH}$${LIBPREFIX}$${TARGET}.so.$${TEMP_VERSION} } } else { TARGET_BASEPATH = $${TARGET_BASEPATH}$${TARGET} @@ -87,7 +87,6 @@ breakpad { !isEmpty(QMAKE_STRIP):QMAKE_POST_LINK = $$quote($$QMAKE_POST_LINK$$escape_expand(\\n\\t)$$QMAKE_STRIP \"$$DEBUGFILENAME\") unset(TARGET_BASEPATH) - unset(TARGET_FILENAME) unset(SYMBOLFILENAME) unset(TARGET_EXT) unset(TARGET_VERSION_EXT) -- cgit v0.12 From ac0eeca641214a60b13dcabb8749b92bad155fc8 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Tue, 21 Sep 2010 13:00:02 +0200 Subject: Add exports for Bauhaus The QmlDesigner(Bauhaus) should not rely on -nokia-developer Reviewed-by: Marco Bubke (cherry picked from commit 8ad396891f2a4966ad3cf943f99e208211e956bb) --- src/declarative/util/qdeclarativeanimation_p.h | 2 +- src/declarative/util/qdeclarativetimer_p.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/declarative/util/qdeclarativeanimation_p.h b/src/declarative/util/qdeclarativeanimation_p.h index cdd5041..8cb17e4 100644 --- a/src/declarative/util/qdeclarativeanimation_p.h +++ b/src/declarative/util/qdeclarativeanimation_p.h @@ -63,7 +63,7 @@ QT_MODULE(Declarative) class QDeclarativeAbstractAnimationPrivate; class QDeclarativeAnimationGroup; -class Q_AUTOTEST_EXPORT QDeclarativeAbstractAnimation : public QObject, public QDeclarativePropertyValueSource, public QDeclarativeParserStatus +class Q_DECLARATIVE_EXPORT QDeclarativeAbstractAnimation : public QObject, public QDeclarativePropertyValueSource, public QDeclarativeParserStatus { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarativeAbstractAnimation) diff --git a/src/declarative/util/qdeclarativetimer_p.h b/src/declarative/util/qdeclarativetimer_p.h index 93b0965..08c3d4e 100644 --- a/src/declarative/util/qdeclarativetimer_p.h +++ b/src/declarative/util/qdeclarativetimer_p.h @@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QDeclarativeTimerPrivate; -class Q_AUTOTEST_EXPORT QDeclarativeTimer : public QObject, public QDeclarativeParserStatus +class Q_DECLARATIVE_EXPORT QDeclarativeTimer : public QObject, public QDeclarativeParserStatus { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarativeTimer) -- cgit v0.12 From a506b183332f313a9a197d5fd7359153eb1728c8 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 22 Sep 2010 21:03:57 +0200 Subject: Make QmlDebug protocol more robust The protocol so far was client->server only. That is, there was no sane way for a client to check whether a plugin on the server (service) was available or not. E.g. calling Client::setEnabled(true) 'succeeded', without a check whether there is actually a service to talk to. The new protocol replaces this shortcoming by a service discovery mechanism: Both client & service announce their available plugins at handshake time, and later on if there are changes. The status is reflected in Client::status() and Service::Status() , which are either NotConnected - no network connection, or not registered properly Unavailable - TCP/IP connection works, but no plugin with the same name on the other side Enabled - You can connect to plugin on other side The status changes happen automatically (no setEnabled() anymore). Furthermore a version ID was added to the handshake, so that we can extend the protocol further in the future :) (cherry picked from commit fd9771c29d401d88779ab7c5d7715c9ca41dd723) --- src/declarative/debugger/qdeclarativedebug.cpp | 56 ++++-- src/declarative/debugger/qdeclarativedebug_p.h | 7 +- .../debugger/qdeclarativedebugclient.cpp | 199 +++++++++++++++------ .../debugger/qdeclarativedebugclient_p.h | 10 +- .../debugger/qdeclarativedebugservice.cpp | 126 ++++++++++--- .../debugger/qdeclarativedebugservice_p.h | 9 +- .../debugger/qdeclarativedebugtrace.cpp | 8 +- .../qdeclarativedebug/tst_qdeclarativedebug.cpp | 5 +- .../tst_qdeclarativedebugclient.cpp | 60 +++---- .../tst_qdeclarativedebugservice.cpp | 41 ++--- tests/auto/declarative/shared/debugutil.cpp | 13 +- tests/auto/declarative/shared/debugutil_p.h | 8 +- 12 files changed, 362 insertions(+), 180 deletions(-) diff --git a/src/declarative/debugger/qdeclarativedebug.cpp b/src/declarative/debugger/qdeclarativedebug.cpp index 1ffe441..7a5e5f6 100644 --- a/src/declarative/debugger/qdeclarativedebug.cpp +++ b/src/declarative/debugger/qdeclarativedebug.cpp @@ -55,10 +55,12 @@ public: QDeclarativeEngineDebugClient(QDeclarativeDebugConnection *client, QDeclarativeEngineDebugPrivate *p); protected: + virtual void statusChanged(Status status); virtual void messageReceived(const QByteArray &); private: QDeclarativeEngineDebugPrivate *priv; + friend class QDeclarativeEngineDebugPrivate; }; class QDeclarativeEngineDebugPrivate : public QObjectPrivate @@ -66,7 +68,9 @@ class QDeclarativeEngineDebugPrivate : public QObjectPrivate Q_DECLARE_PUBLIC(QDeclarativeEngineDebug) public: QDeclarativeEngineDebugPrivate(QDeclarativeDebugConnection *); + ~QDeclarativeEngineDebugPrivate(); + void statusChanged(QDeclarativeEngineDebug::Status status); void message(const QByteArray &); QDeclarativeEngineDebugClient *client; @@ -93,12 +97,18 @@ QDeclarativeEngineDebugClient::QDeclarativeEngineDebugClient(QDeclarativeDebugCo QDeclarativeEngineDebugPrivate *p) : QDeclarativeDebugClient(QLatin1String("QDeclarativeEngine"), client), priv(p) { - setEnabled(true); +} + +void QDeclarativeEngineDebugClient::statusChanged(Status status) +{ + if (priv) + priv->statusChanged(static_cast(status)); } void QDeclarativeEngineDebugClient::messageReceived(const QByteArray &data) { - priv->message(data); + if (priv) + priv->message(data); } QDeclarativeEngineDebugPrivate::QDeclarativeEngineDebugPrivate(QDeclarativeDebugConnection *c) @@ -106,6 +116,12 @@ QDeclarativeEngineDebugPrivate::QDeclarativeEngineDebugPrivate(QDeclarativeDebug { } +QDeclarativeEngineDebugPrivate::~QDeclarativeEngineDebugPrivate() +{ + if (client) + client->priv = 0; +} + int QDeclarativeEngineDebugPrivate::getId() { return nextId++; @@ -228,6 +244,11 @@ void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugCo } } +void QDeclarativeEngineDebugPrivate::statusChanged(QDeclarativeEngineDebug::Status status) +{ + emit q_func()->statusChanged(status); +} + void QDeclarativeEngineDebugPrivate::message(const QByteArray &data) { QDataStream ds(data); @@ -350,12 +371,19 @@ QDeclarativeEngineDebug::QDeclarativeEngineDebug(QDeclarativeDebugConnection *cl { } +QDeclarativeEngineDebug::Status QDeclarativeEngineDebug::status() const +{ + Q_D(const QDeclarativeEngineDebug); + + return static_cast(d->client->status()); +} + QDeclarativeDebugPropertyWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugPropertyReference &property, QObject *parent) { Q_D(QDeclarativeEngineDebug); QDeclarativeDebugPropertyWatch *watch = new QDeclarativeDebugPropertyWatch(parent); - if (d->client->isConnected()) { + if (d->client->status() == QDeclarativeDebugClient::Enabled) { int queryId = d->getId(); watch->m_queryId = queryId; watch->m_client = this; @@ -384,7 +412,7 @@ QDeclarativeDebugObjectExpressionWatch *QDeclarativeEngineDebug::addWatch(const { Q_D(QDeclarativeEngineDebug); QDeclarativeDebugObjectExpressionWatch *watch = new QDeclarativeDebugObjectExpressionWatch(parent); - if (d->client->isConnected()) { + if (d->client->status() == QDeclarativeDebugClient::Enabled) { int queryId = d->getId(); watch->m_queryId = queryId; watch->m_client = this; @@ -407,7 +435,7 @@ QDeclarativeDebugWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebu Q_D(QDeclarativeEngineDebug); QDeclarativeDebugWatch *watch = new QDeclarativeDebugWatch(parent); - if (d->client->isConnected()) { + if (d->client->status() == QDeclarativeDebugClient::Enabled) { int queryId = d->getId(); watch->m_queryId = queryId; watch->m_client = this; @@ -443,7 +471,7 @@ void QDeclarativeEngineDebug::removeWatch(QDeclarativeDebugWatch *watch) d->watched.remove(watch->queryId()); - if (d->client && d->client->isConnected()) { + if (d->client && d->client->status() == QDeclarativeDebugClient::Enabled) { QByteArray message; QDataStream ds(&message, QIODevice::WriteOnly); ds << QByteArray("NO_WATCH") << watch->queryId(); @@ -456,7 +484,7 @@ QDeclarativeDebugEnginesQuery *QDeclarativeEngineDebug::queryAvailableEngines(QO Q_D(QDeclarativeEngineDebug); QDeclarativeDebugEnginesQuery *query = new QDeclarativeDebugEnginesQuery(parent); - if (d->client->isConnected()) { + if (d->client->status() == QDeclarativeDebugClient::Enabled) { query->m_client = this; int queryId = d->getId(); query->m_queryId = queryId; @@ -478,7 +506,7 @@ QDeclarativeDebugRootContextQuery *QDeclarativeEngineDebug::queryRootContexts(co Q_D(QDeclarativeEngineDebug); QDeclarativeDebugRootContextQuery *query = new QDeclarativeDebugRootContextQuery(parent); - if (d->client->isConnected() && engine.debugId() != -1) { + if (d->client->status() == QDeclarativeDebugClient::Enabled && engine.debugId() != -1) { query->m_client = this; int queryId = d->getId(); query->m_queryId = queryId; @@ -500,7 +528,7 @@ QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObject(const QDeclar Q_D(QDeclarativeEngineDebug); QDeclarativeDebugObjectQuery *query = new QDeclarativeDebugObjectQuery(parent); - if (d->client->isConnected() && object.debugId() != -1) { + if (d->client->status() == QDeclarativeDebugClient::Enabled && object.debugId() != -1) { query->m_client = this; int queryId = d->getId(); query->m_queryId = queryId; @@ -523,7 +551,7 @@ QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObjectRecursive(cons Q_D(QDeclarativeEngineDebug); QDeclarativeDebugObjectQuery *query = new QDeclarativeDebugObjectQuery(parent); - if (d->client->isConnected() && object.debugId() != -1) { + if (d->client->status() == QDeclarativeDebugClient::Enabled && object.debugId() != -1) { query->m_client = this; int queryId = d->getId(); query->m_queryId = queryId; @@ -546,7 +574,7 @@ QDeclarativeDebugExpressionQuery *QDeclarativeEngineDebug::queryExpressionResult Q_D(QDeclarativeEngineDebug); QDeclarativeDebugExpressionQuery *query = new QDeclarativeDebugExpressionQuery(parent); - if (d->client->isConnected() && objectDebugId != -1) { + if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) { query->m_client = this; query->m_expr = expr; int queryId = d->getId(); @@ -570,7 +598,7 @@ bool QDeclarativeEngineDebug::setBindingForObject(int objectDebugId, const QStri { Q_D(QDeclarativeEngineDebug); - if (d->client->isConnected() && objectDebugId != -1) { + if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) { QByteArray message; QDataStream ds(&message, QIODevice::WriteOnly); ds << QByteArray("SET_BINDING") << objectDebugId << propertyName << bindingExpression << isLiteralValue; @@ -585,7 +613,7 @@ bool QDeclarativeEngineDebug::resetBindingForObject(int objectDebugId, const QSt { Q_D(QDeclarativeEngineDebug); - if (d->client->isConnected() && objectDebugId != -1) { + if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) { QByteArray message; QDataStream ds(&message, QIODevice::WriteOnly); ds << QByteArray("RESET_BINDING") << objectDebugId << propertyName; @@ -601,7 +629,7 @@ bool QDeclarativeEngineDebug::setMethodBody(int objectDebugId, const QString &me { Q_D(QDeclarativeEngineDebug); - if (d->client->isConnected() && objectDebugId != -1) { + if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) { QByteArray message; QDataStream ds(&message, QIODevice::WriteOnly); ds << QByteArray("SET_METHOD_BODY") << objectDebugId << methodName << methodBody; diff --git a/src/declarative/debugger/qdeclarativedebug_p.h b/src/declarative/debugger/qdeclarativedebug_p.h index 2b1a115..3d83e8a 100644 --- a/src/declarative/debugger/qdeclarativedebug_p.h +++ b/src/declarative/debugger/qdeclarativedebug_p.h @@ -69,7 +69,11 @@ class Q_DECLARATIVE_EXPORT QDeclarativeEngineDebug : public QObject { Q_OBJECT public: - QDeclarativeEngineDebug(QDeclarativeDebugConnection *, QObject * = 0); + enum Status { NotConnected, Unavailable, Enabled }; + + explicit QDeclarativeEngineDebug(QDeclarativeDebugConnection *, QObject * = 0); + + Status status() const; QDeclarativeDebugPropertyWatch *addWatch(const QDeclarativeDebugPropertyReference &, QObject *parent = 0); @@ -101,6 +105,7 @@ public: Q_SIGNALS: void newObjects(); + void statusChanged(Status status); private: Q_DECLARE_PRIVATE(QDeclarativeEngineDebug) diff --git a/src/declarative/debugger/qdeclarativedebugclient.cpp b/src/declarative/debugger/qdeclarativedebugclient.cpp index 2e52b40..f7d7243 100644 --- a/src/declarative/debugger/qdeclarativedebugclient.cpp +++ b/src/declarative/debugger/qdeclarativedebugclient.cpp @@ -50,6 +50,20 @@ QT_BEGIN_NAMESPACE +const int protocolVersion = 1; +const QString serverId = QLatin1String("QDeclarativeDebugServer"); +const QString clientId = QLatin1String("QDeclarativeDebugClient"); + +class QDeclarativeDebugClientPrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QDeclarativeDebugClient) +public: + QDeclarativeDebugClientPrivate(); + + QString name; + QDeclarativeDebugConnection *client; +}; + class QDeclarativeDebugConnectionPrivate : public QObject { Q_OBJECT @@ -58,40 +72,123 @@ public: QDeclarativeDebugConnection *q; QPacketProtocol *protocol; - QStringList enabled; + bool gotHello; + QStringList serverPlugins; QHash plugins; + + void advertisePlugins(); + public Q_SLOTS: void connected(); void readyRead(); }; QDeclarativeDebugConnectionPrivate::QDeclarativeDebugConnectionPrivate(QDeclarativeDebugConnection *c) -: QObject(c), q(c), protocol(0) +: QObject(c), q(c), protocol(0), gotHello(false) { protocol = new QPacketProtocol(q, this); QObject::connect(c, SIGNAL(connected()), this, SLOT(connected())); QObject::connect(protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); } +void QDeclarativeDebugConnectionPrivate::advertisePlugins() +{ + if (!q->isConnected() || !gotHello) + return; + + QPacket pack; + pack << serverId << 1 << plugins.keys(); + protocol->send(pack); +} + void QDeclarativeDebugConnectionPrivate::connected() { QPacket pack; - pack << QString(QLatin1String("QDeclarativeDebugServer")) << enabled; + pack << serverId << 0 << protocolVersion << plugins.keys(); protocol->send(pack); } void QDeclarativeDebugConnectionPrivate::readyRead() { - QPacket pack = protocol->read(); - QString name; QByteArray message; - pack >> name >> message; + if (!gotHello) { + QPacket pack = protocol->read(); + QString name; + + pack >> name; + + bool validHello = false; + if (name == clientId) { + int op = -1; + pack >> op; + if (op == 0) { + int version = -1; + pack >> version; + if (version == protocolVersion) { + pack >> serverPlugins; + validHello = true; + } + } + } - QHash::Iterator iter = - plugins.find(name); - if (iter == plugins.end()) { - qWarning() << "QDeclarativeDebugConnection: Message received for missing plugin" << name; - } else { - (*iter)->messageReceived(message); + if (!validHello) { + qWarning("QDeclarativeDebugConnection: Invalid hello message"); + QObject::disconnect(protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); + return; + } + + qDebug() << "Available server side plugins: " << serverPlugins; + + QHash::Iterator iter = plugins.begin(); + for (; iter != plugins.end(); ++iter) { + QDeclarativeDebugClient::Status newStatus = QDeclarativeDebugClient::Unavailable; + if (serverPlugins.contains(iter.key())) + newStatus = QDeclarativeDebugClient::Enabled; + iter.value()->statusChanged(newStatus); + } + gotHello = true; + } + + while (protocol->packetsAvailable()) { + QPacket pack = protocol->read(); + QString name; + pack >> name; + + if (name == clientId) { + int op = -1; + pack >> op; + + if (op == 1) { + // Service Discovery + QStringList oldServerPlugins = serverPlugins; + pack >> serverPlugins; + + QHash::Iterator iter = plugins.begin(); + for (; iter != plugins.end(); ++iter) { + const QString pluginName = iter.key(); + QDeclarativeDebugClient::Status newStatus = QDeclarativeDebugClient::Unavailable; + if (serverPlugins.contains(pluginName)) + newStatus = QDeclarativeDebugClient::Enabled; + + if (oldServerPlugins.contains(pluginName) + != serverPlugins.contains(pluginName)) { + iter.value()->statusChanged(newStatus); + } + } + } else { + qWarning() << "QDeclarativeDebugConnection: Unknown control message id" << op; + } + } else { + QByteArray message; + pack >> message; + + QHash::Iterator iter = + plugins.find(name); + if (iter == plugins.end()) { + qWarning() << "QDeclarativeDebugConnection: Message received for missing plugin" << name; + } else { + (*iter)->messageReceived(message); + } + } } } @@ -100,24 +197,22 @@ QDeclarativeDebugConnection::QDeclarativeDebugConnection(QObject *parent) { } -bool QDeclarativeDebugConnection::isConnected() const +QDeclarativeDebugConnection::~QDeclarativeDebugConnection() { - return state() == ConnectedState; + QHash::iterator iter = d->plugins.begin(); + for (; iter != d->plugins.end(); ++iter) { + iter.value()->d_func()->client = 0; + iter.value()->statusChanged(QDeclarativeDebugClient::NotConnected); + } } -class QDeclarativeDebugClientPrivate : public QObjectPrivate +bool QDeclarativeDebugConnection::isConnected() const { - Q_DECLARE_PUBLIC(QDeclarativeDebugClient) -public: - QDeclarativeDebugClientPrivate(); - - QString name; - QDeclarativeDebugConnection *client; - bool enabled; -}; + return state() == ConnectedState; +} QDeclarativeDebugClientPrivate::QDeclarativeDebugClientPrivate() -: client(0), enabled(false) +: client(0) { } @@ -137,60 +232,44 @@ QDeclarativeDebugClient::QDeclarativeDebugClient(const QString &name, d->client = 0; } else { d->client->d->plugins.insert(name, this); + d->client->d->advertisePlugins(); } } -QString QDeclarativeDebugClient::name() const +QDeclarativeDebugClient::~QDeclarativeDebugClient() { Q_D(const QDeclarativeDebugClient); - return d->name; + if (d->client && d->client->d) { + d->client->d->plugins.remove(d->name); + d->client->d->advertisePlugins(); + } } -bool QDeclarativeDebugClient::isEnabled() const +QString QDeclarativeDebugClient::name() const { Q_D(const QDeclarativeDebugClient); - return d->enabled; -} - -void QDeclarativeDebugClient::setEnabled(bool e) -{ - Q_D(QDeclarativeDebugClient); - if (e == d->enabled) - return; - - d->enabled = e; - - if (d->client) { - if (e) - d->client->d->enabled.append(d->name); - else - d->client->d->enabled.removeAll(d->name); - - if (d->client->state() == QTcpSocket::ConnectedState) { - QPacket pack; - pack << QString(QLatin1String("QDeclarativeDebugServer")); - if (e) pack << (int)1; - else pack << (int)2; - pack << d->name; - d->client->d->protocol->send(pack); - } - } + return d->name; } -bool QDeclarativeDebugClient::isConnected() const +QDeclarativeDebugClient::Status QDeclarativeDebugClient::status() const { Q_D(const QDeclarativeDebugClient); + if (!d->client + || !d->client->isConnected() + || !d->client->d->gotHello) + return NotConnected; - if (!d->client) - return false; - return d->client->isConnected(); + if (d->client->d->serverPlugins.contains(d->name)) + return Enabled; + + return Unavailable; } void QDeclarativeDebugClient::sendMessage(const QByteArray &message) { Q_D(QDeclarativeDebugClient); - if (!d->client || !d->client->isConnected()) + if (status() != Enabled) return; QPacket pack; @@ -198,6 +277,10 @@ void QDeclarativeDebugClient::sendMessage(const QByteArray &message) d->client->d->protocol->send(pack); } +void QDeclarativeDebugClient::statusChanged(Status status) +{ +} + void QDeclarativeDebugClient::messageReceived(const QByteArray &) { } diff --git a/src/declarative/debugger/qdeclarativedebugclient_p.h b/src/declarative/debugger/qdeclarativedebugclient_p.h index 4144a66..8d1706d 100644 --- a/src/declarative/debugger/qdeclarativedebugclient_p.h +++ b/src/declarative/debugger/qdeclarativedebugclient_p.h @@ -57,6 +57,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeDebugConnection : public QTcpSocket Q_DISABLE_COPY(QDeclarativeDebugConnection) public: QDeclarativeDebugConnection(QObject * = 0); + ~QDeclarativeDebugConnection(); bool isConnected() const; private: @@ -73,18 +74,19 @@ class Q_DECLARATIVE_EXPORT QDeclarativeDebugClient : public QObject Q_DISABLE_COPY(QDeclarativeDebugClient) public: + enum Status { NotConnected, Unavailable, Enabled }; + QDeclarativeDebugClient(const QString &, QDeclarativeDebugConnection *parent); + ~QDeclarativeDebugClient(); QString name() const; - bool isEnabled() const; - void setEnabled(bool); - - bool isConnected() const; + Status status() const; void sendMessage(const QByteArray &); protected: + virtual void statusChanged(Status); virtual void messageReceived(const QByteArray &); private: diff --git a/src/declarative/debugger/qdeclarativedebugservice.cpp b/src/declarative/debugger/qdeclarativedebugservice.cpp index 1f2bf4f..0fbc1e3 100644 --- a/src/declarative/debugger/qdeclarativedebugservice.cpp +++ b/src/declarative/debugger/qdeclarativedebugservice.cpp @@ -54,6 +54,30 @@ QT_BEGIN_NAMESPACE +/* + QDeclarativeDebug Protocol (Version 1): + + handshake: + 1. Client sends + "QDeclarativeDebugServer" 0 version pluginNames + version: an int representing the highest protocol version the client knows + pluginNames: plugins available on client side + 2. Server sends + "QDeclarativeDebugClient" 0 version pluginNames + version: an int representing the highest protocol version the client & server know + pluginNames: plugins available on server side. plugins both in the client and server message are enabled. + client plugin advertisement + 1. Client sends + "QDeclarativeDebugServer" 1 pluginNames + server plugin advertisement + 1. Server sends + "QDeclarativeDebugClient" 1 pluginNames + plugin communication: + Everything send with a header different to "QDeclarativeDebugServer" is sent to the appropriate plugin. + */ + +const int protocolVersion = 1; + class QDeclarativeDebugServerPrivate; class QDeclarativeDebugServer : public QObject { @@ -82,11 +106,13 @@ class QDeclarativeDebugServerPrivate : public QObjectPrivate public: QDeclarativeDebugServerPrivate(); + void advertisePlugins(); + int port; QTcpSocket *connection; QPacketProtocol *protocol; QHash plugins; - QStringList enabledPlugins; + QStringList clientPlugins; QTcpServer *tcpServer; bool gotHello; }; @@ -106,6 +132,18 @@ QDeclarativeDebugServerPrivate::QDeclarativeDebugServerPrivate() { } +void QDeclarativeDebugServerPrivate::advertisePlugins() +{ + if (!connection + || connection->state() != QTcpSocket::ConnectedState + || !gotHello) + return; + + QPacket pack; + pack << QString(QLatin1String("QDeclarativeDebugClient")) << 1 << plugins.keys(); + protocol->send(pack); +} + void QDeclarativeDebugServer::listen() { Q_D(QDeclarativeDebugServer); @@ -202,9 +240,13 @@ void QDeclarativeDebugServer::readyRead() if (!d->gotHello) { QPacket hello = d->protocol->read(); - QString name; - hello >> name >> d->enabledPlugins; - if (name != QLatin1String("QDeclarativeDebugServer")) { + + QString name; + int op; + hello >> name >> op; + + if (name != QLatin1String("QDeclarativeDebugServer") + || op != 0) { qWarning("QDeclarativeDebugServer: Invalid hello message"); QObject::disconnect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); d->protocol->deleteLater(); @@ -213,6 +255,23 @@ void QDeclarativeDebugServer::readyRead() d->connection = 0; return; } + + int version; + hello >> version >> d->clientPlugins; + + QHash::Iterator iter = d->plugins.begin(); + for (; iter != d->plugins.end(); ++iter) { + QDeclarativeDebugService::Status newStatus = QDeclarativeDebugService::Unavailable; + if (d->clientPlugins.contains(iter.key())) + newStatus = QDeclarativeDebugService::Enabled; + iter.value()->statusChanged(newStatus); + } + + QPacket helloAnswer; + helloAnswer << QString(QLatin1String("QDeclarativeDebugClient")) << 0 << protocolVersion << d->plugins.keys(); + d->protocol->send(helloAnswer); + d->connection->flush(); + d->gotHello = true; qWarning("QDeclarativeDebugServer: Connection established"); } @@ -226,32 +285,29 @@ void QDeclarativeDebugServer::readyRead() pack >> name; if (name == debugServer) { - int op = -1; QString plugin; - pack >> op >> plugin; + int op = -1; + pack >> op; if (op == 1) { - // Enable - if (!d->enabledPlugins.contains(plugin)) { - d->enabledPlugins.append(plugin); - QHash::Iterator iter = - d->plugins.find(plugin); - if (iter != d->plugins.end()) - (*iter)->enabledChanged(true); - } - - } else if (op == 2) { - // Disable - if (d->enabledPlugins.contains(plugin)) { - d->enabledPlugins.removeAll(plugin); - QHash::Iterator iter = - d->plugins.find(plugin); - if (iter != d->plugins.end()) - (*iter)->enabledChanged(false); + // Service Discovery + QStringList oldClientPlugins = d->clientPlugins; + pack >> d->clientPlugins; + + QHash::Iterator iter = d->plugins.begin(); + for (; iter != d->plugins.end(); ++iter) { + const QString pluginName = iter.key(); + QDeclarativeDebugService::Status newStatus = QDeclarativeDebugService::Unavailable; + if (d->clientPlugins.contains(pluginName)) + newStatus = QDeclarativeDebugService::Enabled; + + if (oldClientPlugins.contains(pluginName) + != d->clientPlugins.contains(pluginName)) { + iter.value()->statusChanged(newStatus); + } } } else { qWarning("QDeclarativeDebugServer: Invalid control message %d", op); } - } else { QByteArray message; pack >> message; @@ -287,6 +343,16 @@ QDeclarativeDebugService::QDeclarativeDebugService(const QString &name, QObject d->server = 0; } else { d->server->d_func()->plugins.insert(name, this); + d->server->d_func()->advertisePlugins(); + } +} + +QDeclarativeDebugService::~QDeclarativeDebugService() +{ + Q_D(const QDeclarativeDebugService); + if (d->server) { + d->server->d_func()->plugins.remove(d->name); + d->server->d_func()->advertisePlugins(); } } @@ -296,10 +362,16 @@ QString QDeclarativeDebugService::name() const return d->name; } -bool QDeclarativeDebugService::isEnabled() const +QDeclarativeDebugService::Status QDeclarativeDebugService::status() const { Q_D(const QDeclarativeDebugService); - return (d->server && d->server->d_func()->enabledPlugins.contains(d->name)); + if (!d->server + || !d->server->hasDebuggingClient()) + return NotConnected; + if (d->server->d_func()->clientPlugins.contains(d->name)) + return Enabled; + + return Unavailable; } namespace { @@ -422,7 +494,7 @@ void QDeclarativeDebugService::sendMessage(const QByteArray &message) d->server->d_func()->connection->flush(); } -void QDeclarativeDebugService::enabledChanged(bool) +void QDeclarativeDebugService::statusChanged(Status) { } diff --git a/src/declarative/debugger/qdeclarativedebugservice_p.h b/src/declarative/debugger/qdeclarativedebugservice_p.h index c461ddf..0cadbe5 100644 --- a/src/declarative/debugger/qdeclarativedebugservice_p.h +++ b/src/declarative/debugger/qdeclarativedebugservice_p.h @@ -56,12 +56,15 @@ class Q_DECLARATIVE_EXPORT QDeclarativeDebugService : public QObject Q_OBJECT Q_DECLARE_PRIVATE(QDeclarativeDebugService) Q_DISABLE_COPY(QDeclarativeDebugService) + public: - QDeclarativeDebugService(const QString &, QObject *parent = 0); + explicit QDeclarativeDebugService(const QString &, QObject *parent = 0); + ~QDeclarativeDebugService(); QString name() const; - bool isEnabled() const; + enum Status { NotConnected, Unavailable, Enabled }; + Status status() const; void sendMessage(const QByteArray &); @@ -74,7 +77,7 @@ public: static bool hasDebuggingClient(); protected: - virtual void enabledChanged(bool); + virtual void statusChanged(Status); virtual void messageReceived(const QByteArray &); private: diff --git a/src/declarative/debugger/qdeclarativedebugtrace.cpp b/src/declarative/debugger/qdeclarativedebugtrace.cpp index b2b0c8a..03e2d56 100644 --- a/src/declarative/debugger/qdeclarativedebugtrace.cpp +++ b/src/declarative/debugger/qdeclarativedebugtrace.cpp @@ -78,7 +78,7 @@ void QDeclarativeDebugTrace::endRange(RangeType t) void QDeclarativeDebugTrace::addEventImpl(EventType event) { - if (!isEnabled()) + if (status() != Enabled) return; QByteArray data; @@ -89,7 +89,7 @@ void QDeclarativeDebugTrace::addEventImpl(EventType event) void QDeclarativeDebugTrace::startRangeImpl(RangeType range) { - if (!isEnabled()) + if (status() != Enabled) return; QByteArray data; @@ -100,7 +100,7 @@ void QDeclarativeDebugTrace::startRangeImpl(RangeType range) void QDeclarativeDebugTrace::rangeDataImpl(RangeType range, const QUrl &u) { - if (!isEnabled()) + if (status() != Enabled) return; QByteArray data; @@ -111,7 +111,7 @@ void QDeclarativeDebugTrace::rangeDataImpl(RangeType range, const QUrl &u) void QDeclarativeDebugTrace::endRangeImpl(RangeType range) { - if (!isEnabled()) + if (status() != Enabled) return; QByteArray data; diff --git a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp index 4a5bdf2..e6a81b8 100644 --- a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp +++ b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp @@ -324,13 +324,16 @@ void tst_QDeclarativeDebug::initTestCase() bool ok = m_conn->waitForConnected(); Q_ASSERT(ok); QTRY_VERIFY(QDeclarativeDebugService::hasDebuggingClient()); - m_dbg = new QDeclarativeEngineDebug(m_conn, this); + QTRY_VERIFY(m_dbg->status() == QDeclarativeEngineDebug::Enabled); } void tst_QDeclarativeDebug::cleanupTestCase() { + delete m_dbg; + delete m_conn; qDeleteAll(m_components); + delete m_engine; } void tst_QDeclarativeDebug::setMethodBody() diff --git a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp index 7db0e60..72af3eb 100644 --- a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp +++ b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp @@ -66,9 +66,7 @@ private slots: void initTestCase(); void name(); - void isEnabled(); - void setEnabled(); - void isConnected(); + void status(); void sendMessage(); }; @@ -96,46 +94,33 @@ void tst_QDeclarativeDebugClient::name() QCOMPARE(client.name(), name); } -void tst_QDeclarativeDebugClient::isEnabled() +void tst_QDeclarativeDebugClient::status() { - QDeclarativeDebugClient client("tst_QDeclarativeDebugClient::isEnabled()", m_conn); - QCOMPARE(client.isEnabled(), false); -} + { + QDeclarativeDebugConnection dummyConn; + QDeclarativeDebugClient client("tst_QDeclarativeDebugClient::status()", &dummyConn); + QCOMPARE(client.status(), QDeclarativeDebugClient::NotConnected); + } -void tst_QDeclarativeDebugClient::setEnabled() -{ - QDeclarativeDebugTestService service("tst_QDeclarativeDebugClient::setEnabled()"); - QDeclarativeDebugTestClient client("tst_QDeclarativeDebugClient::setEnabled()", m_conn); + QDeclarativeDebugTestClient client("tst_QDeclarativeDebugClient::status()", m_conn); + QCOMPARE(client.status(), QDeclarativeDebugClient::Unavailable); - QCOMPARE(service.isEnabled(), false); + { + QDeclarativeDebugTestService service("tst_QDeclarativeDebugClient::status()"); + QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())); + QCOMPARE(client.status(), QDeclarativeDebugClient::Enabled); + } + QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())); - client.setEnabled(true); - QCOMPARE(client.isEnabled(), true); - QDeclarativeDebugTest::waitForSignal(&service, SIGNAL(enabledStateChanged())); - QCOMPARE(service.isEnabled(), true); - - client.setEnabled(false); - QCOMPARE(client.isEnabled(), false); - QDeclarativeDebugTest::waitForSignal(&service, SIGNAL(enabledStateChanged())); - QCOMPARE(service.isEnabled(), false); -} - -void tst_QDeclarativeDebugClient::isConnected() -{ - QDeclarativeDebugClient client1("tst_QDeclarativeDebugClient::isConnected() A", m_conn); - QCOMPARE(client1.isConnected(), true); - - QDeclarativeDebugConnection conn; - QDeclarativeDebugClient client2("tst_QDeclarativeDebugClient::isConnected() B", &conn); - QCOMPARE(client2.isConnected(), false); - - QDeclarativeDebugClient client3("tst_QDeclarativeDebugClient::isConnected() C", 0); - QCOMPARE(client3.isConnected(), false); + QCOMPARE(client.status(), QDeclarativeDebugClient::Unavailable); // duplicate plugin name - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugClient: Conflicting plugin name \"tst_QDeclarativeDebugClient::isConnected() A\" "); - QDeclarativeDebugClient client4("tst_QDeclarativeDebugClient::isConnected() A", m_conn); - QCOMPARE(client4.isConnected(), false); + QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugClient: Conflicting plugin name \"tst_QDeclarativeDebugClient::status()\" "); + QDeclarativeDebugClient client2("tst_QDeclarativeDebugClient::status()", m_conn); + QCOMPARE(client2.status(), QDeclarativeDebugClient::NotConnected); + + QDeclarativeDebugClient client3("tst_QDeclarativeDebugClient::status3()", 0); + QCOMPARE(client3.status(), QDeclarativeDebugClient::NotConnected); } void tst_QDeclarativeDebugClient::sendMessage() @@ -145,6 +130,7 @@ void tst_QDeclarativeDebugClient::sendMessage() QByteArray msg = "hello!"; + QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())); client.sendMessage(msg); QByteArray resp = client.waitForResponse(); QCOMPARE(resp, msg); diff --git a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp index 70679b9..945823a 100644 --- a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp +++ b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp @@ -66,8 +66,7 @@ private slots: void initTestCase(); void name(); - void isEnabled(); - void enabledChanged(); + void status(); void sendMessage(); void idForObject(); void objectForId(); @@ -97,31 +96,24 @@ void tst_QDeclarativeDebugService::name() QCOMPARE(service.name(), name); } -void tst_QDeclarativeDebugService::isEnabled() +void tst_QDeclarativeDebugService::status() { - QDeclarativeDebugTestService service("tst_QDeclarativeDebugService::isEnabled()", m_conn); - QCOMPARE(service.isEnabled(), false); + QDeclarativeDebugTestService service("tst_QDeclarativeDebugService::status()"); + QCOMPARE(service.status(), QDeclarativeDebugService::Unavailable); - QDeclarativeDebugTestClient client("tst_QDeclarativeDebugService::isEnabled()", m_conn); - client.setEnabled(true); - QDeclarativeDebugTest::waitForSignal(&service, SIGNAL(enabledStateChanged())); - QCOMPARE(service.isEnabled(), true); + { + QDeclarativeDebugTestClient client("tst_QDeclarativeDebugService::status()", m_conn); + QDeclarativeDebugTest::waitForSignal(&service, SIGNAL(statusHasChanged())); + QCOMPARE(service.status(), QDeclarativeDebugService::Enabled); + } - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugService: Conflicting plugin name \"tst_QDeclarativeDebugService::isEnabled()\" "); - QDeclarativeDebugService duplicate("tst_QDeclarativeDebugService::isEnabled()", m_conn); - QCOMPARE(duplicate.isEnabled(), false); -} - -void tst_QDeclarativeDebugService::enabledChanged() -{ - QDeclarativeDebugTestService service("tst_QDeclarativeDebugService::enabledChanged()"); - QDeclarativeDebugTestClient client("tst_QDeclarativeDebugService::enabledChanged()", m_conn); + QDeclarativeDebugTest::waitForSignal(&service, SIGNAL(statusHasChanged())); + QCOMPARE(service.status(), QDeclarativeDebugService::Unavailable); - QCOMPARE(service.enabled, false); + QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugService: Conflicting plugin name \"tst_QDeclarativeDebugService::status()\" "); - client.setEnabled(true); - QDeclarativeDebugTest::waitForSignal(&service, SIGNAL(enabledStateChanged())); - QCOMPARE(service.enabled, true); + QDeclarativeDebugService duplicate("tst_QDeclarativeDebugService::status()"); + QCOMPARE(duplicate.status(), QDeclarativeDebugService::NotConnected); } void tst_QDeclarativeDebugService::sendMessage() @@ -131,6 +123,11 @@ void tst_QDeclarativeDebugService::sendMessage() QByteArray msg = "hello!"; + if (service.status() != QDeclarativeDebugService::Enabled) + QDeclarativeDebugTest::waitForSignal(&service, SIGNAL(statusHasChanged())); + if (client.status() != QDeclarativeDebugClient::Enabled) + QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())); + client.sendMessage(msg); QByteArray resp = client.waitForResponse(); QCOMPARE(resp, msg); diff --git a/tests/auto/declarative/shared/debugutil.cpp b/tests/auto/declarative/shared/debugutil.cpp index c0c3eca..5f68e44 100644 --- a/tests/auto/declarative/shared/debugutil.cpp +++ b/tests/auto/declarative/shared/debugutil.cpp @@ -60,7 +60,7 @@ bool QDeclarativeDebugTest::waitForSignal(QObject *receiver, const char *member, } QDeclarativeDebugTestService::QDeclarativeDebugTestService(const QString &s, QObject *parent) - : QDeclarativeDebugService(s, parent), enabled(false) + : QDeclarativeDebugService(s, parent) { } @@ -69,10 +69,9 @@ void QDeclarativeDebugTestService::messageReceived(const QByteArray &ba) sendMessage(ba); } -void QDeclarativeDebugTestService::enabledChanged(bool e) +void QDeclarativeDebugTestService::statusChanged(Status) { - enabled = e; - emit enabledStateChanged(); + emit statusHasChanged(); } @@ -92,9 +91,13 @@ QByteArray QDeclarativeDebugTestClient::waitForResponse() return lastMsg; } +void QDeclarativeDebugTestClient::statusChanged(Status status) +{ + emit statusHasChanged(); +} + void QDeclarativeDebugTestClient::messageReceived(const QByteArray &ba) { lastMsg = ba; emit serverMessage(ba); } - diff --git a/tests/auto/declarative/shared/debugutil_p.h b/tests/auto/declarative/shared/debugutil_p.h index e6bb7ad..434e053 100644 --- a/tests/auto/declarative/shared/debugutil_p.h +++ b/tests/auto/declarative/shared/debugutil_p.h @@ -62,15 +62,13 @@ class QDeclarativeDebugTestService : public QDeclarativeDebugService Q_OBJECT public: QDeclarativeDebugTestService(const QString &s, QObject *parent = 0); - bool enabled; signals: - void enabledStateChanged(); + void statusHasChanged(); protected: virtual void messageReceived(const QByteArray &ba); - - virtual void enabledChanged(bool e); + virtual void statusChanged(Status status); }; class QDeclarativeDebugTestClient : public QDeclarativeDebugClient @@ -82,9 +80,11 @@ public: QByteArray waitForResponse(); signals: + void statusHasChanged(); void serverMessage(const QByteArray &); protected: + virtual void statusChanged(Status status); virtual void messageReceived(const QByteArray &ba); private: -- cgit v0.12 From 69a39d7b48ef239248d1039a2d8f2f0dbf560b34 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 28 Sep 2010 12:24:55 +0200 Subject: QmlDebugService: Check that there is a receiver before sending messages Reviewed-by: Christiaan Janssen (cherry picked from commit 30959e88498b2c8591145e30c8b497a76c12d8f6) --- src/declarative/debugger/qdeclarativedebugservice.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/declarative/debugger/qdeclarativedebugservice.cpp b/src/declarative/debugger/qdeclarativedebugservice.cpp index 0fbc1e3..62f2f39 100644 --- a/src/declarative/debugger/qdeclarativedebugservice.cpp +++ b/src/declarative/debugger/qdeclarativedebugservice.cpp @@ -182,7 +182,9 @@ void QDeclarativeDebugServer::newConnection() bool QDeclarativeDebugServer::hasDebuggingClient() const { Q_D(const QDeclarativeDebugServer); - return d->gotHello; + return d->connection + && (d->connection->state() == QTcpSocket::ConnectedState) + && d->gotHello; } QDeclarativeDebugServer *QDeclarativeDebugServer::instance() @@ -485,7 +487,7 @@ void QDeclarativeDebugService::sendMessage(const QByteArray &message) { Q_D(QDeclarativeDebugService); - if (!d->server || !d->server->d_func()->connection) + if (status() != Enabled) return; QPacket pack; -- cgit v0.12 From b4ccec4309f9d384056e743e9c0caf91097a57b4 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 28 Sep 2010 12:48:13 +0200 Subject: QDeclarativeDebugClient: Fix gcc warning (cherry picked from commit 9caae83e1f2b9c56ee86b8523391e6a83ea724c5) --- src/declarative/debugger/qdeclarativedebugclient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/debugger/qdeclarativedebugclient.cpp b/src/declarative/debugger/qdeclarativedebugclient.cpp index f7d7243..ce3faf6 100644 --- a/src/declarative/debugger/qdeclarativedebugclient.cpp +++ b/src/declarative/debugger/qdeclarativedebugclient.cpp @@ -277,7 +277,7 @@ void QDeclarativeDebugClient::sendMessage(const QByteArray &message) d->client->d->protocol->send(pack); } -void QDeclarativeDebugClient::statusChanged(Status status) +void QDeclarativeDebugClient::statusChanged(Status) { } -- cgit v0.12 From 000a95629a4dd07b600b5ae4d463654f8d2267af Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 30 Sep 2010 15:26:05 +0200 Subject: QDeclarativeDebugClient: Make sure status is consistent When statusChanged() is called during handsake state() was not the same as the argument passed. Fix this by setting gotHello = true _before_ notifying the clients. Reviewed-by: Christiaan Janssen Task-number: QTBUG-14087 (cherry picked from commit a1f050fe4217d3a642ab7f4df8e50c21aa51689c) --- src/declarative/debugger/qdeclarativedebugclient.cpp | 3 +-- .../qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp | 5 +++++ tests/auto/declarative/shared/debugutil.cpp | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/declarative/debugger/qdeclarativedebugclient.cpp b/src/declarative/debugger/qdeclarativedebugclient.cpp index ce3faf6..5baaf70 100644 --- a/src/declarative/debugger/qdeclarativedebugclient.cpp +++ b/src/declarative/debugger/qdeclarativedebugclient.cpp @@ -136,7 +136,7 @@ void QDeclarativeDebugConnectionPrivate::readyRead() return; } - qDebug() << "Available server side plugins: " << serverPlugins; + gotHello = true; QHash::Iterator iter = plugins.begin(); for (; iter != plugins.end(); ++iter) { @@ -145,7 +145,6 @@ void QDeclarativeDebugConnectionPrivate::readyRead() newStatus = QDeclarativeDebugClient::Enabled; iter.value()->statusChanged(newStatus); } - gotHello = true; } while (protocol->packetsAvailable()) { diff --git a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp index 72af3eb..a5f9846 100644 --- a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp +++ b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp @@ -77,6 +77,10 @@ void tst_QDeclarativeDebugClient::initTestCase() new QDeclarativeEngine(this); m_conn = new QDeclarativeDebugConnection(this); + + QDeclarativeDebugTestClient client("tst_QDeclarativeDebugClient::handshake()", m_conn); + QDeclarativeDebugTestService service("tst_QDeclarativeDebugClient::handshake()"); + m_conn->connectToHost("127.0.0.1", 3770); QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Connection established"); @@ -84,6 +88,7 @@ void tst_QDeclarativeDebugClient::initTestCase() Q_ASSERT(ok); QTRY_VERIFY(QDeclarativeDebugService::hasDebuggingClient()); + QTRY_COMPARE(client.status(), QDeclarativeDebugClient::Enabled); } void tst_QDeclarativeDebugClient::name() diff --git a/tests/auto/declarative/shared/debugutil.cpp b/tests/auto/declarative/shared/debugutil.cpp index 5f68e44..cbd055b 100644 --- a/tests/auto/declarative/shared/debugutil.cpp +++ b/tests/auto/declarative/shared/debugutil.cpp @@ -91,8 +91,9 @@ QByteArray QDeclarativeDebugTestClient::waitForResponse() return lastMsg; } -void QDeclarativeDebugTestClient::statusChanged(Status status) +void QDeclarativeDebugTestClient::statusChanged(Status stat) { + QCOMPARE(stat, status()); emit statusHasChanged(); } -- cgit v0.12 From c249db933aeb4b44b935924f3ff67669f3d94707 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 30 Sep 2010 17:49:19 +0200 Subject: QDeclarativeDebug: Make autotests more robust Always flush sockets after sending data, and make autotests more robust by using busy wait. Reviewed-by: Christiaan Janssen (cherry picked from commit cfe198948f1e4867918176df38b3e0b49757a4b8) --- src/declarative/debugger/qdeclarativedebugclient.cpp | 3 +++ src/declarative/debugger/qdeclarativedebugservice.cpp | 1 + .../tst_qdeclarativedebugclient.cpp | 9 ++++----- .../tst_qdeclarativedebugservice.cpp | 14 ++++++-------- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/declarative/debugger/qdeclarativedebugclient.cpp b/src/declarative/debugger/qdeclarativedebugclient.cpp index 5baaf70..977e58e 100644 --- a/src/declarative/debugger/qdeclarativedebugclient.cpp +++ b/src/declarative/debugger/qdeclarativedebugclient.cpp @@ -99,6 +99,7 @@ void QDeclarativeDebugConnectionPrivate::advertisePlugins() QPacket pack; pack << serverId << 1 << plugins.keys(); protocol->send(pack); + q->flush(); } void QDeclarativeDebugConnectionPrivate::connected() @@ -106,6 +107,7 @@ void QDeclarativeDebugConnectionPrivate::connected() QPacket pack; pack << serverId << 0 << protocolVersion << plugins.keys(); protocol->send(pack); + q->flush(); } void QDeclarativeDebugConnectionPrivate::readyRead() @@ -274,6 +276,7 @@ void QDeclarativeDebugClient::sendMessage(const QByteArray &message) QPacket pack; pack << d->name << message; d->client->d->protocol->send(pack); + d->client->d->q->flush(); } void QDeclarativeDebugClient::statusChanged(Status) diff --git a/src/declarative/debugger/qdeclarativedebugservice.cpp b/src/declarative/debugger/qdeclarativedebugservice.cpp index 62f2f39..d2ef00d 100644 --- a/src/declarative/debugger/qdeclarativedebugservice.cpp +++ b/src/declarative/debugger/qdeclarativedebugservice.cpp @@ -142,6 +142,7 @@ void QDeclarativeDebugServerPrivate::advertisePlugins() QPacket pack; pack << QString(QLatin1String("QDeclarativeDebugClient")) << 1 << plugins.keys(); protocol->send(pack); + connection->flush(); } void QDeclarativeDebugServer::listen() diff --git a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp index a5f9846..80241ba 100644 --- a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp +++ b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp @@ -112,12 +112,10 @@ void tst_QDeclarativeDebugClient::status() { QDeclarativeDebugTestService service("tst_QDeclarativeDebugClient::status()"); - QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())); - QCOMPARE(client.status(), QDeclarativeDebugClient::Enabled); + QTRY_COMPARE(client.status(), QDeclarativeDebugClient::Enabled); } - QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())); - QCOMPARE(client.status(), QDeclarativeDebugClient::Unavailable); + QTRY_COMPARE(client.status(), QDeclarativeDebugClient::Unavailable); // duplicate plugin name QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugClient: Conflicting plugin name \"tst_QDeclarativeDebugClient::status()\" "); @@ -135,7 +133,8 @@ void tst_QDeclarativeDebugClient::sendMessage() QByteArray msg = "hello!"; - QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())); + QTRY_COMPARE(client.status(), QDeclarativeDebugClient::Enabled); + client.sendMessage(msg); QByteArray resp = client.waitForResponse(); QCOMPARE(resp, msg); diff --git a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp index 945823a..653515a 100644 --- a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp +++ b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp @@ -103,12 +103,12 @@ void tst_QDeclarativeDebugService::status() { QDeclarativeDebugTestClient client("tst_QDeclarativeDebugService::status()", m_conn); - QDeclarativeDebugTest::waitForSignal(&service, SIGNAL(statusHasChanged())); - QCOMPARE(service.status(), QDeclarativeDebugService::Enabled); + QTRY_COMPARE(client.status(), QDeclarativeDebugClient::Enabled); + QTRY_COMPARE(service.status(), QDeclarativeDebugService::Enabled); } - QDeclarativeDebugTest::waitForSignal(&service, SIGNAL(statusHasChanged())); - QCOMPARE(service.status(), QDeclarativeDebugService::Unavailable); + + QTRY_COMPARE(service.status(), QDeclarativeDebugService::Unavailable); QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugService: Conflicting plugin name \"tst_QDeclarativeDebugService::status()\" "); @@ -123,10 +123,8 @@ void tst_QDeclarativeDebugService::sendMessage() QByteArray msg = "hello!"; - if (service.status() != QDeclarativeDebugService::Enabled) - QDeclarativeDebugTest::waitForSignal(&service, SIGNAL(statusHasChanged())); - if (client.status() != QDeclarativeDebugClient::Enabled) - QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(statusHasChanged())); + QTRY_COMPARE(client.status(), QDeclarativeDebugClient::Enabled); + QTRY_COMPARE(service.status(), QDeclarativeDebugService::Enabled); client.sendMessage(msg); QByteArray resp = client.waitForResponse(); -- cgit v0.12 From 5b2a4581bda34e20875402aac2a235fbee7e1222 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 30 Sep 2010 11:40:39 +0200 Subject: Revert "Fix (implement!) hfw/wfh in QGridLayoutEngine" This reverts commit 62b5ef3cc1306e46a4042b14867f2f92d9a110f3. The implementation of hfw from this patch is unfortunately not robust enough. It doesn't manage correctly the constraints on the layouts and the cell spans. It caused bad behaviour or regressions seen in tasks: QTBUG-13547, QTBUG-13067, QTBUG-13549, and more Reviewed-By: ogoffart (cherry picked from commit 5bd6f7eb5c7d87c08539b6c2df416990cc417ec7) --- src/gui/graphicsview/qgraphicslayoutitem.cpp | 51 +-- src/gui/graphicsview/qgraphicslayoutitem_p.h | 6 - src/gui/graphicsview/qgridlayoutengine.cpp | 251 +------------- src/gui/graphicsview/qgridlayoutengine_p.h | 23 +- .../tst_qgraphicsgridlayout.cpp | 364 +-------------------- 5 files changed, 17 insertions(+), 678 deletions(-) diff --git a/src/gui/graphicsview/qgraphicslayoutitem.cpp b/src/gui/graphicsview/qgraphicslayoutitem.cpp index 634f68c..ad4b2b5 100644 --- a/src/gui/graphicsview/qgraphicslayoutitem.cpp +++ b/src/gui/graphicsview/qgraphicslayoutitem.cpp @@ -48,7 +48,6 @@ #include "qgraphicslayoutitem.h" #include "qgraphicslayoutitem_p.h" #include "qwidget.h" -#include "qgraphicswidget.h" #include @@ -140,11 +139,9 @@ QSizeF *QGraphicsLayoutItemPrivate::effectiveSizeHints(const QSizeF &constraint) if (!sizeHintCacheDirty && cachedConstraint == constraint) return cachedSizeHints; - const bool hasConstraint = constraint.width() >= 0 || constraint.height() >= 0; - for (int i = 0; i < Qt::NSizeHints; ++i) { cachedSizeHints[i] = constraint; - if (userSizeHints && !hasConstraint) + if (userSizeHints) combineSize(cachedSizeHints[i], userSizeHints[i]); } @@ -262,52 +259,6 @@ void QGraphicsLayoutItemPrivate::setSizeComponent( q->updateGeometry(); } - -bool QGraphicsLayoutItemPrivate::hasHeightForWidth() const -{ - Q_Q(const QGraphicsLayoutItem); - if (isLayout) { - const QGraphicsLayout *l = static_cast(q); - for (int i = l->count() - 1; i >= 0; --i) { - if (QGraphicsLayoutItemPrivate::get(l->itemAt(i))->hasHeightForWidth()) - return true; - } - } else if (QGraphicsItem *item = q->graphicsItem()) { - if (item->isWidget()) { - QGraphicsWidget *w = static_cast(item); - if (w->layout()) { - return QGraphicsLayoutItemPrivate::get(w->layout())->hasHeightForWidth(); - } - } - } - return q->sizePolicy().hasHeightForWidth(); -} - -bool QGraphicsLayoutItemPrivate::hasWidthForHeight() const -{ - // enable this code when we add QSizePolicy::hasWidthForHeight() (For 4.8) -#if 1 - return false; -#else - Q_Q(const QGraphicsLayoutItem); - if (isLayout) { - const QGraphicsLayout *l = static_cast(q); - for (int i = l->count() - 1; i >= 0; --i) { - if (QGraphicsLayoutItemPrivate::get(l->itemAt(i))->hasWidthForHeight()) - return true; - } - } else if (QGraphicsItem *item = q->graphicsItem()) { - if (item->isWidget()) { - QGraphicsWidget *w = static_cast(item); - if (w->layout()) { - return QGraphicsLayoutItemPrivate::get(w->layout())->hasWidthForHeight(); - } - } - } - return q->sizePolicy().hasWidthForHeight(); -#endif -} - /*! \class QGraphicsLayoutItem \brief The QGraphicsLayoutItem class can be inherited to allow your custom diff --git a/src/gui/graphicsview/qgraphicslayoutitem_p.h b/src/gui/graphicsview/qgraphicslayoutitem_p.h index b752e03..15cc7a5 100644 --- a/src/gui/graphicsview/qgraphicslayoutitem_p.h +++ b/src/gui/graphicsview/qgraphicslayoutitem_p.h @@ -65,9 +65,6 @@ class Q_AUTOTEST_EXPORT QGraphicsLayoutItemPrivate public: virtual ~QGraphicsLayoutItemPrivate(); QGraphicsLayoutItemPrivate(QGraphicsLayoutItem *parent, bool isLayout); - static QGraphicsLayoutItemPrivate *get(QGraphicsLayoutItem *q) { return q->d_func();} - static const QGraphicsLayoutItemPrivate *get(const QGraphicsLayoutItem *q) { return q->d_func();} - void init(); QSizeF *effectiveSizeHints(const QSizeF &constraint) const; QGraphicsItem *parentItem() const; @@ -76,9 +73,6 @@ public: enum SizeComponent { Width, Height }; void setSizeComponent(Qt::SizeHint which, SizeComponent component, qreal value); - bool hasHeightForWidth() const; - bool hasWidthForHeight() const; - QSizePolicy sizePolicy; QGraphicsLayoutItem *parent; diff --git a/src/gui/graphicsview/qgridlayoutengine.cpp b/src/gui/graphicsview/qgridlayoutengine.cpp index f3b2026..4fba5ff 100644 --- a/src/gui/graphicsview/qgridlayoutengine.cpp +++ b/src/gui/graphicsview/qgridlayoutengine.cpp @@ -546,24 +546,6 @@ QSizePolicy::Policy QGridLayoutItem::sizePolicy(Qt::Orientation orientation) con : sizePolicy.verticalPolicy(); } -/* - returns true if the size policy returns true for either hasHeightForWidth() - or hasWidthForHeight() - */ -bool QGridLayoutItem::hasDynamicConstraint() const -{ - return QGraphicsLayoutItemPrivate::get(q_layoutItem)->hasHeightForWidth() - || QGraphicsLayoutItemPrivate::get(q_layoutItem)->hasWidthForHeight(); -} - -Qt::Orientation QGridLayoutItem::dynamicConstraintOrientation() const -{ - if (QGraphicsLayoutItemPrivate::get(q_layoutItem)->hasHeightForWidth()) - return Qt::Vertical; - else //if (QGraphicsLayoutItemPrivate::get(q_layoutItem)->hasWidthForHeight()) - return Qt::Horizontal; -} - QSizePolicy::ControlTypes QGridLayoutItem::controlTypes(LayoutSide /* side */) const { return q_layoutItem->sizePolicy().controlType(); @@ -632,14 +614,7 @@ QRectF QGridLayoutItem::geometryWithin(qreal x, qreal y, qreal width, qreal heig qreal cellWidth = width; qreal cellHeight = height; - QSize constraint; - if (hasDynamicConstraint()) { - if (dynamicConstraintOrientation() == Qt::Vertical) - constraint.setWidth(cellWidth); - else - constraint.setHeight(cellHeight); - } - QSizeF size = effectiveMaxSize(constraint).boundedTo(QSizeF(cellWidth, cellHeight)); + QSizeF size = effectiveMaxSize().boundedTo(QSizeF(cellWidth, cellHeight)); width = size.width(); height = size.height(); @@ -701,13 +676,13 @@ void QGridLayoutItem::insertOrRemoveRows(int row, int delta, Qt::Orientation ori Note that effectiveSizeHint does not take sizePolicy into consideration, (since it only evaluates the hints, as the name implies) */ -QSizeF QGridLayoutItem::effectiveMaxSize(const QSizeF &constraint) const +QSizeF QGridLayoutItem::effectiveMaxSize() const { - QSizeF size = constraint; + QSizeF size; bool vGrow = (sizePolicy(Qt::Vertical) & QSizePolicy::GrowFlag) == QSizePolicy::GrowFlag; bool hGrow = (sizePolicy(Qt::Horizontal) & QSizePolicy::GrowFlag) == QSizePolicy::GrowFlag; if (!vGrow || !hGrow) { - QSizeF pref = layoutItem()->effectiveSizeHint(Qt::PreferredSize, constraint); + QSizeF pref = layoutItem()->effectiveSizeHint(Qt::PreferredSize); if (!vGrow) size.setHeight(pref.height()); if (!hGrow) @@ -715,7 +690,7 @@ QSizeF QGridLayoutItem::effectiveMaxSize(const QSizeF &constraint) const } if (!size.isValid()) { - QSizeF maxSize = layoutItem()->effectiveSizeHint(Qt::MaximumSize, constraint); + QSizeF maxSize = layoutItem()->effectiveSizeHint(Qt::MaximumSize); if (size.width() == -1) size.setWidth(maxSize.width()); if (size.height() == -1) @@ -1036,7 +1011,6 @@ void QGridLayoutEngine::invalidate() q_cachedEffectiveLastRows[Ver] = -1; q_cachedDataForStyleInfo.invalidate(); q_cachedSize = QSizeF(); - q_cachedConstraintOrientation = UnknownConstraint; } static void visualRect(QRectF *geom, Qt::LayoutDirection dir, const QRectF &contentsRect) @@ -1101,13 +1075,10 @@ QRectF QGridLayoutEngine::cellRect(const QLayoutStyleInfo &styleInfo, } QSizeF QGridLayoutEngine::sizeHint(const QLayoutStyleInfo &styleInfo, Qt::SizeHint which, - const QSizeF &constraint) const + const QSizeF & /* constraint */) const { ensureColumnAndRowData(styleInfo); - if (hasDynamicConstraint()) - return dynamicallyConstrainedSizeHint(which, constraint); - switch (which) { case Qt::MinimumSize: return QSizeF(q_totalBoxes[Hor].q_minimumSize, q_totalBoxes[Ver].q_minimumSize); @@ -1405,11 +1376,7 @@ void QGridLayoutEngine::fillRowData(QGridLayoutRowData *rowData, const QLayoutSt box = &multiCell.q_box; multiCell.q_stretch = itemStretch; } - // Items with constraints are not included in the orientation that - // they are constrained (since it depends on the hfw/constraint function). - // They must be combined at a later stage. - if (!item->hasDynamicConstraint() || orientation != item->dynamicConstraintOrientation()) - box->combine(item->box(orientation)); + box->combine(item->box(orientation)); if (effectiveRowSpan == 1) { QSizePolicy::ControlTypes controls = item->controlTypes(top); @@ -1566,138 +1533,6 @@ void QGridLayoutEngine::ensureColumnAndRowData(const QLayoutStyleInfo &styleInfo q_cachedDataForStyleInfo = styleInfo; } -QSizeF QGridLayoutEngine::dynamicallyConstrainedSizeHint(Qt::SizeHint which, - const QSizeF &constraint) const -{ - Q_ASSERT(hasDynamicConstraint()); - if (constraint.width() < 0 && constraint.height() < 0) { - // Process the hfw / wfh items that we did not process in fillRowData() - const Qt::Orientation constraintOrient = constraintOrientation(); - - QGridLayoutRowData rowData = constraintOrient == Qt::Vertical ? q_rowData : q_columnData; - for (int i = q_items.count() - 1; i >= 0; --i) { - QGridLayoutItem *item = q_items.at(i); - if (item->hasDynamicConstraint()) { - QGridLayoutBox box = item->box(constraintOrient); - QGridLayoutBox &rowBox = rowData.boxes[item->firstRow(constraintOrient)]; - rowBox.combine(box); - } - } - - QGridLayoutBox totalBoxes[2]; - if (constraintOrient == Qt::Vertical) { - totalBoxes[Hor] = q_columnData.totalBox(0, columnCount()); - totalBoxes[Ver] = rowData.totalBox(0, rowCount()); - } else { - totalBoxes[Hor] = rowData.totalBox(0, columnCount()); - totalBoxes[Ver] = q_rowData.totalBox(0, rowCount()); - } - return QSizeF(totalBoxes[Hor].q_sizes(which), totalBoxes[Ver].q_sizes(which)); - } - - - Q_ASSERT(constraint.width() >= 0 || constraint.height() >= 0); - q_xx.resize(columnCount()); - q_yy.resize(rowCount()); - q_widths.resize(columnCount()); - q_heights.resize(rowCount()); - q_descents.resize(rowCount()); - - - const Qt::Orientation orientation = constraintOrientation(); - QGridLayoutRowData *colData; - QGridLayoutRowData constrainedRowData; - QGridLayoutBox *totalBox; - qreal *sizes; - qreal *pos; - qreal *descents; - qreal targetSize; - qreal cCount; - qreal rCount; - - if (orientation == Qt::Vertical) { - // height for width - colData = &q_columnData; - totalBox = &q_totalBoxes[Hor]; - sizes = q_widths.data(); - pos = q_xx.data(); - descents = 0; - targetSize = constraint.width(); - cCount = columnCount(); - rCount = rowCount(); - constrainedRowData = q_rowData; - } else { - // width for height - colData = &q_rowData; - totalBox = &q_totalBoxes[Ver]; - sizes = q_heights.data(); - pos = q_yy.data(); - descents = q_descents.data(); - targetSize = constraint.height(); - cCount = rowCount(); - rCount = columnCount(); - constrainedRowData = q_columnData; - } - colData->calculateGeometries(0, cCount, targetSize, pos, sizes, descents, *totalBox); - for (int i = q_items.count() - 1; i >= 0; --i) { - QGridLayoutItem *item = q_items.at(i); - - if (item->hasDynamicConstraint()) { - const qreal size = sizes[item->firstColumn(orientation)]; - QGridLayoutBox box = item->box(orientation, size); - QGridLayoutBox &rowBox = constrainedRowData.boxes[item->firstRow(orientation)]; - rowBox.combine(box); - } - } - const qreal newSize = constrainedRowData.totalBox(0, rCount).q_sizes(which); - - return (orientation == Qt::Vertical) ? QSizeF(targetSize, newSize) : QSizeF(newSize, targetSize); -} - - -/** - returns false if the layout has contradicting constraints (i.e. some items with a horizontal - constraint and other items with a vertical constraint) - */ -bool QGridLayoutEngine::ensureDynamicConstraint() const -{ - if (q_cachedConstraintOrientation == UnknownConstraint) { - for (int i = q_items.count() - 1; i >= 0; --i) { - QGridLayoutItem *item = q_items.at(i); - if (item->hasDynamicConstraint()) { - Qt::Orientation itemConstraintOrientation = item->dynamicConstraintOrientation(); - if (q_cachedConstraintOrientation == UnknownConstraint) { - q_cachedConstraintOrientation = itemConstraintOrientation; - } else if (q_cachedConstraintOrientation != itemConstraintOrientation) { - q_cachedConstraintOrientation = UnfeasibleConstraint; - qWarning("QGridLayoutEngine: Unfeasible, cannot mix horizontal and" - " vertical constraint in the same layout"); - return false; - } - } - } - if (q_cachedConstraintOrientation == UnknownConstraint) - q_cachedConstraintOrientation = NoConstraint; - } - return true; -} - -bool QGridLayoutEngine::hasDynamicConstraint() const -{ - if (!ensureDynamicConstraint()) - return false; - return q_cachedConstraintOrientation != NoConstraint; -} - -/* - * return value is only valid if hasConstraint() returns true - */ -Qt::Orientation QGridLayoutEngine::constraintOrientation() const -{ - (void)ensureDynamicConstraint(); - return (Qt::Orientation)q_cachedConstraintOrientation; -} - void QGridLayoutEngine::ensureGeometries(const QLayoutStyleInfo &styleInfo, const QSizeF &size) const { @@ -1710,74 +1545,10 @@ void QGridLayoutEngine::ensureGeometries(const QLayoutStyleInfo &styleInfo, q_widths.resize(columnCount()); q_heights.resize(rowCount()); q_descents.resize(rowCount()); - - - Qt::Orientation orientation = Qt::Vertical; - if (hasDynamicConstraint()) - orientation = constraintOrientation(); - - /* - In order to do hfw we need to first distribute the columns, then the rows. - In order to do wfh we need to first distribute the rows, then the columns. - - If there is no constraint, the order of distributing the rows or columns first is irrelevant. - We choose horizontal just to keep the same behaviour as before (however, there shouldn't - be any behaviour difference). - */ - - QGridLayoutRowData *colData; - QGridLayoutRowData rowData; - qreal *widths; - qreal *heights; - qreal *xx; - qreal *yy; - qreal *xdescents = 0; - qreal *ydescents = 0; - qreal cCount; - qreal rCount; - QSizeF oSize = size; - if (orientation == Qt::Vertical) { - // height for width - colData = &q_columnData; - rowData = q_rowData; - widths = q_widths.data(); - heights = q_heights.data(); - xx = q_xx.data(); - yy = q_yy.data(); - cCount = columnCount(); - rCount = rowCount(); - ydescents = q_descents.data(); - } else { - // width for height - colData = &q_rowData; - rowData = q_columnData; - widths = q_heights.data(); - heights = q_widths.data(); - xx = q_yy.data(); - yy = q_xx.data(); - cCount = rowCount(); - rCount = columnCount(); - xdescents = q_descents.data(); - oSize.transpose(); - } - - colData->calculateGeometries(0, cCount, oSize.width(), xx, widths, - xdescents, q_totalBoxes[orientation == Qt::Horizontal]); - for (int i = q_items.count() - 1; i >= 0; --i) { - QGridLayoutItem *item = q_items.at(i); - const int col = item->firstColumn(orientation); - const int row = item->firstRow(orientation); - if (item->hasDynamicConstraint()) { - const qreal sz = widths[col]; - QGridLayoutBox box = item->box(orientation, sz); - rowData.boxes[row].combine(box); - } - } - - QGridLayoutBox &totalBox = q_totalBoxes[orientation == Qt::Vertical]; - totalBox = rowData.totalBox(0, rCount); - rowData.calculateGeometries(0, rCount, oSize.height(), yy, heights, - ydescents, totalBox); + q_columnData.calculateGeometries(0, columnCount(), size.width(), q_xx.data(), q_widths.data(), + 0, q_totalBoxes[Hor]); + q_rowData.calculateGeometries(0, rowCount(), size.height(), q_yy.data(), q_heights.data(), + q_descents.data(), q_totalBoxes[Ver]); q_cachedSize = size; } diff --git a/src/gui/graphicsview/qgridlayoutengine_p.h b/src/gui/graphicsview/qgridlayoutengine_p.h index 580af7e..9ac9a8e 100644 --- a/src/gui/graphicsview/qgridlayoutengine_p.h +++ b/src/gui/graphicsview/qgridlayoutengine_p.h @@ -91,14 +91,6 @@ enum LayoutSide { Bottom }; -enum { - NoConstraint, - HorizontalConstraint, - VerticalConstraint, - UnknownConstraint, // need to update cache - UnfeasibleConstraint // not feasible, it be has some items with Vertical and others with Horizontal constraints -}; - template class QLayoutParameter { @@ -278,10 +270,6 @@ public: inline void setAlignment(Qt::Alignment alignment) { q_alignment = alignment; } QSizePolicy::Policy sizePolicy(Qt::Orientation orientation) const; - - bool hasDynamicConstraint() const; - Qt::Orientation dynamicConstraintOrientation() const; - QSizePolicy::ControlTypes controlTypes(LayoutSide side) const; QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const; QGridLayoutBox box(Qt::Orientation orientation, qreal constraint = -1.0) const; @@ -292,7 +280,7 @@ public: void setGeometry(const QRectF &rect); void transpose(); void insertOrRemoveRows(int row, int delta, Qt::Orientation orientation = Qt::Vertical); - QSizeF effectiveMaxSize(const QSizeF &constraint) const; + QSizeF effectiveMaxSize() const; #ifdef QT_DEBUG void dump(int indent = 0) const; @@ -384,14 +372,6 @@ public: int column, int rowSpan, int columnSpan) const; QSizeF sizeHint(const QLayoutStyleInfo &styleInfo, Qt::SizeHint which, const QSizeF &constraint) const; - - // heightForWidth / widthForHeight support - QSizeF dynamicallyConstrainedSizeHint(Qt::SizeHint which, const QSizeF &constraint) const; - bool ensureDynamicConstraint() const; - bool hasDynamicConstraint() const; - Qt::Orientation constraintOrientation() const; - - QSizePolicy::ControlTypes controlTypes(LayoutSide side) const; void transpose(); void setVisualDirection(Qt::LayoutDirection direction); @@ -425,7 +405,6 @@ private: // Lazily computed from the above user input mutable int q_cachedEffectiveFirstRows[NOrientations]; mutable int q_cachedEffectiveLastRows[NOrientations]; - mutable quint8 q_cachedConstraintOrientation : 2; // Layout item input mutable QLayoutStyleInfo q_cachedDataForStyleInfo; diff --git a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp index 03c1d5b..5b03767 100644 --- a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp +++ b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp @@ -107,13 +107,12 @@ private slots: void avoidRecursionInInsertItem(); void styleInfoLeak(); void task236367_maxSizeHint(); - void heightForWidth(); }; class RectWidget : public QGraphicsWidget { public: - RectWidget(QGraphicsItem *parent = 0) : QGraphicsWidget(parent), m_fnConstraint(0) {} + RectWidget(QGraphicsItem *parent = 0) : QGraphicsWidget(parent){} void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { @@ -126,12 +125,9 @@ public: QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const { - if (constraint.width() < 0 && constraint.height() < 0 && m_sizeHints[which].isValid()) { + if (m_sizeHints[which].isValid()) { return m_sizeHints[which]; } - if (m_fnConstraint) { - return m_fnConstraint(which, constraint); - } return QGraphicsWidget::sizeHint(which, constraint); } @@ -140,13 +136,7 @@ public: updateGeometry(); } - void setConstraintFunction(QSizeF (*fnConstraint)(Qt::SizeHint, const QSizeF &)) { - m_fnConstraint = fnConstraint; - } - QSizeF m_sizeHints[Qt::NSizeHints]; - QSizeF (*m_fnConstraint)(Qt::SizeHint, const QSizeF &); - }; struct ItemDesc @@ -156,8 +146,7 @@ struct ItemDesc m_rowSpan(1), m_colSpan(1), m_sizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred)), - m_align(0), - m_fnConstraint(0) + m_align(0) { } @@ -224,20 +213,8 @@ struct ItemDesc return (*this); } - ItemDesc &heightForWidth(QSizeF (*fnConstraint)(Qt::SizeHint, const QSizeF &)) { - m_fnConstraint = fnConstraint; - m_constraintOrientation = Qt::Vertical; - return (*this); - } - void apply(QGraphicsGridLayout *layout, QGraphicsWidget *item) { - QSizePolicy sp = m_sizePolicy; - if (m_fnConstraint) { - sp.setHeightForWidth(m_constraintOrientation == Qt::Vertical); - //sp.setWidthForHeight(m_constraintOrientation == Qt::Horizontal); - } - - item->setSizePolicy(sp); + item->setSizePolicy(m_sizePolicy); for (int i = 0; i < Qt::NSizeHints; ++i) { if (!m_sizes[i].isValid()) continue; @@ -256,7 +233,6 @@ struct ItemDesc break; } } - layout->addItem(item, m_pos.first, m_pos.second, m_rowSpan, m_colSpan); layout->setAlignment(item, m_align); } @@ -264,7 +240,6 @@ struct ItemDesc void apply(QGraphicsGridLayout *layout, RectWidget *item) { for (int i = 0; i < Qt::NSizeHints; ++i) item->setSizeHint((Qt::SizeHint)i, m_sizeHints[i]); - item->setConstraintFunction(m_fnConstraint); apply(layout, static_cast(item)); } @@ -276,9 +251,6 @@ struct ItemDesc QSizeF m_sizeHints[Qt::NSizeHints]; QSizeF m_sizes[Qt::NSizeHints]; Qt::Alignment m_align; - - Qt::Orientation m_constraintOrientation; - QSizeF (*m_fnConstraint)(Qt::SizeHint, const QSizeF &); }; typedef QList ItemList; @@ -2144,17 +2116,6 @@ void tst_QGraphicsGridLayout::alignment2() delete widget; } -static QSizeF hfw1(Qt::SizeHint, const QSizeF &constraint) -{ - QSizeF result(constraint); - if (constraint.width() < 0 && constraint.height() < 0) { - return QSizeF(50, 400); - } else if (constraint.width() >= 0) { - result.setHeight(20000./constraint.width()); - } - return result; -} - void tst_QGraphicsGridLayout::geometries_data() { @@ -2184,186 +2145,6 @@ void tst_QGraphicsGridLayout::geometries_data() << QRectF(0, 0, 60,10) << QRectF(0, 10, 60,10) ); - // change layout height and verify - QTest::newRow("hfw-h401") << (ItemList() - << ItemDesc(0,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(0,1) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,1) - .minSize(QSizeF(40,40)) - .preferredSize(QSizeF(50,400)) - .maxSize(QSizeF(500, 500)) - .heightForWidth(hfw1) - ) - << QSizeF(100, 401) - << (RectList() - << QRectF(0, 0, 50, 1) << QRectF(50, 0, 50, 1) - << QRectF(0, 1, 50,100) << QRectF(50, 1, 50,400) - ); - - - QTest::newRow("hfw-h408") << (ItemList() - << ItemDesc(0,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(0,1) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,1) - .minSize(QSizeF(40,40)) - .preferredSize(QSizeF(50,400)) - .maxSize(QSizeF(500, 500)) - .heightForWidth(hfw1) - ) - << QSizeF(100, 408) - << (RectList() - << QRectF(0, 0, 50, 8) << QRectF(50, 0, 50, 8) - << QRectF(0, 8, 50,100) << QRectF(50, 8, 50,400) - ); - - QTest::newRow("hfw-h410") << (ItemList() - << ItemDesc(0,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(0,1) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,1) - .minSize(QSizeF(40,40)) - .preferredSize(QSizeF(50,400)) - .maxSize(QSizeF(500, 500)) - .heightForWidth(hfw1) - ) - << QSizeF(100, 410) - << (RectList() - << QRectF(0, 0, 50,10) << QRectF(50, 0, 50,10) - << QRectF(0, 10, 50,100) << QRectF(50, 10, 50,400) - ); - - QTest::newRow("hfw-h470") << (ItemList() - << ItemDesc(0,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(0,1) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,1) - .minSize(QSizeF(40,40)) - .preferredSize(QSizeF(50,400)) - .maxSize(QSizeF(500, 500)) - .heightForWidth(hfw1) - ) - << QSizeF(100, 470) - << (RectList() - << QRectF(0, 0, 50,70) << QRectF(50, 0, 50,70) - << QRectF(0, 70, 50,100) << QRectF(50, 70, 50,400) - ); - - - // change layout width and verify - QTest::newRow("hfw-w100") << (ItemList() - << ItemDesc(0,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(0,1) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,1) - .minSize(QSizeF(40,40)) - .preferredSize(QSizeF(50,400)) - .maxSize(QSizeF(5000, 5000)) - .heightForWidth(hfw1) - ) - << QSizeF(100, 401) - << (RectList() - << QRectF( 0, 0, 50, 1) << QRectF( 50, 0, 50, 1) - << QRectF( 0, 1, 50, 100) << QRectF( 50, 1, 50, 400) - ); - - QTest::newRow("hfw-w160") << (ItemList() - << ItemDesc(0,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(0,1) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,1) - .minSize(QSizeF(40,40)) - .preferredSize(QSizeF(50,400)) - .maxSize(QSizeF(5000, 5000)) - .heightForWidth(hfw1) - ) - << QSizeF(160, 401) - << (RectList() - << QRectF( 0, 0, 80, 100) << QRectF( 80, 0, 80, 100) - << QRectF( 0, 100, 80, 100) << QRectF( 80, 100, 80, 250) - ); - - - QTest::newRow("hfw-w500") << (ItemList() - << ItemDesc(0,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(0,1) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,1) - .minSize(QSizeF(40,40)) - .preferredSize(QSizeF(50,400)) - .maxSize(QSizeF(5000, 5000)) - .heightForWidth(hfw1) - ) - << QSizeF(500, 401) - << (RectList() - << QRectF( 0, 0, 100, 100) << QRectF(100, 0, 100, 100) - << QRectF( 0, 100, 100, 100) << QRectF(100, 100, 400, 50) - ); - } void tst_QGraphicsGridLayout::geometries() @@ -2434,143 +2215,6 @@ void tst_QGraphicsGridLayout::task236367_maxSizeHint() QCOMPARE(widget->size(), QSizeF(w, h)); } -/* -static qreal hfw(qreal w) -{ - if (w == 0) - return 20000; - return 20000/w; -} -*/ -static QSizeF hfw(Qt::SizeHint /*which*/, const QSizeF &constraint) -{ - QSizeF result(constraint); - const qreal cw = constraint.width(); - const qreal ch = constraint.height(); - if (cw < 0 && ch < 0) { - return QSizeF(200, 100); - } else if (cw >= 0) { - result.setHeight(20000./cw); - } else if (cw == 0) { - result.setHeight(20000); - } else if (ch >= 0) { - result.setWidth(20000./ch); - } else if (ch == 0) { - result.setWidth(20000); - } - - return result; -} - -static qreal growthFactorBelowPreferredSize(qreal desired, qreal sumAvailable, qreal sumDesired) -{ - Q_ASSERT(sumDesired != 0.0); - return desired * qPow(sumAvailable / sumDesired, desired / sumDesired); -} - -static void expectedWidth(qreal minSize1, qreal prefSize1, - qreal minSize2, qreal prefSize2, - qreal targetSize, qreal *width1, qreal *width2) -{ - qreal sumAvail,factor1,factor2; - // stretch behaviour is different below and above preferred size... - if (targetSize < prefSize1 + prefSize2) { - sumAvail = targetSize - minSize1 - minSize2; - const qreal desired1 = prefSize1 - minSize1; - const qreal desired2 = prefSize2 - minSize2; - const qreal sumDesired = desired1 + desired2; - factor1 = growthFactorBelowPreferredSize(desired1, sumAvail, sumDesired); - factor2 = growthFactorBelowPreferredSize(desired2, sumAvail, sumDesired); - const qreal sumFactors = factor1 + factor2; - *width1 = sumAvail*factor1/sumFactors + minSize1; - *width2 = sumAvail*factor2/sumFactors + minSize2; - } else { - sumAvail = targetSize - prefSize1 - prefSize2; - factor1 = prefSize1; - factor2 = prefSize2; - const qreal sumFactors = factor1 + factor2; - *width1 = sumAvail*factor1/sumFactors + prefSize1; - *width2 = sumAvail*factor2/sumFactors + prefSize2; - } -} - - -bool qFuzzyCompare(const QSizeF &a, const QSizeF &b) -{ - return qFuzzyCompare(a.width(), b.width()) && qFuzzyCompare(a.height(), b.height()); -} - -void tst_QGraphicsGridLayout::heightForWidth() -{ - QGraphicsWidget *widget = new QGraphicsWidget; - QGraphicsGridLayout *layout = new QGraphicsGridLayout; - widget->setLayout(layout); - layout->setContentsMargins(0, 0, 0, 0); - layout->setSpacing(0); - RectWidget *w00 = new RectWidget; - w00->setSizeHint(Qt::MinimumSize, QSizeF(1,1)); - w00->setSizeHint(Qt::PreferredSize, QSizeF(10,10)); - w00->setSizeHint(Qt::MaximumSize, QSizeF(100,100)); - layout->addItem(w00, 0, 0); - - RectWidget *w01 = new RectWidget; - w01->setSizeHint(Qt::MinimumSize, QSizeF(1,1)); - w01->setSizeHint(Qt::PreferredSize, QSizeF(10,10)); - w01->setSizeHint(Qt::MaximumSize, QSizeF(100,100)); - layout->addItem(w01, 0, 1); - - RectWidget *w10 = new RectWidget; - w10->setSizeHint(Qt::MinimumSize, QSizeF(1,1)); - w10->setSizeHint(Qt::PreferredSize, QSizeF(10,10)); - w10->setSizeHint(Qt::MaximumSize, QSizeF(100,100)); - layout->addItem(w10, 1, 0); - - RectWidget *w11 = new RectWidget; - w11->setSizeHint(Qt::MinimumSize, QSizeF(1,1)); - w11->setSizeHint(Qt::MaximumSize, QSizeF(30000,30000)); - w11->setConstraintFunction(hfw); - QSizePolicy sp(QSizePolicy::Preferred, QSizePolicy::Preferred); - sp.setHeightForWidth(true); - w11->setSizePolicy(sp); - layout->addItem(w11, 1, 1); - - QSizeF prefSize = layout->effectiveSizeHint(Qt::PreferredSize, QSizeF(-1, -1)); - QCOMPARE(prefSize, QSizeF(10+200, 10+100)); - - QCOMPARE(layout->effectiveSizeHint(Qt::MinimumSize, QSizeF(2, -1)), QSizeF(2, 20001)); - QCOMPARE(layout->effectiveSizeHint(Qt::PreferredSize, QSizeF(2, -1)), QSizeF(2, 20010)); - QCOMPARE(layout->effectiveSizeHint(Qt::MaximumSize, QSizeF(2, -1)), QSizeF(2, 20100)); - qreal width1; - qreal width2; - expectedWidth(1, 10, 1, 200, 20, &width1, &width2); - QSizeF expectedSize = hfw(Qt::MinimumSize, QSizeF(width2, -1)) + QSizeF(width1, 1); - QCOMPARE(layout->effectiveSizeHint(Qt::MinimumSize, QSizeF(20, -1)), expectedSize); - expectedSize.rheight()+=9; - QCOMPARE(layout->effectiveSizeHint(Qt::PreferredSize, QSizeF(20, -1)), expectedSize); - expectedSize.rheight()+=90; - QCOMPARE(layout->effectiveSizeHint(Qt::MaximumSize, QSizeF(20, -1)), expectedSize); - - expectedWidth(1, 10, 1, 200, 300, &width1, &width2); - expectedSize = hfw(Qt::MinimumSize, QSizeF(width2, -1)) + QSizeF(width1, 1); - QCOMPARE(layout->effectiveSizeHint(Qt::MinimumSize, QSizeF(300, -1)), expectedSize); - expectedSize.rheight()+=9; - QCOMPARE(layout->effectiveSizeHint(Qt::PreferredSize, QSizeF(300, -1)), expectedSize); - // the height of the hfw widget is shorter than the one to the left, which is 100, so - // the total height of the last row is 100 (which leaves the layout height to be 200) - QCOMPARE(layout->effectiveSizeHint(Qt::MaximumSize, QSizeF(300, -1)), QSizeF(300, 200)); - - // the hfw item is shorter than the item to the left - expectedWidth(1, 10, 1, 200, 500, &width1, &width2); - expectedSize = hfw(Qt::MinimumSize, QSizeF(width2, -1)) + QSizeF(width1, 1); - QCOMPARE(layout->effectiveSizeHint(Qt::MinimumSize, QSizeF(500, -1)), expectedSize); - expectedSize.rheight()+=9; - QCOMPARE(layout->effectiveSizeHint(Qt::PreferredSize, QSizeF(500, -1)), expectedSize); - // the height of the hfw widget is shorter than the one to the left, which is 100, so - // the total height of the last row is 100 (which leaves the layout height to be 200) - QCOMPARE(layout->effectiveSizeHint(Qt::MaximumSize, QSizeF(500, -1)), QSizeF(500, 200)); - -} - QTEST_MAIN(tst_QGraphicsGridLayout) #include "tst_qgraphicsgridlayout.moc" -- cgit v0.12 From 8683e35e958fe5363e6ebc22f76042525151a40b Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Wed, 29 Sep 2010 18:41:38 +0200 Subject: Fixed parsing of SVGs with absolute font sizes. Task-number: QTBUG-14070 Reviewed-by: Gunnar (cherry picked from commit 4cd4160d85dc1e158a545422cac895792b14eda6) --- src/svg/qsvghandler.cpp | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index bf19a88..c17ca7a 100644 --- a/src/svg/qsvghandler.cpp +++ b/src/svg/qsvghandler.cpp @@ -1282,8 +1282,39 @@ static void parseFont(QSvgNode *node, fontStyle->setFamily(attributes.fontFamily.toString().trimmed()); if (!attributes.fontSize.isEmpty() && attributes.fontSize != QT_INHERIT) { + // TODO: Support relative sizes 'larger' and 'smaller'. QSvgHandler::LengthType dummy; // should always be pixel size - fontStyle->setSize(parseLength(attributes.fontSize.toString(), dummy, handler)); + qreal size = 0; + static const qreal sizeTable[] = { qreal(6.9), qreal(8.3), qreal(10.0), qreal(12.0), qreal(14.4), qreal(17.3), qreal(20.7) }; + enum AbsFontSize { XXSmall, XSmall, Small, Medium, Large, XLarge, XXLarge }; + switch (attributes.fontSize.at(0).unicode()) { + case 'x': + if (attributes.fontSize == QLatin1String("xx-small")) + size = sizeTable[XXSmall]; + else if (attributes.fontSize == QLatin1String("x-small")) + size = sizeTable[XSmall]; + else if (attributes.fontSize == QLatin1String("x-large")) + size = sizeTable[XLarge]; + else if (attributes.fontSize == QLatin1String("xx-large")) + size = sizeTable[XXLarge]; + break; + case 's': + if (attributes.fontSize == QLatin1String("small")) + size = sizeTable[Small]; + break; + case 'm': + if (attributes.fontSize == QLatin1String("medium")) + size = sizeTable[Medium]; + break; + case 'l': + if (attributes.fontSize == QLatin1String("large")) + size = sizeTable[Large]; + break; + default: + size = parseLength(attributes.fontSize.toString(), dummy, handler); + break; + } + fontStyle->setSize(size); } if (!attributes.fontStyle.isEmpty() && attributes.fontStyle != QT_INHERIT) { -- cgit v0.12 From 6c53410d8104064b53beccb1f2014c980735aefb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Mon, 27 Sep 2010 13:02:47 +0200 Subject: Fixed performance regression in curve stroking. Change c46688b8a88da made us use m_curve_threshold for both QBezier::shifted and QBezier::toPolygon, and adjusted the threshold dynamically based on the painter scale. Since the threshold in shifted was already relative to the pen width, it is independent from the painter scale. Instead, we need to set a separate threshold for dashing. Also, in several places we were calling setCurveThresholdForTransform with the painter matrix even though we were transforming the points into device coordinate space before stroking. Task-number: QTBUG-13894 Reviewed-by: Gunnar Sletta (cherry picked from commit d60dc7cba21794866c9382f83080fab1a129eb08) --- src/gui/painting/qpaintengineex.cpp | 2 +- src/gui/painting/qstroker.cpp | 9 +++++---- src/gui/painting/qstroker_p.h | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp index 1e857e4..c1e3d66 100644 --- a/src/gui/painting/qpaintengineex.cpp +++ b/src/gui/painting/qpaintengineex.cpp @@ -517,7 +517,7 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) QPainterPath painterPath = state()->matrix.map(path.convertToPainterPath()); d->activeStroker->strokePath(painterPath, d->strokeHandler, QTransform()); } else { - d->activeStroker->setCurveThresholdFromTransform(state()->matrix); + d->activeStroker->setCurveThresholdFromTransform(QTransform()); d->activeStroker->begin(d->strokeHandler); if (types) { while (points < lastPoint) { diff --git a/src/gui/painting/qstroker.cpp b/src/gui/painting/qstroker.cpp index 9cff339..9decf41 100644 --- a/src/gui/painting/qstroker.cpp +++ b/src/gui/painting/qstroker.cpp @@ -190,6 +190,7 @@ static inline qreal adapted_angle_on_x(const QLineF &line) QStrokerOps::QStrokerOps() : m_elements(0) , m_curveThreshold(qt_real_to_fixed(0.25)) + , m_dashThreshold(qt_real_to_fixed(0.25)) , m_customData(0) , m_moveTo(0) , m_lineTo(0) @@ -243,7 +244,7 @@ void QStrokerOps::strokePath(const QPainterPath &path, void *customData, const Q if (path.isEmpty()) return; - setCurveThresholdFromTransform(matrix); + setCurveThresholdFromTransform(QTransform()); begin(customData); int count = path.elementCount(); if (matrix.isIdentity()) { @@ -315,7 +316,7 @@ void QStrokerOps::strokePolygon(const QPointF *points, int pointCount, bool impl if (!pointCount) return; - setCurveThresholdFromTransform(matrix); + setCurveThresholdFromTransform(QTransform()); begin(data); if (matrix.isIdentity()) { moveTo(qt_real_to_fixed(points[0].x()), qt_real_to_fixed(points[0].y())); @@ -356,7 +357,7 @@ void QStrokerOps::strokeEllipse(const QRectF &rect, void *data, const QTransform } } - setCurveThresholdFromTransform(matrix); + setCurveThresholdFromTransform(QTransform()); begin(data); moveTo(qt_real_to_fixed(start.x()), qt_real_to_fixed(start.y())); for (int i=0; i<12; i+=3) { @@ -1142,7 +1143,7 @@ void QDashStroker::processCurrentSubpath() QPainterPath dashPath; - QSubpathFlatIterator it(&m_elements, m_curveThreshold); + QSubpathFlatIterator it(&m_elements, m_dashThreshold); qfixed2d prev = it.next(); bool clipping = !m_clip_rect.isEmpty(); diff --git a/src/gui/painting/qstroker_p.h b/src/gui/painting/qstroker_p.h index d646135..5607a8e 100644 --- a/src/gui/painting/qstroker_p.h +++ b/src/gui/painting/qstroker_p.h @@ -168,7 +168,7 @@ public: { qreal scale; qt_scaleForTransform(transform, &scale); - setCurveThreshold(scale == 0 ? qreal(0.5) : (qreal(0.5) / scale)); + m_dashThreshold = scale == 0 ? qreal(0.5) : (qreal(0.5) / scale); } void setCurveThreshold(qfixed threshold) { m_curveThreshold = threshold; } @@ -184,6 +184,7 @@ protected: QRectF m_clip_rect; qfixed m_curveThreshold; + qfixed m_dashThreshold; void *m_customData; qStrokerMoveToHook m_moveTo; -- cgit v0.12 From acc1dc498ea733bab2a1f5ef9983829adbbf5735 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Wed, 29 Sep 2010 12:56:38 +0200 Subject: Fix double painting when adding an item into a linear layout the problem was that the item is first painted at its default position, then moved by the layout and finally repainted. We now made sure the item is laid out before the first paint event occurs. Task-number: QTBUG-13865 Reviewed-by: bnilsen (cherry picked from commit 33f525e636ef8fa64a15d3e66c56adaea0075bda) --- src/gui/graphicsview/qgraphicslinearlayout.cpp | 8 +++-- tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp | 40 ++++++++++++++++++++++ 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/src/gui/graphicsview/qgraphicslinearlayout.cpp b/src/gui/graphicsview/qgraphicslinearlayout.cpp index 1588364..7e8d19f 100644 --- a/src/gui/graphicsview/qgraphicslinearlayout.cpp +++ b/src/gui/graphicsview/qgraphicslinearlayout.cpp @@ -275,13 +275,17 @@ void QGraphicsLinearLayout::insertItem(int index, QGraphicsLayoutItem *item) qWarning("QGraphicsLinearLayout::insertItem: cannot insert itself"); return; } + Q_ASSERT(item); + + //the order of the following instructions is very important because + //invalidating the layout before adding the child item will make the layout happen + //before we try to paint the item + invalidate(); d->addChildLayoutItem(item); - Q_ASSERT(item); d->fixIndex(&index); d->engine.insertRow(index, d->orientation); new QGridLayoutItem(&d->engine, item, d->gridRow(index), d->gridColumn(index), 1, 1, 0, index); - invalidate(); } /*! diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp index ddc4f73..7f24ddc 100644 --- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp @@ -184,6 +184,7 @@ private slots: void task250119_shortcutContext(); void QT_BUG_6544_tabFocusFirstUnsetWhenRemovingItems(); void QT_BUG_12056_tabFocusFirstUnsetWhenRemovingItems(); + void QT_BUG_13865_doublePaintWhenAddingASubItem(); }; @@ -3321,6 +3322,45 @@ void tst_QGraphicsWidget::QT_BUG_12056_tabFocusFirstUnsetWhenRemovingItems() //This should not crash } + +struct GreenWidget : public QGraphicsWidget +{ + GreenWidget() : count(0) + { + } + + void paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * ) + { + count++; + painter->setPen(Qt::green); + painter->drawRect(option->rect.adjusted(0,0,-1,-1)); + } + + int count; +}; + +void tst_QGraphicsWidget::QT_BUG_13865_doublePaintWhenAddingASubItem() +{ + QGraphicsScene scene; + QGraphicsView view(&scene); + QGraphicsWidget *widget = new QGraphicsWidget; + widget->resize(100, 100); + scene.addItem(widget); + QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(widget); + + view.show(); + QTest::qWaitForWindowShown(&view); + + + GreenWidget *sub = new GreenWidget; + layout->addItem(sub); + + QTest::qWait(100); + QCOMPARE(sub->count, 1); //it should only be painted once + +} + + QTEST_MAIN(tst_QGraphicsWidget) #include "tst_qgraphicswidget.moc" -- cgit v0.12 From a808b5e596bdd2a0f9801e4acf726066d7b9aafd Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Mon, 27 Sep 2010 11:39:05 +0200 Subject: Doc update for the support of MSVC 2010 64-bit MS has released a hotfix for the support of MSVC 2010 64-bit. It fixes the optimizer that could generate code that crashes. Reviewed-by: Trust-Me Task-number: QTBUG-11445 (cherry picked from commit ce2a273bab9b9094a1f0f3f60309797e11e59404) --- doc/src/platforms/compiler-notes.qdoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/src/platforms/compiler-notes.qdoc b/doc/src/platforms/compiler-notes.qdoc index 3870e8f..bcf7cb4 100644 --- a/doc/src/platforms/compiler-notes.qdoc +++ b/doc/src/platforms/compiler-notes.qdoc @@ -267,8 +267,9 @@ for more information. There currently is a problem when compiling Qt with Visual Studio 2010 for 64-bit. - Its optimizer causes trouble and crashes for the release builds and it is not supported - in that configuration. See task http://bugreports.qt.nokia.com/browse/QTBUG-11445. + Its optimizer causes trouble and generates code that crashes for the release builds. + To avoid the crashes, You need to apply the hotfix in the following article + http://support.microsoft.com/kb/2280741. \section1 IBM xlC (AIX) -- cgit v0.12 From 9dc4889b8ae8c598a671c0fab3b71cf128cd7311 Mon Sep 17 00:00:00 2001 From: Leandro Melo Date: Thu, 30 Sep 2010 11:43:10 +0200 Subject: Build fix for -qtnamespace. Reviewed-by: Thiago Macieira (cherry picked from commit b8089f0b7a0fef9318070aea9c8344bfe987bac9) --- src/corelib/plugin/qsystemlibrary.cpp | 5 +++++ src/corelib/plugin/qsystemlibrary_p.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/corelib/plugin/qsystemlibrary.cpp b/src/corelib/plugin/qsystemlibrary.cpp index eeb142b..1b8d8fe 100644 --- a/src/corelib/plugin/qsystemlibrary.cpp +++ b/src/corelib/plugin/qsystemlibrary.cpp @@ -77,6 +77,9 @@ in the documentation for LoadLibrary for Windows CE at MSDN. (http://msdn.microsoft.com/en-us/library/ms886736.aspx) */ + +QT_BEGIN_NAMESPACE + #if defined(Q_OS_WINCE) HINSTANCE QSystemLibrary::load(const wchar_t *libraryName, bool onlySystemDirectory /* = true */) { @@ -134,3 +137,5 @@ HINSTANCE QSystemLibrary::load(const wchar_t *libraryName, bool onlySystemDirect } #endif //Q_OS_WINCE + +QT_END_NAMESPACE diff --git a/src/corelib/plugin/qsystemlibrary_p.h b/src/corelib/plugin/qsystemlibrary_p.h index 3251a3c..8000a61 100644 --- a/src/corelib/plugin/qsystemlibrary_p.h +++ b/src/corelib/plugin/qsystemlibrary_p.h @@ -47,6 +47,8 @@ #include #include +QT_BEGIN_NAMESPACE + class QSystemLibrary { public: @@ -101,6 +103,8 @@ private: bool m_didLoad; }; +QT_END_NAMESPACE + #endif //Q_OS_WIN #endif //QSYSTEMLIBRARY_P_H -- cgit v0.12 From fb439760468f55d7884f5b14172fff9cc0a2107f Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 30 Sep 2010 11:38:14 +0200 Subject: Fixed a layout issue where you could get NaN as dimensions The problem is that with empty layouts we could sometimes divide by 0. Note: This doesn't fix the whole task... Task-number: QTBUG-13547 Reviewed-by: ogoffart (cherry picked from commit c1f9978c9d61bcbdb2f280185a3abdea13d7f532) --- src/gui/graphicsview/qgridlayoutengine.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/gui/graphicsview/qgridlayoutengine.cpp b/src/gui/graphicsview/qgridlayoutengine.cpp index 4fba5ff..ae5bf90 100644 --- a/src/gui/graphicsview/qgridlayoutengine.cpp +++ b/src/gui/graphicsview/qgridlayoutengine.cpp @@ -306,20 +306,19 @@ void QGridLayoutRowData::calculateGeometries(int start, int end, qreal targetSiz ultimatePreferredSize = ultimatePreferredSize * 3 / 2; ultimateSumPreferredSizes = ultimateSumPreferredSizes * 3 / 2; - qreal ultimateFactor = (stretch * ultimateSumPreferredSizes - / sumStretches) - - (box.q_preferredSize); - qreal transitionalFactor = sumCurrentAvailable - * (ultimatePreferredSize - box.q_preferredSize) - / (ultimateSumPreferredSizes - - sumPreferredSizes); - - qreal alpha = qMin(sumCurrentAvailable, - ultimateSumPreferredSizes - sumPreferredSizes); qreal beta = ultimateSumPreferredSizes - sumPreferredSizes; + if (!beta) { + factors[i] = 1; + } else { + qreal alpha = qMin(sumCurrentAvailable, beta); + qreal ultimateFactor = (stretch * ultimateSumPreferredSizes / sumStretches) + - (box.q_preferredSize); + qreal transitionalFactor = sumCurrentAvailable * (ultimatePreferredSize - box.q_preferredSize) / beta; + + factors[i] = ((alpha * ultimateFactor) + + ((beta - alpha) * transitionalFactor)) / beta; + } - factors[i] = ((alpha * ultimateFactor) - + ((beta - alpha) * transitionalFactor)) / beta; } sumFactors += factors[i]; if (desired < sumCurrentAvailable) -- cgit v0.12 From 8eccccd6306bc5ec8cbe30243e7e96f5367f0acb Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 5 Oct 2010 20:11:47 +1000 Subject: Update .def files for recent cherry-picks. --- src/s60installs/bwins/QtDeclarativeu.def | 131 ++++++++++++++++++++++++++-- src/s60installs/bwins/QtGuiu.def | 2 + src/s60installs/eabi/QtDeclarativeu.def | 144 +++++++++++++++++++++++++++++-- 3 files changed, 267 insertions(+), 10 deletions(-) diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def index bd2026d..581c3b8 100644 --- a/src/s60installs/bwins/QtDeclarativeu.def +++ b/src/s60installs/bwins/QtDeclarativeu.def @@ -142,7 +142,7 @@ EXPORTS ?setEnumOrFlag@QMetaPropertyBuilder@@QAEX_N@Z @ 141 NONAME ; void QMetaPropertyBuilder::setEnumOrFlag(bool) ?getStaticMetaObject@QDeclarativeRectangle@@SAABUQMetaObject@@XZ @ 142 NONAME ; struct QMetaObject const & QDeclarativeRectangle::getStaticMetaObject(void) ?isValid@QDeclarativeProperty@@QBE_NXZ @ 143 NONAME ; bool QDeclarativeProperty::isValid(void) const - ?isConnected@QDeclarativeDebugClient@@QBE_NXZ @ 144 NONAME ; bool QDeclarativeDebugClient::isConnected(void) const + ?isConnected@QDeclarativeDebugClient@@QBE_NXZ @ 144 NONAME ABSENT ; bool QDeclarativeDebugClient::isConnected(void) const ?enabled@QDeclarativeBinding@@QBE_NXZ @ 145 NONAME ; bool QDeclarativeBinding::enabled(void) const ?setSource@QDeclarativeView@@QAEXABVQUrl@@@Z @ 146 NONAME ; void QDeclarativeView::setSource(class QUrl const &) ??_EQDeclarativeDebugService@@UAE@I@Z @ 147 NONAME ; QDeclarativeDebugService::~QDeclarativeDebugService(unsigned int) @@ -461,7 +461,7 @@ EXPORTS ?qt_metacall@QDeclarativeContext@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 460 NONAME ; int QDeclarativeContext::qt_metacall(enum QMetaObject::Call, int, void * *) ??_EQDeclarativeValueType@@UAE@I@Z @ 461 NONAME ; QDeclarativeValueType::~QDeclarativeValueType(unsigned int) ?qt_metacall@QDeclarativeState@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 462 NONAME ; int QDeclarativeState::qt_metacall(enum QMetaObject::Call, int, void * *) - ?isEnabled@QDeclarativeDebugService@@QBE_NXZ @ 463 NONAME ; bool QDeclarativeDebugService::isEnabled(void) const + ?isEnabled@QDeclarativeDebugService@@QBE_NXZ @ 463 NONAME ABSENT ; bool QDeclarativeDebugService::isEnabled(void) const ?stateChanged@QDeclarativeDebugWatch@@IAEXW4State@1@@Z @ 464 NONAME ; void QDeclarativeDebugWatch::stateChanged(enum QDeclarativeDebugWatch::State) ??0QMetaMethodBuilder@@AAE@PBVQMetaObjectBuilder@@H@Z @ 465 NONAME ; QMetaMethodBuilder::QMetaMethodBuilder(class QMetaObjectBuilder const *, int) ??4QDeclarativeListReference@@QAEAAV0@ABV0@@Z @ 466 NONAME ; class QDeclarativeListReference & QDeclarativeListReference::operator=(class QDeclarativeListReference const &) @@ -1028,7 +1028,7 @@ EXPORTS ?qmlInfo@@YA?AVQDeclarativeInfo@@PBVQObject@@ABVQDeclarativeError@@@Z @ 1027 NONAME ; class QDeclarativeInfo qmlInfo(class QObject const *, class QDeclarativeError const &) ?staticMetaObject@QDeclarativeText@@2UQMetaObject@@B @ 1028 NONAME ; struct QMetaObject const QDeclarativeText::staticMetaObject ?color@QDeclarativeRectangle@@QBE?AVQColor@@XZ @ 1029 NONAME ; class QColor QDeclarativeRectangle::color(void) const - ?isEnabled@QDeclarativeDebugClient@@QBE_NXZ @ 1030 NONAME ; bool QDeclarativeDebugClient::isEnabled(void) const + ?isEnabled@QDeclarativeDebugClient@@QBE_NXZ @ 1030 NONAME ABSENT ; bool QDeclarativeDebugClient::isEnabled(void) const ?send@QPacketProtocol@@QAEXABVQPacket@@@Z @ 1031 NONAME ; void QPacketProtocol::send(class QPacket const &) ?width@QDeclarativePixmap@@QBEHXZ @ 1032 NONAME ; int QDeclarativePixmap::width(void) const ?error@QDeclarativeCustomParser@@IAEXABVQDeclarativeCustomParserNode@@ABVQString@@@Z @ 1033 NONAME ; void QDeclarativeCustomParser::error(class QDeclarativeCustomParserNode const &, class QString const &) @@ -1147,7 +1147,7 @@ EXPORTS ?removeNotifySignal@QMetaPropertyBuilder@@QAEXXZ @ 1146 NONAME ; void QMetaPropertyBuilder::removeNotifySignal(void) ?trUtf8@QDeclarativeDebugService@@SA?AVQString@@PBD0@Z @ 1147 NONAME ; class QString QDeclarativeDebugService::trUtf8(char const *, char const *) ?setImportPathList@QDeclarativeEngine@@QAEXABVQStringList@@@Z @ 1148 NONAME ; void QDeclarativeEngine::setImportPathList(class QStringList const &) - ?enabledChanged@QDeclarativeDebugService@@MAEX_N@Z @ 1149 NONAME ; void QDeclarativeDebugService::enabledChanged(bool) + ?enabledChanged@QDeclarativeDebugService@@MAEX_N@Z @ 1149 NONAME ABSENT ; void QDeclarativeDebugService::enabledChanged(bool) ?addWatch@QDeclarativeEngineDebug@@QAEPAVQDeclarativeDebugWatch@@ABVQDeclarativeDebugObjectReference@@PAVQObject@@@Z @ 1150 NONAME ; class QDeclarativeDebugWatch * QDeclarativeEngineDebug::addWatch(class QDeclarativeDebugObjectReference const &, class QObject *) ?asAST@Variant@QDeclarativeParser@@QBEPAVNode@AST@QDeclarativeJS@@XZ @ 1151 NONAME ; class QDeclarativeJS::AST::Node * QDeclarativeParser::Variant::asAST(void) const ?indexOfClassInfo@QMetaObjectBuilder@@QAEHABVQByteArray@@@Z @ 1152 NONAME ; int QMetaObjectBuilder::indexOfClassInfo(class QByteArray const &) @@ -1386,7 +1386,7 @@ EXPORTS ?qmlTypes@QDeclarativeMetaType@@SA?AV?$QList@PAVQDeclarativeType@@@@XZ @ 1385 NONAME ; class QList QDeclarativeMetaType::qmlTypes(void) ?valueTypeCoreIndex@QDeclarativePropertyPrivate@@SAHABVQDeclarativeProperty@@@Z @ 1386 NONAME ; int QDeclarativePropertyPrivate::valueTypeCoreIndex(class QDeclarativeProperty const &) ?writeEnumProperty@QDeclarativePropertyPrivate@@SA_NABVQMetaProperty@@HPAVQObject@@ABVQVariant@@H@Z @ 1387 NONAME ; bool QDeclarativePropertyPrivate::writeEnumProperty(class QMetaProperty const &, int, class QObject *, class QVariant const &, int) - ?setEnabled@QDeclarativeDebugClient@@QAEX_N@Z @ 1388 NONAME ; void QDeclarativeDebugClient::setEnabled(bool) + ?setEnabled@QDeclarativeDebugClient@@QAEX_N@Z @ 1388 NONAME ABSENT ; void QDeclarativeDebugClient::setEnabled(bool) ??1QMetaObjectBuilder@@UAE@XZ @ 1389 NONAME ; QMetaObjectBuilder::~QMetaObjectBuilder(void) ?tr@QDeclarativeStateOperation@@SA?AVQString@@PBD0@Z @ 1390 NONAME ; class QString QDeclarativeStateOperation::tr(char const *, char const *) ?clear@QPacket@@QAEXXZ @ 1391 NONAME ; void QPacket::clear(void) @@ -1717,4 +1717,125 @@ EXPORTS ?canMove@QDeclarativeListModel@@ABE_NHHH@Z @ 1716 NONAME ; bool QDeclarativeListModel::canMove(int, int, int) const ?getScriptEngine@QDeclarativeDebugHelper@@SAPAVQScriptEngine@@PAVQDeclarativeEngine@@@Z @ 1717 NONAME ; class QScriptEngine * QDeclarativeDebugHelper::getScriptEngine(class QDeclarativeEngine *) ?setAnimationSlowDownFactor@QDeclarativeDebugHelper@@SAXM@Z @ 1718 NONAME ; void QDeclarativeDebugHelper::setAnimationSlowDownFactor(float) + ?add@QDeclarativeBasePositioner@@QBEPAVQDeclarativeTransition@@XZ @ 1719 NONAME ; class QDeclarativeTransition * QDeclarativeBasePositioner::add(void) const + ?setLoops@QDeclarativeAbstractAnimation@@QAEXH@Z @ 1720 NONAME ; void QDeclarativeAbstractAnimation::setLoops(int) + ?trUtf8@QDeclarativeAbstractAnimation@@SA?AVQString@@PBD0@Z @ 1721 NONAME ; class QString QDeclarativeAbstractAnimation::trUtf8(char const *, char const *) + ?tr@QDeclarativeBasePositioner@@SA?AVQString@@PBD0@Z @ 1722 NONAME ; class QString QDeclarativeBasePositioner::tr(char const *, char const *) + ?staticMetaObject@QDeclarativeAbstractAnimation@@2UQMetaObject@@B @ 1723 NONAME ; struct QMetaObject const QDeclarativeAbstractAnimation::staticMetaObject + ?setMove@QDeclarativeBasePositioner@@QAEXPAVQDeclarativeTransition@@@Z @ 1724 NONAME ; void QDeclarativeBasePositioner::setMove(class QDeclarativeTransition *) + ?setRunning@QDeclarativeTimer@@QAEX_N@Z @ 1725 NONAME ; void QDeclarativeTimer::setRunning(bool) + ?tr@QDeclarativeTimer@@SA?AVQString@@PBD0@Z @ 1726 NONAME ; class QString QDeclarativeTimer::tr(char const *, char const *) + ?qt_metacall@QDeclarativeTimer@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1727 NONAME ; int QDeclarativeTimer::qt_metacall(enum QMetaObject::Call, int, void * *) + ?setPaused@QDeclarativeAbstractAnimation@@QAEX_N@Z @ 1728 NONAME ; void QDeclarativeAbstractAnimation::setPaused(bool) + ?d_func@QDeclarativeBasePositioner@@ABEPBVQDeclarativeBasePositionerPrivate@@XZ @ 1729 NONAME ; class QDeclarativeBasePositionerPrivate const * QDeclarativeBasePositioner::d_func(void) const + ?setRepeating@QDeclarativeTimer@@QAEX_N@Z @ 1730 NONAME ; void QDeclarativeTimer::setRepeating(bool) + ?interval@QDeclarativeTimer@@QBEHXZ @ 1731 NONAME ; int QDeclarativeTimer::interval(void) const + ?start@QDeclarativeTimer@@QAEXXZ @ 1732 NONAME ; void QDeclarativeTimer::start(void) + ?transition@QDeclarativeAbstractAnimation@@UAEXAAV?$QList@VQDeclarativeAction@@@@AAV?$QList@VQDeclarativeProperty@@@@W4TransitionDirection@1@@Z @ 1733 NONAME ; void QDeclarativeAbstractAnimation::transition(class QList &, class QList &, enum QDeclarativeAbstractAnimation::TransitionDirection) + ?componentComplete@QDeclarativeAbstractAnimation@@UAEXXZ @ 1734 NONAME ; void QDeclarativeAbstractAnimation::componentComplete(void) + ?statusChanged@QDeclarativeDebugService@@MAEXW4Status@1@@Z @ 1735 NONAME ; void QDeclarativeDebugService::statusChanged(enum QDeclarativeDebugService::Status) + ?runningChanged@QDeclarativeAbstractAnimation@@IAEX_N@Z @ 1736 NONAME ; void QDeclarativeAbstractAnimation::runningChanged(bool) + ?trUtf8@QDeclarativeAbstractAnimation@@SA?AVQString@@PBD0H@Z @ 1737 NONAME ; class QString QDeclarativeAbstractAnimation::trUtf8(char const *, char const *, int) + ??_EQDeclarativeBasePositioner@@UAE@I@Z @ 1738 NONAME ; QDeclarativeBasePositioner::~QDeclarativeBasePositioner(unsigned int) + ?metaObject@QDeclarativeTimer@@UBEPBUQMetaObject@@XZ @ 1739 NONAME ; struct QMetaObject const * QDeclarativeTimer::metaObject(void) const + ?setGroup@QDeclarativeAbstractAnimation@@QAEXPAVQDeclarativeAnimationGroup@@@Z @ 1740 NONAME ; void QDeclarativeAbstractAnimation::setGroup(class QDeclarativeAnimationGroup *) + ?isRepeating@QDeclarativeTimer@@QBE_NXZ @ 1741 NONAME ; bool QDeclarativeTimer::isRepeating(void) const + ?setTriggeredOnStart@QDeclarativeTimer@@QAEX_N@Z @ 1742 NONAME ; void QDeclarativeTimer::setTriggeredOnStart(bool) + ?currentTime@QDeclarativeAbstractAnimation@@QAEHXZ @ 1743 NONAME ; int QDeclarativeAbstractAnimation::currentTime(void) + ?status@QDeclarativeEngineDebug@@QBE?AW4Status@1@XZ @ 1744 NONAME ; enum QDeclarativeEngineDebug::Status QDeclarativeEngineDebug::status(void) const + ??1QDeclarativeAbstractAnimation@@UAE@XZ @ 1745 NONAME ; QDeclarativeAbstractAnimation::~QDeclarativeAbstractAnimation(void) + ?triggered@QDeclarativeTimer@@IAEXXZ @ 1746 NONAME ; void QDeclarativeTimer::triggered(void) + ?getStaticMetaObject@QDeclarativeBasePositioner@@SAABUQMetaObject@@XZ @ 1747 NONAME ; struct QMetaObject const & QDeclarativeBasePositioner::getStaticMetaObject(void) + ?finished@QDeclarativeTimer@@AAEXXZ @ 1748 NONAME ; void QDeclarativeTimer::finished(void) + ?pausedChanged@QDeclarativeAbstractAnimation@@IAEX_N@Z @ 1749 NONAME ; void QDeclarativeAbstractAnimation::pausedChanged(bool) + ?complete@QDeclarativeAbstractAnimation@@QAEXXZ @ 1750 NONAME ; void QDeclarativeAbstractAnimation::complete(void) + ?setRunning@QDeclarativeAbstractAnimation@@QAEX_N@Z @ 1751 NONAME ; void QDeclarativeAbstractAnimation::setRunning(bool) + ?trUtf8@QDeclarativeBasePositioner@@SA?AVQString@@PBD0H@Z @ 1752 NONAME ; class QString QDeclarativeBasePositioner::trUtf8(char const *, char const *, int) + ?trUtf8@QDeclarativeBasePositioner@@SA?AVQString@@PBD0@Z @ 1753 NONAME ; class QString QDeclarativeBasePositioner::trUtf8(char const *, char const *) + ?completed@QDeclarativeAbstractAnimation@@IAEXXZ @ 1754 NONAME ; void QDeclarativeAbstractAnimation::completed(void) + ?trUtf8@QDeclarativeTimer@@SA?AVQString@@PBD0@Z @ 1755 NONAME ; class QString QDeclarativeTimer::trUtf8(char const *, char const *) + ?loopCountChanged@QDeclarativeAbstractAnimation@@IAEXH@Z @ 1756 NONAME ; void QDeclarativeAbstractAnimation::loopCountChanged(int) + ?repeatChanged@QDeclarativeTimer@@IAEXXZ @ 1757 NONAME ; void QDeclarativeTimer::repeatChanged(void) + ?setDisableUserControl@QDeclarativeAbstractAnimation@@QAEXXZ @ 1758 NONAME ; void QDeclarativeAbstractAnimation::setDisableUserControl(void) + ?componentComplete@QDeclarativeBasePositioner@@MAEXXZ @ 1759 NONAME ; void QDeclarativeBasePositioner::componentComplete(void) + ?setDefaultTarget@QDeclarativeAbstractAnimation@@QAEXABVQDeclarativeProperty@@@Z @ 1760 NONAME ; void QDeclarativeAbstractAnimation::setDefaultTarget(class QDeclarativeProperty const &) + ?staticMetaObject@QDeclarativeBasePositioner@@2UQMetaObject@@B @ 1761 NONAME ; struct QMetaObject const QDeclarativeBasePositioner::staticMetaObject + ?triggeredOnStart@QDeclarativeTimer@@QBE_NXZ @ 1762 NONAME ; bool QDeclarativeTimer::triggeredOnStart(void) const + ?notifyRunningChanged@QDeclarativeAbstractAnimation@@AAEX_N@Z @ 1763 NONAME ; void QDeclarativeAbstractAnimation::notifyRunningChanged(bool) + ?statusChanged@QDeclarativeDebugClient@@MAEXW4Status@1@@Z @ 1764 NONAME ; void QDeclarativeDebugClient::statusChanged(enum QDeclarativeDebugClient::Status) + ??0QDeclarativeBasePositioner@@IAE@AAVQDeclarativeBasePositionerPrivate@@W4PositionerType@0@PAVQDeclarativeItem@@@Z @ 1765 NONAME ; QDeclarativeBasePositioner::QDeclarativeBasePositioner(class QDeclarativeBasePositionerPrivate &, enum QDeclarativeBasePositioner::PositionerType, class QDeclarativeItem *) + ?componentComplete@QDeclarativeTimer@@MAEXXZ @ 1766 NONAME ; void QDeclarativeTimer::componentComplete(void) + ?tr@QDeclarativeAbstractAnimation@@SA?AVQString@@PBD0@Z @ 1767 NONAME ; class QString QDeclarativeAbstractAnimation::tr(char const *, char const *) + ?isRunning@QDeclarativeAbstractAnimation@@QBE_NXZ @ 1768 NONAME ; bool QDeclarativeAbstractAnimation::isRunning(void) const + ?d_func@QDeclarativeAbstractAnimation@@ABEPBVQDeclarativeAbstractAnimationPrivate@@XZ @ 1769 NONAME ; class QDeclarativeAbstractAnimationPrivate const * QDeclarativeAbstractAnimation::d_func(void) const + ??_EQDeclarativeAbstractAnimation@@UAE@I@Z @ 1770 NONAME ; QDeclarativeAbstractAnimation::~QDeclarativeAbstractAnimation(unsigned int) + ??0QDeclarativeBasePositioner@@QAE@W4PositionerType@0@PAVQDeclarativeItem@@@Z @ 1771 NONAME ; QDeclarativeBasePositioner::QDeclarativeBasePositioner(enum QDeclarativeBasePositioner::PositionerType, class QDeclarativeItem *) + ?qt_metacall@QDeclarativeBasePositioner@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1772 NONAME ; int QDeclarativeBasePositioner::qt_metacall(enum QMetaObject::Call, int, void * *) + ?status@QDeclarativeDebugClient@@QBE?AW4Status@1@XZ @ 1773 NONAME ; enum QDeclarativeDebugClient::Status QDeclarativeDebugClient::status(void) const + ?prePositioning@QDeclarativeBasePositioner@@IAEXXZ @ 1774 NONAME ; void QDeclarativeBasePositioner::prePositioning(void) + ?finishApplyTransitions@QDeclarativeBasePositioner@@IAEXXZ @ 1775 NONAME ; void QDeclarativeBasePositioner::finishApplyTransitions(void) + ?d_func@QDeclarativeAbstractAnimation@@AAEPAVQDeclarativeAbstractAnimationPrivate@@XZ @ 1776 NONAME ; class QDeclarativeAbstractAnimationPrivate * QDeclarativeAbstractAnimation::d_func(void) + ?componentFinalized@QDeclarativeAbstractAnimation@@AAEXXZ @ 1777 NONAME ; void QDeclarativeAbstractAnimation::componentFinalized(void) + ??_EQDeclarativeTimer@@UAE@I@Z @ 1778 NONAME ; QDeclarativeTimer::~QDeclarativeTimer(unsigned int) + ?pause@QDeclarativeAbstractAnimation@@QAEXXZ @ 1779 NONAME ; void QDeclarativeAbstractAnimation::pause(void) + ?stop@QDeclarativeTimer@@QAEXXZ @ 1780 NONAME ; void QDeclarativeTimer::stop(void) + ?timelineComplete@QDeclarativeAbstractAnimation@@AAEXXZ @ 1781 NONAME ; void QDeclarativeAbstractAnimation::timelineComplete(void) + ?d_func@QDeclarativeBasePositioner@@AAEPAVQDeclarativeBasePositionerPrivate@@XZ @ 1782 NONAME ; class QDeclarativeBasePositionerPrivate * QDeclarativeBasePositioner::d_func(void) + ?setAlwaysRunToEnd@QDeclarativeAbstractAnimation@@QAEX_N@Z @ 1783 NONAME ; void QDeclarativeAbstractAnimation::setAlwaysRunToEnd(bool) + ?classBegin@QDeclarativeAbstractAnimation@@UAEXXZ @ 1784 NONAME ; void QDeclarativeAbstractAnimation::classBegin(void) + ?d_func@QDeclarativeTimer@@AAEPAVQDeclarativeTimerPrivate@@XZ @ 1785 NONAME ; class QDeclarativeTimerPrivate * QDeclarativeTimer::d_func(void) + ?spacing@QDeclarativeBasePositioner@@QBEHXZ @ 1786 NONAME ; int QDeclarativeBasePositioner::spacing(void) const + ??0QDeclarativeAbstractAnimation@@QAE@PAVQObject@@@Z @ 1787 NONAME ; QDeclarativeAbstractAnimation::QDeclarativeAbstractAnimation(class QObject *) + ?metaObject@QDeclarativeAbstractAnimation@@UBEPBUQMetaObject@@XZ @ 1788 NONAME ; struct QMetaObject const * QDeclarativeAbstractAnimation::metaObject(void) const + ?tr@QDeclarativeAbstractAnimation@@SA?AVQString@@PBD0H@Z @ 1789 NONAME ; class QString QDeclarativeAbstractAnimation::tr(char const *, char const *, int) + ?started@QDeclarativeAbstractAnimation@@IAEXXZ @ 1790 NONAME ; void QDeclarativeAbstractAnimation::started(void) + ?setInterval@QDeclarativeTimer@@QAEXH@Z @ 1791 NONAME ; void QDeclarativeTimer::setInterval(int) + ?statusChanged@QDeclarativeEngineDebug@@IAEXW4Status@1@@Z @ 1792 NONAME ; void QDeclarativeEngineDebug::statusChanged(enum QDeclarativeEngineDebug::Status) + ?d_func@QDeclarativeTimer@@ABEPBVQDeclarativeTimerPrivate@@XZ @ 1793 NONAME ; class QDeclarativeTimerPrivate const * QDeclarativeTimer::d_func(void) const + ?setSpacing@QDeclarativeBasePositioner@@QAEXH@Z @ 1794 NONAME ; void QDeclarativeBasePositioner::setSpacing(int) + ?staticMetaObject@QDeclarativeTimer@@2UQMetaObject@@B @ 1795 NONAME ; struct QMetaObject const QDeclarativeTimer::staticMetaObject + ?positionY@QDeclarativeBasePositioner@@IAEXHABVPositionedItem@1@@Z @ 1796 NONAME ; void QDeclarativeBasePositioner::positionY(int, class QDeclarativeBasePositioner::PositionedItem const &) + ?qt_metacast@QDeclarativeAbstractAnimation@@UAEPAXPBD@Z @ 1797 NONAME ; void * QDeclarativeAbstractAnimation::qt_metacast(char const *) + ?setAdd@QDeclarativeBasePositioner@@QAEXPAVQDeclarativeTransition@@@Z @ 1798 NONAME ; void QDeclarativeBasePositioner::setAdd(class QDeclarativeTransition *) + ?setCurrentTime@QDeclarativeAbstractAnimation@@QAEXH@Z @ 1799 NONAME ; void QDeclarativeAbstractAnimation::setCurrentTime(int) + ?attachedPropertiesId@QDeclarativeType@@QBEHXZ @ 1800 NONAME ; int QDeclarativeType::attachedPropertiesId(void) const + ?positionX@QDeclarativeBasePositioner@@IAEXHABVPositionedItem@1@@Z @ 1801 NONAME ; void QDeclarativeBasePositioner::positionX(int, class QDeclarativeBasePositioner::PositionedItem const &) + ?restart@QDeclarativeAbstractAnimation@@QAEXXZ @ 1802 NONAME ; void QDeclarativeAbstractAnimation::restart(void) + ?itemChange@QDeclarativeBasePositioner@@MAE?AVQVariant@@W4GraphicsItemChange@QGraphicsItem@@ABV2@@Z @ 1803 NONAME ; class QVariant QDeclarativeBasePositioner::itemChange(enum QGraphicsItem::GraphicsItemChange, class QVariant const &) + ??0QDeclarativeAbstractAnimation@@IAE@AAVQDeclarativeAbstractAnimationPrivate@@PAVQObject@@@Z @ 1804 NONAME ; QDeclarativeAbstractAnimation::QDeclarativeAbstractAnimation(class QDeclarativeAbstractAnimationPrivate &, class QObject *) + ?resume@QDeclarativeAbstractAnimation@@QAEXXZ @ 1805 NONAME ; void QDeclarativeAbstractAnimation::resume(void) + ?runningChanged@QDeclarativeTimer@@IAEXXZ @ 1806 NONAME ; void QDeclarativeTimer::runningChanged(void) + ?ticked@QDeclarativeTimer@@AAEXXZ @ 1807 NONAME ; void QDeclarativeTimer::ticked(void) + ?graphicsWidgetGeometryChanged@QDeclarativeBasePositioner@@IAEXXZ @ 1808 NONAME ; void QDeclarativeBasePositioner::graphicsWidgetGeometryChanged(void) + ?trUtf8@QDeclarativeTimer@@SA?AVQString@@PBD0H@Z @ 1809 NONAME ; class QString QDeclarativeTimer::trUtf8(char const *, char const *, int) + ??0QDeclarativeTimer@@QAE@PAVQObject@@@Z @ 1810 NONAME ; QDeclarativeTimer::QDeclarativeTimer(class QObject *) + ?loops@QDeclarativeAbstractAnimation@@QBEHXZ @ 1811 NONAME ; int QDeclarativeAbstractAnimation::loops(void) const + ?setTarget@QDeclarativeAbstractAnimation@@EAEXABVQDeclarativeProperty@@@Z @ 1812 NONAME ; void QDeclarativeAbstractAnimation::setTarget(class QDeclarativeProperty const &) + ?alwaysRunToEnd@QDeclarativeAbstractAnimation@@QBE_NXZ @ 1813 NONAME ; bool QDeclarativeAbstractAnimation::alwaysRunToEnd(void) const + ?tr@QDeclarativeTimer@@SA?AVQString@@PBD0H@Z @ 1814 NONAME ; class QString QDeclarativeTimer::tr(char const *, char const *, int) + ?status@QDeclarativeDebugService@@QBE?AW4Status@1@XZ @ 1815 NONAME ; enum QDeclarativeDebugService::Status QDeclarativeDebugService::status(void) const + ?intervalChanged@QDeclarativeTimer@@IAEXXZ @ 1816 NONAME ; void QDeclarativeTimer::intervalChanged(void) + ?isPaused@QDeclarativeAbstractAnimation@@QBE_NXZ @ 1817 NONAME ; bool QDeclarativeAbstractAnimation::isPaused(void) const + ?getStaticMetaObject@QDeclarativeAbstractAnimation@@SAABUQMetaObject@@XZ @ 1818 NONAME ; struct QMetaObject const & QDeclarativeAbstractAnimation::getStaticMetaObject(void) + ?group@QDeclarativeAbstractAnimation@@QBEPAVQDeclarativeAnimationGroup@@XZ @ 1819 NONAME ; class QDeclarativeAnimationGroup * QDeclarativeAbstractAnimation::group(void) const + ?classBegin@QDeclarativeTimer@@MAEXXZ @ 1820 NONAME ; void QDeclarativeTimer::classBegin(void) + ?restart@QDeclarativeTimer@@QAEXXZ @ 1821 NONAME ; void QDeclarativeTimer::restart(void) + ?move@QDeclarativeBasePositioner@@QBEPAVQDeclarativeTransition@@XZ @ 1822 NONAME ; class QDeclarativeTransition * QDeclarativeBasePositioner::move(void) const + ?spacingChanged@QDeclarativeBasePositioner@@IAEXXZ @ 1823 NONAME ; void QDeclarativeBasePositioner::spacingChanged(void) + ?qt_metacast@QDeclarativeBasePositioner@@UAEPAXPBD@Z @ 1824 NONAME ; void * QDeclarativeBasePositioner::qt_metacast(char const *) + ??1QDeclarativeTimer@@UAE@XZ @ 1825 NONAME ; QDeclarativeTimer::~QDeclarativeTimer(void) + ?getStaticMetaObject@QDeclarativeTimer@@SAABUQMetaObject@@XZ @ 1826 NONAME ; struct QMetaObject const & QDeclarativeTimer::getStaticMetaObject(void) + ?tr@QDeclarativeBasePositioner@@SA?AVQString@@PBD0H@Z @ 1827 NONAME ; class QString QDeclarativeBasePositioner::tr(char const *, char const *, int) + ??1QDeclarativeBasePositioner@@UAE@XZ @ 1828 NONAME ; QDeclarativeBasePositioner::~QDeclarativeBasePositioner(void) + ?moveChanged@QDeclarativeBasePositioner@@IAEXXZ @ 1829 NONAME ; void QDeclarativeBasePositioner::moveChanged(void) + ?qt_metacast@QDeclarativeTimer@@UAEPAXPBD@Z @ 1830 NONAME ; void * QDeclarativeTimer::qt_metacast(char const *) + ?metaObject@QDeclarativeBasePositioner@@UBEPBUQMetaObject@@XZ @ 1831 NONAME ; struct QMetaObject const * QDeclarativeBasePositioner::metaObject(void) const + ?alwaysRunToEndChanged@QDeclarativeAbstractAnimation@@IAEX_N@Z @ 1832 NONAME ; void QDeclarativeAbstractAnimation::alwaysRunToEndChanged(bool) + ?triggeredOnStartChanged@QDeclarativeTimer@@IAEXXZ @ 1833 NONAME ; void QDeclarativeTimer::triggeredOnStartChanged(void) + ?isRunning@QDeclarativeTimer@@QBE_NXZ @ 1834 NONAME ; bool QDeclarativeTimer::isRunning(void) const + ?update@QDeclarativeTimer@@AAEXXZ @ 1835 NONAME ; void QDeclarativeTimer::update(void) + ?stop@QDeclarativeAbstractAnimation@@QAEXXZ @ 1836 NONAME ; void QDeclarativeAbstractAnimation::stop(void) + ?addChanged@QDeclarativeBasePositioner@@IAEXXZ @ 1837 NONAME ; void QDeclarativeBasePositioner::addChanged(void) + ?start@QDeclarativeAbstractAnimation@@QAEXXZ @ 1838 NONAME ; void QDeclarativeAbstractAnimation::start(void) + ?qt_metacall@QDeclarativeAbstractAnimation@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1839 NONAME ; int QDeclarativeAbstractAnimation::qt_metacall(enum QMetaObject::Call, int, void * *) diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def index 7805dae..aacc03a 100644 --- a/src/s60installs/bwins/QtGuiu.def +++ b/src/s60installs/bwins/QtGuiu.def @@ -12892,4 +12892,6 @@ EXPORTS ?setTimeout@QTapAndHoldGesture@@SAXH@Z @ 12891 NONAME ; void QTapAndHoldGesture::setTimeout(int) ?qmljsDebugArguments@QApplicationPrivate@@2VQString@@A @ 12892 NONAME ; class QString QApplicationPrivate::qmljsDebugArguments ?effectiveBoundingRect@QGraphicsItemPrivate@@QBE?AVQRectF@@PAVQGraphicsItem@@@Z @ 12893 NONAME ; class QRectF QGraphicsItemPrivate::effectiveBoundingRect(class QGraphicsItem *) const + ?maxTextureHeight@QTextureGlyphCache@@UBEHXZ @ 12894 NONAME ; int QTextureGlyphCache::maxTextureHeight(void) const + ?maxTextureWidth@QTextureGlyphCache@@UBEHXZ @ 12895 NONAME ; int QTextureGlyphCache::maxTextureWidth(void) const diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def index 9762c55..b3bb7f5 100644 --- a/src/s60installs/eabi/QtDeclarativeu.def +++ b/src/s60installs/eabi/QtDeclarativeu.def @@ -673,7 +673,7 @@ EXPORTS _ZN22QDeclarativeTransitionD0Ev @ 672 NONAME _ZN22QDeclarativeTransitionD1Ev @ 673 NONAME _ZN22QDeclarativeTransitionD2Ev @ 674 NONAME - _ZN23QDeclarativeDebugClient10setEnabledEb @ 675 NONAME + _ZN23QDeclarativeDebugClient10setEnabledEb @ 675 NONAME ABSENT _ZN23QDeclarativeDebugClient11qt_metacallEN11QMetaObject4CallEiPPv @ 676 NONAME _ZN23QDeclarativeDebugClient11qt_metacastEPKc @ 677 NONAME _ZN23QDeclarativeDebugClient11sendMessageERK10QByteArray @ 678 NONAME @@ -766,7 +766,7 @@ EXPORTS _ZN24QDeclarativeDebugService11qt_metacallEN11QMetaObject4CallEiPPv @ 765 NONAME _ZN24QDeclarativeDebugService11qt_metacastEPKc @ 766 NONAME _ZN24QDeclarativeDebugService11sendMessageERK10QByteArray @ 767 NONAME - _ZN24QDeclarativeDebugService14enabledChangedEb @ 768 NONAME + _ZN24QDeclarativeDebugService14enabledChangedEb @ 768 NONAME ABSENT _ZN24QDeclarativeDebugService14objectToStringEP7QObject @ 769 NONAME _ZN24QDeclarativeDebugService15messageReceivedERK10QByteArray @ 770 NONAME _ZN24QDeclarativeDebugService16staticMetaObjectE @ 771 NONAME DATA 16 @@ -1390,9 +1390,9 @@ EXPORTS _ZNK22QDeclarativeTransition7toStateEv @ 1389 NONAME _ZNK22QDeclarativeTransition9fromStateEv @ 1390 NONAME _ZNK23QDeclarativeDebugClient10metaObjectEv @ 1391 NONAME - _ZNK23QDeclarativeDebugClient11isConnectedEv @ 1392 NONAME + _ZNK23QDeclarativeDebugClient11isConnectedEv @ 1392 NONAME ABSENT _ZNK23QDeclarativeDebugClient4nameEv @ 1393 NONAME - _ZNK23QDeclarativeDebugClient9isEnabledEv @ 1394 NONAME + _ZNK23QDeclarativeDebugClient9isEnabledEv @ 1394 NONAME ABSENT _ZNK23QDeclarativeDomDocument10rootObjectEv @ 1395 NONAME _ZNK23QDeclarativeDomDocument6errorsEv @ 1396 NONAME _ZNK23QDeclarativeDomDocument7importsEv @ 1397 NONAME @@ -1427,7 +1427,7 @@ EXPORTS _ZNK24QDeclarativeCustomParser12evaluateEnumERK10QByteArray @ 1426 NONAME _ZNK24QDeclarativeDebugService10metaObjectEv @ 1427 NONAME _ZNK24QDeclarativeDebugService4nameEv @ 1428 NONAME - _ZNK24QDeclarativeDebugService9isEnabledEv @ 1429 NONAME + _ZNK24QDeclarativeDebugService9isEnabledEv @ 1429 NONAME ABSENT _ZNK24QDeclarativeDomComponent13componentRootEv @ 1430 NONAME _ZNK24QDeclarativeScriptString11scopeObjectEv @ 1431 NONAME _ZNK24QDeclarativeScriptString6scriptEv @ 1432 NONAME @@ -1749,4 +1749,138 @@ EXPORTS _ZNK21QDeclarativeListModel14inWorkerThreadEv @ 1748 NONAME _ZN23QDeclarativeDebugHelper15getScriptEngineEP18QDeclarativeEngine @ 1749 NONAME _ZN23QDeclarativeDebugHelper26setAnimationSlowDownFactorEf @ 1750 NONAME + _ZN17QDeclarativeTimer10classBeginEv @ 1751 NONAME + _ZN17QDeclarativeTimer10setRunningEb @ 1752 NONAME + _ZN17QDeclarativeTimer11qt_metacallEN11QMetaObject4CallEiPPv @ 1753 NONAME + _ZN17QDeclarativeTimer11qt_metacastEPKc @ 1754 NONAME + _ZN17QDeclarativeTimer11setIntervalEi @ 1755 NONAME + _ZN17QDeclarativeTimer12setRepeatingEb @ 1756 NONAME + _ZN17QDeclarativeTimer13repeatChangedEv @ 1757 NONAME + _ZN17QDeclarativeTimer14runningChangedEv @ 1758 NONAME + _ZN17QDeclarativeTimer15intervalChangedEv @ 1759 NONAME + _ZN17QDeclarativeTimer16staticMetaObjectE @ 1760 NONAME DATA 16 + _ZN17QDeclarativeTimer17componentCompleteEv @ 1761 NONAME + _ZN17QDeclarativeTimer19getStaticMetaObjectEv @ 1762 NONAME + _ZN17QDeclarativeTimer19setTriggeredOnStartEb @ 1763 NONAME + _ZN17QDeclarativeTimer23triggeredOnStartChangedEv @ 1764 NONAME + _ZN17QDeclarativeTimer4stopEv @ 1765 NONAME + _ZN17QDeclarativeTimer5startEv @ 1766 NONAME + _ZN17QDeclarativeTimer6tickedEv @ 1767 NONAME + _ZN17QDeclarativeTimer6updateEv @ 1768 NONAME + _ZN17QDeclarativeTimer7restartEv @ 1769 NONAME + _ZN17QDeclarativeTimer8finishedEv @ 1770 NONAME + _ZN17QDeclarativeTimer9triggeredEv @ 1771 NONAME + _ZN17QDeclarativeTimerC1EP7QObject @ 1772 NONAME + _ZN17QDeclarativeTimerC2EP7QObject @ 1773 NONAME + _ZN23QDeclarativeDebugClient13statusChangedENS_6StatusE @ 1774 NONAME + _ZN23QDeclarativeDebugClientD0Ev @ 1775 NONAME + _ZN23QDeclarativeDebugClientD1Ev @ 1776 NONAME + _ZN23QDeclarativeDebugClientD2Ev @ 1777 NONAME + _ZN23QDeclarativeEngineDebug13statusChangedENS_6StatusE @ 1778 NONAME + _ZN24QDeclarativeDebugService13statusChangedENS_6StatusE @ 1779 NONAME + _ZN24QDeclarativeDebugServiceD0Ev @ 1780 NONAME + _ZN24QDeclarativeDebugServiceD1Ev @ 1781 NONAME + _ZN24QDeclarativeDebugServiceD2Ev @ 1782 NONAME + _ZN26QDeclarativeBasePositioner10addChangedEv @ 1783 NONAME + _ZN26QDeclarativeBasePositioner10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 1784 NONAME + _ZN26QDeclarativeBasePositioner10setSpacingEi @ 1785 NONAME + _ZN26QDeclarativeBasePositioner11moveChangedEv @ 1786 NONAME + _ZN26QDeclarativeBasePositioner11qt_metacallEN11QMetaObject4CallEiPPv @ 1787 NONAME + _ZN26QDeclarativeBasePositioner11qt_metacastEPKc @ 1788 NONAME + _ZN26QDeclarativeBasePositioner14prePositioningEv @ 1789 NONAME + _ZN26QDeclarativeBasePositioner14spacingChangedEv @ 1790 NONAME + _ZN26QDeclarativeBasePositioner16staticMetaObjectE @ 1791 NONAME DATA 16 + _ZN26QDeclarativeBasePositioner17componentCompleteEv @ 1792 NONAME + _ZN26QDeclarativeBasePositioner19getStaticMetaObjectEv @ 1793 NONAME + _ZN26QDeclarativeBasePositioner22finishApplyTransitionsEv @ 1794 NONAME + _ZN26QDeclarativeBasePositioner29graphicsWidgetGeometryChangedEv @ 1795 NONAME + _ZN26QDeclarativeBasePositioner6setAddEP22QDeclarativeTransition @ 1796 NONAME + _ZN26QDeclarativeBasePositioner7setMoveEP22QDeclarativeTransition @ 1797 NONAME + _ZN26QDeclarativeBasePositioner9positionXEiRKNS_14PositionedItemE @ 1798 NONAME + _ZN26QDeclarativeBasePositioner9positionYEiRKNS_14PositionedItemE @ 1799 NONAME + _ZN26QDeclarativeBasePositionerC2ENS_14PositionerTypeEP16QDeclarativeItem @ 1800 NONAME + _ZN26QDeclarativeBasePositionerC2ER33QDeclarativeBasePositionerPrivateNS_14PositionerTypeEP16QDeclarativeItem @ 1801 NONAME + _ZN26QDeclarativeBasePositionerD0Ev @ 1802 NONAME + _ZN26QDeclarativeBasePositionerD1Ev @ 1803 NONAME + _ZN26QDeclarativeBasePositionerD2Ev @ 1804 NONAME + _ZN27QDeclarativeDebugConnectionD0Ev @ 1805 NONAME + _ZN27QDeclarativeDebugConnectionD1Ev @ 1806 NONAME + _ZN27QDeclarativeDebugConnectionD2Ev @ 1807 NONAME + _ZN29QDeclarativeAbstractAnimation10classBeginEv @ 1808 NONAME + _ZN29QDeclarativeAbstractAnimation10setRunningEb @ 1809 NONAME + _ZN29QDeclarativeAbstractAnimation10transitionER5QListI18QDeclarativeActionERS0_I20QDeclarativePropertyENS_19TransitionDirectionE @ 1810 NONAME + _ZN29QDeclarativeAbstractAnimation11currentTimeEv @ 1811 NONAME + _ZN29QDeclarativeAbstractAnimation11qt_metacallEN11QMetaObject4CallEiPPv @ 1812 NONAME + _ZN29QDeclarativeAbstractAnimation11qt_metacastEPKc @ 1813 NONAME + _ZN29QDeclarativeAbstractAnimation13pausedChangedEb @ 1814 NONAME + _ZN29QDeclarativeAbstractAnimation14runningChangedEb @ 1815 NONAME + _ZN29QDeclarativeAbstractAnimation14setCurrentTimeEi @ 1816 NONAME + _ZN29QDeclarativeAbstractAnimation16loopCountChangedEi @ 1817 NONAME + _ZN29QDeclarativeAbstractAnimation16setDefaultTargetERK20QDeclarativeProperty @ 1818 NONAME + _ZN29QDeclarativeAbstractAnimation16staticMetaObjectE @ 1819 NONAME DATA 16 + _ZN29QDeclarativeAbstractAnimation16timelineCompleteEv @ 1820 NONAME + _ZN29QDeclarativeAbstractAnimation17componentCompleteEv @ 1821 NONAME + _ZN29QDeclarativeAbstractAnimation17setAlwaysRunToEndEb @ 1822 NONAME + _ZN29QDeclarativeAbstractAnimation18componentFinalizedEv @ 1823 NONAME + _ZN29QDeclarativeAbstractAnimation19getStaticMetaObjectEv @ 1824 NONAME + _ZN29QDeclarativeAbstractAnimation20notifyRunningChangedEb @ 1825 NONAME + _ZN29QDeclarativeAbstractAnimation21alwaysRunToEndChangedEb @ 1826 NONAME + _ZN29QDeclarativeAbstractAnimation21setDisableUserControlEv @ 1827 NONAME + _ZN29QDeclarativeAbstractAnimation4stopEv @ 1828 NONAME + _ZN29QDeclarativeAbstractAnimation5pauseEv @ 1829 NONAME + _ZN29QDeclarativeAbstractAnimation5startEv @ 1830 NONAME + _ZN29QDeclarativeAbstractAnimation6resumeEv @ 1831 NONAME + _ZN29QDeclarativeAbstractAnimation7restartEv @ 1832 NONAME + _ZN29QDeclarativeAbstractAnimation7startedEv @ 1833 NONAME + _ZN29QDeclarativeAbstractAnimation8completeEv @ 1834 NONAME + _ZN29QDeclarativeAbstractAnimation8setGroupEP26QDeclarativeAnimationGroup @ 1835 NONAME + _ZN29QDeclarativeAbstractAnimation8setLoopsEi @ 1836 NONAME + _ZN29QDeclarativeAbstractAnimation9completedEv @ 1837 NONAME + _ZN29QDeclarativeAbstractAnimation9setPausedEb @ 1838 NONAME + _ZN29QDeclarativeAbstractAnimation9setTargetERK20QDeclarativeProperty @ 1839 NONAME + _ZN29QDeclarativeAbstractAnimationC2EP7QObject @ 1840 NONAME + _ZN29QDeclarativeAbstractAnimationC2ER36QDeclarativeAbstractAnimationPrivateP7QObject @ 1841 NONAME + _ZN29QDeclarativeAbstractAnimationD0Ev @ 1842 NONAME + _ZN29QDeclarativeAbstractAnimationD1Ev @ 1843 NONAME + _ZN29QDeclarativeAbstractAnimationD2Ev @ 1844 NONAME + _ZNK16QDeclarativeType20attachedPropertiesIdEv @ 1845 NONAME + _ZNK17QDeclarativeTimer10metaObjectEv @ 1846 NONAME + _ZNK17QDeclarativeTimer11isRepeatingEv @ 1847 NONAME + _ZNK17QDeclarativeTimer16triggeredOnStartEv @ 1848 NONAME + _ZNK17QDeclarativeTimer8intervalEv @ 1849 NONAME + _ZNK17QDeclarativeTimer9isRunningEv @ 1850 NONAME + _ZNK23QDeclarativeDebugClient6statusEv @ 1851 NONAME + _ZNK23QDeclarativeEngineDebug6statusEv @ 1852 NONAME + _ZNK24QDeclarativeDebugService6statusEv @ 1853 NONAME + _ZNK26QDeclarativeBasePositioner10metaObjectEv @ 1854 NONAME + _ZNK26QDeclarativeBasePositioner3addEv @ 1855 NONAME + _ZNK26QDeclarativeBasePositioner4moveEv @ 1856 NONAME + _ZNK26QDeclarativeBasePositioner7spacingEv @ 1857 NONAME + _ZNK29QDeclarativeAbstractAnimation10metaObjectEv @ 1858 NONAME + _ZNK29QDeclarativeAbstractAnimation14alwaysRunToEndEv @ 1859 NONAME + _ZNK29QDeclarativeAbstractAnimation5groupEv @ 1860 NONAME + _ZNK29QDeclarativeAbstractAnimation5loopsEv @ 1861 NONAME + _ZNK29QDeclarativeAbstractAnimation8isPausedEv @ 1862 NONAME + _ZNK29QDeclarativeAbstractAnimation9isRunningEv @ 1863 NONAME + _ZTI17QDeclarativeTimer @ 1864 NONAME + _ZTI26QDeclarativeBasePositioner @ 1865 NONAME + _ZTI29QDeclarativeAbstractAnimation @ 1866 NONAME + _ZTV17QDeclarativeTimer @ 1867 NONAME + _ZTV26QDeclarativeBasePositioner @ 1868 NONAME + _ZTV29QDeclarativeAbstractAnimation @ 1869 NONAME + _ZThn12_N29QDeclarativeAbstractAnimation10classBeginEv @ 1870 NONAME + _ZThn12_N29QDeclarativeAbstractAnimation17componentCompleteEv @ 1871 NONAME + _ZThn12_N29QDeclarativeAbstractAnimationD0Ev @ 1872 NONAME + _ZThn12_N29QDeclarativeAbstractAnimationD1Ev @ 1873 NONAME + _ZThn16_N26QDeclarativeBasePositioner17componentCompleteEv @ 1874 NONAME + _ZThn16_N26QDeclarativeBasePositionerD0Ev @ 1875 NONAME + _ZThn16_N26QDeclarativeBasePositionerD1Ev @ 1876 NONAME + _ZThn8_N17QDeclarativeTimer10classBeginEv @ 1877 NONAME + _ZThn8_N17QDeclarativeTimer17componentCompleteEv @ 1878 NONAME + _ZThn8_N26QDeclarativeBasePositioner10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 1879 NONAME + _ZThn8_N26QDeclarativeBasePositionerD0Ev @ 1880 NONAME + _ZThn8_N26QDeclarativeBasePositionerD1Ev @ 1881 NONAME + _ZThn8_N29QDeclarativeAbstractAnimation9setTargetERK20QDeclarativeProperty @ 1882 NONAME + _ZThn8_N29QDeclarativeAbstractAnimationD0Ev @ 1883 NONAME + _ZThn8_N29QDeclarativeAbstractAnimationD1Ev @ 1884 NONAME -- cgit v0.12 From 512e44f4595a807b0eae968521a28659a70eb387 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Tue, 5 Oct 2010 16:43:33 +0300 Subject: QS60Style: QDateEdit - Layout issues In portrait orientation, QDateEdit's calendar popup (QCalendarWidget) does not fit into screen. As a fix, the pixel metric PM_FocusFrameHMargin, is reduced from 13 to 3 in qHD screens (640*360). Also, the explicit halving of the pixel metric for QTableViews is removed. The pixel metric resulted in 27 pixel text margins (2 * pm + 1)for calendar widgets, which is clearly a bit too much. Task-number: QTBUG-14126 Reviewed-by: Miikka Heikkinen (cherry picked from commit b3f895fd97deda0c7c5bfd704c04450e7afee748) --- src/gui/styles/qs60style.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 5996032..866e922 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -106,8 +106,8 @@ const short QS60StylePrivate::data[][MAX_PIXELMETRICS] = { // *** generated pixel metrics *** {5,0,-909,0,0,2,0,0,-1,7,12,22,15,15,7,198,-909,-909,-909,20,13,2,0,0,21,7,18,30,3,3,1,-909,-909,0,1,0,0,12,20,15,15,18,18,1,115,18,0,-909,-909,-909,-909,0,0,16,2,-909,0,0,-909,16,-909,-909,-909,-909,32,18,55,24,55,4,4,4,9,13,-909,5,51,11,5,0,3,3,6,8,3,3,-909,2,-909,-909,-909,-909,5,5,3,1,106}, {5,0,-909,0,0,1,0,0,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,8,27,28,4,4,1,-909,-909,0,7,6,0,13,23,17,17,21,21,7,115,21,0,-909,-909,-909,-909,0,0,15,1,-909,0,0,-909,15,-909,-909,-909,-909,32,21,65,27,65,3,3,5,10,15,-909,5,58,13,5,0,4,4,7,9,4,4,-909,2,-909,-909,-909,-909,6,6,3,1,106}, -{7,0,-909,0,0,2,0,0,-1,25,69,46,37,37,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,44,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,13,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135}, -{7,0,-909,0,0,2,0,0,-1,25,68,46,37,37,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,52,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,12,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135}, +{7,0,-909,0,0,2,0,0,-1,25,69,46,37,37,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,44,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,3,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135}, +{7,0,-909,0,0,2,0,0,-1,25,68,46,37,37,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,52,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,3,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135}, {7,0,-909,0,0,2,0,0,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,7,32,30,5,5,2,-909,-909,0,2,8,0,16,28,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,6,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,19,7,0,5,6,8,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1,106} // *** End of generated data *** }; @@ -2530,11 +2530,6 @@ int QS60Style::pixelMetric(PixelMetric metric, const QStyleOption *option, const //without having to define custom pixel metric metricValue *= 2; - if (widget && (metric == PM_FocusFrameHMargin)) - if (qobject_cast(widget)) - //Halve the focus frame margin for table items - metricValue /= 2; - return metricValue; } -- cgit v0.12 From d566c9cd0a5f403c30cdb65a024cec489bfc46aa Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Mon, 4 Oct 2010 15:42:51 +0300 Subject: Revert "When using complex transformations rendering goes easily off by one pixel." This reverts commit 2acdc634ee895af4a9738c0f6c2496e388afba38. Originally this fixed QT-3791 but it caused lots of problems in other sites. So reverting this will fix QT-4001 but reopens QT-3791. QT-4001 blocks Qt 4.7.1 but QT-3791 doesn't. Task-number: QT-4001 Reviewed-by: Jason Barron (cherry picked from commit 25ddfb434f13aa3bbc6ac303aa17dbe9582bf3f0) --- src/openvg/qpaintengine_vg.cpp | 158 +++++++++++++++++------------------------ 1 file changed, 66 insertions(+), 92 deletions(-) diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index 74395a2..f6d2435 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -196,9 +196,7 @@ public: #endif QTransform transform; // Currently active transform. - bool affineTransform; // True if the transform is non-projective. - bool simpleTransform; // True if the transform is simple translate - // or 0, 90, 180, and 270 degree rotation + bool simpleTransform; // True if the transform is simple (non-projective). qreal penScale; // Pen scaling factor from "transform". QTransform pathTransform; // Calculated VG path transformation. @@ -379,7 +377,6 @@ void QVGPaintEnginePrivate::init() roundRectPath = 0; #endif - affineTransform = true; simpleTransform = true; pathTransformSet = false; penScale = 1.0; @@ -532,59 +529,12 @@ void QVGPaintEnginePrivate::setTransform vgLoadMatrix(mat); } -// Determine if a co-ordinate transform is simple enough to allow -// rectangle-based clipping with vgMask() and rounding translation -// to integers. Simple transforms most often result from origin translations. -static inline bool transformIsSimple(const QTransform& transform) -{ - QTransform::TransformationType type = transform.type(); - if (type == QTransform::TxNone || type == QTransform::TxTranslate) { - return true; - } else if (type == QTransform::TxScale) { - // Check for 0 and 180 degree rotations. - // (0 might happen after 4 rotations of 90 degrees). - qreal m11 = transform.m11(); - qreal m12 = transform.m12(); - qreal m21 = transform.m21(); - qreal m22 = transform.m22(); - if (m12 == 0.0f && m21 == 0.0f) { - if (m11 == 1.0f && m22 == 1.0f) - return true; // 0 degrees - else if (m11 == -1.0f && m22 == -1.0f) - return true; // 180 degrees. - if(m11 == 1.0f && m22 == -1.0f) - return true; // 0 degrees inverted y. - else if(m11 == -1.0f && m22 == 1.0f) - return true; // 180 degrees inverted y. - } - } else if (type == QTransform::TxRotate) { - // Check for 90, and 270 degree rotations. - qreal m11 = transform.m11(); - qreal m12 = transform.m12(); - qreal m21 = transform.m21(); - qreal m22 = transform.m22(); - if (m11 == 0.0f && m22 == 0.0f) { - if (m12 == 1.0f && m21 == -1.0f) - return true; // 90 degrees. - else if (m12 == -1.0f && m21 == 1.0f) - return true; // 270 degrees. - else if (m12 == -1.0f && m21 == -1.0f) - return true; // 90 degrees inverted y. - else if (m12 == 1.0f && m21 == 1.0f) - return true; // 270 degrees inverted y. - } - } - return false; -} - Q_DECL_IMPORT extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale); void QVGPaintEnginePrivate::updateTransform(QPaintDevice *pdev) { VGfloat devh = pdev->height(); - simpleTransform = transformIsSimple(transform); - // Construct the VG transform by combining the Qt transform with // the following viewport transformation: // | 1 0 0 | @@ -607,9 +557,9 @@ void QVGPaintEnginePrivate::updateTransform(QPaintDevice *pdev) // so we will have to convert the co-ordinates ourselves. // Change the matrix to just the viewport transformation. pathTransform = viewport; - affineTransform = false; + simpleTransform = false; } else { - affineTransform = true; + simpleTransform = true; } pathTransformSet = false; @@ -638,7 +588,7 @@ VGPath QVGPaintEnginePrivate::vectorPathToVGPath(const QVectorPath& path) // Size is sufficient segments for drawRoundedRect() paths. QVarLengthArray segments; - if (sizeof(qreal) == sizeof(VGfloat) && elements && affineTransform) { + if (sizeof(qreal) == sizeof(VGfloat) && elements && simpleTransform) { // If Qt was compiled with qreal the same size as VGfloat, // then convert the segment types and use the incoming // points array directly. @@ -673,7 +623,7 @@ VGPath QVGPaintEnginePrivate::vectorPathToVGPath(const QVectorPath& path) int curvePos = 0; QPointF temp; - if (elements && affineTransform) { + if (elements && simpleTransform) { // Convert the members of the element array. for (int i = 0; i < count; ++i) { switch (elements[i]) { @@ -717,7 +667,7 @@ VGPath QVGPaintEnginePrivate::vectorPathToVGPath(const QVectorPath& path) } points += 2; } - } else if (elements && !affineTransform) { + } else if (elements && !simpleTransform) { // Convert the members of the element array after applying the // current transform to the path locally. for (int i = 0; i < count; ++i) { @@ -766,7 +716,7 @@ VGPath QVGPaintEnginePrivate::vectorPathToVGPath(const QVectorPath& path) } points += 2; } - } else if (count > 0 && affineTransform) { + } else if (count > 0 && simpleTransform) { // If there is no element array, then the path is assumed // to be a MoveTo followed by several LineTo's. coords.append(points[0]); @@ -779,7 +729,7 @@ VGPath QVGPaintEnginePrivate::vectorPathToVGPath(const QVectorPath& path) segments.append(VG_LINE_TO_ABS); --count; } - } else if (count > 0 && !affineTransform) { + } else if (count > 0 && !simpleTransform) { // Convert a simple path, and apply the transform locally. temp = transform.map(QPointF(points[0], points[1])); coords.append(temp.x()); @@ -840,7 +790,7 @@ VGPath QVGPaintEnginePrivate::painterPathToVGPath(const QPainterPath& path) bool haveStart = false; bool haveEnd = false; - if (affineTransform) { + if (simpleTransform) { // Convert the members of the element array. for (int i = 0; i < count; ++i) { switch (elements[i].type) { @@ -1615,6 +1565,36 @@ void QVGPaintEngine::stroke(const QVectorPath &path, const QPen &pen) vgDestroyPath(vgpath); } +// Determine if a co-ordinate transform is simple enough to allow +// rectangle-based clipping with vgMask(). Simple transforms most +// often result from origin translations. +static inline bool clipTransformIsSimple(const QTransform& transform) +{ + QTransform::TransformationType type = transform.type(); + if (type == QTransform::TxNone || type == QTransform::TxTranslate) + return true; + if (type == QTransform::TxRotate) { + // Check for 0, 90, 180, and 270 degree rotations. + // (0 might happen after 4 rotations of 90 degrees). + qreal m11 = transform.m11(); + qreal m12 = transform.m12(); + qreal m21 = transform.m21(); + qreal m22 = transform.m22(); + if (m11 == 0.0f && m22 == 0.0f) { + if (m12 == 1.0f && m21 == -1.0f) + return true; // 90 degrees. + else if (m12 == -1.0f && m21 == 1.0f) + return true; // 270 degrees. + } else if (m12 == 0.0f && m21 == 0.0f) { + if (m11 == -1.0f && m22 == -1.0f) + return true; // 180 degrees. + else if (m11 == 1.0f && m22 == 1.0f) + return true; // 0 degrees. + } + } + return false; +} + #if defined(QVG_SCISSOR_CLIP) void QVGPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op) @@ -1632,7 +1612,7 @@ void QVGPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op) // We aren't using masking, so handle simple QRectF's only. if (path.shape() == QVectorPath::RectangleHint && - path.elementCount() == 4 && d->simpleTransform) { + path.elementCount() == 4 && clipTransformIsSimple(d->transform)) { // Clipping region that resulted from QPainter::setClipRect(QRectF). // Convert it into a QRect and apply. const qreal *points = path.points(); @@ -1782,7 +1762,7 @@ void QVGPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op) // We don't have vgRenderToMask(), so handle simple QRectF's only. if (path.shape() == QVectorPath::RectangleHint && - path.elementCount() == 4 && d->simpleTransform) { + path.elementCount() == 4 && clipTransformIsSimple(d->transform)) { // Clipping region that resulted from QPainter::setClipRect(QRectF). // Convert it into a QRect and apply. const qreal *points = path.points(); @@ -1834,7 +1814,7 @@ void QVGPaintEngine::clip(const QRect &rect, Qt::ClipOperation op) d->dirty |= QPaintEngine::DirtyClipRegion; // If we have a non-simple transform, then use path-based clipping. - if (op != Qt::NoClip && !d->simpleTransform) { + if (op != Qt::NoClip && !clipTransformIsSimple(d->transform)) { QPaintEngineEx::clip(rect, op); return; } @@ -1953,7 +1933,7 @@ void QVGPaintEngine::clip(const QRegion ®ion, Qt::ClipOperation op) d->dirty |= QPaintEngine::DirtyClipRegion; // If we have a non-simple transform, then use path-based clipping. - if (op != Qt::NoClip && !d->simpleTransform) { + if (op != Qt::NoClip && !clipTransformIsSimple(d->transform)) { QPaintEngineEx::clip(region, op); return; } @@ -2530,14 +2510,14 @@ void QVGPaintEngine::fillRect(const QRectF &rect, const QBrush &brush) // Check to see if we can use vgClear() for faster filling. if (brush.style() == Qt::SolidPattern && brush.isOpaque() && - d->simpleTransform && d->opacity == 1.0f && + clipTransformIsSimple(d->transform) && d->opacity == 1.0f && clearRect(rect, brush.color())) { return; } #if !defined(QVG_NO_MODIFY_PATH) VGfloat coords[8]; - if (d->affineTransform) { + if (d->simpleTransform) { coords[0] = rect.x(); coords[1] = rect.y(); coords[2] = rect.x() + rect.width(); @@ -2572,14 +2552,14 @@ void QVGPaintEngine::fillRect(const QRectF &rect, const QColor &color) Q_D(QVGPaintEngine); // Check to see if we can use vgClear() for faster filling. - if (d->simpleTransform && d->opacity == 1.0f && color.alpha() == 255 && + if (clipTransformIsSimple(d->transform) && d->opacity == 1.0f && color.alpha() == 255 && clearRect(rect, color)) { return; } #if !defined(QVG_NO_MODIFY_PATH) VGfloat coords[8]; - if (d->affineTransform) { + if (d->simpleTransform) { coords[0] = rect.x(); coords[1] = rect.y(); coords[2] = rect.x() + rect.width(); @@ -2612,7 +2592,7 @@ void QVGPaintEngine::fillRect(const QRectF &rect, const QColor &color) void QVGPaintEngine::drawRoundedRect(const QRectF &rect, qreal xrad, qreal yrad, Qt::SizeMode mode) { Q_D(QVGPaintEngine); - if (d->affineTransform) { + if (d->simpleTransform) { QVGPainterState *s = state(); VGPath vgpath = d->roundedRectPath(rect, xrad, yrad, mode); d->draw(vgpath, s->pen, s->brush); @@ -2631,7 +2611,7 @@ void QVGPaintEngine::drawRects(const QRect *rects, int rectCount) QVGPainterState *s = state(); for (int i = 0; i < rectCount; ++i, ++rects) { VGfloat coords[8]; - if (d->affineTransform) { + if (d->simpleTransform) { coords[0] = rects->x(); coords[1] = rects->y(); coords[2] = rects->x() + rects->width(); @@ -2672,7 +2652,7 @@ void QVGPaintEngine::drawRects(const QRectF *rects, int rectCount) QVGPainterState *s = state(); for (int i = 0; i < rectCount; ++i, ++rects) { VGfloat coords[8]; - if (d->affineTransform) { + if (d->simpleTransform) { coords[0] = rects->x(); coords[1] = rects->y(); coords[2] = rects->x() + rects->width(); @@ -2710,7 +2690,7 @@ void QVGPaintEngine::drawLines(const QLine *lines, int lineCount) QVGPainterState *s = state(); for (int i = 0; i < lineCount; ++i, ++lines) { VGfloat coords[4]; - if (d->affineTransform) { + if (d->simpleTransform) { coords[0] = lines->x1(); coords[1] = lines->y1(); coords[2] = lines->x2(); @@ -2738,7 +2718,7 @@ void QVGPaintEngine::drawLines(const QLineF *lines, int lineCount) QVGPainterState *s = state(); for (int i = 0; i < lineCount; ++i, ++lines) { VGfloat coords[4]; - if (d->affineTransform) { + if (d->simpleTransform) { coords[0] = lines->x1(); coords[1] = lines->y1(); coords[2] = lines->x2(); @@ -2764,7 +2744,7 @@ void QVGPaintEngine::drawEllipse(const QRectF &r) // Based on the description of vguEllipse() in the OpenVG specification. // We don't use vguEllipse(), to avoid unnecessary library dependencies. Q_D(QVGPaintEngine); - if (d->affineTransform) { + if (d->simpleTransform) { QVGPainterState *s = state(); VGPath path = vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_F, @@ -2837,7 +2817,7 @@ void QVGPaintEngine::drawPoints(const QPointF *points, int pointCount) for (int i = 0; i < pointCount; ++i, ++points) { VGfloat coords[4]; - if (d->affineTransform) { + if (d->simpleTransform) { coords[0] = points->x(); coords[1] = points->y(); coords[2] = coords[0]; @@ -2871,7 +2851,7 @@ void QVGPaintEngine::drawPoints(const QPoint *points, int pointCount) for (int i = 0; i < pointCount; ++i, ++points) { VGfloat coords[4]; - if (d->affineTransform) { + if (d->simpleTransform) { coords[0] = points->x(); coords[1] = points->y(); coords[2] = coords[0]; @@ -2905,7 +2885,7 @@ void QVGPaintEngine::drawPolygon(const QPointF *points, int pointCount, PolygonD QVarLengthArray coords; QVarLengthArray segments; for (int i = 0; i < pointCount; ++i, ++points) { - if (d->affineTransform) { + if (d->simpleTransform) { coords.append(points->x()); coords.append(points->y()); } else { @@ -2952,7 +2932,7 @@ void QVGPaintEngine::drawPolygon(const QPoint *points, int pointCount, PolygonDr QVarLengthArray coords; QVarLengthArray segments; for (int i = 0; i < pointCount; ++i, ++points) { - if (d->affineTransform) { + if (d->simpleTransform) { coords.append(points->x()); coords.append(points->y()); } else { @@ -2987,7 +2967,7 @@ void QVGPaintEngine::drawPolygon(const QPoint *points, int pointCount, PolygonDr void QVGPaintEnginePrivate::setImageOptions() { - if (opacity != 1.0f && affineTransform) { + if (opacity != 1.0f && simpleTransform) { if (opacity != paintOpacity) { VGfloat values[4]; values[0] = 1.0f; @@ -3034,10 +3014,7 @@ static void drawVGImage(QVGPaintEnginePrivate *d, QTransform transform(d->imageTransform); VGfloat scaleX = sr.width() == 0.0f ? 0.0f : r.width() / sr.width(); VGfloat scaleY = sr.height() == 0.0f ? 0.0f : r.height() / sr.height(); - if (d->simpleTransform) - transform.translate(qRound(r.x()), qRound(r.y())); - else - transform.translate(r.x(), r.y()); + transform.translate(r.x(), r.y()); transform.scale(scaleX, scaleY); d->setTransform(VG_MATRIX_IMAGE_USER_TO_SURFACE, transform); @@ -3055,10 +3032,7 @@ static void drawVGImage(QVGPaintEnginePrivate *d, return; QTransform transform(d->imageTransform); - if(d->simpleTransform) - transform.translate(qRound(pos.x()), qRound(pos.y())); - else - transform.translate(pos.x(), pos.y()); + transform.translate(pos.x(), pos.y()); d->setTransform(VG_MATRIX_IMAGE_USER_TO_SURFACE, transform); d->setImageOptions(); @@ -3101,7 +3075,7 @@ void QVGPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF QVGPixmapData *vgpd = static_cast(pd); if (!vgpd->isValid()) return; - if (d->affineTransform) + if (d->simpleTransform) drawVGImage(d, r, vgpd->toVGImage(), vgpd->size(), sr); else drawVGImage(d, r, vgpd->toVGImage(d->opacity), vgpd->size(), sr); @@ -3120,7 +3094,7 @@ void QVGPaintEngine::drawPixmap(const QPointF &pos, const QPixmap &pm) QVGPixmapData *vgpd = static_cast(pd); if (!vgpd->isValid()) return; - if (d->affineTransform) + if (d->simpleTransform) drawVGImage(d, pos, vgpd->toVGImage()); else drawVGImage(d, pos, vgpd->toVGImage(d->opacity)); @@ -3135,7 +3109,7 @@ void QVGPaintEngine::drawImage { Q_D(QVGPaintEngine); VGImage vgImg; - if (d->affineTransform || d->opacity == 1.0f) + if (d->simpleTransform || d->opacity == 1.0f) vgImg = toVGImageSubRect(image, sr.toRect(), flags); else vgImg = toVGImageWithOpacitySubRect(image, d->opacity, sr.toRect()); @@ -3158,7 +3132,7 @@ void QVGPaintEngine::drawImage(const QPointF &pos, const QImage &image) { Q_D(QVGPaintEngine); VGImage vgImg; - if (d->affineTransform || d->opacity == 1.0f) + if (d->simpleTransform || d->opacity == 1.0f) vgImg = toVGImage(image); else vgImg = toVGImageWithOpacity(image, d->opacity); @@ -3191,7 +3165,7 @@ void QVGPaintEngine::drawPixmapFragments(const QPainter::PixmapFragment *drawing QPixmapData *pd = pixmap.pixmapData(); if (!pd) return; // null QPixmap - if (pd->classId() != QPixmapData::OpenVGClass || !d->affineTransform) { + if (pd->classId() != QPixmapData::OpenVGClass || !d->simpleTransform) { QPaintEngineEx::drawPixmapFragments(drawingData, dataCount, pixmap, hints); return; } @@ -3416,7 +3390,7 @@ void QVGPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem) // If we are not using a simple transform, then fall back // to the default Qt path stroking algorithm. - if (!d->affineTransform) { + if (!d->simpleTransform) { QPaintEngineEx::drawTextItem(p, textItem); return; } -- cgit v0.12 From 96226ad15202770f72e257d1a75654be9582326c Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 6 Oct 2010 16:43:06 +0200 Subject: Doc: Added missing examples and snippets. Task-number: QTBUG-14238 --- .../gettingStarted/gsQml/parts/part0/Button.qml | 55 +++++ .../gettingStarted/gsQml/parts/part1/Button.qml | 97 +++++++++ .../gettingStarted/gsQml/parts/part1/EditMenu.qml | 76 +++++++ .../gettingStarted/gsQml/parts/part1/FileMenu.qml | 91 ++++++++ .../gsQml/parts/part1/SimpleButton.qml | 73 +++++++ .../parts/part1/pics/qml-texteditor1_button.png | Bin 0 -> 1670 bytes .../parts/part1/pics/qml-texteditor1_editmenu.png | Bin 0 -> 6177 bytes .../parts/part1/pics/qml-texteditor1_filemenu.png | Bin 0 -> 6062 bytes .../part1/pics/qml-texteditor1_simplebutton.png | Bin 0 -> 1055 bytes .../gsQml/parts/part1/qml-texteditor.qmlproject | 16 ++ .../gettingStarted/gsQml/parts/part2/Button.qml | 99 +++++++++ .../gettingStarted/gsQml/parts/part2/EditMenu.qml | 77 +++++++ .../gettingStarted/gsQml/parts/part2/FileMenu.qml | 92 ++++++++ .../gettingStarted/gsQml/parts/part2/MenuBar.qml | 140 +++++++++++++ .../parts/part2/pics/qml-texteditor2_menubar.png | Bin 0 -> 6079 bytes .../gsQml/parts/part2/qml-texteditor2.qmlproject | 16 ++ .../gettingStarted/gsQml/parts/part3/Button.qml | 99 +++++++++ .../gettingStarted/gsQml/parts/part3/EditMenu.qml | 77 +++++++ .../gettingStarted/gsQml/parts/part3/FileMenu.qml | 92 ++++++++ .../gettingStarted/gsQml/parts/part3/MenuBar.qml | 140 +++++++++++++ .../gettingStarted/gsQml/parts/part3/TextArea.qml | 80 +++++++ .../gsQml/parts/part3/TextEditor.qml | 68 ++++++ .../gsQml/parts/part3/images/arrow.png | Bin 0 -> 583 bytes .../part3/pics/qml-texteditor3_texteditor.png | Bin 0 -> 59345 bytes .../gsQml/parts/part3/qml-texteditor3.qmlproject | 16 ++ .../gettingStarted/gsQml/parts/part4/Button.qml | 109 ++++++++++ .../gettingStarted/gsQml/parts/part4/EditMenu.qml | 81 +++++++ .../gettingStarted/gsQml/parts/part4/FileMenu.qml | 96 +++++++++ .../gettingStarted/gsQml/parts/part4/MenuBar.qml | 146 +++++++++++++ .../gsQml/parts/part4/SimpleButton.qml | 59 ++++++ .../gettingStarted/gsQml/parts/part4/TextArea.qml | 80 +++++++ .../gsQml/parts/part4/TextEditor.qml | 146 +++++++++++++ .../gsQml/parts/part4/images/arrow.png | Bin 0 -> 583 bytes .../part4/pics/qml-texteditor4_texteditor.png | Bin 0 -> 63629 bytes .../gsQml/parts/part4/qml-texteditor4.qmlproject | 16 ++ .../gsQml/parts/part5/TextEditor.qml | 127 +++++++++++ .../gsQml/parts/part5/core/Button.qml | 109 ++++++++++ .../gsQml/parts/part5/core/EditMenu.qml | 110 ++++++++++ .../gsQml/parts/part5/core/FileDialog.qml | 170 +++++++++++++++ .../gsQml/parts/part5/core/FileMenu.qml | 232 +++++++++++++++++++++ .../gsQml/parts/part5/core/MenuBar.qml | 148 +++++++++++++ .../gsQml/parts/part5/core/TextArea.qml | 86 ++++++++ .../gettingStarted/gsQml/parts/part5/core/qmldir | 13 ++ .../gsQml/parts/part5/filedialog/cppPlugins.pro | 17 ++ .../gsQml/parts/part5/filedialog/dialogPlugin.cpp | 57 +++++ .../gsQml/parts/part5/filedialog/dialogPlugin.h | 57 +++++ .../gsQml/parts/part5/filedialog/directory.cpp | 219 +++++++++++++++++++ .../gsQml/parts/part5/filedialog/directory.h | 108 ++++++++++ .../gsQml/parts/part5/filedialog/file.cpp | 56 +++++ .../gsQml/parts/part5/filedialog/file.h | 67 ++++++ .../gsQml/parts/part5/filedialog/qmldir | 1 + .../gsQml/parts/part5/images/arrow.png | Bin 0 -> 583 bytes .../parts/part5/pics/qml-texteditor5_editmenu.png | Bin 0 -> 65123 bytes .../parts/part5/pics/qml-texteditor5_filemenu.png | Bin 0 -> 21367 bytes .../parts/part5/pics/qml-texteditor5_newfile.png | Bin 0 -> 76693 bytes .../gsQml/parts/part5/qml-texteditor5.qmlproject | 18 ++ 56 files changed, 3732 insertions(+) create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part0/Button.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part1/Button.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part1/EditMenu.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part1/FileMenu.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part1/SimpleButton.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_button.png create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_editmenu.png create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_filemenu.png create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_simplebutton.png create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part1/qml-texteditor.qmlproject create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part2/Button.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part2/EditMenu.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part2/FileMenu.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part2/MenuBar.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part2/pics/qml-texteditor2_menubar.png create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part2/qml-texteditor2.qmlproject create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part3/Button.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part3/EditMenu.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part3/FileMenu.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part3/MenuBar.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part3/TextArea.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part3/TextEditor.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part3/images/arrow.png create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part3/pics/qml-texteditor3_texteditor.png create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part3/qml-texteditor3.qmlproject create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part4/Button.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part4/EditMenu.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part4/FileMenu.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part4/MenuBar.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part4/SimpleButton.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part4/TextArea.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part4/TextEditor.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part4/images/arrow.png create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part4/pics/qml-texteditor4_texteditor.png create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part4/qml-texteditor4.qmlproject create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part5/TextEditor.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part5/core/Button.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part5/core/EditMenu.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileDialog.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileMenu.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part5/core/MenuBar.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part5/core/TextArea.qml create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part5/core/qmldir create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/cppPlugins.pro create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.cpp create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.h create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.cpp create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.h create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.cpp create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.h create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/qmldir create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part5/images/arrow.png create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_editmenu.png create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_filemenu.png create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_newfile.png create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part5/qml-texteditor5.qmlproject diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part0/Button.qml b/examples/tutorials/gettingStarted/gsQml/parts/part0/Button.qml new file mode 100644 index 0000000..ffd4be4 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part0/Button.qml @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] +import QtQuick 1.0 + +Rectangle { + id: simplebutton + color: "grey" + width: 150; height: 75 + + Text{ + id: buttonLabel + anchors.centerIn: parent + text: "button label" + } +} +//! [document] diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/Button.qml b/examples/tutorials/gettingStarted/gsQml/parts/part1/Button.qml new file mode 100644 index 0000000..bb70cfd --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part1/Button.qml @@ -0,0 +1,97 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + + //identifier of the item + id: button + + property string label: "button label" + + //these properties act as constants, useable outside this QML file + property int buttonHeight: 75 + property int buttonWidth: 150 + + //the color highlight when the mouse hovers on the rectangle + property color onHoverColor: "gold" + property color borderColor: "white" + + //buttonColor is set to the button's main color + property color buttonColor: "lightblue" + + //set appearance properties + radius: 10 + smooth: true + border{color: "white"; width: 3} + width: buttonWidth; height: buttonHeight + + Text{ + id: buttonLabel + anchors.centerIn: parent + text: label + } + + //buttonClick() is callable and a signal handler, onButtonClick is automatically created + signal buttonClick() + onButtonClick: { + console.log(buttonLabel.text + " clicked" ) + } + + //define the clickable area to be the whole rectangle + MouseArea{ + id: buttonMouseArea + anchors.fill: parent //stretch the area to the parent's dimension + onClicked: buttonClick() + + //if true, then onEntered and onExited called if mouse hovers in the mouse area + //if false, a button must be clicked to detect the mouse hover + hoverEnabled: true + + //display a border if the mouse hovers on the button mouse area + onEntered: parent.border.color = onHoverColor + //remove the border if the mouse exits the button mouse area + onExited: parent.border.color = borderColor + } + + //change the color of the button when pressed + color: buttonMouseArea.pressed ? Qt.darker(buttonColor, 1.5) : buttonColor +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/EditMenu.qml b/examples/tutorials/gettingStarted/gsQml/parts/part1/EditMenu.qml new file mode 100644 index 0000000..460f5e9 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part1/EditMenu.qml @@ -0,0 +1,76 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: editMenu + height: 480; width:1000 + color: "powderblue" + property string menuName:"Edit" + + Rectangle{ + id:actionContainer + color:"transparent" + anchors.centerIn: parent + + width: parent.width; height: parent.height / 5 + Row{ + anchors.centerIn: parent + spacing: parent.width/6 + Button{ + id: loadButton + buttonColor: "lightgrey" + label: "Cut" + } + + Button{ + buttonColor: "grey" + id: saveButton + label: "Paste" + } + Button{ + id: exitButton + label: "Select All" + buttonColor: "darkgrey" + } + } + } +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/FileMenu.qml b/examples/tutorials/gettingStarted/gsQml/parts/part1/FileMenu.qml new file mode 100644 index 0000000..65de4f1 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part1/FileMenu.qml @@ -0,0 +1,91 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: fileMenu + + //the menuName is accessible from outside this QML file + property string menuName: "File" + + //generous amount of screen space that will allow the buttons to fit + height: 480; width:1000 + + color: "#6C646A" + + //a sub-rectangle allows the flexibility of setting the row area + Rectangle{ + id:actionContainer + + //make this rectangle invisible + color:"transparent" + anchors.centerIn: parent + + //the height is a good proportion that creates more space at the top of the row of buttons + width: parent.width; height: parent.height / 5 + + Row{ + anchors.centerIn: parent + spacing: parent.width/6 + Button{ + id: loadButton + buttonColor: "lightgrey" + label: "Load" + } + + Button{ + buttonColor: "grey" + id: saveButton + label: "Save" + } + Button{ + id: exitButton + label: "Exit" + buttonColor: "darkgrey" + + //exit the application if the exitButton is clicked + onButtonClick:{ + Qt.quit() + } + } + } + } +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/SimpleButton.qml b/examples/tutorials/gettingStarted/gsQml/parts/part1/SimpleButton.qml new file mode 100644 index 0000000..5bb50f8 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part1/SimpleButton.qml @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + + //identifier of the item + id: simplebutton + + //the rectangle's fill color + color: "grey" + + //dimensions of the button + width: 150; height: 75 + + //A text element contains functionalities for creating texts + Text { + id: buttonLabel + + //center the text inside the parent + anchors.centerIn: parent + + //text property binds to the label displayed on the button + text: "button label" + } + + //define the clickable area to be the whole rectangle + MouseArea { + id: buttonMouseArea + anchors.fill: parent //anchor all sides of the mouse area to the rectangle's anchors + + //onClicked handles valid mouse button clicks + onClicked: console.log(buttonLabel.text + " clicked" ) + } +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_button.png b/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_button.png new file mode 100644 index 0000000..aab64bc Binary files /dev/null and b/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_button.png differ diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_editmenu.png b/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_editmenu.png new file mode 100644 index 0000000..d3ff66f Binary files /dev/null and b/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_editmenu.png differ diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_filemenu.png b/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_filemenu.png new file mode 100644 index 0000000..f2e2b0d Binary files /dev/null and b/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_filemenu.png differ diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_simplebutton.png b/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_simplebutton.png new file mode 100644 index 0000000..21ce509 Binary files /dev/null and b/examples/tutorials/gettingStarted/gsQml/parts/part1/pics/qml-texteditor1_simplebutton.png differ diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part1/qml-texteditor.qmlproject b/examples/tutorials/gettingStarted/gsQml/parts/part1/qml-texteditor.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part1/qml-texteditor.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part2/Button.qml b/examples/tutorials/gettingStarted/gsQml/parts/part2/Button.qml new file mode 100644 index 0000000..39ac591 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part2/Button.qml @@ -0,0 +1,99 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + + //identifier of the item + id: button + + property string label: "button label" + + //these properties act as constants, useable outside this QML file + property int buttonHeight: 75 + property int buttonWidth: 150 + + //the color highlight when the mouse hovers on the rectangle + property color onHoverColor: "gold" + property color borderColor: "white" + + //buttonColor is set to the button's main color + property color buttonColor: "lightblue" + + //set appearance properties + radius:10 + smooth: true + border{color: "white"; width: 3} + width: buttonWidth; height: buttonHeight + + Text{ + id: buttonLabel + anchors.centerIn: parent + text: label + } + + //buttonClick() is callable and a signal handler, onButtonClick is automatically created + signal buttonClick() + onButtonClick: { + console.log(buttonLabel.text + " clicked" ) + } + + //define the clickable area to be the whole rectangle + MouseArea{ + id: buttonMouseArea + anchors.fill: parent //stretch the area to the parent's dimension + onClicked: buttonClick() + + //if true, then onEntered and onExited called if mouse hovers in the mouse area + //if false, a button must be clicked to detect the mouse hover + hoverEnabled: true + + //display a border if the mouse hovers on the button mouse area + onEntered: parent.border.color = onHoverColor + //remove the border if the mouse exits the button mouse area + onExited: parent.border.color = borderColor + + } + + //change the color of the button when pressed + color: buttonMouseArea.pressed ? Qt.darker(buttonColor, 1.5) : buttonColor + +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part2/EditMenu.qml b/examples/tutorials/gettingStarted/gsQml/parts/part2/EditMenu.qml new file mode 100644 index 0000000..fdd06d5 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part2/EditMenu.qml @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: editMenu + height: 480; width:1000 + color: "powderblue" + property string menuName:"Edit" + + Rectangle{ + id:actionContainer + color:"transparent" + anchors.centerIn: parent + + width: parent.width; height: parent.height / 5 + Row{ + anchors.centerIn: parent + spacing: parent.width/6 + Button{ + id: loadButton + buttonColor: "lightgrey" + label: "Cut" + } + + Button{ + buttonColor: "grey" + id: saveButton + label: "Paste" + } + Button{ + id: exitButton + label: "Select All" + buttonColor: "darkgrey" + } + } + } + +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part2/FileMenu.qml b/examples/tutorials/gettingStarted/gsQml/parts/part2/FileMenu.qml new file mode 100644 index 0000000..bd6669b --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part2/FileMenu.qml @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: fileMenu + + //the menuName is accessible from outside this QML file + property string menuName: "File" + + //generous amount of screen space that will allow the buttons to fit + height: 480; width:1000 + + color: "#6C646A" + + //a sub-rectangle allows the flexibility of setting the row area + Rectangle{ + id:actionContainer + + //make this rectangle invisible + color:"transparent" + anchors.centerIn: parent + + //the height is a good proportion that creates more space at the top of the row of buttons + width: parent.width; height: parent.height / 5 + + Row{ + anchors.centerIn: parent + spacing: parent.width/6 + Button{ + id: loadButton + buttonColor: "lightgrey" + label: "Load" + } + + Button{ + buttonColor: "grey" + id: saveButton + label: "Save" + } + Button{ + id: exitButton + label: "Exit" + buttonColor: "darkgrey" + + //exit the application if the exitButton is clicked + onButtonClick:{ + Qt.quit() + } + } + } + } + +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part2/MenuBar.qml b/examples/tutorials/gettingStarted/gsQml/parts/part2/MenuBar.qml new file mode 100644 index 0000000..8065804 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part2/MenuBar.qml @@ -0,0 +1,140 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: menuBar + width: 1000 + height:300 + + property color fileColor: "thistle" + property color editColor: "powderblue" + + //container for the header and the buttons + Rectangle{ + + id: labelList + height:parent.height/10 + width: parent.width + color: "steelblue" + + //default z is 0, items with higher z values are shown on top of items with lower z values + z: 1 + + //row displays its children in a vertical row + Row{ + anchors.centerIn: parent + spacing:40 + Button{ + height: 20 + width: 50 + label: "File" + id: fileButton + buttonColor : menuListView.currentIndex == 0? fileColor : Qt.darker(fileColor, 1.5) + scale: menuListView.currentIndex == 0? 1.25: 1 + radius: 1 + + //on a button click, change the list's currently selected item to FileMenu + onButtonClick: { + menuListView.currentIndex = 0 + } + } + Button{ + height: 20 + width: 50 + id: editButton + buttonColor : menuListView.currentIndex == 1? editColor : Qt.darker(editColor, 1.5) + scale: menuListView.currentIndex == 1? 1.25: 1 + label: "Edit" + radius: 1 + + //on a button click, change the list's currently selected item to EditMenu + onButtonClick: { + menuListView.currentIndex = 1 + } + + + } + + + } + } + + //a list of visual items already have delegates handling their display + VisualItemModel{ + id: menuListModel + + FileMenu{ + width: menuListView.width + height: menuBar.height + color: fileColor + } + EditMenu{ + color: editColor + width: menuListView.width + height: menuBar.height + + } + } + + //list view will display a model according to a delegate + ListView{ + id: menuListView + anchors.fill:parent + anchors.bottom: parent.bottom + width:parent.width + height: parent.height + + //the model contains the data + model: menuListModel + + //control the movement of the menu switching + snapMode: ListView.SnapOneItem + orientation: ListView.Horizontal + boundsBehavior: Flickable.StopAtBounds + flickDeceleration: 5000 + highlightFollowsCurrentItem: true + highlightMoveDuration:240 + highlightRangeMode: ListView.StrictlyEnforceRange + } + + +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part2/pics/qml-texteditor2_menubar.png b/examples/tutorials/gettingStarted/gsQml/parts/part2/pics/qml-texteditor2_menubar.png new file mode 100644 index 0000000..da959a3 Binary files /dev/null and b/examples/tutorials/gettingStarted/gsQml/parts/part2/pics/qml-texteditor2_menubar.png differ diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part2/qml-texteditor2.qmlproject b/examples/tutorials/gettingStarted/gsQml/parts/part2/qml-texteditor2.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part2/qml-texteditor2.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/Button.qml b/examples/tutorials/gettingStarted/gsQml/parts/part3/Button.qml new file mode 100644 index 0000000..39ac591 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part3/Button.qml @@ -0,0 +1,99 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + + //identifier of the item + id: button + + property string label: "button label" + + //these properties act as constants, useable outside this QML file + property int buttonHeight: 75 + property int buttonWidth: 150 + + //the color highlight when the mouse hovers on the rectangle + property color onHoverColor: "gold" + property color borderColor: "white" + + //buttonColor is set to the button's main color + property color buttonColor: "lightblue" + + //set appearance properties + radius:10 + smooth: true + border{color: "white"; width: 3} + width: buttonWidth; height: buttonHeight + + Text{ + id: buttonLabel + anchors.centerIn: parent + text: label + } + + //buttonClick() is callable and a signal handler, onButtonClick is automatically created + signal buttonClick() + onButtonClick: { + console.log(buttonLabel.text + " clicked" ) + } + + //define the clickable area to be the whole rectangle + MouseArea{ + id: buttonMouseArea + anchors.fill: parent //stretch the area to the parent's dimension + onClicked: buttonClick() + + //if true, then onEntered and onExited called if mouse hovers in the mouse area + //if false, a button must be clicked to detect the mouse hover + hoverEnabled: true + + //display a border if the mouse hovers on the button mouse area + onEntered: parent.border.color = onHoverColor + //remove the border if the mouse exits the button mouse area + onExited: parent.border.color = borderColor + + } + + //change the color of the button when pressed + color: buttonMouseArea.pressed ? Qt.darker(buttonColor, 1.5) : buttonColor + +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/EditMenu.qml b/examples/tutorials/gettingStarted/gsQml/parts/part3/EditMenu.qml new file mode 100644 index 0000000..fdd06d5 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part3/EditMenu.qml @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: editMenu + height: 480; width:1000 + color: "powderblue" + property string menuName:"Edit" + + Rectangle{ + id:actionContainer + color:"transparent" + anchors.centerIn: parent + + width: parent.width; height: parent.height / 5 + Row{ + anchors.centerIn: parent + spacing: parent.width/6 + Button{ + id: loadButton + buttonColor: "lightgrey" + label: "Cut" + } + + Button{ + buttonColor: "grey" + id: saveButton + label: "Paste" + } + Button{ + id: exitButton + label: "Select All" + buttonColor: "darkgrey" + } + } + } + +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/FileMenu.qml b/examples/tutorials/gettingStarted/gsQml/parts/part3/FileMenu.qml new file mode 100644 index 0000000..bd6669b --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part3/FileMenu.qml @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: fileMenu + + //the menuName is accessible from outside this QML file + property string menuName: "File" + + //generous amount of screen space that will allow the buttons to fit + height: 480; width:1000 + + color: "#6C646A" + + //a sub-rectangle allows the flexibility of setting the row area + Rectangle{ + id:actionContainer + + //make this rectangle invisible + color:"transparent" + anchors.centerIn: parent + + //the height is a good proportion that creates more space at the top of the row of buttons + width: parent.width; height: parent.height / 5 + + Row{ + anchors.centerIn: parent + spacing: parent.width/6 + Button{ + id: loadButton + buttonColor: "lightgrey" + label: "Load" + } + + Button{ + buttonColor: "grey" + id: saveButton + label: "Save" + } + Button{ + id: exitButton + label: "Exit" + buttonColor: "darkgrey" + + //exit the application if the exitButton is clicked + onButtonClick:{ + Qt.quit() + } + } + } + } + +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/MenuBar.qml b/examples/tutorials/gettingStarted/gsQml/parts/part3/MenuBar.qml new file mode 100644 index 0000000..8065804 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part3/MenuBar.qml @@ -0,0 +1,140 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: menuBar + width: 1000 + height:300 + + property color fileColor: "thistle" + property color editColor: "powderblue" + + //container for the header and the buttons + Rectangle{ + + id: labelList + height:parent.height/10 + width: parent.width + color: "steelblue" + + //default z is 0, items with higher z values are shown on top of items with lower z values + z: 1 + + //row displays its children in a vertical row + Row{ + anchors.centerIn: parent + spacing:40 + Button{ + height: 20 + width: 50 + label: "File" + id: fileButton + buttonColor : menuListView.currentIndex == 0? fileColor : Qt.darker(fileColor, 1.5) + scale: menuListView.currentIndex == 0? 1.25: 1 + radius: 1 + + //on a button click, change the list's currently selected item to FileMenu + onButtonClick: { + menuListView.currentIndex = 0 + } + } + Button{ + height: 20 + width: 50 + id: editButton + buttonColor : menuListView.currentIndex == 1? editColor : Qt.darker(editColor, 1.5) + scale: menuListView.currentIndex == 1? 1.25: 1 + label: "Edit" + radius: 1 + + //on a button click, change the list's currently selected item to EditMenu + onButtonClick: { + menuListView.currentIndex = 1 + } + + + } + + + } + } + + //a list of visual items already have delegates handling their display + VisualItemModel{ + id: menuListModel + + FileMenu{ + width: menuListView.width + height: menuBar.height + color: fileColor + } + EditMenu{ + color: editColor + width: menuListView.width + height: menuBar.height + + } + } + + //list view will display a model according to a delegate + ListView{ + id: menuListView + anchors.fill:parent + anchors.bottom: parent.bottom + width:parent.width + height: parent.height + + //the model contains the data + model: menuListModel + + //control the movement of the menu switching + snapMode: ListView.SnapOneItem + orientation: ListView.Horizontal + boundsBehavior: Flickable.StopAtBounds + flickDeceleration: 5000 + highlightFollowsCurrentItem: true + highlightMoveDuration:240 + highlightRangeMode: ListView.StrictlyEnforceRange + } + + +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/TextArea.qml b/examples/tutorials/gettingStarted/gsQml/parts/part3/TextArea.qml new file mode 100644 index 0000000..b0bf664 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part3/TextArea.qml @@ -0,0 +1,80 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id:textArea + + width :400 + height:400 + color: "white" + + Flickable{ + id: flickArea + + width: parent.width + height: parent.height + anchors.fill:parent + + function ensureVisible(r){ + if (contentX >= r.x) + contentX = r.x; + else if (contentX+width <= r.x+r.width) + contentX = r.x+r.width-width; + if (contentY >= r.y) + contentY = r.y; + else if (contentY+height <= r.y+r.height) + contentY = r.y+r.height-height; + } + + TextEdit{ + id: textEditor + anchors.fill:parent + width:parent.width; height:parent.height + color:"midnightblue" + focus: true + + wrapMode: TextEdit.Wrap + + onCursorRectangleChanged: flickArea.ensureVisible(cursorRectangle) + } + } +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/TextEditor.qml b/examples/tutorials/gettingStarted/gsQml/parts/part3/TextEditor.qml new file mode 100644 index 0000000..7f0e650 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part3/TextEditor.qml @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + + id: screen + width: 1000; height: 1000 + border.color:"black" + //the screen is partitioned into the MenuBar and TextArea. 1/3 of the screen is assigned to the MenuBar + property int partition: height/3 + + MenuBar{ + id:menuBar + height: partition + width:parent.width + z: 1 + } + + + TextArea{ + id:textArea + anchors.bottom:parent.bottom + y: partition + color: "azure" + height: partition*2 + width:parent.width + } + +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/images/arrow.png b/examples/tutorials/gettingStarted/gsQml/parts/part3/images/arrow.png new file mode 100644 index 0000000..14978c2 Binary files /dev/null and b/examples/tutorials/gettingStarted/gsQml/parts/part3/images/arrow.png differ diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/pics/qml-texteditor3_texteditor.png b/examples/tutorials/gettingStarted/gsQml/parts/part3/pics/qml-texteditor3_texteditor.png new file mode 100644 index 0000000..d0623b5 Binary files /dev/null and b/examples/tutorials/gettingStarted/gsQml/parts/part3/pics/qml-texteditor3_texteditor.png differ diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part3/qml-texteditor3.qmlproject b/examples/tutorials/gettingStarted/gsQml/parts/part3/qml-texteditor3.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part3/qml-texteditor3.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/Button.qml b/examples/tutorials/gettingStarted/gsQml/parts/part4/Button.qml new file mode 100644 index 0000000..36833f5 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part4/Button.qml @@ -0,0 +1,109 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + + //identifier of the item + id: button + + //these properties act as constants, useable outside this QML file + property int buttonHeight: 75 + property int buttonWidth: 150 + + //attaches to the Text element's text content + property string label + property color textColor: buttonLabel.color + + //the color highlight when the mouse hovers on the rectangle + property color onHoverColor: "gold" + property color borderColor: "white" + + //buttonColor is set to the button's main color + property color buttonColor: "lightblue" + + //set appearance properties + radius:10 + smooth: true + border.color: "white" + border.width: 3 + width: buttonWidth; height: buttonHeight + + Text{ + id: buttonLabel + anchors.centerIn: parent + text: label //"button label" //bind the text to the parent's text + } + + //buttonClick() is callable and a signal handler, onButtonClick is automatically created + signal buttonClick() + onButtonClick: { + console.log(buttonLabel.text + " clicked" ) + } + + //define the clickable area to be the whole rectangle + MouseArea{ + id: buttonMouseArea + anchors.fill: parent //stretch the area to the parent's dimension + onClicked: buttonClick() + + //if true, then onEntered and onExited called if mouse hovers in the mouse area + //if false, a button must be clicked to detect the mouse hover + hoverEnabled: true + + //display a border if the mouse hovers on the button mouse area + onEntered: parent.border.color = onHoverColor + //remove the border if the mouse exits the button mouse area + onExited: parent.border.color = borderColor + + } + + //change the color of the button when pressed + color: buttonMouseArea.pressed ? Qt.darker(buttonColor, 1.5) : buttonColor + //animate the color whenever the color property changes + Behavior on color { ColorAnimation{ duration: 55} } + + //scale the button when pressed + scale: buttonMouseArea.pressed ? 1.1 : 1.00 + //Animate the scale property change + Behavior on scale { NumberAnimation{ duration: 55} } + +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/EditMenu.qml b/examples/tutorials/gettingStarted/gsQml/parts/part4/EditMenu.qml new file mode 100644 index 0000000..f0a0e36 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part4/EditMenu.qml @@ -0,0 +1,81 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: editMenu + height: 480; width:1000 + color: "powderblue" + property string menuName:"Edit" + gradient: Gradient{ + GradientStop { position: 0.0; color: "#6A6F70" } + GradientStop { position: 1.0; color: Qt.darker("#6A6D67") } + } + + Rectangle{ + id:actionContainer + color:"transparent" + anchors.centerIn: parent + + width: parent.width; height: parent.height / 5 + Row{ + anchors.centerIn: parent + spacing: parent.width/6 + Button{ + id: loadButton + buttonColor: "lightgrey" + label: "Cut" + } + + Button{ + buttonColor: "grey" + id: saveButton + label: "Paste" + } + Button{ + id: exitButton + label: "Select All" + buttonColor: "darkgrey" + } + } + } + +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/FileMenu.qml b/examples/tutorials/gettingStarted/gsQml/parts/part4/FileMenu.qml new file mode 100644 index 0000000..d257d6a --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part4/FileMenu.qml @@ -0,0 +1,96 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: fileMenu + + //the menuName is accessible from outside this QML file + property string menuName: "File" + + //generous amount of screen space that will allow the buttons to fit + height: 480; width:1000 + + color: "#6C646A" + gradient: Gradient{ + GradientStop { position: 0.0; color: "#6C646A" } + GradientStop { position: 1.0; color: Qt.darker("#6A6D6A") } + } + + //a sub-rectangle allows the flexibility of setting the row area + Rectangle{ + id:actionContainer + + //make this rectangle invisible + color:"transparent" + anchors.centerIn: parent + + //the height is a good proportion that creates more space at the top of the row of buttons + width: parent.width; height: parent.height / 5 + + Row{ + anchors.centerIn: parent + spacing: parent.width/6 + Button{ + id: loadButton + buttonColor: "lightgrey" + label: "Load" + } + + Button{ + buttonColor: "grey" + id: saveButton + label: "Save" + } + Button{ + id: exitButton + label: "Exit" + buttonColor: "darkgrey" + + //exit the application if the exitButton is clicked + onButtonClick:{ + Qt.quit() + } + } + } + } + +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/MenuBar.qml b/examples/tutorials/gettingStarted/gsQml/parts/part4/MenuBar.qml new file mode 100644 index 0000000..5b0dbf8 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part4/MenuBar.qml @@ -0,0 +1,146 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: menuBar + width: 1000 + height:300 + + property color fileColor: "plum" + property color editColor: "powderblue" + + //container for the header and the buttons + Rectangle{ + + id: labelList + height:parent.height/10 + width: parent.width + color: "beige" + gradient: Gradient { + GradientStop { position: 0.0; color: "#8C8F8C" } + GradientStop { position: 0.17; color: "#6A6D6A" } + GradientStop { position: 0.98;color: "#3F3F3F" } + GradientStop { position: 1.0; color: "#0e1B20" } + } + + //default z is 0, items with higher z values are shown on top of items with lower z values + z: 1 + + //row displays its children in a vertical row + Row{ + anchors.centerIn: parent + spacing:40 + Button{ + height: 20 + width: 50 + label: "File" + id: fileButton + buttonColor : menuListView.currentIndex == 0? fileColor : Qt.darker(fileColor, 1.5) + scale: menuListView.currentIndex == 0? 1.25: 1 + radius: 1 + + //on a button click, change the list's currently selected item to FileMenu + onButtonClick: { + menuListView.currentIndex = 0 + } + } + Button{ + height: 20 + width: 50 + id: editButton + buttonColor : menuListView.currentIndex == 1? editColor : Qt.darker(editColor, 1.5) + scale: menuListView.currentIndex == 1? 1.25: 1 + label: "Edit" + radius: 1 + + //on a button click, change the list's currently selected item to EditMenu + onButtonClick: { + menuListView.currentIndex = 1 + } + + + } + + + } + } + + //a list of visual items already have delegates handling their display + VisualItemModel{ + id: menuListModel + + FileMenu{ + width: menuListView.width + height: menuBar.height + color: fileColor + } + EditMenu{ + color: editColor + width: menuListView.width + height: menuBar.height + + } + } + + //list view will display a model according to a delegate + ListView{ + id: menuListView + anchors.fill:parent + anchors.bottom: parent.bottom + width:parent.width + height: parent.height + + //the model contains the data + model: menuListModel + + //control the movement of the menu switching + snapMode: ListView.SnapOneItem + orientation: ListView.Horizontal + boundsBehavior: Flickable.StopAtBounds + flickDeceleration: 5000 + highlightFollowsCurrentItem: true + highlightMoveDuration:240 + highlightRangeMode: ListView.StrictlyEnforceRange + } + + +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/SimpleButton.qml b/examples/tutorials/gettingStarted/gsQml/parts/part4/SimpleButton.qml new file mode 100644 index 0000000..d360faa --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part4/SimpleButton.qml @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: simplebutton + color: "grey" + width: 150; height: 75 + + Text{ + id: buttonLabel + anchors.centerIn: parent + text: "button label" + } + + MouseArea{ + id: buttonMouseArea + anchors.fill: parent + onClicked: console.log(buttonLabel.text + " clicked" ) + } +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/TextArea.qml b/examples/tutorials/gettingStarted/gsQml/parts/part4/TextArea.qml new file mode 100644 index 0000000..4eedf34 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part4/TextArea.qml @@ -0,0 +1,80 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id:textArea + + width :400 + height:400 + property color fontColor: "white" + + Flickable{ + id: flickArea + + width: parent.width + height: parent.height + anchors.fill:parent + + function ensureVisible(r){ + if (contentX >= r.x) + contentX = r.x; + else if (contentX+width <= r.x+r.width) + contentX = r.x+r.width-width; + if (contentY >= r.y) + contentY = r.y; + else if (contentY+height <= r.y+r.height) + contentY = r.y+r.height-height; + } + + TextEdit{ + id: textEditor + anchors.fill:parent + width:parent.width; height:parent.height + color:fontColor + focus: true + + wrapMode: TextEdit.Wrap + + onCursorRectangleChanged: flickArea.ensureVisible(cursorRectangle) + } + } +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/TextEditor.qml b/examples/tutorials/gettingStarted/gsQml/parts/part4/TextEditor.qml new file mode 100644 index 0000000..d218bba --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part4/TextEditor.qml @@ -0,0 +1,146 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: screen + width: 1000; height: 1000 + property int partition: height/3 + state: "DRAWER_CLOSED" + + + //Item 1: MenuBar on the top portion of the screen + MenuBar{ + id:menuBar + height: partition + //anchors.top:parent.top + width:parent.width + z:1 + } + + + //Item 2: The editable text area + TextArea{ + id:textArea + y:drawer.height + border.color: Qt.darker(color, 1.4) + border.width: 2 + color: "#3F3F3F" + fontColor: "#DCDCCC" + height: partition*2 + width:parent.width + } + + //Item 3: The drawer handle + Rectangle{ + id:drawer + height:15 + width: parent.width + border.color : "#6A6D6A" + border.width: 1 + + gradient: Gradient { + GradientStop { position: 0.0; color: "#8C8F8C" } + GradientStop { position: 0.17; color: "#6A6D6A" } + GradientStop { position: 0.77; color: "#3F3F3F" } + GradientStop { position: 1.0; color: "#6A6D6A" } + } + + Image{ + id: arrowIcon + source: "images/arrow.png" + anchors.horizontalCenter: parent.horizontalCenter + + Behavior{NumberAnimation{property: "rotation";easing.type: Easing.OutExpo }} + } + + MouseArea{ + id: drawerMouseArea + anchors.fill:parent + onClicked:{ + if (screen.state == "DRAWER_CLOSED"){ + screen.state = "DRAWER_OPEN" + console.log("drawer OPEN") + } + else if (screen.state == "DRAWER_OPEN"){ + screen.state = "DRAWER_CLOSED" + console.log("drawer closed") + } + } + + //if true, then onEntered and onExited called if mouse hovers in the mouse area + //if false, a button must be clicked to detect the mouse hover + hoverEnabled: true + + //display a border if the mouse hovers on the button mouse area + onEntered: parent.border.color = Qt.lighter("#6A6D6A") + //remove the border if the mouse exits the button mouse area + onExited: parent.border.color = "#6A6D6A" + } + + } + states:[ + State{ + name: "DRAWER_OPEN" + PropertyChanges { target: menuBar; y:0} + PropertyChanges { target: textArea; y: partition + drawer.height} + PropertyChanges { target: drawer; y: partition} + PropertyChanges { target: arrowIcon; rotation: 180} + }, + State{ + name: "DRAWER_CLOSED" + PropertyChanges { target: menuBar; y:-partition} + PropertyChanges { target: textArea; y: drawer.height; height: screen.height - drawer.height} + PropertyChanges { target: drawer; y: 0} + PropertyChanges { target: arrowIcon; rotation: 0} + } + + ] + transitions: [ + Transition{ + to: "*" + NumberAnimation { target: textArea; properties: "y, height"; duration: 100; easing.type:Easing.OutExpo } + NumberAnimation { target: menuBar; properties: "y"; duration: 100;easing.type: Easing.OutExpo } + NumberAnimation { target: drawer; properties: "y"; duration: 100;easing.type: Easing.OutExpo } + } + + ] +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/images/arrow.png b/examples/tutorials/gettingStarted/gsQml/parts/part4/images/arrow.png new file mode 100644 index 0000000..14978c2 Binary files /dev/null and b/examples/tutorials/gettingStarted/gsQml/parts/part4/images/arrow.png differ diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/pics/qml-texteditor4_texteditor.png b/examples/tutorials/gettingStarted/gsQml/parts/part4/pics/qml-texteditor4_texteditor.png new file mode 100644 index 0000000..a195fb8 Binary files /dev/null and b/examples/tutorials/gettingStarted/gsQml/parts/part4/pics/qml-texteditor4_texteditor.png differ diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part4/qml-texteditor4.qmlproject b/examples/tutorials/gettingStarted/gsQml/parts/part4/qml-texteditor4.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part4/qml-texteditor4.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/TextEditor.qml b/examples/tutorials/gettingStarted/gsQml/parts/part5/TextEditor.qml new file mode 100644 index 0000000..4adcf05 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/TextEditor.qml @@ -0,0 +1,127 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 +import "core" + +Rectangle { + id: screen + width: 1000; height: 1000 + property int partition: height/3 + state: "DRAWER_CLOSED" + + //Item 1: MenuBar on the top portion of the screen + MenuBar{ + id:menuBar + height: screen.partition; width: screen.width + z:1 + } + //Item 2: The editable text area + TextArea{ + id:textArea + y:drawer.height + color: "#3F3F3F" + fontColor: "#DCDCCC" + height: partition*2; width:parent.width + } + //Item 3: The drawer handle + Rectangle{ + id:drawer + height:15; width: parent.width + border.color : "#6A6D6A" + border.width: 1 + z:1 + gradient: Gradient { + GradientStop { position: 0.0; color: "#8C8F8C" } + GradientStop { position: 0.17; color: "#6A6D6A" } + GradientStop { position: 0.77; color: "#3F3F3F" } + GradientStop { position: 1.0; color: "#6A6D6A" } + } + Image{ + id: arrowIcon + source: "images/arrow.png" + anchors.horizontalCenter: parent.horizontalCenter + + Behavior{NumberAnimation{property: "rotation";easing.type: Easing.OutExpo }} + } + + MouseArea{ + id: drawerMouseArea + anchors.fill:parent + hoverEnabled: true + onEntered: parent.border.color = Qt.lighter("#6A6D6A") + onExited: parent.border.color = "#6A6D6A" + onClicked:{ + if (screen.state == "DRAWER_CLOSED"){ + screen.state = "DRAWER_OPEN" + } + else if (screen.state == "DRAWER_OPEN"){ + screen.state = "DRAWER_CLOSED" + } + } + } + } + + states:[ + State{ + name: "DRAWER_OPEN" + PropertyChanges { target: menuBar; y: 0} + PropertyChanges { target: textArea; y: partition + drawer.height} + PropertyChanges { target: drawer; y: partition} + PropertyChanges { target: arrowIcon; rotation: 180} + }, + State{ + name: "DRAWER_CLOSED" + PropertyChanges { target: menuBar; y:-height; } + PropertyChanges { target: textArea; y: drawer.height; height: screen.height - drawer.height} + PropertyChanges { target: drawer; y: 0} + PropertyChanges { target: arrowIcon; rotation: 0} + } + ] + + transitions: [ + Transition{ + to: "*" + NumberAnimation { target: textArea; properties: "y, height"; duration: 100; easing.type:Easing.OutExpo } + NumberAnimation { target: menuBar; properties: "y"; duration: 100;easing.type: Easing.OutExpo } + NumberAnimation { target: drawer; properties: "y"; duration: 100;easing.type: Easing.OutExpo } + } + ] +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/Button.qml b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/Button.qml new file mode 100644 index 0000000..c0c1f77 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/Button.qml @@ -0,0 +1,109 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + + //identifier of the item + id: button + + //these properties act as constants, useable outside this QML file + property int buttonHeight: 75 + property int buttonWidth: 150 + + //attaches to the Text element's text content + property string label + property color textColor: buttonLabel.color + + //the color highlight when the mouse hovers on the rectangle + property color onHoverColor: "lightsteelblue" + property color borderColor: "transparent" + + //buttonColor is set to the button's main color + property color buttonColor: "lightblue" + + property real labelSize: 14 + //set appearance properties + radius:6 + smooth: true + border.width: 2 + border.color: borderColor + width: buttonWidth; height: buttonHeight + + Text{ + id: buttonLabel + anchors.centerIn: parent + text: label //bind the text to the parent's text + color: "#DCDCCC" + font.pointSize: labelSize + } + + //buttonClick() is callable and a signal handler, onButtonClick is automatically created + signal buttonClick() + + //define the clickable area to be the whole rectangle + MouseArea{ + id: buttonMouseArea + anchors.fill: parent //stretch the area to the parent's dimension + onClicked: buttonClick() + + //if true, then onEntered and onExited called if mouse hovers in the mouse area + //if false, a button must be clicked to detect the mouse hover + hoverEnabled: true + + //display a border if the mouse hovers on the button mouse area + onEntered: parent.border.color = onHoverColor + //remove the border if the mouse exits the button mouse area + onExited: parent.border.color = borderColor + + } + + //change the color of the button when pressed + color: buttonMouseArea.pressed ? Qt.darker(buttonColor, 1.5) : buttonColor + //animate the color whenever the color property changes + Behavior on color { ColorAnimation{ duration: 55} } + + //scale the button when pressed + scale: buttonMouseArea.pressed ? 1.1 : 1.00 + //Animate the scale property change + Behavior on scale { NumberAnimation{ duration: 55} } + +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/EditMenu.qml b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/EditMenu.qml new file mode 100644 index 0000000..4338d25 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/EditMenu.qml @@ -0,0 +1,110 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: editMenu + height: 480; width:1000 + color: "powderblue" + property color buttonBorderColor: "#7A8182" + property color buttonFillColor: "#61BDCACD" + property string menuName:"Edit" + + gradient: Gradient{ + GradientStop { position: 0.0; color: "#6A7570" } + GradientStop { position: 1.0; color: Qt.darker("#6A7570") } + } + + Rectangle{ + id:actionContainer + color:"transparent" + anchors.centerIn: parent + width: parent.width; height: parent.height / 5 + Row{ + anchors.centerIn: parent + spacing: parent.width/9 + Button{ + id: loadButton + buttonColor: buttonFillColor + label: "Copy" + labelSize:16 + borderColor:buttonBorderColor + height: actionContainer.height + width: actionContainer.width/6 + onButtonClick:textArea.copy() + gradient: Gradient { + GradientStop { position: 0.0; color: Qt.lighter(buttonFillColor,1.25) } + GradientStop { position: 0.67; color: Qt.darker(buttonFillColor,1.3) } + } + } + + Button{ + id: saveButton + height: actionContainer.height + width: actionContainer.width/6 + buttonColor: buttonFillColor + label: "Paste" + borderColor:buttonBorderColor + labelSize:16 + onButtonClick:textArea.paste() + gradient: Gradient { + GradientStop { position: 0.0; color: Qt.lighter(buttonFillColor,1.25) } + GradientStop { position: 0.67; color: Qt.darker(buttonFillColor,1.3) } + } + } + Button{ + id: exitButton + label: "Select All" + height: actionContainer.height + width: actionContainer.width/6 + labelSize:16 + buttonColor: buttonFillColor + borderColor:buttonBorderColor + onButtonClick:textArea.selectAll() + gradient: Gradient { + GradientStop { position: 0.0; color: Qt.lighter(buttonFillColor,1.25) } + GradientStop { position: 0.67; color: Qt.darker(buttonFillColor,1.3) } + } + } + } + } + +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileDialog.qml b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileDialog.qml new file mode 100644 index 0000000..af9d82c --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileDialog.qml @@ -0,0 +1,170 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id:dialog + height: 200 * partition; width: 200 + color: "transparent" + + signal selectChanged() + signal notifyRefresh() + onNotifyRefresh:dirView.model = directory.files + + property string selectedFile + property int selectedIndex: 0 + + Rectangle{ + id: dirBox + radius: 10 + anchors.centerIn:parent + height: parent.height -15; width: parent.width -30 + + Rectangle{ + id:header + height:parent.height*0.1 + width: parent.width + radius:3 + z:1 + gradient: Gradient { + GradientStop { position: 0.0; color: "#8C8F8C" } + GradientStop { position: 0.17; color: "#6A6D6A" } + GradientStop { position: 0.98;color: "#3F3F3F" } + GradientStop { position: 1.0; color: "#0e1B20" } + } + Text{ + height: header.height + anchors.centerIn: header + text: "files:" + color: "lightblue" + font.weight: Font.Light + font.italic: true + } + } + GridView{ + id:dirView + width:parent.width + height:parent.height*.9 + anchors.top: header.bottom + cellWidth: 100 + cellHeight: 75 +// highlight: Rectangle { width:cellWidth; height: cellHeight; color: "lightsteelblue" ;radius: 13} + model: directory.files + delegate: dirDelegate + clip: true + highlightMoveDuration:40 + } + + Component{ + id:dirDelegate + + Rectangle{ + id:file + color: "transparent" + width: GridView.view.cellWidth; height: GridView.view.cellHeight + + Text{ + id:fileName + width: parent.width + anchors.centerIn:parent + text: name + color: "#BDCACD" + font.weight: GridView.view.currentIndex == index ? Font.DemiBold : Font.Normal + font.pointSize: GridView.view.currentIndex == index ? 12 : 10 + elide: Text.ElideMiddle + horizontalAlignment: Text.AlignHCenter + } + Rectangle{ + id:selection + width:parent.width; height:parent.height + anchors.centerIn: parent + radius: 10 + smooth: true + scale: GridView.view.currentIndex == index ? 1 : 0.5 + opacity: GridView.view.currentIndex == index ? 1 : 0 + Text{ + id:overlay + width: parent.width + anchors.centerIn:parent + text: name + color: "#696167" + font.weight: Font.DemiBold + font.pointSize: 12 + smooth:true + elide: Text.ElideMiddle + horizontalAlignment: Text.AlignHCenter + } + Behavior on opacity{ NumberAnimation{ duration: 45} } + Behavior on scale { NumberAnimation{ duration: 45} } + gradient: Gradient { + GradientStop { position: 0.0; color: Qt.lighter("lightsteelblue",1.25) } + GradientStop { position: 0.67; color: Qt.darker("lightsteelblue",1.3) } + } + border.color:"lightsteelblue" + border.width:1 + } + MouseArea{ + id:fileMouseArea + anchors.fill:parent + hoverEnabled: true + + onClicked:{ + GridView.view.currentIndex = index + selectedFile = directory.files[index].name + selectChanged() + } + onEntered:{ + fileName.color = "lightsteelblue" + fileName.font.weight = Font.DemiBold + } + onExited: { + fileName.font.weight = Font.Normal + fileName.color = "#BDCACD" + } + } + } + } + gradient: Gradient{ + GradientStop { position: 0.0; color: "#A5333333" } + GradientStop { position: 1.0; color: "#03333333" } + } + } +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileMenu.qml b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileMenu.qml new file mode 100644 index 0000000..1d671e4 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/FileMenu.qml @@ -0,0 +1,232 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: fileMenu + height: 480; width:1000 + property color buttonBorderColor: "#7F8487" + property color buttonFillColor: "#8FBDCACD" + property string fileContent:directory.fileContent + + //the menuName is accessible from outside this QML file + property string menuName: "File" + + //used to divide the screen into parts. + property real partition: 1/3 + + color: "#6C646A" + gradient: Gradient{ + GradientStop { position: 0.0; color: "#6C646A" } + GradientStop { position: 1.0; color: Qt.darker("#6A6D6A") } + } + + Directory{ + id:directory + filename: textInput.text + onDirectoryChanged:fileDialog.notifyRefresh() + } + + Rectangle{ + id:actionContainer + + //make this rectangle invisible + color:"transparent" + anchors.left: parent.left + + //the height is a good proportion that creates more space at the top of the column of buttons + width: fileMenu.width * partition; height: fileMenu.height + + Column{ + anchors.centerIn: parent + spacing: parent.height/32 + Button{ + id: saveButton + label: "Save" + borderColor: buttonBorderColor + buttonColor: buttonFillColor + width: actionContainer.width/ 1.3 + height:actionContainer.height / 8 + labelSize:24 + onButtonClick:{ + directory.fileContent = textArea.textContent + directory.filename = textInput.text + directory.saveFile() + } + gradient: Gradient { + GradientStop { position: 0.0; color: Qt.lighter(buttonFillColor,1.25) } + GradientStop { position: 0.67; color: Qt.darker(buttonFillColor,1.3) } + } + + } + Button{ + id: loadButton + width: actionContainer.width/ 1.3 + height:actionContainer.height/ 8 + buttonColor: buttonFillColor + borderColor: buttonBorderColor + label: "Load" + labelSize:24 + onButtonClick:{ + directory.filename = textInput.text + directory.loadFile() + textArea.textContent = directory.fileContent + } + gradient: Gradient { + GradientStop { position: 0.0; color: Qt.lighter(buttonFillColor,1.25) } + GradientStop { position: 0.67; color: Qt.darker(buttonFillColor,1.3) } + } + } + Button{ + id: newButton + width: actionContainer.width/ 1.3 + height:actionContainer.height/ 8 + buttonColor: buttonFillColor + borderColor: buttonBorderColor + label: "New" + labelSize:24 + onButtonClick:{ + textArea.textContent = "" + textInput.text = "" + } + gradient: Gradient { + GradientStop { position: 0.0; color: Qt.lighter(buttonFillColor,1.25) } + GradientStop { position: 0.67; color: Qt.darker(buttonFillColor,1.3) } + } + + } + Rectangle{ + id: space + width: actionContainer.width/ 1.3 + height:actionContainer.height / 16 + color:"transparent" + } + Button{ + id: exitButton + width: actionContainer.width/ 1.3 + height:actionContainer.height/ 8 + label: "Exit" + labelSize:24 + buttonColor: buttonFillColor + borderColor: buttonBorderColor + onButtonClick:Qt.quit() + gradient: Gradient { + GradientStop { position: 0.0; color: Qt.lighter(buttonFillColor,1.25) } + GradientStop { position: 0.67; color: Qt.darker(buttonFillColor,1.3) } + } + } + } + } + + Rectangle{ + id:dialogContainer + + width: 2*fileMenu.width * partition; height: fileMenu.height + anchors.right:parent.right + color:"transparent" + + Column { + anchors.centerIn: parent + spacing: parent.height /640 + FileDialog{ + id:fileDialog + height: 2*dialogContainer.height * partition; width: dialogContainer.width + onSelectChanged: textInput.text = selectedFile + } + + Rectangle{ + id:lowerPartition + height: dialogContainer.height * partition; width: dialogContainer.width + color: "transparent" + + Rectangle{ + id: nameField + gradient: Gradient{ + GradientStop { position: 0.0; color: "#806F6F6F" } + GradientStop { position: 1.0; color: "#136F6F6F" } + } + + radius: 10 + anchors {centerIn:parent; leftMargin: 15; rightMargin: 15; topMargin: 15} + height: parent.height-15; width: parent.width -20 + border {color:"#4A4A4A"; width:1} + + TextInput{ + id: textInput + z:2 + anchors {bottom: parent.bottom; topMargin: 10; horizontalCenter:parent.horizontalCenter} + width: parent.width - 10 + height: parent.height -10 + font.pointSize: 40 + color:"lightsteelblue" + focus:true + } + Text{ + id: textInstruction + anchors.centerIn:parent + text: "Select file name and press save or load" + font {pointSize: 11; weight:Font.Light; italic: true} + color: "lightblue" + z:2 + opacity: (textInput.text == "") ? 1: 0 + } + Text{ + id:fieldLabel + anchors {top: parent.top; left: parent.left} + text: " file name: " + font {pointSize: 11; weight: Font.Light; italic: true} + color: "lightblue" + z:2 + } + MouseArea{ + anchors.centerIn:parent + width: nameField.width; height: nameField.height + onClicked:{ + textInput.text = "" + textInput.focus = true + textInput.forceFocus() + } + } + } + } + } + } +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/MenuBar.qml b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/MenuBar.qml new file mode 100644 index 0000000..657e5dc --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/MenuBar.qml @@ -0,0 +1,148 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: menuBar + width: 1000; height:300 + color:"transparent" + property color fileColor: "plum" + property color editColor: "powderblue" + + property real partition: 1/10 + + Column{ + anchors.fill: parent + //container for the header and the buttons + z: 1 + Rectangle{ + id: labelList + height:menuBar.height*partition + width: menuBar.width + color: "beige" + gradient: Gradient { + GradientStop { position: 0.0; color: "#8C8F8C" } + GradientStop { position: 0.17; color: "#6A6D6A" } + GradientStop { position: 0.98;color: "#3F3F3F" } + GradientStop { position: 1.0; color: "#0e1B20" } + } + Text{ + height: parent.height + anchors {right: labelRow.left ; verticalCenter: parent.bottom} + text: "menu: " + color: "lightblue" + font {weight: Font.Light; italic: true} + smooth: true + } + + //row displays its children in a vertical row + Row{ + id: labelRow + anchors.centerIn: parent + spacing:40 + Button{ + id: fileButton + height: 20; width: 50 + label: "File" + buttonColor : menuListView.currentIndex == 0? fileColor : Qt.darker(fileColor, 1.5) + scale: menuListView.currentIndex == 0? 1.25: 1 + labelSize: menuListView.currentIndex == 0? 16:12 + radius: 1 + smooth:true + //on a button click, change the list's currently selected item to FileMenu + onButtonClick: menuListView.currentIndex = 0 + gradient: Gradient{ + GradientStop { position: 0.0; color: fileColor } + GradientStop { position: 1.0; color: "#136F6F6F" } + } + } + Button{ + id: editButton + height: 20; width: 50 + buttonColor : menuListView.currentIndex == 1? Qt.darker(editColor, 1.5) : Qt.darker(editColor, 1.9) + scale: menuListView.currentIndex == 1? 1.25: 1 + label: "Edit" + radius: 1 + labelSize: menuListView.currentIndex == 1? 16:12 + smooth:true + //on a button click, change the list's currently selected item to EditMenu + onButtonClick: menuListView.currentIndex = 1 + gradient: Gradient{ + GradientStop { position: 0.0; color: editColor } + GradientStop { position: 1.0; color: "#136F6F6F" } + } + } + } + } + + //list view will display a model according to a delegate + ListView{ + id: menuListView + width:menuBar.width; height: 9*menuBar.height*partition + + //the model contains the data + model: menuListModel + + //control the movement of the menu switching + snapMode: ListView.SnapOneItem + orientation: ListView.Horizontal + boundsBehavior: Flickable.StopAtBounds + flickDeceleration: 5000 + highlightFollowsCurrentItem: true + highlightMoveDuration:240 + highlightRangeMode: ListView.StrictlyEnforceRange + } + } + //a list of visual items already have delegates handling their display + VisualItemModel{ + id: menuListModel + + FileMenu{ + id:fileMenu + width: menuListView.width; height: menuListView.height + color: fileColor + } + EditMenu{ + color: editColor + width: menuListView.width; height: menuListView.height + } + } +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/TextArea.qml b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/TextArea.qml new file mode 100644 index 0000000..d58c159 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/TextArea.qml @@ -0,0 +1,86 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id:textArea + + function paste(){ textEdit.paste()} + function copy() { textEdit.copy() } + function selectAll() { textEdit.selectAll() } + + width :400; height:400 + + property color fontColor: "white" + property alias textContent: textEdit.text + Flickable{ + id: flickArea + width: parent.width; height: parent.height + anchors.fill:parent + + boundsBehavior: Flickable.StopAtBounds + flickableDirection: Flickable.HorizontalFlick + interactive: true + //Will move the text Edit area to make the area visible when scrolled with keyboard strokes + function ensureVisible(r){ + if (contentX >= r.x) + contentX = r.x; + else if (contentX+width <= r.x+r.width) + contentX = r.x+r.width-width; + if (contentY >= r.y) + contentY = r.y; + else if (contentY+height <= r.y+r.height) + contentY = r.y+r.height-height; + } + + TextEdit{ + id: textEdit + anchors.fill:parent + width:parent.width; height:parent.height + color:fontColor + focus: true + wrapMode: TextEdit.Wrap + font.pointSize:10 + onCursorRectangleChanged: flickArea.ensureVisible(cursorRectangle) + selectByMouse: true + } + } +} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/core/qmldir b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/qmldir new file mode 100644 index 0000000..3f22778 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/core/qmldir @@ -0,0 +1,13 @@ + +Button ./Button.qml +FileDialog ./FileDialog.qml +TextArea ./TextArea.qml +TextEditor ./TextEditor.qml +EditMenu ./EditMenu.qml +MenuBar ./MenuBar.qml + +plugin FileDialog ../plugins + + + + diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/cppPlugins.pro b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/cppPlugins.pro new file mode 100644 index 0000000..6247747 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/cppPlugins.pro @@ -0,0 +1,17 @@ +TEMPLATE = lib +CONFIG += qt plugin +QT += declarative + +DESTDIR += ../plugins +OBJECTS_DIR = tmp +MOC_DIR = tmp + +TARGET = FileDialog + +HEADERS += directory.h \ + file.h \ + dialogPlugin.h + +SOURCES += directory.cpp \ + file.cpp \ + dialogPlugin.cpp diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.cpp b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.cpp new file mode 100644 index 0000000..7ea44ce --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.cpp @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "dialogPlugin.h" +#include "directory.h" +#include "file.h" +#include + +void DialogPlugin::registerTypes(const char *uri){ + + //register the class Directory into QML as a "Directory" element version 1.0 + qmlRegisterType(uri, 1, 0, "Directory"); + qmlRegisterType(uri,1,0,"File"); + + //qRegisterMetaType > ("QDeclarativeListProperty"); + +} + +//FileDialog is the plugin name (same as the TARGET in the project file) and DialogPlugin is the plugin classs +Q_EXPORT_PLUGIN2(FileDialog, DialogPlugin); \ No newline at end of file diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.h b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.h new file mode 100644 index 0000000..188e070 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.h @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef DIALOGPLUGIN_H +#define DIALOGPLUGIN_H + +#include + +class DialogPlugin : public QDeclarativeExtensionPlugin +{ + Q_OBJECT + + public: + //registerTypes is inherited from QDeclarativeExtensionPlugin + void registerTypes(const char *uri); + +}; + +#endif + diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.cpp b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.cpp new file mode 100644 index 0000000..cddfa03 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.cpp @@ -0,0 +1,219 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "directory.h" +#include + +/* +Directory constructor + +Initialize the saves directory and creates the file list +*/ +Directory::Directory(QObject *parent) : QObject(parent) +{ + + + m_dir.cd( QDir::currentPath()); + + //go to the saved directory. if not found, create save directory + m_saveDir = "saves"; + if (m_dir.cd(m_saveDir) == 0){ + m_dir.mkdir(m_saveDir); + m_dir.cd(m_saveDir); + } + m_filterList << "*.txt"; + + refresh(); +} + +/* +Directory::filesNumber +Return the number of Files +*/ +int Directory:: filesCount() const{ + return m_fileList.size(); +} + +/* +Function called to append data onto list property +*/ +void appendFiles(QDeclarativeListProperty * property, File * file){ + //Do nothing. can't add to a directory using this method +} + +/* +Function called to retrieve file in the list using an index +*/ +File* fileAt(QDeclarativeListProperty * property, int index){ + return static_cast< QList *>(property->data)->at(index); +} + +/* +Returns the number of files in the list +*/ +int filesSize(QDeclarativeListProperty * property){ + return static_cast< QList *>(property->data)->size(); +} + +/* +Function called to empty the list property contents +*/ +void clearFilesPtr(QDeclarativeListProperty *property){ + return static_cast< QList *>(property->data)->clear(); +} + +/* +Returns the list of files as a QDeclarativeListProperty. +*/ +QDeclarativeListProperty Directory::files(){ + + refresh(); +// return QDeclarativeListProperty(this,m_filePtrList); //not recommended in the docs + return QDeclarativeListProperty( this, &m_fileList, &appendFiles, &filesSize, &fileAt, &clearFilesPtr ); +} + +/* +Return te name of the currently selected file +*/ +QString Directory::filename() const{ + return currentFile.name(); +} + +/* +Return the file's content as a string. +*/ +QString Directory::fileContent() const{ + return m_fileContent; +} + +/* +Set the file name of the current file +*/ +void Directory::setFilename(const QString &str){ + if(str != currentFile.name()){ + currentFile.setName(str); + emit filenameChanged(); + } +} + +/* +Set the content of the file as a string +*/ +void Directory::setFileContent(const QString &str){ + if(str != m_fileContent){ + m_fileContent = str; + emit fileContentChanged(); + } +} + +/* +Called from QML to save the file using the filename and file content. +Saving makes sure that the file has a .txt extension. +*/ +void Directory::saveFile(){ + + if(currentFile.name().size() == 0){ + qWarning()<< "Empty filename. no save"; + return; + } + + QString extendedName = currentFile.name(); + if(!currentFile.name().endsWith(".txt")){ + extendedName.append(".txt"); + } + + QFile file( m_dir.filePath(extendedName) ); + if (file.open(QFile::WriteOnly | QFile::Truncate)){ + QTextStream outStream(&file); + outStream << m_fileContent; + } + file.close(); + refresh(); + emit directoryChanged(); +} + +/* +Load the contents of a file. +Only loads files with a .txt extension +*/ +void Directory::loadFile(){ + + m_fileContent.clear(); + QString extendedName = currentFile.name(); + if(!currentFile.name().endsWith(".txt")){ + extendedName.append(".txt"); + } + + QFile file( m_dir.filePath(extendedName) ); + if (file.open(QFile::ReadOnly )){ + QTextStream inStream(&file); + + QString line; + do{ + line = inStream.read(75); + m_fileContent.append(line); + }while (!line .isNull()); + } + file.close(); +} + +/* +Reloads the content of the files list. This is to ensure that the newly +created files are added onto the list. +*/ +void Directory::refresh(){ + m_dirFiles = m_dir.entryList(m_filterList,QDir::Files,QDir::Name); + m_fileList.clear(); + + File * file; + for(int i = 0; i < m_dirFiles.size() ; i ++){ + + file = new File(); + + if(m_dirFiles.at(i).endsWith(".txt")){ + QString name = m_dirFiles.at(i); + file->setName( name.remove(".txt",Qt::CaseSensitive)); + } + else{ + file->setName(m_dirFiles.at(i)); + } + m_fileList.append(file); + } +} \ No newline at end of file diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.h b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.h new file mode 100644 index 0000000..417df68 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/directory.h @@ -0,0 +1,108 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef DIRECTORY_H +#define DIRECTORY_H + +#include "file.h" + +#include +#include +#include +#include +#include + +class Directory : public QObject{ + + Q_OBJECT + + //number of files in the directory + Q_PROPERTY(int filesCount READ filesCount) + + //list property containing file names as QString + Q_PROPERTY(QDeclarativeListProperty files READ files CONSTANT ) + + //file name of the text file to read/write + Q_PROPERTY(QString filename READ filename WRITE setFilename NOTIFY filenameChanged) + + //text content of the file + Q_PROPERTY(QString fileContent READ fileContent WRITE setFileContent NOTIFY fileContentChanged) + + public: + Directory(QObject *parent = 0); + + //properties' read functions + int filesCount() const; + QString filename() const; + QString fileContent() const; + QDeclarativeListProperty files(); + + //properties' write functions + void setFilename(const QString &str); + void setFileContent(const QString &str); + + //accessible from QML + Q_INVOKABLE void saveFile(); + Q_INVOKABLE void loadFile(); + + signals: + void directoryChanged(); + void filenameChanged(); + void fileContentChanged(); + + private: + QDir m_dir; + QStringList m_dirFiles; + File currentFile; + QString m_saveDir; + QStringList m_filterList; + + //contains the file data in QString format + QString m_fileContent; + + //Registered to QML in a plugin. Accessible from QML as a property of Directory + QList m_fileList; + + //refresh content of the directory + void refresh(); +}; + + +#endif diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.cpp b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.cpp new file mode 100644 index 0000000..f4a360a --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.cpp @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "file.h" + +File::File(QObject *parent) : QObject(parent) +{ + m_name = ""; +} + +QString File::name() const{ + return m_name; +} +void File::setName(const QString &str){ + if(str != m_name){ + m_name = str; + emit nameChanged(); + } +} \ No newline at end of file diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.h b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.h new file mode 100644 index 0000000..b27a143 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/file.h @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef FILE_H +#define FILE_H + + +#include +#include + +class File : public QObject{ + + Q_OBJECT + + Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) + + public: + File(QObject *parent = 0); + + QString name() const; + void setName(const QString &str); + + signals: + void nameChanged(); + + private: + QString m_name; +}; + +#endif \ No newline at end of file diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/qmldir b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/qmldir new file mode 100644 index 0000000..c2b27da --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/qmldir @@ -0,0 +1 @@ +plugin FileDialog plugins diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/images/arrow.png b/examples/tutorials/gettingStarted/gsQml/parts/part5/images/arrow.png new file mode 100644 index 0000000..14978c2 Binary files /dev/null and b/examples/tutorials/gettingStarted/gsQml/parts/part5/images/arrow.png differ diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_editmenu.png b/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_editmenu.png new file mode 100644 index 0000000..27feed5 Binary files /dev/null and b/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_editmenu.png differ diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_filemenu.png b/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_filemenu.png new file mode 100644 index 0000000..4d8f9f2 Binary files /dev/null and b/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_filemenu.png differ diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_newfile.png b/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_newfile.png new file mode 100644 index 0000000..680acfe Binary files /dev/null and b/examples/tutorials/gettingStarted/gsQml/parts/part5/pics/qml-texteditor5_newfile.png differ diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/qml-texteditor5.qmlproject b/examples/tutorials/gettingStarted/gsQml/parts/part5/qml-texteditor5.qmlproject new file mode 100644 index 0000000..ed034df --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/qml-texteditor5.qmlproject @@ -0,0 +1,18 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + directory: "core" + directory: "filedialog" + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + importPaths: [ " ./plugins " ] +} -- cgit v0.12 From 9d1b4359fc602e85412d1b6d60243d2e65bc5f59 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 6 Oct 2010 16:45:10 +0200 Subject: Doc: Renamed a project file. Task-number: QTBUG-14238 --- .../gsQml/parts/part5/filedialog/cppPlugins.pro | 17 ----------------- .../gsQml/parts/part5/filedialog/filedialog.pro | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 17 deletions(-) delete mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/cppPlugins.pro create mode 100644 examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.pro diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/cppPlugins.pro b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/cppPlugins.pro deleted file mode 100644 index 6247747..0000000 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/cppPlugins.pro +++ /dev/null @@ -1,17 +0,0 @@ -TEMPLATE = lib -CONFIG += qt plugin -QT += declarative - -DESTDIR += ../plugins -OBJECTS_DIR = tmp -MOC_DIR = tmp - -TARGET = FileDialog - -HEADERS += directory.h \ - file.h \ - dialogPlugin.h - -SOURCES += directory.cpp \ - file.cpp \ - dialogPlugin.cpp diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.pro b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.pro new file mode 100644 index 0000000..6247747 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.pro @@ -0,0 +1,17 @@ +TEMPLATE = lib +CONFIG += qt plugin +QT += declarative + +DESTDIR += ../plugins +OBJECTS_DIR = tmp +MOC_DIR = tmp + +TARGET = FileDialog + +HEADERS += directory.h \ + file.h \ + dialogPlugin.h + +SOURCES += directory.cpp \ + file.cpp \ + dialogPlugin.cpp -- cgit v0.12 From bf5d0fa36d257b6deb8531f9b80bbdae07a69434 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 23 Sep 2010 11:00:11 +0200 Subject: My Qt 4.7.1 changes (cherry picked from commit 77b9b5dc93662d505b2c69211d001e5672d8a2cb) --- dist/changes-4.7.1 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index c8b26c2..fd5a9f2 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -40,6 +40,15 @@ QtCore QtGui ----- + - QGraphicsWidget + * [QTBUG-13188] Make sure a font that has propagated from a parent can + be set on a QPainter. + + + - QStaticText + * [QTBUG-12614] Fix crash with zero-width string. + * [QTBUG-12540] Fix rendering of large glyphs with OpenGL2 paint engine. + QtDBus ------ -- cgit v0.12 From c3c4e685361dfc8aa609dac9a3ef0545acdfc01f Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Thu, 23 Sep 2010 11:15:45 +0200 Subject: my changes for 4.7.1 (cherry picked from commit f2be9f394972edffa0eebc9c30fe00a4fce81abc) --- dist/changes-4.7.1 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index fd5a9f2..30c2efd 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -60,6 +60,10 @@ QtMultimedia QtNetwork --------- + - QSslConfiguration + * [QTBUG-13265] fix crash with empty configuration + - QSslCertificate + * [QTBUG-12489] support dates > 2049 QtOpenGL @@ -81,6 +85,12 @@ QtSql QtSvg ----- +QtXmlPatterns +------------- + - XML Schema internals: + * [QTBUG-11559] Only parse 3 digits of time fraction + + Qt Plugins ---------- -- cgit v0.12 From 5abb4bdbaf306c7b40e4f18728a4a2a6768094ec Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Thu, 23 Sep 2010 12:22:15 +0200 Subject: Update the changelog with the SSE work done for Qt 4.7.1 (cherry picked from commit 9c97aa4946a1d6b22bdcd8475f32b5ead7051976) --- dist/changes-4.7.1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index 30c2efd..d3ae280 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -26,6 +26,11 @@ Optimizations - Improved the benchmarking library's timing code * Uses a faster access to the system clock + - Introduction of SSSE3 for alpha blending of images. + + - On x86 and 86_64, the memory access has been improved for alpha blending + and for some composition functions. + * See list of Important Behavior Changes below @@ -107,7 +112,7 @@ Qt for Unix (X11 and Mac OS X) Qt for Linux/X11 ---------------- - + - The configure script now detects all vector extensions of x86 and x86_64 Qt for Windows -------------- @@ -115,7 +120,7 @@ Qt for Windows Qt for Mac OS X --------------- - + - The configure script now detects all vector extensions of x86 and x86_64 Qt for Symbian -------------- -- cgit v0.12 From 6daecd573fb3663bf3f6305a8cf73bea52e7eede Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 23 Sep 2010 15:49:46 +0200 Subject: Changelog: 4.7.1 (uic/Designer). (cherry picked from commit f160e04ebe2926d09c20ef3960def1388a566db7) --- dist/changes-4.7.1 | 1 + 1 file changed, 1 insertion(+) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index d3ae280..7676368 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -134,6 +134,7 @@ Qt for Symbian - Designer - uic + * Improve warnings and error reports **************************************************************************** * Important Behavior Changes * -- cgit v0.12 From c770ad8124bce99b45bdbe72ebaa067fb17bf23d Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Fri, 24 Sep 2010 12:27:34 +0200 Subject: Updated changes-4.7.1. (cherry picked from commit bed3d1eca213f24dae13cbd4cda4df94d9f0738b) --- dist/changes-4.7.1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index 7676368..fdfecb7 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -100,7 +100,9 @@ QtXmlPatterns Qt Plugins ---------- - + - Jpeg image IO plugin + * [QTBUG-13653] Fixed infinite loop when loading jpeg without EOI marker + from memory. **************************************************************************** * Platform Specific Changes * -- cgit v0.12 From f843d4e1703533d208b538a615abf8ea20bfa836 Mon Sep 17 00:00:00 2001 From: Lasse Holmstedt Date: Fri, 24 Sep 2010 12:44:17 +0200 Subject: dist/changes: QML Debugging changes (cherry picked from commit baa2d6bee64e458f547b290d7cd1acdfc6292e05) --- dist/changes-4.7.1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index fdfecb7..5f33ce8 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -95,7 +95,11 @@ QtXmlPatterns - XML Schema internals: * [QTBUG-11559] Only parse 3 digits of time fraction - +QtDeclarative +------------- + - QML debugging: + * [QTBUG-5162] The debugger is now activated with -qmljsdebugger command + line arg to enable support for platforms without environment variables Qt Plugins ---------- -- cgit v0.12 From fece9253d419ad450ee87a033c3623ee7b3f6ed1 Mon Sep 17 00:00:00 2001 From: axis Date: Mon, 27 Sep 2010 16:34:04 +0200 Subject: Added my changes to the changelog. (cherry picked from commit fbf91dc787c15f561686cd708735ff8f45984aba) --- dist/changes-4.7.1 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index 5f33ce8..29b4d41 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -131,6 +131,18 @@ Qt for Mac OS X Qt for Symbian -------------- + - configure + * [QTBUG-11671] Fixed audio-backend detection in configure tests. + + - qmake + * [QTBUG-13523] Added support for using -L notation in the LIBS variable + when building with the symbian/linux-armcc or gcce mkspec. + + - QInputContext + * [QTBUG-12949] Fixed a bug where passwords would not be committed when + confirming. + * [QTBUG-13472] Fixed crash in input methods when using symbols menu and + numbers only. **************************************************************************** -- cgit v0.12 From a69fd02e4e27a669b41b3c00619b242c55211994 Mon Sep 17 00:00:00 2001 From: Zeno Albisser Date: Tue, 28 Sep 2010 09:44:06 -0400 Subject: Added note to changes-4.7.1 Reviewed-by: Frederik Gladhorn (cherry picked from commit 02de74f0b2d443e410154e96321357cfe2ef9aad) --- dist/changes-4.7.1 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index 29b4d41..d1ef791 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -55,6 +55,15 @@ QtGui * [QTBUG-12540] Fix rendering of large glyphs with OpenGL2 paint engine. + - QPinchGesture + * The scaleFactor and totalScaleFactor now represent a value that allows + an object to track a touchpoint during a Pinch Gesture even when using + sequences for zooming. + Therefor the scale factors are initialized to 1.0 and for every new + sequence the totalScaleFactor is multiplied with the scaleFactor of the + new sequence. + + QtDBus ------ -- cgit v0.12 From 51f31b1b41ceb4dfde5779787c64aeb79c054ac9 Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Wed, 29 Sep 2010 17:02:06 +1000 Subject: My changes. (cherry picked from commit 2b70a3a6d5ebef36e90f52076c5d942d8cc171d7) --- dist/changes-4.7.1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index d1ef791..2c22fea 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -78,6 +78,8 @@ QtNetwork * [QTBUG-13265] fix crash with empty configuration - QSslCertificate * [QTBUG-12489] support dates > 2049 + - Bearer Management + * Improved reliability on Symbian and Maemo. QtOpenGL -- cgit v0.12 From 2b38401f6a68a6d087368075f9ec4ac90a552fbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 29 Sep 2010 09:49:29 +0200 Subject: Updated changes-4.7.1 (cherry picked from commit 2d1e3b9778328046d3ba94dd51c37c507e618721) --- dist/changes-4.7.1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index 2c22fea..bbf8c3d 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -48,7 +48,10 @@ QtGui - QGraphicsWidget * [QTBUG-13188] Make sure a font that has propagated from a parent can be set on a QPainter. - + + - QPainter + * [QTBUG-13429] Fixed scale point drawing with square cap in the raster + engine, plus some potential floating point overflows in the rasterizer. - QStaticText * [QTBUG-12614] Fix crash with zero-width string. -- cgit v0.12 From 1af6507a8fed1e9606566e5e595191968d6002b2 Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Wed, 29 Sep 2010 10:13:22 +0200 Subject: Changes done for 4.7.1 (cherry picked from commit 583ca462caf656af17bea1c3f05d88ae7785ae91) --- dist/changes-4.7.1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index bbf8c3d..a18c4ad 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -141,6 +141,10 @@ Qt for Windows Qt for Mac OS X --------------- - The configure script now detects all vector extensions of x86 and x86_64 + * [QTBUG-10500] Fixed a bug which causes the QMainWindow geometry + to be calculated wrongly, when used with native toolbars. + * [QTBUG-13878] Application menu entries can now also be translated + using the QMenuBar context. Qt for Symbian -------------- -- cgit v0.12 From 33e4a7dcacc9e413bd6f19c8281e2855e4142490 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Wed, 29 Sep 2010 10:22:26 +0200 Subject: added my and Jan-Arve's change to changelog for 4.7.1 (cherry picked from commit c1a9c50d53ae41b19bdcd7930eec0805498e01c6) --- dist/changes-4.7.1 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index a18c4ad..e442951 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -41,6 +41,9 @@ Optimizations QtCore ------ + - QLibrary + * [QT-3825] System libraries are only loaded from the system directories + QtGui ----- @@ -66,6 +69,12 @@ QtGui sequence the totalScaleFactor is multiplied with the scaleFactor of the new sequence. + - QLineEdit + * [QTBUG-13520] Fixed the scrolling of text with right alignment + + - QPixmap + * [QTBUG-12560] Fixed a regression preventing loading images without extensions + QtDBus ------ @@ -136,6 +145,8 @@ Qt for Linux/X11 Qt for Windows -------------- + - Drag & Drop: + * [QTBUG-13787] Fixed a possible crash with mingw Qt for Mac OS X -- cgit v0.12 From f4e76aee217ddd6931516c17e62f0f4c086c1b7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Wed, 29 Sep 2010 11:22:53 +0200 Subject: My 4.7.1 changes. (cherry picked from commit 99340cf858731f531af29be1e1368e4991e8564e) --- dist/changes-4.7.1 | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index e442951..2be9760 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -55,7 +55,7 @@ QtGui - QPainter * [QTBUG-13429] Fixed scale point drawing with square cap in the raster engine, plus some potential floating point overflows in the rasterizer. - + - QStaticText * [QTBUG-12614] Fix crash with zero-width string. * [QTBUG-12540] Fix rendering of large glyphs with OpenGL2 paint engine. @@ -96,7 +96,9 @@ QtNetwork QtOpenGL -------- - + - QGL2PaintEngineEx + * Fixed drawing a large number of glyphs with the same font on systems + with small texure size limits. QtOpenVG -------- @@ -148,6 +150,13 @@ Qt for Windows - Drag & Drop: * [QTBUG-13787] Fixed a possible crash with mingw + - QPrinter + * [QTBUG-12263] Strokes were in some cases not printed with the correct + color under Windows. + + - QGLWidget + * [QTBUG-13141] Fixed multi-sampling support for ATI based cards under + Windows. Qt for Mac OS X --------------- -- cgit v0.12 From 0738176c2c3ec1fa411b8a0ae49a70d1d7ab8963 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Wed, 29 Sep 2010 11:34:29 +0200 Subject: my contributions to dist/changes-4.7.1 (cherry picked from commit 3519840ef2c5cb7cbc5b32ffc9976a8638187d64) --- dist/changes-4.7.1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index 2be9760..ea2e949 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -44,6 +44,8 @@ QtCore - QLibrary * [QT-3825] System libraries are only loaded from the system directories + - QUuid + * [QTBUG-11213] QUuid::createUuid() should not generate identical sequences on UNIX QtGui ----- @@ -139,7 +141,8 @@ Qt Plugins Qt for Unix (X11 and Mac OS X) ------------------------------ - + - Event System: + * [QT_3553] Fix invalid memory write during recursive timer activation. Qt for Linux/X11 ---------------- @@ -147,6 +150,9 @@ Qt for Linux/X11 Qt for Windows -------------- + - Event System: + * [QTBUG-12721] Fix Qt applications freezing until mouse/keyboard events occur. + - Drag & Drop: * [QTBUG-13787] Fixed a possible crash with mingw -- cgit v0.12 From d2acbb699efae07f761762909884822aa9629718 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 29 Sep 2010 11:33:18 +0200 Subject: Update changelog (cherry picked from commit 8050dc45c8c9a134875196dcddf010d4194fd974) --- dist/changes-4.7.1 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index ea2e949..dbfa0b3 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -41,12 +41,21 @@ Optimizations QtCore ------ + - Containers + * [QTBUG-13079] Fix assingment of a container included in the container itself + - QLibrary * [QT-3825] System libraries are only loaded from the system directories + - QUuid * [QTBUG-11213] QUuid::createUuid() should not generate identical sequences on UNIX + - QEventDispatcherUnix + * [QTBUG-13633] Do not process too many timer events if other events need + to be processed first + + QtGui ----- @@ -57,6 +66,7 @@ QtGui - QPainter * [QTBUG-13429] Fixed scale point drawing with square cap in the raster engine, plus some potential floating point overflows in the rasterizer. + * Optimized pixmap drawing with SmoothPixmapTransform. - QStaticText * [QTBUG-12614] Fix crash with zero-width string. @@ -77,6 +87,9 @@ QtGui - QPixmap * [QTBUG-12560] Fixed a regression preventing loading images without extensions + - QTreeView + * [QTBUG-13567] Do not scroll to top if last item is removed + QtDBus ------ @@ -117,6 +130,10 @@ QtSql QtSvg ----- +QtXml +----- + * Fixed a crash when parsing invalid tag names. + QtXmlPatterns ------------- - XML Schema internals: @@ -127,6 +144,10 @@ QtDeclarative - QML debugging: * [QTBUG-5162] The debugger is now activated with -qmljsdebugger command line arg to enable support for platforms without environment variables + * Various improvements to ease debugging in creator + - QDeclarativeImageProvider: + * Fixed memory leak + * Improved concurrency when using in assynchronus mode. Qt Plugins ---------- @@ -198,6 +219,9 @@ Qt for Symbian - uic * Improve warnings and error reports + - moc + * Show an error if NOTIFY refer to a wrong signal in Q_PROPERTY + **************************************************************************** * Important Behavior Changes * **************************************************************************** -- cgit v0.12 From cbfdce47d2e348341358d308bfaea9ba603421fe Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 29 Sep 2010 13:58:51 +0200 Subject: updated changes-4.7.1 (cherry picked from commit 0ce33ebfa8b99c2988b56d0157ddc039a9ab06ae) --- dist/changes-4.7.1 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index dbfa0b3..c68f9e0 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -197,11 +197,19 @@ Qt for Symbian -------------- - configure + * [QTBUG-4586] Fixed wrong paths in include/ActiveQt/headers.pri. * [QTBUG-11671] Fixed audio-backend detection in configure tests. - qmake * [QTBUG-13523] Added support for using -L notation in the LIBS variable when building with the symbian/linux-armcc or gcce mkspec. + * [QTBUG-12851] Fix assertion on Windows when DESTDIR is empty in static + libs. + * [QTBUG-12802] Fix vcxproj generator when using /Fd in QMAKE_CXXFLAGS. + * [QTBUG-13080] vcxproj generator: fix bug when using CharacterSet=1 in + .pro file. + * [QTBUG-13081] vc[x]proj generators: support /MAP option without file + name. - QInputContext * [QTBUG-12949] Fixed a bug where passwords would not be committed when @@ -209,6 +217,10 @@ Qt for Symbian * [QTBUG-13472] Fixed crash in input methods when using symbols menu and numbers only. +Qt for Windows CE +----------------- + - Gui + * [QTBUG-8408] Show the [X] button on Windows mobile when maximizing. **************************************************************************** * Tools * -- cgit v0.12 From 4bb9c55b0105aebfe9004fc82585ab72d5149675 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Wed, 29 Sep 2010 14:31:46 +0200 Subject: My changelog entries for 4.7.1 (cherry picked from commit 646c37a670b101487a76b1e787fd298187b49430) --- dist/changes-4.7.1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index c68f9e0..e9458c9 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -107,6 +107,10 @@ QtNetwork * [QTBUG-12489] support dates > 2049 - Bearer Management * Improved reliability on Symbian and Maemo. + - IPv6 + * Disable on Symbian until OpenC properly supports it + - QNetworkAccessManager + * [QTBUG-12285] Crash fix related to aborted uploads QtOpenGL -- cgit v0.12 From 6978061fdfbaf97b1b887e43b2f4d0ac7f2b2890 Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Thu, 30 Sep 2010 15:00:47 +1000 Subject: connman backend (cherry picked from commit ba698e20b32defcb0840293fc4ac5948f7c190c9) --- dist/changes-4.7.1 | 1 + 1 file changed, 1 insertion(+) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index e9458c9..993e596 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -107,6 +107,7 @@ QtNetwork * [QTBUG-12489] support dates > 2049 - Bearer Management * Improved reliability on Symbian and Maemo. + * Added connman/meego backend. - IPv6 * Disable on Symbian until OpenC properly supports it - QNetworkAccessManager -- cgit v0.12 From 745bc005d988daee0df2a31951fc6b80851d8ad5 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Thu, 30 Sep 2010 18:03:43 +1000 Subject: Add declarative changelog entries for 4.7.1 Task-number: Reviewed-by: Yann Bodson (cherry picked from commit 753d366ced1a62a97d5207eb2708817efc35bc4d) --- dist/changes-4.7.1 | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index 993e596..9a3e543 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -146,10 +146,97 @@ QtXmlPatterns QtDeclarative ------------- + - QML language + * [QTBUG-13799] QML core module renamed to QtQuick to decouple it from Qt releases. + Old "import Qt 4.7" will co-exist with "import QtQuick 1.0' at least during Qt 4.7 releases. + * [QTBUG-13047] Support passing QObject derived types to QML methods + * [QTBUG-12837] Support JS "in" operator on QML objects + * [QTBUG-13045] Prevent calling deleteLater() from QML + * [QTBUG-13043] Ignore non-scriptable properties in QML + * [QTBUG-13114] Don't double call classBegin() + * [QTBUG-12946] Ensure the onDestruction handlers are called before the expressions are cleared + * [QTBUG-12599] Re-enabled script program caching on Symbian + * [QTBUG-13374] Don't modify the signal order on the second dynamic meta object pass + * Support for qsTrId and meta-data in comments for QML - QML debugging: * [QTBUG-5162] The debugger is now activated with -qmljsdebugger command line arg to enable support for platforms without environment variables * Various improvements to ease debugging in creator + - AnchorAnimation + * [QTBUG-13398] Fix AnchorAnimation for multiple AnchorChanges with dependancies + - AnchorChanges + * [QTBUG-11834] Restore any absolute geometry changed by AnchorChanges when returning to the base state + - Component + * [QTBUG-13170] Complete Component::createObject() creation after setting the parent + - GridView + * [QTBUG-13166] GridView.view property should not be writable + - Flickable + * [QTBUG-13095] Ensure Flickable visibleArea is updated when view height changes + * [QTBUG-13176] Avoid Flickable view jumping when drag threashold is exceeded + * [QTBUG-13078] Fix poor flicking behavior with slower flicks + * Handle QGraphicsWidgets in Flickable + - FocusScope + * [QTBUG-12649] Make sure onFocusChanged is correctly emitted for items in a FocusScope. + - FontLoader + * [QTBUG-13419] Don't add the same font to the font database multiple times + - ListModel + * [QTBUG-12363] Modifying an object returned by ListModel.get(0) didn't update the view + * [QTBUG-13666] Calling set() and setProperty() on ListModel from a WorkerScript didn't update the view + * Fix Worker ListModel to emit the right signal when items change + * Fix crash with invalid role indexes + * improved ListModel error messages + - ListView + * [QTBUG-13664] Models with a single role didn't always update correctly + * [QTBUG-13543] Ensure flickable velocity is updated when view is moved by setCurrentIndex + * [QTBUG-12664] Ensure highlight is positioned correctly in positionViewAtIndex() + * [QTBUG-13166] Fix ListView.view attached property with VisualItemModel + * [QTBUG-13039] Fix crash in synchronization of ListModel in WorkerThread + * [QTBUG-11341] Flicking a ListView sometimes made it loose focus + * [QTBUG-13166] ListView.view property should not be writable + - PathView + * [QTBUG-13689] Moving items in a PathView caused PathView.onPath to be set to false + * [QTBUG-13687] PathView didn't accept mouse events, preventing it from working in a Flickable + * [QTBUG-13416] Fix PathView item position on insertion and removal + * [QTBUG-13017] Fix PathView when setting an empty model that is later filled + * [QTBUG-12747] PathView required some diagonal movement before a drag was initiated + - Positioners + * made positioners work with QGraphicsWidgets + - PropertyChanges + * [QTBUG-12559] Correctly apply PropertyChanges when entering an extended state directly from the base state + - VisualDataModel + * [QTBUG-13754] Fixed a crash when updating a property in ListModel with multiple roles + * [QTBUG-13038] Fix VisualDataModel model update handling when rootIndex is specified + * [QTBUG-13146] Handle layoutChanged() properly in QML views + - XmlListModel + * [QTBUG-13041] XmlListModel thread was left hanging on Symbian application exit + - ParentChange + * [QTBUG-13554] ParentChange fails to apply rotation changes of exactly 180 degrees + - MouseArea + * [QTBUG-12250] When onDoubleClicked: is handled don't emit a second onPressed/onClicked + - Image + * [QTBUG-13454] Changing the Image 'source' no longer goes through the 'Loading' state if the image is cached. + * [QTBUG-13383] Do not reset sourceSize when changing image source url + * [QTBUG-13002] Setting one dimension of the sourceSize should set the other dimensio + * [QTBUG-12302] Fix remote image url redirects are done in the right thread + * Ensure all image states are updated before emitting statusChanged signals + - NumberAnimation + * [QTBUG-12805] Clear previous animation data for non-triggering animations + - Repeater + * [QTBUG-12905] Emit countChanged where appropriate in Repeater + - SmoothedAnimation + * [QTBUG-12336] Update running animations if a SmoothedAnimation is changed + - SpringAnimation + * [QTBUG-13044] SpringAnimation velocity animation stop logic was fragile + - Text + * [QTBUG-13453] Fix jerky scrolling caused by unnecessary repaints of Text element + * [QTBUG-13142] Fix alignment of shadow for rich text when using text styles + * [QTBUG-11002] Improve QML text rendering when LCD smoothing is enabled for OS X + - TextInput + * [QTBUG-11127] Fix autoScroll implementation + - XmlHttpRequest + * [QTBUG-13117] Fix responseText to check the charset encoding field and also to not assume that the data is xml + - WebView + * [QTBUG-13342] Ensure WebView gets focus when an editable node is clicked on - QDeclarativeImageProvider: * Fixed memory leak * Improved concurrency when using in assynchronus mode. @@ -239,6 +326,11 @@ Qt for Windows CE - moc * Show an error if NOTIFY refer to a wrong signal in Q_PROPERTY + - QML Viewer + * [QTBUG-13347] Paused orientation sensors in Qml Viewer when the application window is not active to save device battery + * [QTBUG-11019] Add a menu option to open remote files in the QML viewer + * QML Viewer is deployed under QtDemos folder instead of QtExamples folder in Symbian application menu + **************************************************************************** * Important Behavior Changes * **************************************************************************** -- cgit v0.12 From 42e1282f210d9a9a30b02c274af60edf3d785de9 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Thu, 30 Sep 2010 11:00:33 +0200 Subject: Update changes (cherry picked from commit 7d5afd371d634e35192ab27f65c6dc895f7bbb5c) --- dist/changes-4.7.1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index 9a3e543..2c25699 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -90,6 +90,8 @@ QtGui - QTreeView * [QTBUG-13567] Do not scroll to top if last item is removed + - QGtkStyle + * [QTBUG-13125] Fixed a regression with custom itemview background color. QtDBus ------ -- cgit v0.12 From c3d2287f3bd9a3a0bb00fdc3f6214a4bdf76b01d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Thu, 30 Sep 2010 16:46:26 +0200 Subject: Some 4.7.1 changes. (cherry picked from commit 72fd8399aa36395e41f497fff79842496d6f9b03) --- dist/changes-4.7.1 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index 2c25699..2d79ac1 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -62,6 +62,16 @@ QtGui - QGraphicsWidget * [QTBUG-13188] Make sure a font that has propagated from a parent can be set on a QPainter. + * [QT-3808] Issues when applying effects in combination with ItemHasNoContents flag. + + - QGraphicsItem + * [QTBUG-3633, QT-3828] Wrong children bounding rect when applying effects. + + - QGraphicsEffect + * [QT-3633] Wrong bounding rect. + + - QGraphicsScene + * [QT-3674] Spurious assert triggered from render(). - QPainter * [QTBUG-13429] Fixed scale point drawing with square cap in the raster -- cgit v0.12 From 5ebb9bca00f401fc3657cc95a2cfafae5a14916e Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 7 Oct 2010 15:28:40 +0200 Subject: Doc: Marked some new properties as internal for now. --- src/gui/kernel/qgesture.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/gui/kernel/qgesture.cpp b/src/gui/kernel/qgesture.cpp index 5725a22..e3339c4 100644 --- a/src/gui/kernel/qgesture.cpp +++ b/src/gui/kernel/qgesture.cpp @@ -260,6 +260,27 @@ QGesture::GestureCancelPolicy QGesture::gestureCancelPolicy() const /*! \property QPanGesture::acceleration + \brief the acceleration in the motion of the touch point for this gesture +*/ + +/*! + \property QPanGesture::horizontalVelocity + \brief the horizontal component of the motion of the touch point for this + gesture + \since 4.7.1 + \internal + + \sa verticalVelocity, acceleration +*/ + +/*! + \property QPanGesture::verticalVelocity + \brief the vertical component of the motion of the touch point for this + gesture + \since 4.7.1 + \internal + + \sa horizontalVelocity, acceleration */ /*! @@ -633,6 +654,12 @@ void QPinchGesture::setRotationAngle(qreal value) */ /*! + \property QSwipeGesture::velocity + \since 4.7.1 + \internal +*/ + +/*! \internal */ QSwipeGesture::QSwipeGesture(QObject *parent) -- cgit v0.12 From 0ffaf436d3a90a2f8c6cd81e70ba94f47539f4d3 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 7 Oct 2010 15:32:55 +0200 Subject: Doc: Re-added a link to the Qt site related to testing tools. --- doc/src/development/qtestlib.qdoc | 25 +++++++++++++------------ doc/src/qt-webpages.qdoc | 4 ++-- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/doc/src/development/qtestlib.qdoc b/doc/src/development/qtestlib.qdoc index 23d6670..8e2089a 100644 --- a/doc/src/development/qtestlib.qdoc +++ b/doc/src/development/qtestlib.qdoc @@ -32,7 +32,7 @@ \ingroup frameworks-technologies \ingroup qt-basic-concepts - + \keyword qtestlib The QTestLib framework, provided by Nokia, is a tool for unit @@ -40,10 +40,6 @@ all the functionality commonly found in unit testing frameworks as well as extensions for testing graphical user interfaces. - Table of contents: - - \tableofcontents - \section1 QTestLib Features QTestLib is designed to ease the writing of unit tests for Qt @@ -88,6 +84,10 @@ \o Custom types can easily be added to the test data and test output. \endtable + \note For higher-level GUI and application testing needs, please + see the \l{Partner Directory} for Qt testing products provided by + Nokia partners. + \section1 QTestLib API @@ -213,17 +213,17 @@ \endlist \section2 Creating a Benchmark - + To create a benchmark, follow the instructions for creating a test and then add a QBENCHMARK macro to the test function that you want to benchmark. - + \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 12 - + The code inside the QBENCHMARK macro will be measured, and possibly also repeated several times in order to get an accurate measurement. This depends on the selected measurement back-end. Several back-ends are available. They can be selected on the command line: - + \target testlib-benchmarking-measurement \table @@ -243,7 +243,7 @@ \o -eventcounter \o All platforms \endtable - + In short, walltime is always available but requires many repetitions to get a useful result. Tick counters are usually available and can provide @@ -255,7 +255,7 @@ Event counting is available on all platforms and it provides the number of events that were received by the event loop before they are sent to their corresponding targets (this might include non-Qt events). - + \note Depending on the device configuration, Tick counters on the Windows CE platform may not be as fine-grained, compared to other platforms. Devices that do not support high-resolution timers default to @@ -334,7 +334,7 @@ The CPU tick counters used for benchmarking is licensed under the following license: (from src/testlib/3rdparty/cycle.h) - + \legalese Copyright (c) 2003, 2006 Matteo Frigo\br Copyright (c) 2003, 2006 Massachusetts Institute of Technology @@ -365,6 +365,7 @@ \brief A short introduction to testing with QTestLib. \contentspage QTestLib Manual \nextpage {Chapter 1: Writing a Unit Test}{Chapter 1} + \ingroup best-practices \title QTestLib Tutorial diff --git a/doc/src/qt-webpages.qdoc b/doc/src/qt-webpages.qdoc index 9947d7b..05817df 100644 --- a/doc/src/qt-webpages.qdoc +++ b/doc/src/qt-webpages.qdoc @@ -46,8 +46,8 @@ */ /*! - \externalpage http://qt.nokia.com/products/add-on-products/add-on-products/ - \title Third-Party Tools + \externalpage http://qt.nokia.com/services-partners/partners/partner-directory + \title Partner Directory */ /*! -- cgit v0.12 From 86d121aebedfa2dec1affa5879e4274780f2cc28 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 7 Oct 2010 15:34:22 +0200 Subject: Doc: Fixed qdoc warnings. --- src/declarative/graphicsitems/qdeclarativepath.cpp | 2 +- src/declarative/qml/qdeclarativeinfo.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativepath.cpp b/src/declarative/graphicsitems/qdeclarativepath.cpp index d526688..966c51b 100644 --- a/src/declarative/graphicsitems/qdeclarativepath.cpp +++ b/src/declarative/graphicsitems/qdeclarativepath.cpp @@ -871,7 +871,7 @@ void QDeclarativePathCubic::addToPath(QPainterPath &path) */ /*! - \qmlproperty real value + \qmlproperty real PathPercent::value The proporation of items that should be laid out up to this point. This value should always be higher than the last value specified diff --git a/src/declarative/qml/qdeclarativeinfo.cpp b/src/declarative/qml/qdeclarativeinfo.cpp index c6560dd..56c0599 100644 --- a/src/declarative/qml/qdeclarativeinfo.cpp +++ b/src/declarative/qml/qdeclarativeinfo.cpp @@ -55,7 +55,8 @@ QT_BEGIN_NAMESPACE \fn QDeclarativeInfo qmlInfo(const QObject *object) \relates QDeclarativeEngine - \brief Prints warnings messages that include the file and line number for QML types. + Prints warning messages that include the file and line number for the + specified QML \a object. When QML types display warning messages, it improves traceability if they include the QML file and line number on which the -- cgit v0.12 From 6a23ac7ea68bc87ebceb58c28c398d3f364a3a1f Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 7 Oct 2010 15:36:22 +0200 Subject: Doc: Fixed links to the online BSD license information. --- doc/src/getting-started/examples.qdoc | 3 ++- doc/src/legal/opensourceedition.qdoc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc index 398eee8..aa0b695 100644 --- a/doc/src/getting-started/examples.qdoc +++ b/doc/src/getting-started/examples.qdoc @@ -53,7 +53,8 @@ deliberately show off Qt's features. You might want to look at these as well. - These examples are provided under the terms of the \l{BSD License}. + These examples are provided under the terms of the + \l{New and Modified BSD Licenses}{Modified BSD License}. \section1 Examples by Functional Area diff --git a/doc/src/legal/opensourceedition.qdoc b/doc/src/legal/opensourceedition.qdoc index e3a3e27..602e6d3 100644 --- a/doc/src/legal/opensourceedition.qdoc +++ b/doc/src/legal/opensourceedition.qdoc @@ -46,7 +46,7 @@ that are compatible with these free software licenses. Additionally, the \l{Qt Examples}{examples} included with Qt are provided under - the terms of the \l{BSD License}. + the terms of the \l{New and Modified BSD Licenses}{Modified BSD License}. The support of open source with the Open Source Versions of Qt has enabled large successful software projects like KDE to thrive, with thousands of developers -- cgit v0.12 From 509dedfe7b8af7bfb8b583dd3d672b5285b044f2 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 7 Oct 2010 17:15:56 +0200 Subject: Doc: Fixed qdoc warnings. --- doc/src/classes/phonon-api.qdoc | 50 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/doc/src/classes/phonon-api.qdoc b/doc/src/classes/phonon-api.qdoc index a429e5a..6c9c8de 100644 --- a/doc/src/classes/phonon-api.qdoc +++ b/doc/src/classes/phonon-api.qdoc @@ -4114,7 +4114,7 @@ */ /*! - \fn Phonon::VideoWidget::snapshot() + \fn Phonon::VideoWidget::snapshot() const \since 4.7 Returns a snapshot of the current frame shown in the widget. @@ -4312,6 +4312,16 @@ */ /*! + \class Phonon::VideoWidgetInterface44 + \inmodule Phonon + \since 4.7 +*/ + +/*! + \fn Phonon::VideoWidgetInterface44::snapshot() const +*/ + +/*! \typedef Phonon::VideoWidgetInterfaceLatest \inmodule Phonon \since 4.7 @@ -5076,6 +5086,22 @@ */ /*! + \fn int Phonon::AudioDataOutput::sampleRate() const + + Returns the sample rate measured in Hertz, as reported by the backend. + If the backend is unavailable -1 is returned. +*/ + +/*! + \fn void Phonon::AudioDataOutput::endOfMedia(int remainingSamples) + + This signal is emitted before the final dataReady() signal is emitted for + a media. The \a remainingSamples value sent by the signal contains the + number of samples that will be sent in the final dataReady() signal for + the media. +*/ + +/*! \fn Phonon::AudioDataOutput::dataReady(const QMap > &data) This signal is emitted whenever there is data available to read. The @@ -5084,13 +5110,28 @@ */ /*! + \fn Phonon::AudioDataOutputPrivate::AudioDataOutputPrivate() + \internal +*/ + +/*! \fn Phonon::AudioDataOutputInterface::~AudioDataOutputInterface() Destroys the data interface. */ /*! - \fn Phonon::AudioDataOutputInterface::frontendObject() + \fn Phonon::AudioDataOutputInterface::frontendObject() const + \internal +*/ + +/*! + \fn Phonon::AudioDataOutputInterface::setFrontendObject(AudioDataOutput *) + \internal +*/ + +/*! + \fn Phonon::GlobalConfigPrivate::GlobalConfigPrivate() \internal */ @@ -5098,3 +5139,8 @@ \fn Phonon::GlobalConfigPrivate::~GlobalConfigPrivate() \internal */ + +/*! + \fn Phonon::SwiftSlider::~SwiftSlider() + \internal +*/ -- cgit v0.12 From ba7bec67c4ff68efa0abf3e204c39324fd6caf55 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 7 Oct 2010 17:49:00 +0200 Subject: Doc: Renamed an external reference to work around an auto-linking issue. --- doc/src/external-resources.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/external-resources.qdoc b/doc/src/external-resources.qdoc index 3041046..7d1b5bb 100644 --- a/doc/src/external-resources.qdoc +++ b/doc/src/external-resources.qdoc @@ -436,7 +436,7 @@ /*! \externalpage https://developer.mozilla.org/en/JavaScript - \title JavaScript + \title JavaScript Resources */ /*! -- cgit v0.12 From f447ae026637a75d565e9347eb19f33d09557039 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 7 Oct 2010 19:07:06 +0200 Subject: Doc: Fixed warnings caused by an earlier change. Made docs consistent. Change b65a598e0c580585bd16babfd46967b0f4cf8931 broke some links. --- doc/src/platforms/emb-deployment.qdoc | 2 +- doc/src/platforms/emb-install.qdoc | 6 +++--- doc/src/platforms/emb-qvfb.qdoc | 4 ++-- doc/src/platforms/emb-running.qdoc | 2 +- doc/src/platforms/mac-differences.qdoc | 2 +- doc/src/platforms/qt-embedded-linux.qdoc | 2 +- doc/src/platforms/symbian-introduction.qdoc | 12 ++++++------ doc/src/platforms/wince-customization.qdoc | 2 +- doc/src/platforms/wince-introduction.qdoc | 6 +++--- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/doc/src/platforms/emb-deployment.qdoc b/doc/src/platforms/emb-deployment.qdoc index 6b22ba4..9a36097 100644 --- a/doc/src/platforms/emb-deployment.qdoc +++ b/doc/src/platforms/emb-deployment.qdoc @@ -58,7 +58,7 @@ directory relative to the path set using the \c -prefix parameter when running the \c configure script; ensure that this is a sensible path in the target device environment. See the - \l {Installing Qt on Embedded Linux#Step 3: Building the + \l {Installing Qt for Embedded Linux#Step 3: Building the Library}{installation} documentation for more details. \section1 Environment Variables diff --git a/doc/src/platforms/emb-install.qdoc b/doc/src/platforms/emb-install.qdoc index 11392b4..b5b408a 100644 --- a/doc/src/platforms/emb-install.qdoc +++ b/doc/src/platforms/emb-install.qdoc @@ -28,10 +28,10 @@ /*! \page qt-embedded-install.html - \title Installing Qt on Embedded Linux + \title Installing Qt for Embedded Linux \ingroup qt-embedded-linux \ingroup installation - \brief How to install Qt on Embedded Linux. + \brief How to install Qt for Embedded Linux. This document describes how to install \l{Qt for Embedded Linux} in your development environment: @@ -152,7 +152,7 @@ \endlist Note that the virtual framebuffer requires a Qt for X11 - installation. See \l {Installing Qt on X11 Platforms} for details. + installation. See \l {Installing Qt for X11 Platforms} for details. The Linux framebuffer, on the other hand, is enabled by default on all modern Linux distributions. For information on older versions, diff --git a/doc/src/platforms/emb-qvfb.qdoc b/doc/src/platforms/emb-qvfb.qdoc index 4be2f64..418d2d2 100644 --- a/doc/src/platforms/emb-qvfb.qdoc +++ b/doc/src/platforms/emb-qvfb.qdoc @@ -40,8 +40,8 @@ QVFb is an X11 application supplied with Qt for X11 that provides a virtual framebuffer for Qt for Embedded Linux to use. To use it, - you need to \l{Installing Qt on X11 Platforms}{configure and - install Qt on X11 platforms} appropriately. Further requirements + you need to \l{Installing Qt for X11 Platforms}{configure and + install Qt for X11 platforms} appropriately. Further requirements can be found in the \l{Qt for Embedded Linux Requirements} document. diff --git a/doc/src/platforms/emb-running.qdoc b/doc/src/platforms/emb-running.qdoc index 269f4f3..12222a6 100644 --- a/doc/src/platforms/emb-running.qdoc +++ b/doc/src/platforms/emb-running.qdoc @@ -63,7 +63,7 @@ \row \o Provided that the environment variables are adjusted properly - during the \l {Installing Qt on Embedded Linux}{installation process}, you + during the \l {Installing Qt for Embedded Linux}{installation process}, you should see the \l {Text Edit} demo appear. It might be that the hardware drivers must be specified explicitly diff --git a/doc/src/platforms/mac-differences.qdoc b/doc/src/platforms/mac-differences.qdoc index dfcecca..8436043 100644 --- a/doc/src/platforms/mac-differences.qdoc +++ b/doc/src/platforms/mac-differences.qdoc @@ -32,7 +32,7 @@ \ingroup platform-specific This file outlines known issues and possible workarounds when - using Qt on Mac OS X. Contact Qt's technical support team if you find + using Qt for Mac OS X. Contact Qt's technical support team if you find additional issues which are not covered here. (See also the document \l{qtmac-as-native.html} {Qt is Mac OS X Native}.) diff --git a/doc/src/platforms/qt-embedded-linux.qdoc b/doc/src/platforms/qt-embedded-linux.qdoc index 553c4b1..cd20917 100644 --- a/doc/src/platforms/qt-embedded-linux.qdoc +++ b/doc/src/platforms/qt-embedded-linux.qdoc @@ -67,7 +67,7 @@ \o \list \o \l {Qt for Embedded Linux Architecture}{Architecture Overview} - \o \l {Installing Qt on Embedded Linux}{Installation} + \o \l {Installing Qt for Embedded Linux}{Installation} \o \l {Running Qt for Embedded Linux Applications}{Running Applications} \o \l {Qt for Embedded Linux Examples}{Examples} \endlist diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc index 8932747..7bc5303 100644 --- a/doc/src/platforms/symbian-introduction.qdoc +++ b/doc/src/platforms/symbian-introduction.qdoc @@ -29,7 +29,7 @@ \group qtsymbian \title Qt for the Symbian platform \ingroup qt-embedded - \brief Documents related to Qt on the Symbian platform + \brief Documents related to Qt for the Symbian platform Qt for Symbian is a C++ framework for GUI and application development for embedded devices running Symbian. Qt for Symbian provides all @@ -42,14 +42,14 @@ \o \list \o \l {Qt for the Symbian platform Requirements} - \o \l {Installing Qt on the Symbian platform from a Binary Package} - \o \l {Installing Qt on the Symbian platform} + \o \l {Installing Qt for the Symbian platform from a Binary Package} + \o \l {Installing Qt for the Symbian platform} \o \l {The Symbian platform - Introduction to Qt}{Introduction to using Qt} \endlist \o \list \o \l {Exception Safety with Symbian} - \o \l {Platform Notes - Symbian} {Qt for the Symbian platform - state of support} + \o \l {Platform and Compiler Notes - Symbian} {Qt for the Symbian platform - state of support} \o \l {qmake Platform Notes#Symbian platform} {Qt for Symbian extensions for qmake} \o \l {Symbian Platform Security Requirements} {Symbian Platform Security Requirements} \endlist @@ -93,10 +93,10 @@ \section1 Installing Qt and Running Demos - Follow the instructions found in \l{Installing Qt on the Symbian platform from a Binary Package} + Follow the instructions found in \l{Installing Qt for the Symbian platform from a Binary Package} to learn how to install Qt using a binary package and how to build and run Qt demos. - Follow the instructions found in \l{Installing Qt on the Symbian platform} to learn how to install Qt using + Follow the instructions found in \l{Installing Qt for the Symbian platform} to learn how to install Qt using using source package and how to build and run the Qt demos. \section1 Building Your Own Applications diff --git a/doc/src/platforms/wince-customization.qdoc b/doc/src/platforms/wince-customization.qdoc index a674350..b3b9170 100644 --- a/doc/src/platforms/wince-customization.qdoc +++ b/doc/src/platforms/wince-customization.qdoc @@ -33,7 +33,7 @@ When working with a custom SDK for Windows CE, Qt provides an easy way to add support for it to your development environment. The following is - a tutorial that covers how to create a specification for Qt on Windows + a tutorial that covers how to create a specification for Qt for Windows CE platforms. \tableofcontents diff --git a/doc/src/platforms/wince-introduction.qdoc b/doc/src/platforms/wince-introduction.qdoc index cd66242..2e9da59 100644 --- a/doc/src/platforms/wince-introduction.qdoc +++ b/doc/src/platforms/wince-introduction.qdoc @@ -29,7 +29,7 @@ \group qtce \title Qt for Windows CE \ingroup qt-embedded - \brief Documents related to Qt on Windows CE + \brief Documents related to Qt for Windows CE Qt for Windows CE is a C++ framework for GUI and application development for embedded devices running Windows CE. It runs on a variety of processors, @@ -41,7 +41,7 @@ \o \list \o \l {Qt for Windows CE Requirements} - \o \l {Installing Qt on Windows CE} + \o \l {Installing Qt for Windows CE} \o \l {Windows CE - Introduction to using Qt}{Introduction to using Qt} \endlist \o @@ -81,7 +81,7 @@ \section1 Installing Qt - Follow the instructions found in \l{Installing Qt on Windows CE}. + Follow the instructions found in \l{Installing Qt for Windows CE}. \section1 Building your own applications -- cgit v0.12 From 6b75ccad5829571eb6df9a0bbb05be2ac1480032 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 7 Oct 2010 19:10:07 +0200 Subject: Doc: Fixed warnings caused by an earlier change. Made docs consistent. Related to change f447ae026637a75d565e9347eb19f33d09557039. --- doc/src/development/qtestlib.qdoc | 2 +- doc/src/getting-started/installation.qdoc | 8 ++++---- doc/src/qt4-intro.qdoc | 2 +- doc/src/sql-programming/sql-driver.qdoc | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/src/development/qtestlib.qdoc b/doc/src/development/qtestlib.qdoc index 0379027..e53957f 100644 --- a/doc/src/development/qtestlib.qdoc +++ b/doc/src/development/qtestlib.qdoc @@ -320,7 +320,7 @@ host computer and the device. Thus header files and libraries are needed to compile cetest and QtRemote successfully. - Prior to \l{Installing Qt on Windows CE}{installation} of Qt, you need to set your + Prior to \l{Installing Qt for Windows CE}{installation} of Qt, you need to set your \c INCLUDE and \c LIB environment variables properly. A default installation of Windows Mobile 5 for Pocket PC can be obtained by: diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index c6e79d9..8f6f16a 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -40,7 +40,7 @@ for your platform from the following list. */ /*! \page install-x11.html -\title Installing Qt on X11 Platforms +\title Installing Qt for X11 Platforms \ingroup installation \brief How to install Qt on platforms with X11. \previouspage Installation @@ -151,7 +151,7 @@ for your platform from the following list. /*! \page install-win.html -\title Installing Qt on Windows +\title Installing Qt for Windows \ingroup installation \brief How to install Qt on Windows. \previouspage Installation @@ -269,7 +269,7 @@ for your platform from the following list. */ /*! \page install-mac.html -\title Installing Qt on Mac OS X +\title Installing Qt for Mac OS X \ingroup installation \brief How to install Qt on Mac OS X. \previouspage Installation @@ -563,7 +563,7 @@ in the \l{Qt for the Symbian platform Requirements} document. This document describes how to install and configure Qt for the Symbian platform from scratch. If you are using pre-built binaries, follow -the instructions given in the \l{Installing Qt on the Symbian platform from a +the instructions given in the \l{Installing Qt for the Symbian platform from a Binary Package} document. \section1 Step 1: Set Up the Development Environment diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc index 7d55f82..2384051 100644 --- a/doc/src/qt4-intro.qdoc +++ b/doc/src/qt4-intro.qdoc @@ -157,7 +157,7 @@ \l{QtUiTools}{dynamic user interface building}. \o New \l{Proxy Models}{proxy models} to enable view-specific sorting and filtering of data displayed using item views. - \o Support for \l{Installing Qt on Mac OS X}{universal binaries} on Mac OS X. + \o Support for \l{Installing Qt for Mac OS X}{universal binaries} on Mac OS X. \o Additional features for developers using \l{QtOpenGL}{OpenGL}, such as support for pixel and sample buffers. \o A flexible \l{QSyntaxHighlighter}{syntax highlighting class} based on the diff --git a/doc/src/sql-programming/sql-driver.qdoc b/doc/src/sql-programming/sql-driver.qdoc index 21b106a..9c99ad2 100644 --- a/doc/src/sql-programming/sql-driver.qdoc +++ b/doc/src/sql-programming/sql-driver.qdoc @@ -153,7 +153,7 @@ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 3 - After installing Qt, as described in the \l{Installing Qt on X11 + After installing Qt, as described in the \l{Installing Qt for X11 Platforms} document, you also need to install the plugin in the standard location: @@ -478,7 +478,7 @@ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 13 - After installing Qt, as described in the \l{Installing Qt on X11 Platforms} document, + After installing Qt, as described in the \l{Installing Qt for X11 Platforms} document, you also need to install the plugin in the standard location: \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 14 @@ -565,7 +565,7 @@ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 18 - After installing Qt, as described in the \l{Installing Qt on X11 Platforms} document, + After installing Qt, as described in the \l{Installing Qt for X11 Platforms} document, you also need to install the plugin in the standard location: \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 19 @@ -638,7 +638,7 @@ \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 21 - After installing Qt, as described in the \l{Installing Qt on X11 Platforms} document, + After installing Qt, as described in the \l{Installing Qt for X11 Platforms} document, you also need to install the plugin in the standard location: \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 22 -- cgit v0.12 From 2a4c0afc95d1cbed3161efd43bb781758bc7566d Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 7 Oct 2010 19:15:59 +0200 Subject: Doc: Fixed snippet reference for the Getting Started QML guide. Related to change 96226ad15202770f72e257d1a75654be9582326c. --- doc/src/getting-started/gettingstartedqml.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/getting-started/gettingstartedqml.qdoc b/doc/src/getting-started/gettingstartedqml.qdoc index 065628a..c555627 100644 --- a/doc/src/getting-started/gettingstartedqml.qdoc +++ b/doc/src/getting-started/gettingstartedqml.qdoc @@ -81,7 +81,7 @@ In QML, the basic visual item is the \l {Rectangle}{Rectangle} element. The \c Rectangle element has properties to control the element's appearance and location. - \snippet examples/tutorials/gettingStarted/gsQml/core/Button.qml document + \snippet examples/tutorials/gettingStarted/gsQml/parts/part0/Button.qml document First, the \c { import QtQuick 1.0 } allows the qmlviewer tool to import the QML elements we will later use. This line must exist for every QML file. Notice that the version -- cgit v0.12 From 3973481089f9101668c20a9317b759e09a784070 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 7 Oct 2010 19:19:15 +0200 Subject: Doc: Fixed qdoc warnings. --- src/declarative/util/qlistmodelinterface.cpp | 8 ++------ src/plugins/accessible/widgets/simplewidgets.cpp | 6 +++--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/declarative/util/qlistmodelinterface.cpp b/src/declarative/util/qlistmodelinterface.cpp index acf4dd6..1e2dfb7 100644 --- a/src/declarative/util/qlistmodelinterface.cpp +++ b/src/declarative/util/qlistmodelinterface.cpp @@ -46,6 +46,7 @@ QT_BEGIN_NAMESPACE /*! \internal \class QListModelInterface + \since 4.7 \brief The QListModelInterface class can be subclassed to provide C++ models to QDeclarativeGraphics Views This class is comprised primarily of pure virtual functions which @@ -70,15 +71,10 @@ QT_BEGIN_NAMESPACE Returns the number of data entries in the model. */ -/*! \fn QHash QListModelInterface::data(int index, const QList& roles) const +/*! \fn QVariant QListModelInterface::data(int index, int role) const Returns the data at the given \a index for the specified \a roles. */ -/*! \fn bool QListModelInterface::setData(int index, const QHash& values) - Sets the data at the given \a index. \a values is a mapping of - QVariant values to roles. Returns false. -*/ - /*! \fn QList QListModelInterface::roles() const Returns the list of roles for which the list model interface provides data. diff --git a/src/plugins/accessible/widgets/simplewidgets.cpp b/src/plugins/accessible/widgets/simplewidgets.cpp index f39d538..4a3acbb 100644 --- a/src/plugins/accessible/widgets/simplewidgets.cpp +++ b/src/plugins/accessible/widgets/simplewidgets.cpp @@ -602,7 +602,7 @@ int QAccessibleDisplay::navigate(RelationFlag rel, int entry, QAccessibleInterfa return QAccessibleWidgetEx::navigate(rel, entry, target); } -/*! \reimp */ +/*! \internal */ QString QAccessibleDisplay::imageDescription() { #ifndef QT_NO_TOOLTIP @@ -612,7 +612,7 @@ QString QAccessibleDisplay::imageDescription() #endif } -/*! \reimp */ +/*! \internal */ QSize QAccessibleDisplay::imageSize() { QLabel *label = qobject_cast(widget()); @@ -624,7 +624,7 @@ QSize QAccessibleDisplay::imageSize() return pixmap->size(); } -/*! \reimp */ +/*! \internal */ QRect QAccessibleDisplay::imagePosition(QAccessible2::CoordinateType coordType) { QLabel *label = qobject_cast(widget()); -- cgit v0.12 From 6ac4acce8a759f32cd70336065f77d38a9baf2df Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 7 Oct 2010 19:05:27 +1000 Subject: Support device orientation in harmattan Task-number: QTBUG-14137 Reviewed-by: Aaron Kennedy (cherry picked from commit f9a8c4ec598a0070b9d2d861efe5ee69d5045a1f) --- tools/qml/deviceorientation_harmattan.cpp | 161 ++++++++++++++++++++++++++++++ tools/qml/qml.pri | 5 + 2 files changed, 166 insertions(+) create mode 100644 tools/qml/deviceorientation_harmattan.cpp diff --git a/tools/qml/deviceorientation_harmattan.cpp b/tools/qml/deviceorientation_harmattan.cpp new file mode 100644 index 0000000..22f9f4c --- /dev/null +++ b/tools/qml/deviceorientation_harmattan.cpp @@ -0,0 +1,161 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "deviceorientation.h" +#include +#include + +#define ORIENTATION_SERVICE "com.nokia.SensorService" +#define ORIENTATION_PATH "/org/maemo/contextkit/Screen/TopEdge" +#define CONTEXT_INTERFACE "org.maemo.contextkit.Property" +#define CONTEXT_CHANGED "ValueChanged" +#define CONTEXT_SUBSCRIBE "Subscribe" +#define CONTEXT_UNSUBSCRIBE "Unsubscribe" +#define CONTEXT_GET "Get" + + +class HarmattanOrientation : public DeviceOrientation +{ + Q_OBJECT +public: + HarmattanOrientation() + : o(UnknownOrientation), sensorEnabled(false) + { + resumeListening(); + // connect to the orientation change signal + bool ok = QDBusConnection::systemBus().connect(ORIENTATION_SERVICE, ORIENTATION_PATH, + CONTEXT_INTERFACE, + CONTEXT_CHANGED, + this, + SLOT(deviceOrientationChanged(QList,quint64))); +// qDebug() << "connection OK" << ok; + QDBusMessage reply = QDBusConnection::systemBus().call( + QDBusMessage::createMethodCall(ORIENTATION_SERVICE, ORIENTATION_PATH, + CONTEXT_INTERFACE, CONTEXT_GET)); + if (reply.type() != QDBusMessage::ErrorMessage) { + QList args; + qvariant_cast(reply.arguments().at(0)) >> args; + deviceOrientationChanged(args, 0); + } + } + + ~HarmattanOrientation() + { + // unsubscribe from the orientation sensor + if (sensorEnabled) + QDBusConnection::systemBus().call( + QDBusMessage::createMethodCall(ORIENTATION_SERVICE, ORIENTATION_PATH, + CONTEXT_INTERFACE, CONTEXT_UNSUBSCRIBE)); + } + + inline Orientation orientation() const + { + return o; + } + + void setOrientation(Orientation) + { + } + + void pauseListening() { + if (sensorEnabled) { + // unsubscribe from the orientation sensor + QDBusConnection::systemBus().call( + QDBusMessage::createMethodCall(ORIENTATION_SERVICE, ORIENTATION_PATH, + CONTEXT_INTERFACE, CONTEXT_UNSUBSCRIBE)); + sensorEnabled = false; + } + } + + void resumeListening() { + if (!sensorEnabled) { + // subscribe to the orientation sensor + QDBusMessage reply = QDBusConnection::systemBus().call( + QDBusMessage::createMethodCall(ORIENTATION_SERVICE, ORIENTATION_PATH, + CONTEXT_INTERFACE, CONTEXT_SUBSCRIBE)); + + if (reply.type() == QDBusMessage::ErrorMessage) { + qWarning("Unable to retrieve device orientation: %s", qPrintable(reply.errorMessage())); + } else { + sensorEnabled = true; + } + } + } + +private Q_SLOTS: + void deviceOrientationChanged(QList args,quint64) + { + if (args.count() == 0) + return; + Orientation newOrientation = toOrientation(args.at(0).toString()); + if (newOrientation != o) { + o = newOrientation; + emit orientationChanged(); + } +// qDebug() << "orientation" << args.at(0).toString(); + } + +private: + static Orientation toOrientation(const QString &nativeOrientation) + { + if (nativeOrientation == "top") + return Landscape; + else if (nativeOrientation == "left") + return Portrait; + else if (nativeOrientation == "bottom") + return LandscapeInverted; + else if (nativeOrientation == "right") + return PortraitInverted; + return UnknownOrientation; + } + +private: + Orientation o; + bool sensorEnabled; +}; + +DeviceOrientation* DeviceOrientation::instance() +{ + static HarmattanOrientation *o = new HarmattanOrientation; + return o; +} + +#include "deviceorientation_harmattan.moc" diff --git a/tools/qml/qml.pri b/tools/qml/qml.pri index e5b2c7f..5db7678 100644 --- a/tools/qml/qml.pri +++ b/tools/qml/qml.pri @@ -29,6 +29,11 @@ symbian:!contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) { SOURCES += $$PWD/deviceorientation_maemo5.cpp FORMS = $$PWD/recopts_maemo5.ui \ $$PWD/proxysettings_maemo5.ui +} else:linux-g++-maemo { + QT += dbus + SOURCES += $$PWD/deviceorientation_harmattan.cpp + FORMS = $$PWD/recopts.ui \ + $$PWD/proxysettings.ui } else { SOURCES += $$PWD/deviceorientation.cpp FORMS = $$PWD/recopts.ui \ -- cgit v0.12 From 4652008c01b23eefdba3b02fe8101c5bde857d41 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 6 Oct 2010 13:59:19 +1000 Subject: Ensure PathView updates positions when path changes. Fixes regression caused by optimization added in commit 35a51442ed21f58c06b21293eeb56e843251ee82. Task-number: QTBUG-14239 Reviewed-by: Martin Jones --- src/declarative/graphicsitems/qdeclarativepathview.cpp | 17 +++++++++++++++-- src/declarative/graphicsitems/qdeclarativepathview_p.h | 1 + .../qdeclarativepathview/data/pathUpdate.qml | 18 ++++++++++++++++++ .../qdeclarativepathview/tst_qdeclarativepathview.cpp | 18 ++++++++++++++++++ 4 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativepathview/data/pathUpdate.qml diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index d134929..3ae8788 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -300,6 +300,19 @@ void QDeclarativePathViewPrivate::setHighlightPosition(qreal pos) } } +void QDeclarativePathView::pathUpdated() +{ + Q_D(QDeclarativePathView); + QList::iterator it = d->items.begin(); + while (it != d->items.end()) { + QDeclarativeItem *item = *it; + if (QDeclarativePathViewAttached *att = d->attached(item)) + att->m_percent = -1; + ++it; + } + refill(); +} + void QDeclarativePathViewPrivate::updateItem(QDeclarativeItem *item, qreal percent) { if (QDeclarativePathViewAttached *att = attached(item)) { @@ -526,9 +539,9 @@ void QDeclarativePathView::setPath(QDeclarativePath *path) if (d->path == path) return; if (d->path) - disconnect(d->path, SIGNAL(changed()), this, SLOT(refill())); + disconnect(d->path, SIGNAL(changed()), this, SLOT(pathUpdated())); d->path = path; - connect(d->path, SIGNAL(changed()), this, SLOT(refill())); + connect(d->path, SIGNAL(changed()), this, SLOT(pathUpdated())); if (d->isValid() && isComponentComplete()) { d->clear(); if (d->attType) { diff --git a/src/declarative/graphicsitems/qdeclarativepathview_p.h b/src/declarative/graphicsitems/qdeclarativepathview_p.h index 62a8c44..7775b1c 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview_p.h +++ b/src/declarative/graphicsitems/qdeclarativepathview_p.h @@ -186,6 +186,7 @@ private Q_SLOTS: void modelReset(); void createdItem(int index, QDeclarativeItem *item); void destroyingItem(QDeclarativeItem *item); + void pathUpdated(); private: friend class QDeclarativePathViewAttached; diff --git a/tests/auto/declarative/qdeclarativepathview/data/pathUpdate.qml b/tests/auto/declarative/qdeclarativepathview/data/pathUpdate.qml new file mode 100644 index 0000000..0c99e7f --- /dev/null +++ b/tests/auto/declarative/qdeclarativepathview/data/pathUpdate.qml @@ -0,0 +1,18 @@ +import Qt 4.7 + +Rectangle { + width: 400 + height: 400 + + PathView { + id: view + objectName: "pathView" + anchors.fill: parent + model: 10 + delegate: Rectangle { objectName: "wrapper"; color: "green"; width: 100; height: 100 } + path: Path { + startX: view.width/2; startY: 0 + PathLine { x: view.width/2; y: view.height } + } + } +} diff --git a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp index 3b5d438..eb4bdbb 100644 --- a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp +++ b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp @@ -85,6 +85,7 @@ private slots: void pathUpdateOnStartChanged(); void package(); void emptyModel(); + void pathUpdate(); private: QDeclarativeView *createView(); @@ -787,6 +788,23 @@ void tst_QDeclarativePathView::emptyModel() } +// QTBUG-14239 +void tst_QDeclarativePathView::pathUpdate() +{ + QDeclarativeView *canvas = createView(); + QVERIFY(canvas); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/pathUpdate.qml")); + + QDeclarativePathView *pathView = canvas->rootObject()->findChild("pathView"); + QVERIFY(pathView); + + QDeclarativeItem *item = findItem(pathView, "wrapper", 0); + QVERIFY(item); + QCOMPARE(item->x(), 150.0); + + delete canvas; +} + QDeclarativeView *tst_QDeclarativePathView::createView() { QDeclarativeView *canvas = new QDeclarativeView(0); -- cgit v0.12 From b3ccb9f7b7795dab6520e7328c75537d58d08577 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Wed, 6 Oct 2010 14:01:56 +1000 Subject: Fix minehunt execution from QtDemo Task-number: QTBUG-14250 Reviewed-by: Martin Jones (cherry picked from commit 695b54e671b55bd8103dee8b30ee76309dbd26c1) --- demos/declarative/minehunt/main.cpp | 2 +- demos/declarative/minehunt/minehunt.pro | 1 + demos/declarative/minehunt/minehunt.qrc | 20 ++++++++++++++++++++ demos/qtdemo/menumanager.cpp | 1 + demos/qtdemo/xml/examples.xml | 2 +- 5 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 demos/declarative/minehunt/minehunt.qrc diff --git a/demos/declarative/minehunt/main.cpp b/demos/declarative/minehunt/main.cpp index 8bbaee9..2b286ef 100644 --- a/demos/declarative/minehunt/main.cpp +++ b/demos/declarative/minehunt/main.cpp @@ -58,7 +58,7 @@ int main(int argc, char *argv[]) canvas.setResizeMode(QDeclarativeView::SizeRootObjectToView); #endif canvas.engine()->rootContext()->setContextObject(game); - canvas.setSource(QString("minehunt.qml")); + canvas.setSource(QString("qrc:minehunt.qml")); QObject::connect(canvas.engine(), SIGNAL(quit()), &app, SLOT(quit())); #ifdef Q_OS_SYMBIAN diff --git a/demos/declarative/minehunt/minehunt.pro b/demos/declarative/minehunt/minehunt.pro index 7a491ab..753ca4e 100644 --- a/demos/declarative/minehunt/minehunt.pro +++ b/demos/declarative/minehunt/minehunt.pro @@ -6,6 +6,7 @@ CONFIG += qt plugin # Input HEADERS += minehunt.h SOURCES += main.cpp minehunt.cpp +RESOURCES = minehunt.qrc sources.files = minehunt.qml minehunt.pro MinehuntCore sources.path = $$[QT_INSTALL_DEMOS]/declarative/minehunt diff --git a/demos/declarative/minehunt/minehunt.qrc b/demos/declarative/minehunt/minehunt.qrc new file mode 100644 index 0000000..fa8e27d --- /dev/null +++ b/demos/declarative/minehunt/minehunt.qrc @@ -0,0 +1,20 @@ + + + minehunt.qml + MinehuntCore/Explosion.qml + MinehuntCore/Tile.qml + MinehuntCore/qmldir + MinehuntCore/pics/background.png + MinehuntCore/pics/back.png + MinehuntCore/pics/bomb-color.png + MinehuntCore/pics/bomb.png + MinehuntCore/pics/face-sad.png + MinehuntCore/pics/face-smile-big.png + MinehuntCore/pics/face-smile.png + MinehuntCore/pics/flag-color.png + MinehuntCore/pics/flag.png + MinehuntCore/pics/front.png + MinehuntCore/pics/quit.png + MinehuntCore/pics/star.png + + diff --git a/demos/qtdemo/menumanager.cpp b/demos/qtdemo/menumanager.cpp index fe3c5aa..ea9146e 100644 --- a/demos/qtdemo/menumanager.cpp +++ b/demos/qtdemo/menumanager.cpp @@ -518,6 +518,7 @@ QString MenuManager::resolveExeFile(const QString &name) dir.cd(dirName); dir.cd(fileName); + fileName = fileName.split("/").last(); QFile unixFile(dir.path() + "/" + fileName); if (unixFile.exists()) return unixFile.fileName(); QFile winR(dir.path() + "\\release\\" + fileName + ".exe"); diff --git a/demos/qtdemo/xml/examples.xml b/demos/qtdemo/xml/examples.xml index 0ab048e..27f72bb 100644 --- a/demos/qtdemo/xml/examples.xml +++ b/demos/qtdemo/xml/examples.xml @@ -18,7 +18,7 @@ - + -- cgit v0.12 From 000540cfd13bfdb7743fc5c9e931989ba982dbc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Wed, 6 Oct 2010 14:19:44 +0200 Subject: QGraphicsItem device coordinate cache unefficient in portrait mode Problem was that we always invalidated the cache whenever the item was rotated. This is however not required for simple rotations such as 90, 180 and 270 degrees. This commit also removes the somewhat arbitrary logic which takes the desktop size into account. We now use the viewport size instead. Auto test included. Task-number: QT-3779 Reviewed-by: yoann (cherry picked from commit e84ab1fee7f44a28ee82793f83b0b27d04d28c09) --- src/gui/graphicsview/qgraphicsscene.cpp | 76 ++++++++++++++++++++------ tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 76 ++++++++++++++++++++++++++ 2 files changed, 134 insertions(+), 18 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index c166c30..83fe56a 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -4362,6 +4362,50 @@ static void _q_paintIntoCache(QPixmap *pix, QGraphicsItem *item, const QRegion & } } +// Copied from qpaintengine_vg.cpp +// Returns true for 90, 180, and 270 degree rotations. +static inline bool transformIsSimple(const QTransform& transform) +{ + QTransform::TransformationType type = transform.type(); + if (type == QTransform::TxNone || type == QTransform::TxTranslate) { + return true; + } else if (type == QTransform::TxScale) { + // Check for 0 and 180 degree rotations. + // (0 might happen after 4 rotations of 90 degrees). + qreal m11 = transform.m11(); + qreal m12 = transform.m12(); + qreal m21 = transform.m21(); + qreal m22 = transform.m22(); + if (m12 == 0.0f && m21 == 0.0f) { + if (m11 == 1.0f && m22 == 1.0f) + return true; // 0 degrees + else if (m11 == -1.0f && m22 == -1.0f) + return true; // 180 degrees. + if(m11 == 1.0f && m22 == -1.0f) + return true; // 0 degrees inverted y. + else if(m11 == -1.0f && m22 == 1.0f) + return true; // 180 degrees inverted y. + } + } else if (type == QTransform::TxRotate) { + // Check for 90, and 270 degree rotations. + qreal m11 = transform.m11(); + qreal m12 = transform.m12(); + qreal m21 = transform.m21(); + qreal m22 = transform.m22(); + if (m11 == 0.0f && m22 == 0.0f) { + if (m12 == 1.0f && m21 == -1.0f) + return true; // 90 degrees. + else if (m12 == -1.0f && m21 == 1.0f) + return true; // 270 degrees. + else if (m12 == -1.0f && m21 == -1.0f) + return true; // 90 degrees inverted y. + else if (m12 == 1.0f && m21 == 1.0f) + return true; // 270 degrees inverted y. + } + } + return false; +} + /*! \internal @@ -4530,32 +4574,28 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte if (invertable) diff *= painter->worldTransform(); deviceData->lastTransform = painter->worldTransform(); - if (!invertable - || diff.type() > QTransform::TxTranslate - || painter->worldTransform().type() > QTransform::TxScale) { + bool allowPartialCacheExposure = false; + bool simpleTransform = invertable && diff.type() <= QTransform::TxTranslate + && transformIsSimple(painter->worldTransform()); + if (!simpleTransform) { pixModified = true; itemCache->allExposed = true; itemCache->exposed.clear(); + deviceData->cacheIndent = QPoint(); pix = QPixmap(); + } else { + allowPartialCacheExposure = deviceData->cacheIndent != QPoint(); } - // ### This is a pretty bad way to determine when to start partial - // exposure for DeviceCoordinateCache but it's the least intrusive - // approach for now. -#if 0 - // Only if the device rect isn't fully contained. - bool allowPartialCacheExposure = !viewRect.contains(deviceRect); -#else - // Only if deviceRect is 20% taller or wider than the desktop. - bool allowPartialCacheExposure = false; - if (widget) { - QRect desktopRect = QApplication::desktop()->availableGeometry(widget); - allowPartialCacheExposure = (desktopRect.width() * 1.2 < deviceRect.width() - || desktopRect.height() * 1.2 < deviceRect.height()); + // Allow partial cache exposure if the device rect isn't fully contained and + // deviceRect is 20% taller or wider than the viewRect. + if (!allowPartialCacheExposure && !viewRect.contains(deviceRect)) { + allowPartialCacheExposure = (viewRect.width() * 1.2 < deviceRect.width()) + || (viewRect.height() * 1.2 < deviceRect.height()); } -#endif + QRegion scrollExposure; - if (deviceData->cacheIndent != QPoint() || allowPartialCacheExposure) { + if (allowPartialCacheExposure) { // Part of pixmap is drawn. Either device contains viewrect (big // item covers whole screen) or parts of device are outside the // viewport. In either case the device rect must be the intersect diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 4476084..a1909e7 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -444,6 +444,7 @@ private slots: void textItem_shortcuts(); void scroll(); void stopClickFocusPropagation(); + void deviceCoordinateCache_simpleRotations(); // task specific tests below me void task141694_textItemEnsureVisible(); @@ -10372,6 +10373,81 @@ void tst_QGraphicsItem::stopClickFocusPropagation() QVERIFY(itemWithFocus->hasFocus()); } +void tst_QGraphicsItem::deviceCoordinateCache_simpleRotations() +{ + // Make sure we don't invalidate the cache when applying simple + // (90, 180, 270, 360) rotation transforms to the item. + QGraphicsRectItem *item = new QGraphicsRectItem(0, 0, 300, 200); + item->setBrush(Qt::red); + item->setCacheMode(QGraphicsItem::DeviceCoordinateCache); + + QGraphicsScene scene; + scene.setSceneRect(0, 0, 300, 200); + scene.addItem(item); + + MyGraphicsView view(&scene); + view.show(); + QTest::qWaitForWindowShown(&view); + QTRY_VERIFY(view.repaints > 0); + + QGraphicsItemCache *itemCache = QGraphicsItemPrivate::get(item)->extraItemCache(); + Q_ASSERT(itemCache); + QPixmapCache::Key currentKey = itemCache->deviceData.value(view.viewport()).key; + + // Trigger an update and verify that the cache is unchanged. + QPixmapCache::Key oldKey = currentKey; + view.reset(); + view.viewport()->update(); + QTRY_VERIFY(view.repaints > 0); + currentKey = itemCache->deviceData.value(view.viewport()).key; + QCOMPARE(currentKey, oldKey); + + // Check 90, 180, 270 and 360 degree rotations. + for (int angle = 90; angle <= 360; angle += 90) { + // Rotate item and verify that the cache was invalidated. + oldKey = currentKey; + view.reset(); + QTransform transform; + transform.translate(150, 100); + transform.rotate(angle); + transform.translate(-150, -100); + item->setTransform(transform); + QTRY_VERIFY(view.repaints > 0); + currentKey = itemCache->deviceData.value(view.viewport()).key; + QVERIFY(currentKey != oldKey); + + // IMPORTANT PART: + // Trigger an update and verify that the cache is unchanged. + oldKey = currentKey; + view.reset(); + view.viewport()->update(); + QTRY_VERIFY(view.repaints > 0); + currentKey = itemCache->deviceData.value(view.viewport()).key; + QCOMPARE(currentKey, oldKey); + } + + // 45 degree rotation. + oldKey = currentKey; + view.reset(); + QTransform transform; + transform.translate(150, 100); + transform.rotate(45); + transform.translate(-150, -100); + item->setTransform(transform); + QTRY_VERIFY(view.repaints > 0); + currentKey = itemCache->deviceData.value(view.viewport()).key; + QVERIFY(currentKey != oldKey); + + // Trigger an update and verify that the cache was invalidated. + // We should always invalidate the cache for non-trivial transforms. + oldKey = currentKey; + view.reset(); + view.viewport()->update(); + QTRY_VERIFY(view.repaints > 0); + currentKey = itemCache->deviceData.value(view.viewport()).key; + QVERIFY(currentKey != oldKey); +} + void tst_QGraphicsItem::QTBUG_5418_textItemSetDefaultColor() { struct Item : public QGraphicsTextItem -- cgit v0.12 From e1568b04816465df45b7f974a1031791943bf4f0 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 6 Oct 2010 11:48:24 +0200 Subject: Fixes assert in QDeclarativeWebView If QDeclarativeWebView was instantiated twice an assert was triggered by QWebSettings::enablePersistentStorage(); This patch is crtical for tooling (Bauhaus) Task-number: QTBUG-14278 Reviewed-by: Aaron Kennedy (cherry picked from commit f532679ca11914b453e22342f2ae5e9f790ce47a) --- src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp index 94f08bd..e4f70de 100644 --- a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp @@ -249,7 +249,11 @@ void QDeclarativeWebView::init() { d = new QDeclarativeWebViewPrivate(this); - QWebSettings::enablePersistentStorage(); + if (QWebSettings::iconDatabasePath().isNull() && + QWebSettings::globalSettings()->localStoragePath().isNull() && + QWebSettings::offlineStoragePath().isNull() && + QWebSettings::offlineWebApplicationCachePath().isNull()) + QWebSettings::enablePersistentStorage(); setAcceptedMouseButtons(Qt::LeftButton); setFlag(QGraphicsItem::ItemHasNoContents, true); -- cgit v0.12 From 09bf0e548a5542ac594e5d44639cb0aeaecdf661 Mon Sep 17 00:00:00 2001 From: Justin McPherson Date: Fri, 8 Oct 2010 15:37:05 +1000 Subject: Add header guards to audio example headers. Task-number: QTBUG-13413 Reviewed-by: Andrew den Exter --- examples/multimedia/audiodevices/audiodevices.h | 4 ++++ examples/multimedia/audioinput/audioinput.h | 5 +++++ examples/multimedia/audiooutput/audiooutput.h | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/examples/multimedia/audiodevices/audiodevices.h b/examples/multimedia/audiodevices/audiodevices.h index b5b5204..d448a41 100644 --- a/examples/multimedia/audiodevices/audiodevices.h +++ b/examples/multimedia/audiodevices/audiodevices.h @@ -39,6 +39,8 @@ ** ****************************************************************************/ +#ifndef AUDIODEVICES_H +#define AUDIODEVICES_H #include #include @@ -78,3 +80,5 @@ private slots: }; +#endif + diff --git a/examples/multimedia/audioinput/audioinput.h b/examples/multimedia/audioinput/audioinput.h index be721de..bc3d702 100644 --- a/examples/multimedia/audioinput/audioinput.h +++ b/examples/multimedia/audioinput/audioinput.h @@ -39,6 +39,9 @@ ** ****************************************************************************/ +#ifndef AUDIOINPUT_H +#define AUDIOINPUT_H + #include #include #include @@ -133,3 +136,5 @@ private: static const QString ResumeLabel; }; +#endif + diff --git a/examples/multimedia/audiooutput/audiooutput.h b/examples/multimedia/audiooutput/audiooutput.h index 889482b..bfcbf62 100644 --- a/examples/multimedia/audiooutput/audiooutput.h +++ b/examples/multimedia/audiooutput/audiooutput.h @@ -39,6 +39,9 @@ ** ****************************************************************************/ +#ifndef AUDIOOUTPUT_H +#define AUDIOOUTPUT_H + #include #include @@ -116,3 +119,5 @@ private slots: void deviceChanged(int index); }; +#endif + -- cgit v0.12 From f8a6897cf79821b2c5a8443ce18cf66aa5a8d0d8 Mon Sep 17 00:00:00 2001 From: Bruno Abinader Date: Fri, 8 Oct 2010 14:09:25 +0200 Subject: Added missing native separator transforms. This patch fixes the deployment of files when using Qt For Symbian SDK on Linux. Merge-request: 839 Reviewed-by: Oswald Buddenhagen --- qmake/generators/symbian/initprojectdeploy_symbian.cpp | 7 ++++++- qmake/generators/symbian/symmake_abld.cpp | 10 ++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp index 776a646..5963773 100644 --- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp +++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp @@ -59,7 +59,12 @@ static QString fixPathToEpocOS(const QString &src) { QString ret = Option::fixPathToTargetOS(src); - return ret.replace('/', '\\'); + + bool pathHasDriveLetter = false; + if (ret.size() > 1) + pathHasDriveLetter = (ret.at(1) == QLatin1Char(':')); + + return pathHasDriveLetter ? ret.replace('/', '\\') : QDir::toNativeSeparators(ret); } static bool isPlugin(const QFileInfo& info, const QString& devicePath) diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp index 7416cbe..127d5c0 100644 --- a/qmake/generators/symbian/symmake_abld.cpp +++ b/qmake/generators/symbian/symmake_abld.cpp @@ -427,7 +427,8 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t, bool i t << WINSCW_DEPLOYMENT_TARGET ":" << endl; QString remoteTestPath = epocRoot() - + QLatin1String(isRom ? "epoc32\\data\\z\\private\\" : "epoc32\\winscw\\c\\private\\") + + QDir::toNativeSeparators(QLatin1String(isRom ? "epoc32/data/z/private/" + : "epoc32/winscw/c/private/")) + privateDirUid; DeploymentList depList; @@ -439,11 +440,16 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t, bool i t << "\t-echo Deploying changed files..." << endl; for (int i = 0; i < depList.size(); ++i) { +#ifdef Q_OS_WIN32 // Xcopy prompts for selecting file or directory if target doesn't exist, // and doesn't provide switch to force file selection. It does provide dir forcing, though, // so strip the last part of the destination. t << "\t-$(XCOPY) \"" << depList.at(i).from << "\" \"" << depList.at(i).to.left(depList.at(i).to.lastIndexOf("\\") + 1) << "\"" << endl; +#else + t << "\t-$(XCOPY) \"" << QDir::toNativeSeparators(depList.at(i).from) << "\" \"" + << QDir::toNativeSeparators(depList.at(i).to) << "\"" << endl; +#endif } t << endl; @@ -455,7 +461,7 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t, bool i QStringList cleanList; for (int i = 0; i < depList.size(); ++i) { - cleanList.append(depList.at(i).to); + cleanList.append(QDir::toNativeSeparators(depList.at(i).to)); } generateCleanCommands(t, cleanList, "$(DEL_FILE)", "", "", ""); -- cgit v0.12 From 7702bd86f2c0a9b2dc1ddcd745445f8c3fd2602f Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 8 Oct 2010 17:05:27 +0200 Subject: Doc: Fixed qdoc warning. Reviewed-by: hjk --- src/corelib/tools/qcryptographichash.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp index f418de9..8b1464f 100644 --- a/src/corelib/tools/qcryptographichash.cpp +++ b/src/corelib/tools/qcryptographichash.cpp @@ -147,7 +147,7 @@ void QCryptographicHash::addData(const char *data, int length) } /*! - /overload + \overload */ void QCryptographicHash::addData(const QByteArray &data) { -- cgit v0.12 From 436d41eabc5c4953f578c9ca1cbfb065d6fe8612 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 8 Oct 2010 18:16:23 +0200 Subject: Doc: Fixed qdoc warnings. --- doc/src/examples/webkit-bridge-imageanalyzer.qdoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/src/examples/webkit-bridge-imageanalyzer.qdoc b/doc/src/examples/webkit-bridge-imageanalyzer.qdoc index b8c42c6..cee2659 100644 --- a/doc/src/examples/webkit-bridge-imageanalyzer.qdoc +++ b/doc/src/examples/webkit-bridge-imageanalyzer.qdoc @@ -24,9 +24,10 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ + /*! \example webkit/imageanalyzer - \startpage {index.html} {Qt Reference Documentation} + \startpage {index.html}{Qt Reference Documentation} \title The Webkit Bridge Tutorial - Hybrid Client Application In this example, we will show how to write a hybrid application using @@ -84,7 +85,7 @@ page's mainFrame with \c addToJavaScriptWindowObject(). \snippet examples/webkit/imageanalyzer/resources/index.html sample images - Clicking an image adds it to an images list. +Clicking an image adds it to an images list. \snippet examples/webkit/imageanalyzer/resources/index.html addImage -- cgit v0.12 From e8cbed0e9cb3f074405bdc67772d449e312a3b78 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 8 Oct 2010 18:37:15 +0200 Subject: Doc: Fixed documentation style and qdoc warnings. Task-number: QTBUG-12071 --- doc/src/frameworks-technologies/dnd.qdoc | 2 +- doc/src/frameworks-technologies/model-view-programming.qdoc | 12 ++++++------ src/corelib/kernel/qabstractitemmodel.cpp | 10 +++++----- src/gui/itemviews/qabstractitemview.cpp | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/src/frameworks-technologies/dnd.qdoc b/doc/src/frameworks-technologies/dnd.qdoc index 56b461e..356bf9b 100644 --- a/doc/src/frameworks-technologies/dnd.qdoc +++ b/doc/src/frameworks-technologies/dnd.qdoc @@ -44,7 +44,7 @@ outlines the approach used to enable it in custom widgets. Drag and drop operations are also supported by Qt's item views and by the graphics view framework. More information is available in - \l{Using drag & drop with item views} and \l{Graphics View + \l{Using drag and drop with item views} and \l{Graphics View Framework}. \section1 Drag and Drop Classes diff --git a/doc/src/frameworks-technologies/model-view-programming.qdoc b/doc/src/frameworks-technologies/model-view-programming.qdoc index 6de567c..cc98432 100644 --- a/doc/src/frameworks-technologies/model-view-programming.qdoc +++ b/doc/src/frameworks-technologies/model-view-programming.qdoc @@ -32,7 +32,7 @@ /*! \page model-view-programming.html - \ingroup qt-basic-concepts + \ingroup qt-basic-concepts \title Model/View Programming \brief A guide to Qt's extensible model/view architecture. @@ -1635,7 +1635,7 @@ contain the text given in the search string. This pattern can also be used in the list and table widgets. - \section1 Using drag & drop with item views + \section1 Using Drag and Drop with Item Views Qt's drag and drop infrastructure is fully supported by the model/view framework. Items in lists, tables, and trees can be dragged within the views, and data can be @@ -1715,7 +1715,7 @@ of QAbstractItemModel::removeRows(), either directly or by inheriting the implementation from its base class. - \section3 Enabling drag & drop for items + \section3 Enabling drag and drop for items Models indicate to views which items can be dragged, and which will accept drops, by reimplementing the QAbstractItemModel::flags() function to provide suitable @@ -2154,7 +2154,7 @@ models to supply some unique identifier to this function to ensure that the model index can be re-associated with its corresponding item later on. - \section2 Drag & drop support and MIME type handling + \section2 Drag and drop support and MIME type handling The model/view classes support drag and drop operations, providing default behavior that is sufficient for many applications. However, it is also possible to customize @@ -2283,7 +2283,7 @@ \endlist For more information about drag and drop with item views, refer to - \l{Using drag & drop with item views}. + \l{Using drag and drop with item views}. \section3 Convenience views @@ -2294,7 +2294,7 @@ the existing contents with the data being transferred, the underlying model will set the data of the target items rather than insert new rows and columns into the model. For more information on drag and drop in convenience views, - you can see \l{Using drag & drop with item views}. + you can see \l{Using drag and drop with item views}. \section2 Performance optimization for large amounts of data diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp index 6e37aee..a0f7893 100644 --- a/src/corelib/kernel/qabstractitemmodel.cpp +++ b/src/corelib/kernel/qabstractitemmodel.cpp @@ -1197,7 +1197,7 @@ void QAbstractItemModelPrivate::columnsRemoved(const QModelIndex &parent, \l{QAbstractItemModel::}{endInsertRows()} must be called. \sa {Model Classes}, {Model Subclassing Reference}, QModelIndex, - QAbstractItemView, {Using drag & drop with item views}, + QAbstractItemView, {Using drag and drop with item views}, {Simple DOM Model Example}, {Simple Tree Model Example}, {Editable Tree Model Example}, {Fetch More Example} */ @@ -1760,7 +1760,7 @@ QMimeData *QAbstractItemModel::mimeData(const QModelIndexList &indexes) const where to place the data. This can occur in a tree when data is dropped on a parent. Models will usually append the data to the parent in this case. - \sa supportedDropActions(), {Using drag & drop with item views} + \sa supportedDropActions(), {Using drag and drop with item views} */ bool QAbstractItemModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) @@ -1797,7 +1797,7 @@ bool QAbstractItemModel::dropMimeData(const QMimeData *data, Qt::DropAction acti reimplement the dropMimeData() function to handle the additional operations. - \sa dropMimeData(), Qt::DropActions, {Using drag & drop with item + \sa dropMimeData(), Qt::DropActions, {Using drag and drop with item views} */ Qt::DropActions QAbstractItemModel::supportedDropActions() const @@ -1814,7 +1814,7 @@ Qt::DropActions QAbstractItemModel::supportedDropActions() const supportedDragActions() is used by QAbstractItemView::startDrag() as the default values when a drag occurs. - \sa Qt::DropActions, {Using drag & drop with item views} + \sa Qt::DropActions, {Using drag and drop with item views} */ Qt::DropActions QAbstractItemModel::supportedDragActions() const { @@ -1830,7 +1830,7 @@ Qt::DropActions QAbstractItemModel::supportedDragActions() const Sets the supported drag \a actions for the items in the model. - \sa supportedDragActions(), {Using drag & drop with item views} + \sa supportedDragActions(), {Using drag and drop with item views} */ void QAbstractItemModel::setSupportedDragActions(Qt::DropActions actions) { diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index 4ffd284..95e92c9 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -1363,7 +1363,7 @@ bool QAbstractItemView::dragEnabled() const Note that the model used needs to provide support for drag and drop operations. - \sa setDragDropMode() {Using drag & drop with item views} + \sa setDragDropMode() {Using drag and drop with item views} */ /*! -- cgit v0.12 From 227416bd859bca799ca1361ea1cb9b9cf9aa6977 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 8 Oct 2010 18:39:09 +0200 Subject: Doc: Removed non-ASCII characters and reformatted the text. --- doc/src/platforms/emb-hardwareacceleration.qdocinc | 280 ++++++++++----------- 1 file changed, 140 insertions(+), 140 deletions(-) diff --git a/doc/src/platforms/emb-hardwareacceleration.qdocinc b/doc/src/platforms/emb-hardwareacceleration.qdocinc index fb00e09..83ecef5 100644 --- a/doc/src/platforms/emb-hardwareacceleration.qdocinc +++ b/doc/src/platforms/emb-hardwareacceleration.qdocinc @@ -1,140 +1,140 @@ - \section1 Hardware Acceleration - - When designing applications for embedded devices there is often a - compromise between graphics effects and performance. On most - devices, you cannot have both simply because the hardware needed - for such operations just is not there. With a growing number of - devices that use hardware dedicated to graphics operations there is - less need to compromise. - - In addition to enabling dynamic graphics effects, there are two - other benefits to using graphics acceleration. One is that graphics - acceleration hardware is more power efficient than using the CPU. - The reason for this is that the CPU might require a clock speed - that is up to 20 times higher than the GPU, achieving the same - results. E.g. a typical hardware accelerated mobile graphics unit - can rasterize one or two bilinear texture fetches in one cycle, - while a software implementation takes easily more than 20 cycles. - Typical \e {System-on-a-chip} (SoC) graphics hardware generally have - a much lower clock speed and memory bandwidth, and different level - of acceleration than desktop GPUs. One example is that many GPUs - leave out transformation and lighting from the graphics pipeline - and only implements rasterization. - - Another reason to use a GPU is to offload the main CPU, either for - power saving or to perform other operations in parallel. Often - drawing speed with a GPU is not that much faster than a CPU but - the clear benefit of using the GPU is to free up the CPU to perform - other tasks which can be used to create a more responsive use - experience. - - The key to writing good applications for devices is therefore to - limit the wow factor down to what the target hardware can handle, - and to take advantage of any graphics dedicated hardware. Qt - provides several ways to both render advanced effects on the screen - and speed up your application using hardware accelerated graphics. - - \tableofcontents - - \section2 Qt for Embedded Graphics pipeline - - Qt uses QPainter for all graphics operations. By using the same API - regardless of platform, the code can be reused on different devices. - QPainter use different paint engines implemented in the QPaintEngine API to - do the actual painting. - - The QPaintEngine API provides paint engines for each window system and - painting framework supported by Qt. In regards to Qt for Embedded, this - also includes implementations for OpenGL ES versions 1.1 and 2.0, as well - as OpenVG and DirectFB(Embedded Linux only). - - By using one of these paint engines, you will be able to improve the - graphics performance of your Qt application. However, if the graphics - operations used are not supported, this might as well be a trap, slowing - down your application significantly. This all depends on what kind of - graphics operations that are supported by the target devices hardware - configuration. - - \image platformHWAcc.png - - The paint engine will direct all graphics operations supported by the - devices hardware to the GPU, and from there they are sent to the - framebuffer. Unsupported graphics operations falls back to the - QRasterPaintEngine and are handled by the CPU before sent to the - framebuffer. In the end, the operating system sends the paint updates off - to the screen/display. The fallback operation is quite expensive in regards - to memory consumption, and should be avoided. - - \section2 Hardware configuration requirements - - Before implementing any application using hardware acceleration, it is wise - to get an overview of what kind of hardware accelerated graphics operations - that are available for the target device. - - \note On devices with no hardware acceleration, Qt will use - QRasterPaintEngine, which handles the acceleration using software. On - devices supporting OpenGL ES, OpenVG or DirectFB(not supported by Windows - CE), Qt will use the - respective paint engines to accelerate painting. However, hardware - configurations that only support a limited set of hardware acceleration - features, might slow the application graphics down rather than speeding it - up when using unsupported operations that must fall back to the raster - engine. - - \section3 Different architectures - - Based on the architecture used in a device we can make a recommendation on - which hardware acceleration techniques to use. There are mainly two - different architectures on embedded devices. These are devices with a - Unified Memory Architecture (UMA), and devices with dedicated graphics - memory. Generally, high-end devices will have dedicated graphics memory. - Low-end devices will just use system memory, sometimes reserving a memory - region and sometimes not. - - In addition to this, we can categorize the devices into five types based on - the different graphics operations supported by their hardware. - - \list 1 - \o No support for graphics acceleration. - \o Support for blitter and alpha blending. - \o Support for path based 2D vector graphics. - \o Support for fixed function 3D graphics. - \o Support for programmable 3D graphics. - \endlist - - Based on these characteristics the table below recommends which paint - engines to use with the different types of hardware configurations. - - \section3 Recommended use of hardware acceleration based on hardware - - \table - \header - \o Type - \o UMA - \o Non-UMA - \row - \o \bold {None} - \o Qt Raster Engine - \o Qt Raster Engine - \row - \o \bold {Blitter} - \o DirectFB - \o DirectFB - \row - \o \bold {2D Vector} - \o OpenVG - \o OpenVG - \row - \o \bold {Fixed 3D} - \o OpenGL (ES) 1.x - \o OpenGL (ES) 1.x - \row - \o \bold {Programmable 3D} - \o OpenGL (ES) 2.x - \o OpenGL (ES) 2.x - \endtable - - \note Since the DirectFB API is quite primitive, the raster paint engine - handles most of the operations. - - \note Blitter and Alpha blending is currently not supported on Windows CE. +\section1 Hardware Acceleration + +When designing applications for embedded devices there is often a +compromise between graphics effects and performance. On most +devices, you cannot have both simply because the hardware needed +for such operations just is not there. With a growing number of +devices that use hardware dedicated to graphics operations there is +less need to compromise. + +In addition to enabling dynamic graphics effects, there are two +other benefits to using graphics acceleration. One is that graphics +acceleration hardware is more power efficient than using the CPU. +The reason for this is that the CPU might require a clock speed +that is up to 20 times higher than the GPU, achieving the same +results. E.g. a typical hardware accelerated mobile graphics unit +can rasterize one or two bilinear texture fetches in one cycle, +while a software implementation takes easily more than 20 cycles. +Typical \e {System-on-a-chip} (SoC) graphics hardware generally have +a much lower clock speed and memory bandwidth, and different level +of acceleration than desktop GPUs. One example is that many GPUs +leave out transformation and lighting from the graphics pipeline +and only implements rasterization. + +Another reason to use a GPU is to offload the main CPU, either for +power saving or to perform other operations in parallel. Often +drawing speed with a GPU is not that much faster than a CPU but +the clear benefit of using the GPU is to free up the CPU to perform +other tasks which can be used to create a more responsive use +experience. + +The key to writing good applications for devices is therefore to +limit the wow factor down to what the target hardware can handle, +and to take advantage of any graphics dedicated hardware. Qt +provides several ways to both render advanced effects on the screen +and speed up your application using hardware accelerated graphics. + +\tableofcontents + +\section2 Qt for Embedded Graphics pipeline + +Qt uses QPainter for all graphics operations. By using the same API +regardless of platform, the code can be reused on different devices. +QPainter use different paint engines implemented in the QPaintEngine API to +do the actual painting. + +The QPaintEngine API provides paint engines for each window system and +painting framework supported by Qt. In regards to Qt for Embedded, this +also includes implementations for OpenGL ES versions 1.1 and 2.0, as well +as OpenVG and DirectFB(Embedded Linux only). + +By using one of these paint engines, you will be able to improve the +graphics performance of your Qt application. However, if the graphics +operations used are not supported, this might as well be a trap, slowing +down your application significantly. This all depends on what kind of +graphics operations that are supported by the target devices hardware +configuration. + +\image platformHWAcc.png + +The paint engine will direct all graphics operations supported by the +devices hardware to the GPU, and from there they are sent to the +framebuffer. Unsupported graphics operations falls back to the +QRasterPaintEngine and are handled by the CPU before sent to the +framebuffer. In the end, the operating system sends the paint updates off +to the screen/display. The fallback operation is quite expensive in regards +to memory consumption, and should be avoided. + +\section2 Hardware configuration requirements + +Before implementing any application using hardware acceleration, it is wise +to get an overview of what kind of hardware accelerated graphics operations +that are available for the target device. + +\note On devices with no hardware acceleration, Qt will use +QRasterPaintEngine, which handles the acceleration using software. On +devices supporting OpenGL ES, OpenVG or DirectFB(not supported by Windows +CE), Qt will use the +respective paint engines to accelerate painting. However, hardware +configurations that only support a limited set of hardware acceleration +features, might slow the application graphics down rather than speeding it +up when using unsupported operations that must fall back to the raster +engine. + +\section3 Different architectures + +Based on the architecture used in a device we can make a recommendation on +which hardware acceleration techniques to use. There are mainly two +different architectures on embedded devices. These are devices with a +Unified Memory Architecture (UMA), and devices with dedicated graphics +memory. Generally, high-end devices will have dedicated graphics memory. +Low-end devices will just use system memory, sometimes reserving a memory +region and sometimes not. + +In addition to this, we can categorize the devices into five types based on +the different graphics operations supported by their hardware. + +\list 1 + \o No support for graphics acceleration. + \o Support for blitter and alpha blending. + \o Support for path based 2D vector graphics. + \o Support for fixed function 3D graphics. + \o Support for programmable 3D graphics. +\endlist + +Based on these characteristics the table below recommends which paint +engines to use with the different types of hardware configurations. + +\section3 Recommended use of hardware acceleration based on hardware + +\table + \header + \o Type + \o UMA + \o Non-UMA + \row + \o \bold {None} + \o Qt Raster Engine + \o Qt Raster Engine + \row + \o \bold {Blitter} + \o DirectFB + \o DirectFB + \row + \o \bold {2D Vector} + \o OpenVG + \o OpenVG + \row + \o \bold {Fixed 3D} + \o OpenGL (ES) 1.x + \o OpenGL (ES) 1.x + \row + \o \bold {Programmable 3D} + \o OpenGL (ES) 2.x + \o OpenGL (ES) 2.x +\endtable + +\note Since the DirectFB API is quite primitive, the raster paint engine +handles most of the operations. + +\note Blitter and Alpha blending is currently not supported on Windows CE. -- cgit v0.12 From 740b794259eb41845e7529371de3f3e20235f7b4 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 8 Oct 2010 20:11:27 +0200 Subject: Doc: Reorganized the platform and compiler notes pages. Errors and omissions will be fixed in later commits. The idea here is to merge the compiler notes into the platform notes because the platform is usually fixed and the compiler is often determined by the platform. In addition, notes about compilers are not always applicable to multiple platforms, so collating notes by compiler does not save much space, and it only makes maintenance of the notes more difficult. --- doc/src/bughowto.qdoc | 2 +- doc/src/development/developing-with-qt.qdoc | 6 +- doc/src/platforms/compiler-notes.qdoc | 269 +-------------------- doc/src/platforms/platform-notes-rtos.qdoc | 8 +- doc/src/platforms/platform-notes.qdoc | 346 +++++++++++++++++++++++----- doc/src/platforms/supported-platforms.qdoc | 5 +- doc/src/platforms/winsystem.qdoc | 4 +- 7 files changed, 311 insertions(+), 329 deletions(-) diff --git a/doc/src/bughowto.qdoc b/doc/src/bughowto.qdoc index a7b5569..1793fce 100644 --- a/doc/src/bughowto.qdoc +++ b/doc/src/bughowto.qdoc @@ -34,7 +34,7 @@ about it so that we can fix it. Before reporting a bug, please check the \l{FAQs}, \l{Platform - Notes}, and the \l{Qt Bug Tracker} on the Qt website to see + and Compiler Notes}, and the \l{Qt Bug Tracker} on the Qt website to see if the issue is already known. The first thing you should do is to sign up for an account for diff --git a/doc/src/development/developing-with-qt.qdoc b/doc/src/development/developing-with-qt.qdoc index 3972b59..6793abd 100644 --- a/doc/src/development/developing-with-qt.qdoc +++ b/doc/src/development/developing-with-qt.qdoc @@ -81,8 +81,8 @@ \o \l {Compiler Notes} \o \l {Developing Qt Applications for Mac OS X} \o \l {Known Issues} - \o \l {Platform Notes} - \o \l {Platform Notes - Symbian} + \o \l {Platform and Compiler Notes} + \o \l {Platform and Compiler Notes - Symbian} \o \l {ActiveX in Qt} \o \l {Qt for Embedded Linux Classes} \o \l {Qt for Embedded Platforms} @@ -112,4 +112,4 @@ \endtable -*/ \ No newline at end of file +*/ diff --git a/doc/src/platforms/compiler-notes.qdoc b/doc/src/platforms/compiler-notes.qdoc index 5ff3112..fb534df 100644 --- a/doc/src/platforms/compiler-notes.qdoc +++ b/doc/src/platforms/compiler-notes.qdoc @@ -31,273 +31,14 @@ \title Compiler Notes \brief Information about the C++ compilers and tools used to build Qt. - This page contains information about the C++ compilers and tools used - to build Qt on various platforms. + This page used to contain information about the C++ compilers and tools + used to build Qt on various platforms. This information is now maintained + in the \l{Platform and Compiler Notes} for each platform. - \tableofcontents - - Please refer to the \l{Platform Notes} for information on the platforms - Qt is currently known to run on, and see the \l{Supported Platforms} - page for information about the status of each platform. + Please refer to the \l{Supported Platforms} page for information about the + status of each platform. If you have anything to add to this list or any of the platform or compiler-specific pages, please submit it via the \l{Bug Report Form} or through the \l{Public Qt Repository}. - - \section1 Supported Features - - Not all compilers used to build Qt are able to compile all modules. The following table - shows the compiler support for five modules that are not uniformly available for all - platforms and compilers. - - \table - \header \o Compiler \o{5,1} Features - \header \o \o Concurrent \o XmlPatterns \o WebKit(*) \o CLucene \o Phonon - \row \o g++ 3.3 \o \o \bold{X} \o \o \bold{X} \o \bold{X} - \row \o g++ 3.4 and up \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} - \row - \row \o SunCC 5.5 \o \o \o \o \bold{X} \o \bold{X} - \row - \row \o aCC series 3 \o \o \o \o \bold{X} \o \bold{X} - \row \o aCC series 6 \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} - \row \o xlC 6 \o \o \o \o \bold{X} \o \bold{X} - \row \o Intel CC 10 \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} - \row - \row \o MSVC 2003 \o \bold{X} \o \bold{X} \o \o \bold{X} \o \bold{X} - \row \o MSVC 2005 and up \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} - \endtable - - * WebKit is only supported as a dynamically built library. Static linkage is not supported. - - \target GCC - \section1 GCC - - \section2 GCC on Windows (MinGW) - - We have tested Qt with this compiler on Windows XP. - The minimal version of MinGW supported is: - - \list - \o GCC 3.4.2 - \o MinGW runtime 3.7 - \o win32api 3.2 - \o binutils 2.15.91 - \o mingw32-make 3.80.0-3 - \endlist - - \note For users of the MinGW binary package: This package is now - based on MinGW 4.4. The installer no longer offers to download - MinGW for you, but rather offers to use a version of MinGW that - you already have installed on your machine. You just tell the - installer which directory MinGW is installed in. If you don't - already have MinGW 4.4 installed, you can download a .zip archive - from our \l{ftp://ftp.trolltech.com/misc/MinGW-gcc440_1.zip} {ftp - site}. This archive provides fixes to MinGW and support for - missing API, See the _patches directory in the archive for - details. - - \note A MinGW installation is only needed to build against the - binary pacakge, not to run the pre-compiled binaries that are in - the package. - - \section2 GCC 4.0.0 - - The released package of the compiler has some bugs that lead to - miscompilations. We recommend using GCC 4.0.1 or later, or to use - a recent CVS snapshot of the GCC 4.0 branch. The version of GCC - 4.0.0 that is shipped with Mac OS X 10.4 "Tiger" is known to work - with Qt for Mac OS X. - - \section2 HP-UX - - The hpux-g++ platform is tested with GCC 3.4.4. - - \section2 Solaris - - Please use GCC 3.4.2 or later. - Please not that WebKit is not supported for Solaris, regardless of which compiler is used. - - \section2 Mac OS X - - Please use the latest GCC 3.3 from Apple or a later version of GCC 3. - The gcc 3.3 that is provided with Xcode 1.5 is known to generate bad code. - Use the November 2004 GCC 3.3 updater \l{http://connect.apple.com}{available from Apple}. - - \section2 GCC 3.4.6 (Debian 3.4.6-5) on AMD64 (x86_64) - - This compiler is known to miscompile some parts of Qt when doing a - release build. There are several workarounds: - - \list 1 - \o Use a debug build instead. - \o For each miscompilation encountered, recompile the file, removing the -O2 option. - \o Add -fno-gcse to the QMAKE_CXXFLAGS_RELEASE. - \endlist - - \section1 HP ANSI C++ (aCC) - - The hpux-acc-32 and hpux-acc-64 platforms are tested with aCC A.03.57. The - hpuxi-acc-32 and hpuxi-acc-64 platforms are tested with aCC A.06.10. - - \section1 Intel C++ Compiler - - Qt supports the Intel C++ compiler on both Windows and Linux. - However, there are a few issues on Linux (see the following - section). - - \section2 Intel C++ Compiler for Linux - - Nokia currently tests the following compilers: - - \list - - \o Intel(R) C++ Compiler for applications running on IA-32, - Version 10.1 Build 20080602 Package ID: l_cc_p_10.1.017 - - \o Intel(R) C++ Compiler for applications running on Intel(R) 64, - Version 10.1 Build 20080602 Package ID: l_cc_p_10.1.017 - - \endlist - - We do not currently test the IA-64 (Itanium) compiler. - - \section2 Known Issues with Intel C++ Compiler for Linux - - \list - - \o Precompiled header support does not work in version 10.0.025 - and older. For these compilers, you should configure Qt with - -no-pch. Precompiled header support works properly in version - 10.0.026 and later. - \o Version 10.0.026 for Intel 64 is known to miscompile qmake when - building in release mode. For now, configure Qt with - -debug. Version 10.1.008 and later can compile qmake in release - mode. - \o Versions 10.1.008 to 10.1.015 for both IA-32 and Intel 64 are - known crash with "(0): internal error: 0_47021" when compiling - QtXmlPatterns, QtWebKit, and Designer in release mode. Version - 10.1.017 compiles these modules correctly in release mode. - \endlist - - \section2 Intel C++ Compiler (Windows, Altix) - - Qt 4 has been tested successfully with: - - \list - \o Windows - Intel(R) C++ Compiler for 32-bit applications, - Version 9.1.040. - \o Altix - Intel(R) C++ Itanium(R) Compiler for Itanium(R)-based - applications Version 8.1 Build 20050406 Package ID: l_cc_pc_8.1.030 - \endlist - - We currently only test the Intel compiler on 32-bit Windows versions. - - \section1 MIPSpro (IRIX) - - \bold{IRIX is an unsupported platform. See the \l{Supported Platforms} page - and Qt's Software's online \l{Platform Support Policy} page for details.} - - Qt 4.4.x requires MIPSpro version 7.4.2m. - - Note that MIPSpro version 7.4.4m is currently not supported, since it has - introduced a number of problems that have not yet been resolved. - We recommend using 7.4.2m for Qt development. However, please note the - unsupported status of this platform. - - \target Sun Studio - \section1 Forte Developer / Sun Studio (Solaris) - - \section2 Sun Studio - - Qt is tested using Sun Studio 12 (Sun CC 5.9). Go to - \l{Sun Studio Patches} page on Sun's Web site to download - the latest patches for your Sun compiler. - - Please note that Qt 4.6 is stricter in its STL requirements and - that the default STL implementation used by Sun CC does not pass - those requirements. This does not affect binary compatibility and - you can continue to use STL in your own code, but Qt's - STL-compatibility functions will be disabled. - - Sun CC ships with a secondary STL implementation (called stlport4) - which is standards-compliant and can be used by Qt. You can enable - it by passing the -library=stlport4 option to the compiler. Note - that this does not affect Qt's binary compatibility, but it may - affect that of other libraries and programs that use STL. - - \section2 Sun WorkShop 5.0 - - Sun WorkShop 5.0 is not supported with Qt 4. - - \section1 Visual Studio (Windows) - - We do most of our Windows development on Windows XP, using Microsoft - Visual Studio .NET 2005 and Visual Studio 2008 (both the 32- and 64-bit - versions). - - Qt works with the Standard Edition, the Professional Edition and Team - System Edition of Visual Studio 2005. - - In order to use Qt with the Visual Studio 2005/2008 Express Edition you need - to download and install the platform SDK. Due to limitations in the - Express Edition it is not possible for us to install the Qt Visual - Studio Integration. You will need to use our command line tools to - build Qt applications with this edition. - - The Visual C++ Linker doesn't understand filenames with spaces (as in - \c{C:\Program files\Qt\}) so you will have to move it to another place, - or explicitly set the path yourself; for example: - - \snippet doc/src/snippets/code/doc_src_compiler-notes.qdoc 0 - - If you are experiencing strange problems with using special flags that - modify the alignment of structure and union members (such as \c{/Zp2}) - then you will need to recompile Qt with the flags set for the - application as well. - - If you're using Visual Studio .NET (2002) Standard Edition, you should be - using the Qt binary package provided, and not the source package. - As the Standard Edition does not optimize compiled code, your compiled - version of Qt would perform suboptimally with respect to speed. - - With Visual Studio 2005 Service Pack 1 a bug was introduced which - causes Qt not to compile, this has been fixed with a hotfix available - from Microsoft. See this - \l{http://qt.nokia.com/developer/faqs/faq.2006-12-18.3281869860}{Knowledge Base entry} - for more information. - - There currently is a problem when compiling Qt with Visual Studio 2010 for 64-bit. - Its optimizer causes trouble and generates code that crashes for the release builds. - To avoid the crashes, You need to apply the hotfix in the following article - http://support.microsoft.com/kb/2280741. - - \section1 IBM xlC (AIX) - - The makeC++SharedLib utility must be in your PATH and be up to date to - build shared libraries. From IBM's - \l{http://www.redbooks.ibm.com/abstracts/sg245674.html}{C and C++ Application Development on AIX} - Redbook: - - \list - \o "The second step is to use the makeC++SharedLib command to create the - shared object. The command has many optional arguments, but in its - simplest form, can be used as follows:" - \snippet doc/src/snippets/code/doc_src_compiler-notes.qdoc 1 - \o "The full path name to the command is not required; however, to avoid - this, you will have to add the directory in which it is located to - your PATH environment variable. The command is located in the - /usr/vacpp/bin directory with the VisualAge C++ Professional for AIX, - Version 5 compiler." - \endlist - - \section2 VisualAge C++ for AIX, Version 6.0 - - Make sure you have the - \l{http://www-1.ibm.com/support/search.wss?rs=32&tc=SSEP5D&dc=D400}{latest upgrades} - installed. - - \section2 GCCE (Symbian) - - GCCE cannot be used to compile Qt libaries for the Symbian platform, but GCCE is supported - when compiling Qt applications for Symbian platform. */ diff --git a/doc/src/platforms/platform-notes-rtos.qdoc b/doc/src/platforms/platform-notes-rtos.qdoc index 4a34ece..8c30701 100644 --- a/doc/src/platforms/platform-notes-rtos.qdoc +++ b/doc/src/platforms/platform-notes-rtos.qdoc @@ -27,8 +27,8 @@ /*! \page platform-notes-vxworks.html - \title Platform Notes - VxWorks - \contentspage Platform Notes + \title Platform and Compiler Notes - VxWorks + \contentspage Platform and Compiler Notes \target VxWorks \note VxWorks is a community supported platform. See the @@ -143,8 +143,8 @@ /*! \page platform-notes-qnx.html - \title Platform Notes - QNX - \contentspage Platform Notes + \title Platform and Compiler Notes - QNX + \contentspage Platform and Compiler Notes \target QNX \note QNX is a community supported platform. See the diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc index dff1b5b..dbedc1d 100644 --- a/doc/src/platforms/platform-notes.qdoc +++ b/doc/src/platforms/platform-notes.qdoc @@ -39,35 +39,91 @@ /*! \page platform-notes.html \ingroup platform-specific - \title Platform Notes + \title Platform and Compiler Notes \brief Information about the platforms on which Qt can be used. This page contains information about the platforms Qt is currently known to run on, with links to platform-specific notes, including any known bugs or incompatibilities. + Information about the combinations of platforms and compilers + supported by Qt can be found on the \l{Supported Platforms} page. + \list - \o \l{Platform Notes - X11} - \tableofcontents{1 Platform Notes - X11} - \o \l{Platform Notes - Windows} - \tableofcontents{1 Platform Notes - Windows} - \o \l{Platform Notes - Mac OS X} - \tableofcontents{1 Platform Notes - Mac OS X} - \o \l{Platform Notes - Symbian} - \tableofcontents{1 Platform Notes - Symbian} - \o \l{Platform Notes - Embedded Linux} - \tableofcontents{1 Platform Notes - Embedded Linux} - \o \l{Platform Notes - Windows CE} - \tableofcontents{1 Platform Notes - Windows CE} - \o \l{Platform Notes - QNX} - \tableofcontents{1 Platform Notes - QNX} - \o \l{Platform Notes - VxWorks} - \tableofcontents{1 Platform Notes - VxWorks} + \o \l{Platform and Compiler Notes - X11} + \tableofcontents{1 Platform and Compiler Notes - X11} + \o \l{Platform and Compiler Notes - Windows} + \tableofcontents{1 Platform and Compiler Notes - Windows} + \o \l{Platform and Compiler Notes - Mac OS X} + \tableofcontents{1 Platform and Compiler Notes - Mac OS X} + \o \l{Platform and Compiler Notes - Symbian} + \tableofcontents{1 Platform and Compiler Notes - Symbian} + \o \l{Platform and Compiler Notes - Embedded Linux} + \tableofcontents{1 Platform and Compiler Notes - Embedded Linux} + \o \l{Platform and Compiler Notes - Windows CE} + \tableofcontents{1 Platform and Compiler Notes - Windows CE} + \o \l{Platform and Compiler Notes - QNX} + \tableofcontents{1 Platform and Compiler Notes - QNX} + \o \l{Platform and Compiler Notes - VxWorks} + \tableofcontents{1 Platform and Compiler Notes - VxWorks} \endlist - See also the \l{Compiler Notes} for information about compiler-specific - build issues. Information about the combinations of platforms and compilers - supported by Qt can be found on the \l{Supported Platforms} page. + \section1 General Compiler Notes + + \section2 Supported Features + + Not all compilers used to build Qt are able to compile all modules. The following table + shows the compiler support for five modules that are not uniformly available for all + platforms and compilers. + + \table + \header \o Compiler \o{5,1} Features + \header \o \o Concurrent \o XmlPatterns \o WebKit(*) \o CLucene \o Phonon + \row \o g++ 3.3 \o \o \bold{X} \o \o \bold{X} \o \bold{X} + \row \o g++ 3.4 and up \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} + \row + \row \o SunCC 5.5 \o \o \o \o \bold{X} \o \bold{X} + \row + \row \o aCC series 3 \o \o \o \o \bold{X} \o \bold{X} + \row \o aCC series 6 \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} + \row \o xlC 6 \o \o \o \o \bold{X} \o \bold{X} + \row \o Intel CC 10 \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} + \row + \row \o MSVC 2003 \o \bold{X} \o \bold{X} \o \o \bold{X} \o \bold{X} + \row \o MSVC 2005 and up \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} + \endtable + + * WebKit is only supported as a dynamically built library. Static linkage is not supported. + + \section2 GCC 3.4.6 (Debian 3.4.6-5) on AMD64 (x86_64) + + This compiler is known to miscompile some parts of Qt when doing a + release build. There are several workarounds: + + \list 1 + \o Use a debug build instead. + \o For each miscompilation encountered, recompile the file, removing the \c{-O2} option. + \o Add \c{-fno-gcse} to the + \l{qmake Variable Reference#QMAKE_CXXFLAGS_RELEASE}{QMAKE_CXXFLAGS_RELEASE} qmake + variable. + \endlist + + \section2 GCC 4.0.0 + + The released package of the compiler has some bugs that lead to + miscompilations. We recommend using GCC 4.0.1 or later, or to use + a recent CVS snapshot of the GCC 4.0 branch. The version of GCC + 4.0.0 that is shipped with Mac OS X 10.4 "Tiger" is known to work + with Qt for Mac OS X. + + \section2 Intel C++ Compiler + + Qt supports the Intel C++ compiler on both Windows and Linux. + However, there are a few issues on Linux; see + \l{Platform and Compiler Notes - X11#Intel C++ Compiler for Linux}{Intel C++ Compiler for Linux} + for details. + + \section1 Feedback and Corrections If you have anything to add to this list or any of the platform or compiler-specific pages, please submit it via the \l{Bug Report Form} @@ -76,8 +132,8 @@ /*! \page platform-notes-x11.html - \title Platform Notes - X11 - \contentspage Platform Notes + \title Platform and Compiler Notes - X11 + \contentspage Platform and Compiler Notes This page contains information about the X11 platforms Qt is currently known to run on, with links to platform-specific notes. More information @@ -89,8 +145,7 @@ \target AIX \section1 AIX - 5.2 - Qt has been tested on AIX 5.2, using the - \l{Compiler Notes#IBM xlC (AIX)}{xlC} compiler. + Qt has been tested on AIX 5.2, using the xlC compiler. \table \header \o Compiler \o Notes @@ -113,13 +168,38 @@ either \c{-no-stl} or \c{-no-largefile}. \endtable + \section2 IBM xlC + + The makeC++SharedLib utility must be in your PATH and be up to date to + build shared libraries. From IBM's + \l{http://www.redbooks.ibm.com/abstracts/sg245674.html}{C and C++ Application Development on AIX} + Redbook: + + \list + \o "The second step is to use the makeC++SharedLib command to create the + shared object. The command has many optional arguments, but in its + simplest form, can be used as follows:" + \snippet doc/src/snippets/code/doc_src_compiler-notes.qdoc 1 + \o "The full path name to the command is not required; however, to avoid + this, you will have to add the directory in which it is located to + your PATH environment variable. The command is located in the + /usr/vacpp/bin directory with the VisualAge C++ Professional for AIX, + Version 5 compiler." + \endlist + + \section2 VisualAge C++ for AIX, Version 6.0 + + Make sure you have the + \l{http://www-1.ibm.com/support/search.wss?rs=32&tc=SSEP5D&dc=D400}{latest upgrades} + installed. + \target FreeBSD \section1 FreeBSD - 6.0-RELEASE \note FreeBSD is a community supported platform. See the \l{Supported Platforms} page for more information. - The system compiler on FreeBSD 4.x is gcc 2.95.4, which is not + The system compiler on FreeBSD 4.x is GCC 2.95.4, which is not officially supported by Qt 4. We develop using and recommend ports/lang/gcc34. You will need to run configure with the \c{-platform freebsd-g++34} arguments. Optionally, you may use @@ -132,7 +212,6 @@ Note that we do not actively test FreeBSD 4.x and 5.x. Our developers migrated to 6.x after the Qt 4 launch. FreeBSD-CURRENT is not supported. - \target HP-UX \section1 HP-UX Qt supports HP-UX on both PA-RISC and the Itanium (IA64) architectures. @@ -140,17 +219,26 @@ \section2 PA-RISC - B.11.11 or later You can configure Qt for aCC in 32 and 64 bit mode (hpux-acc-64 or - hpux-acc-32), or gcc in 32 bit mode (hpux-g++). The default platform is + hpux-acc-32), or GCC in 32 bit mode (hpux-g++). The default platform is hpux-acc-32. The minimum required version for aCC (HP ANSI C++) on PA-RISC - is A.03.57. The supported gcc compiler is gcc 3.4.3. + is A.03.57. The supported GCC compiler is GCC 3.4.3. \section2 Itanium - B.11.23 or later You can configure Qt for aCC in 32 and 64 bit mode (hpuxi-acc-64 or - hpuxi-acc-32). gcc is currently unsupported. The default platform is + hpuxi-acc-32). GCC is currently unsupported. The default platform is hpuxi-acc-64. The minimum required version for aCC (HP ANSI C++) on Itanium is A.06.12. + \section2 HP ANSI C++ (aCC) + + The hpux-acc-32 and hpux-acc-64 platforms are tested with aCC A.03.57. The + hpuxi-acc-32 and hpuxi-acc-64 platforms are tested with aCC A.06.10. + + \section2 GCC + + The hpux-g++ platform is tested with GCC 3.4.4. + \section2 OpenGL Support Qt's \l{QtOpenGL}{OpenGL} module requires GLX 1.3 or later to be installed. @@ -161,20 +249,29 @@ \target IRIX \section1 IRIX - 6.5.x - \bold{IRIX is an unsupported platform - please see Qt's online - \l{Platform Support Policy} for details.} + \bold{IRIX is an unsupported platform. See the \l{Supported Platforms} page + and Qt's Software's online \l{Platform Support Policy} page for details.} Unpackaging and IRIX tar: Because of long filenames some files will be cut off incorrectly with IRIX tar. Please use GNU tar to unpack Qt packages. + \section2 MIPSpro + + Qt 4.4.x requires MIPSpro version 7.4.2m. + + Note that MIPSpro version 7.4.4m is currently not supported, since it has + introduced a number of problems that have not yet been resolved. + We recommend using 7.4.2m for Qt development. However, please note the + unsupported status of this platform. + \section1 Linux There are no known problems with using Qt on production versions of Linux/x86, Linux/ppc, Linux/amd64 and Linux/ia64 (including Altix(R)). - For the gcc/g++ compiler, please also see the relevant - \l{Compiler Notes#GCC}{compiler page}. + For the GCC compiler, please also see the relevant + \l{Platform and Compiler Notes#General Compiler Notes}{General Compiler Notes}. \section2 Installation problems @@ -198,6 +295,40 @@ "Failed Dependency". Use the \c{--nodeps} option to \c rpm to workaround this problem. + \section2 Intel C++ Compiler for Linux + + Nokia currently tests the following compilers: + + \list + + \o Intel(R) C++ Compiler for applications running on IA-32, + Version 10.1 Build 20080602 Package ID: l_cc_p_10.1.017 + + \o Intel(R) C++ Compiler for applications running on Intel(R) 64, + Version 10.1 Build 20080602 Package ID: l_cc_p_10.1.017 + + \endlist + + We do not currently test the IA-64 (Itanium) compiler. + + \section2 Known Issues with Intel C++ Compiler for Linux + + \list + + \o Precompiled header support does not work in version 10.0.025 + and older. For these compilers, you should configure Qt with + -no-pch. Precompiled header support works properly in version + 10.0.026 and later. + \o Version 10.0.026 for Intel 64 is known to miscompile qmake when + building in release mode. For now, configure Qt with + -debug. Version 10.1.008 and later can compile qmake in release + mode. + \o Versions 10.1.008 to 10.1.015 for both IA-32 and Intel 64 are + known crash with "(0): internal error: 0_47021" when compiling + QtXmlPatterns, QtWebKit, and Designer in release mode. Version + 10.1.017 compiles these modules correctly in release mode. + \endlist + \target Solaris \section1 Solaris - 9 or later @@ -207,25 +338,50 @@ to truncate long filenames. We recommend using star instead (http://star.berlios.de). - \section2 CC on Solaris + Please note that WebKit is not supported for Solaris, regardless of + which compiler is used. + + \section2 CC - Be sure to check our \l{Compiler Notes#Sun Studio}{Forte Developer / Sun Studio} - notes. + See the notes for \l{Forte Developer / Sun Studio}. - \section2 GCC on Solaris + \section2 GCC + + Please use GCC 3.4.2 or later. - Be sure to check the installation notes for \l{GCC on Solaris}. Do not use GCC with Sun's assembler/linker, this will result in link-time errors in shared libraries. Use GNU binutils instead. GCC 3.2.* is known to miscompile Qt due to an optimizer bug that will - cause the resulting binaries to hang. Please use GCC 3.4.2 or later. + cause the resulting binaries to hang. + + \section2 Forte Developer / Sun Studio + + Qt is tested using Sun Studio 12 (Sun CC 5.9). Go to + \l{Sun Studio Patches} page on Sun's Web site to download + the latest patches for your Sun compiler. + + Please note that Qt 4.6 is stricter in its STL requirements and + that the default STL implementation used by Sun CC does not pass + those requirements. This does not affect binary compatibility and + you can continue to use STL in your own code, but Qt's + STL-compatibility functions will be disabled. + + Sun CC ships with a secondary STL implementation (called stlport4) + which is standards-compliant and can be used by Qt. You can enable + it by passing the -library=stlport4 option to the compiler. Note + that this does not affect Qt's binary compatibility, but it may + affect that of other libraries and programs that use STL. + + \section2 Sun WorkShop 5.0 + + Sun WorkShop 5.0 is not supported with Qt 4. */ /*! \page platform-notes-windows.html - \title Platform Notes - Windows - \contentspage Platform Notes + \title Platform and Compiler Notes - Windows + \contentspage Platform and Compiler Notes This page contains information about the Windows platforms Qt is currently known to run on, with links to platform-specific notes. More information @@ -255,12 +411,87 @@ and other applications that require screen grabbing while direct rendering is enabled. Other GL-applications may not work as expected, unless direct rendering is disabled. + + \section2 GCC (MinGW) + + We have tested Qt with this compiler on Windows XP. + The minimal version of MinGW supported is GCC 4.4. + + \note For users of the MinGW binary package: This package is now + based on MinGW 4.4. The installer no longer offers to download + MinGW for you, but rather offers to use a version of MinGW that + you already have installed on your machine. You just tell the + installer which directory MinGW is installed in. If you don't + already have MinGW 4.4 installed, you can download a .zip archive + from our \l{ftp://ftp.trolltech.com/misc/MinGW-gcc440_1.zip}{FTP + site}. This archive provides fixes to MinGW and support for + missing API, See the _patches directory in the archive for + details. + + \note A MinGW installation is only needed to build against the + binary pacakge, not to run the pre-compiled binaries that are in + the package. + + \section2 Intel C++ Compiler (Windows, Altix) + + Qt 4 has been tested successfully with: + + \list + \o Windows - Intel(R) C++ Compiler for 32-bit applications, + Version 9.1.040. + \o Altix - Intel(R) C++ Itanium(R) Compiler for Itanium(R)-based + applications Version 8.1 Build 20050406 Package ID: l_cc_pc_8.1.030 + \endlist + + We currently only test the Intel compiler on 32-bit Windows versions. + + \section2 Visual Studio (Windows) + + We do most of our Windows development on Windows XP, using Microsoft + Visual Studio .NET 2005 and Visual Studio 2008 (both the 32- and 64-bit + versions). + + Qt works with the Standard Edition, the Professional Edition and Team + System Edition of Visual Studio 2005. + + In order to use Qt with the Visual Studio 2005/2008 Express Edition you need + to download and install the platform SDK. Due to limitations in the + Express Edition it is not possible for us to install the Qt Visual + Studio Integration. You will need to use our command line tools to + build Qt applications with this edition. + + The Visual C++ Linker doesn't understand filenames with spaces (as in + \c{C:\Program files\Qt\}) so you will have to move it to another place, + or explicitly set the path yourself; for example: + + \snippet doc/src/snippets/code/doc_src_compiler-notes.qdoc 0 + + If you are experiencing strange problems with using special flags that + modify the alignment of structure and union members (such as \c{/Zp2}) + then you will need to recompile Qt with the flags set for the + application as well. + + If you're using Visual Studio .NET (2002) Standard Edition, you should be + using the Qt binary package provided, and not the source package. + As the Standard Edition does not optimize compiled code, your compiled + version of Qt would perform suboptimally with respect to speed. + + With Visual Studio 2005 Service Pack 1 a bug was introduced which + causes Qt not to compile, this has been fixed with a hotfix available + from Microsoft. See this + \l{http://qt.nokia.com/developer/faqs/faq.2006-12-18.3281869860}{Knowledge Base entry} + for more information. + + There currently is a problem when compiling Qt with Visual Studio 2010 for 64-bit. + Its optimizer causes trouble and generates code that crashes for the release builds. + To avoid the crashes, You need to apply the hotfix in the following article + http://support.microsoft.com/kb/2280741. */ /*! \page platform-notes-mac.html - \title Platform Notes - Mac OS X - \contentspage Platform Notes + \title Platform and Compiler Notes - Mac OS X + \contentspage Platform and Compiler Notes This page contains information about the Mac OS X versions Qt is currently known to run on, with links to platform-specific notes. More information @@ -287,11 +518,15 @@ \section2 Required GCC version - Apple's gcc 4 that is shipped with the Xcode Tools for both Mac OS X 10.4 - and 10.5 will compile Qt. There is preliminary support for gcc 4.2 which + Apple's GCC 4 that is shipped with the Xcode Tools for both Mac OS X 10.4 + and 10.5 will compile Qt. There is preliminary support for GCC 4.2 which is included with Xcode Tools 3.1+ (configurable with \c{-platform macx-g++42}). + Please use the latest GCC 3.3 from Apple or a later version of GCC 3. + The GCC 3.3 that is provided with Xcode 1.5 is known to generate bad code. + Use the November 2004 GCC 3.3 updater \l{http://connect.apple.com}{available from Apple}. + \section2 Binary Package The binary package requires that you have your .qt-license file in your @@ -300,7 +535,7 @@ this file in the email they receive. The binary package was built on Mac OS X 10.4 with Xcode Tools 2.1 - (gcc 4.0.0) for Qt 4.1.0, Xcode Tools 2.2 (gcc 4.0.1) for Qt 4.1.1-4.1.4 + (GCC 4.0.0) for Qt 4.1.0, Xcode Tools 2.2 (GCC 4.0.1) for Qt 4.1.1-4.1.4 and Xcode Tools 2.3 for 4.2.0. It will only link executables built against 10.4 (or a 10.4 SDK). You should be able to run applications linked against these frameworks on Mac OS X 10.3.9 and Mac OS X 10.4+. @@ -374,8 +609,8 @@ /*! \page platform-notes-windows-ce.html - \title Platform Notes - Windows CE - \contentspage Platform Notes + \title Platform and Compiler Notes - Windows CE + \contentspage Platform and Compiler Notes This page contains information about the Windows CE and Windows Mobile platforms Qt is currently known to run on, with links to platform-specific @@ -385,8 +620,8 @@ /*! \page platform-notes-symbian.html - \title Platform Notes - Symbian - \contentspage Platform Notes + \title Platform and Compiler Notes - Symbian + \contentspage Platform and Compiler Notes \ingroup platform-specific \brief Information about the state of support for the Symbian platform. @@ -468,6 +703,13 @@ for Phonon. \endtable + \section1 Compiler Notes + + \section2 GCCE (Symbian) + + GCCE cannot be used to compile Qt libaries for the Symbian platform, but GCCE is supported + when compiling Qt applications for the Symbian platform. + \section1 Known Issues Known issues can be found by visiting the @@ -580,8 +822,8 @@ /*! \page platform-notes-embedded-linux.html - \title Platform Notes - Embedded Linux - \contentspage Platform Notes + \title Platform and Compiler Notes - Embedded Linux + \contentspage Platform and Compiler Notes This page contains information about the Embedded Linux platforms Qt is currently known to run on, with links to platform-specific notes. More diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc index 31866c4..4918e18 100644 --- a/doc/src/platforms/supported-platforms.qdoc +++ b/doc/src/platforms/supported-platforms.qdoc @@ -44,9 +44,8 @@ \tableofcontents - Information about the specific platforms Qt runs on can be found on the - \l{Platform Notes} page. Information about the compilers used on each platform - can be found on the \l{Compiler Notes} page. + Information about the specific platforms Qt runs on, and the compilers used + on each platform, can be found on the \l{Platform and Compiler Notes} page. \section1 Tier 1 Platforms diff --git a/doc/src/platforms/winsystem.qdoc b/doc/src/platforms/winsystem.qdoc index 2919bb7..64e35c5 100644 --- a/doc/src/platforms/winsystem.qdoc +++ b/doc/src/platforms/winsystem.qdoc @@ -44,8 +44,8 @@ \tableofcontents For information about which platforms are supported by Qt, see the - \l{Platform Notes}. For information on distributing Qt applications, see - \l{Deploying Qt Applications}. + \l{Platform and Compiler Notes}. For information on distributing Qt + applications, see \l{Deploying Qt Applications}. \target x11 \section1 Qt for X11 -- cgit v0.12 From 868ab8bbe563427d6f742dbc48b10cc483257d3a Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Sat, 9 Oct 2010 14:36:21 +0200 Subject: Added missing QtWebKit example files and some whitespace fixes. --- examples/webkit/imageanalyzer/imageanalyzer.cpp | 8 +- examples/webkit/imageanalyzer/imageanalyzer.h | 73 +++++------ examples/webkit/imageanalyzer/mainwindow.h | 21 ++-- .../imageanalyzer/resources/imageanalyzer.qrc | 10 ++ examples/webkit/imageanalyzer/resources/index.html | 133 +++++++++++++++++++++ 5 files changed, 198 insertions(+), 47 deletions(-) create mode 100644 examples/webkit/imageanalyzer/resources/imageanalyzer.qrc create mode 100644 examples/webkit/imageanalyzer/resources/index.html diff --git a/examples/webkit/imageanalyzer/imageanalyzer.cpp b/examples/webkit/imageanalyzer/imageanalyzer.cpp index c663cf3..1d0ee45 100644 --- a/examples/webkit/imageanalyzer/imageanalyzer.cpp +++ b/examples/webkit/imageanalyzer/imageanalyzer.cpp @@ -57,7 +57,7 @@ //! [ ImageAnalyzer - Constructor ] ImageAnalyzer::ImageAnalyzer(QNetworkDiskCache* netcache, QObject* parent) -: QObject(parent), m_cache(netcache), m_outstandingFetches(0) + : QObject(parent), m_cache(netcache), m_outstandingFetches(0) { /* ImageAnalyzer only wants to receive http responses for requests that it makes, so that's why it has its own @@ -69,11 +69,11 @@ ImageAnalyzer::ImageAnalyzer(QNetworkDiskCache* netcache, QObject* parent) m_network->setCache(m_cache); QObject::connect(m_network, SIGNAL(finished(QNetworkReply*)), - this, SLOT(handleReply(QNetworkReply*))); + this, SLOT(handleReply(QNetworkReply*))); QObject::connect(m_watcher, SIGNAL(finished()), - this, SLOT(doneProcessing())); + this, SLOT(doneProcessing())); QObject::connect(m_watcher, SIGNAL(progressValueChanged(int)), - this, SLOT(progressStatus(int))); + this, SLOT(progressStatus(int))); } //! [ ImageAnalyzer - Constructor ] ImageAnalyzer::~ImageAnalyzer() diff --git a/examples/webkit/imageanalyzer/imageanalyzer.h b/examples/webkit/imageanalyzer/imageanalyzer.h index f228c0e..1bb25dc 100644 --- a/examples/webkit/imageanalyzer/imageanalyzer.h +++ b/examples/webkit/imageanalyzer/imageanalyzer.h @@ -47,48 +47,53 @@ class QNetworkAccessManager; class QNetworkReply; class QNetworkDiskCache; + //! [ ImageAnalyzer - public interface ] class ImageAnalyzer : public QObject { Q_OBJECT - public: - ImageAnalyzer(QNetworkDiskCache * netcache, QObject * parent=0); +public: + ImageAnalyzer(QNetworkDiskCache * netcache, QObject * parent=0); + + QRgb lastResults(); + float lastRed(); + float lastGreen(); + float lastBlue(); + bool isBusy(); + Q_PROPERTY(bool busy READ isBusy); + Q_PROPERTY(float red READ lastRed); + Q_PROPERTY(float green READ lastGreen); + Q_PROPERTY(float blue READ lastBlue); + ~ImageAnalyzer(); + +public slots: + /*! initiates analysis of all the urls in the list */ + void startAnalysis(const QStringList & urls); + +signals: + void finishedAnalysis(); + void updateProgress(int completed, int total); + //! [ ImageAnalyzer - public interface ] + +private slots: + void handleReply(QNetworkReply*); + void doneProcessing(); + void progressStatus(int); - QRgb lastResults(); - float lastRed(); - float lastGreen(); - float lastBlue(); - bool isBusy(); - Q_PROPERTY(bool busy READ isBusy); - Q_PROPERTY(float red READ lastRed); - Q_PROPERTY(float green READ lastGreen); - Q_PROPERTY(float blue READ lastBlue); - ~ImageAnalyzer(); - public slots: - /*! initiates analysis of all the urls in the list */ - void startAnalysis(const QStringList & urls); - signals: - void finishedAnalysis(); - void updateProgress(int completed, int total); -//! [ ImageAnalyzer - public interface ] - private slots: - void handleReply(QNetworkReply*); - void doneProcessing(); - void progressStatus(int); private: - QRgb processImages(); - void fetchURLs(); - void queueImage(QImage img); + QRgb processImages(); + void fetchURLs(); + void queueImage(QImage img); -//! [ ImageAnalyzer - private members ] + //! [ ImageAnalyzer - private members ] private: - QNetworkAccessManager* m_network; - QNetworkDiskCache* m_cache; - QStringList m_URLQueue; - QList m_imageQueue; - int m_outstandingFetches; - QFutureWatcher * m_watcher; -//! [ ImageAnalyzer - private members ] + QNetworkAccessManager* m_network; + QNetworkDiskCache* m_cache; + QStringList m_URLQueue; + QList m_imageQueue; + int m_outstandingFetches; + QFutureWatcher * m_watcher; + //! [ ImageAnalyzer - private members ] }; QRgb averageRGB(const QImage &img); diff --git a/examples/webkit/imageanalyzer/mainwindow.h b/examples/webkit/imageanalyzer/mainwindow.h index 4c6b950..076e586 100644 --- a/examples/webkit/imageanalyzer/mainwindow.h +++ b/examples/webkit/imageanalyzer/mainwindow.h @@ -41,8 +41,8 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H -#include +#include class ImageAnalyzer; class QNetworkDiskCache; @@ -50,14 +50,17 @@ class QNetworkDiskCache; class MainWin : public QWebView { Q_OBJECT + +public: + explicit MainWin(QWidget * parent = 0); + +private: + ImageAnalyzer * m_analyzer; + QNetworkAccessManager * m_network; + QNetworkDiskCache * m_cache; + +private slots: + void addJSObject(); - public: - explicit MainWin(QWidget * parent = 0); - private: - ImageAnalyzer * m_analyzer; - QNetworkAccessManager * m_network; - QNetworkDiskCache * m_cache; - private slots: - void addJSObject(); }; #endif diff --git a/examples/webkit/imageanalyzer/resources/imageanalyzer.qrc b/examples/webkit/imageanalyzer/resources/imageanalyzer.qrc new file mode 100644 index 0000000..fe9a5df --- /dev/null +++ b/examples/webkit/imageanalyzer/resources/imageanalyzer.qrc @@ -0,0 +1,10 @@ + + + index.html + images/mtRainier.jpg + images/bellaCoola.jpg + images/trees.jpg + images/flower.jpg + images/seaShell.jpg + + diff --git a/examples/webkit/imageanalyzer/resources/index.html b/examples/webkit/imageanalyzer/resources/index.html new file mode 100644 index 0000000..6532951 --- /dev/null +++ b/examples/webkit/imageanalyzer/resources/index.html @@ -0,0 +1,133 @@ + + + + +
+
+
Images to be analyzed:
+ +
+ +
+
+ +
+
+

Image Analyzer

+
+
+

Status: Idle

+
+ Latest Results:
+ Red: n/a
+ Green: n/a
+ Blue: n/a
+
+

Click on images below to select for analysis

+
+
+ +
+
+ + + + + + +
+ + + + + + + -- cgit v0.12 From dc5299e1a59e066e4b804c081114edaa8b104438 Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Sat, 9 Oct 2010 17:28:06 +0200 Subject: Add missing data for the autotest of in-place conversion for Pixmap The commit 4d974ff0a748b22e668a4cb7ef38101122c85b3b uses an new image which was not commited with the patch. (cherry picked from commit f0c1f381af7d6338ded9f65d00ed54b1b9405ba9) --- .../loadFromData/designer_indexed8_no_alpha_animated.gif | Bin 0 -> 4075 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/auto/qpixmap/loadFromData/designer_indexed8_no_alpha_animated.gif diff --git a/tests/auto/qpixmap/loadFromData/designer_indexed8_no_alpha_animated.gif b/tests/auto/qpixmap/loadFromData/designer_indexed8_no_alpha_animated.gif new file mode 100644 index 0000000..86a3a2e Binary files /dev/null and b/tests/auto/qpixmap/loadFromData/designer_indexed8_no_alpha_animated.gif differ -- cgit v0.12 From 6f596b07a7c035b36bc1005a83b283057669e4ac Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Fri, 8 Oct 2010 14:21:10 +0200 Subject: Avoid in-place convertion of images with multiple references The decoding from image reader was assuming the image reader do not keep the image internally. This is not true for the GIF plugins because the previous image can be used to compose the current image. This was causing crash on ARM because the 16 bits color depth causes the image memory to be reduce by half. When the plugin was accessing the memory, it assumes the images has not changed and is on 32 bits. This patch disable the in-place conversion if a detach is required. Regular conversion is the correct solution in this case, and it can also be made faster by converting while copying. Reviewed-by: Andreas Kling (cherry picked from commit 4d974ff0a748b22e668a4cb7ef38101122c85b3b) --- src/gui/image/qimage.cpp | 4 ++++ tests/auto/qpixmap/tst_qpixmap.cpp | 13 ++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index ac148ee..1157b93 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -6607,6 +6607,10 @@ bool QImageData::convertInPlace(QImage::Format newFormat, Qt::ImageConversionFla if (format == newFormat) return true; + // No in-place conversion if we have to detach + if (ref > 1) + return false; + const InPlace_Image_Converter *const converterPtr = &inplace_converter_map[format][newFormat]; InPlace_Image_Converter converter = *converterPtr; if (converter) diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp index 8005ec5..24cbb21 100644 --- a/tests/auto/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/qpixmap/tst_qpixmap.cpp @@ -179,6 +179,7 @@ private slots: void fromImageReader_data(); void fromImageReader(); + void fromImageReaderAnimatedGif_data(); void fromImageReaderAnimatedGif(); void preserveDepth(); @@ -1605,6 +1606,8 @@ void tst_QPixmap::fromImageReader_data() QTest::newRow("designer_indexed8_no_alpha.gif") << prefix + "/designer_indexed8_no_alpha.gif"; QTest::newRow("designer_indexed8_with_alpha.gif") << prefix + "/designer_indexed8_with_alpha.gif"; QTest::newRow("designer_rgb32.jpg") << prefix + "/designer_rgb32.jpg"; + QTest::newRow("designer_indexed8_with_alpha_animated") << prefix + "/designer_indexed8_with_alpha_animated.gif"; + QTest::newRow("designer_indexed8_with_alpha_animated") << prefix + "/designer_indexed8_no_alpha_animated.gif"; } void tst_QPixmap::fromImageReader() @@ -1621,14 +1624,22 @@ void tst_QPixmap::fromImageReader() QVERIFY(pixmapsAreEqual(&pixmapWithCopy, &directLoadingPixmap)); } +void tst_QPixmap::fromImageReaderAnimatedGif_data() +{ + QTest::addColumn("imagePath"); + QTest::newRow("gif with alpha") << QString::fromLatin1("/designer_indexed8_with_alpha_animated.gif"); + QTest::newRow("gif without alpha") << QString::fromLatin1("/designer_indexed8_no_alpha_animated.gif"); +} + void tst_QPixmap::fromImageReaderAnimatedGif() { + QFETCH(QString, imagePath); #ifdef Q_OS_SYMBIAN const QString prefix = QLatin1String(SRCDIR) + "loadFromData"; #else const QString prefix = QLatin1String(SRCDIR) + "/loadFromData"; #endif - const QString path = prefix + QString::fromLatin1("/designer_indexed8_with_alpha_animated.gif"); + const QString path = prefix + imagePath; QImageReader referenceReader(path); QImageReader pixmapReader(path); -- cgit v0.12 From 22fd9b9780389f51ab3dd1865d2b5686fa34e6ff Mon Sep 17 00:00:00 2001 From: Carlos Manuel Duclos Vergara Date: Fri, 8 Oct 2010 15:05:14 +0200 Subject: [QCocoaView scrollWheel:] can end up recursing infinitely when a scrollWheel event is sent to two stacked MDI windows The problem is the fact that we were propagating the event through the class hierarchy. This means calling the super class implementation, which does nothing but pass the event to the next guy, which is the other window, which in turn does the same thing... The point is, there is no need to propagate this event on the class hierarchy. If anything, this should be propagated on the widgets hierarchy, which is already handled by Qt. Removing the code so this problem does not happen again. Task-number: QTBUG-12952 Reviewed-by: Richard Moe Gustavsen --- src/gui/kernel/qcocoaview_mac.mm | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index a552ce7..f759fe0 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -939,10 +939,6 @@ static int qCocoaViewCount = 0; } } #endif //QT_NO_WHEELEVENT - - if (!wheelOK) { - return [super scrollWheel:theEvent]; - } } - (void)tabletProximity:(NSEvent *)tabletEvent -- cgit v0.12 From a6e371076a3b2410af2424efc1407c6f5d0b6407 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Topi=20Reini=C3=B6?= Date: Mon, 11 Oct 2010 12:39:49 +0200 Subject: Add TIFFClose to QTIffHandler::option() to avoid memory leak Task-number: QTBUG-14261 Reviewed-by: aavit --- src/gui/image/qtiffhandler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/image/qtiffhandler.cpp b/src/gui/image/qtiffhandler.cpp index de4f680..1627917 100644 --- a/src/gui/image/qtiffhandler.cpp +++ b/src/gui/image/qtiffhandler.cpp @@ -608,6 +608,7 @@ QVariant QTiffHandler::option(ImageOption option) const TIFFGetField(tiff, TIFFTAG_IMAGEWIDTH, &width); TIFFGetField(tiff, TIFFTAG_IMAGELENGTH, &height); imageSize = QSize(width, height); + TIFFClose(tiff); } device()->seek(pos); if (imageSize.isValid()) -- cgit v0.12 From eb46137d89b0acfb8874445d7d9a591f81fe5520 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 11 Oct 2010 16:49:01 +0200 Subject: remove exec bits again ... --- translations/assistant_ja.ts | 0 translations/linguist_ja.ts | 0 translations/qt_ja.ts | 0 3 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 translations/assistant_ja.ts mode change 100755 => 100644 translations/linguist_ja.ts mode change 100755 => 100644 translations/qt_ja.ts diff --git a/translations/assistant_ja.ts b/translations/assistant_ja.ts old mode 100755 new mode 100644 diff --git a/translations/linguist_ja.ts b/translations/linguist_ja.ts old mode 100755 new mode 100644 diff --git a/translations/qt_ja.ts b/translations/qt_ja.ts old mode 100755 new mode 100644 -- cgit v0.12 From 6a23821f82e3e609c3e51df0068b188d81219812 Mon Sep 17 00:00:00 2001 From: Victor Ostashevsky Date: Mon, 11 Oct 2010 16:54:12 +0200 Subject: Make qtconfig help messages translatable Merge-request: 851 Reviewed-by: Oswald Buddenhagen --- tools/qtconfig/mainwindow.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/qtconfig/mainwindow.cpp b/tools/qtconfig/mainwindow.cpp index 9675f99..4fe2868 100644 --- a/tools/qtconfig/mainwindow.cpp +++ b/tools/qtconfig/mainwindow.cpp @@ -81,7 +81,7 @@ QT_BEGIN_NAMESPACE // external use ignore them // extern bool Q_CORE_EXPORT qt_resolve_symlinks; -static const char *appearance_text = +static const char *appearance_text = QT_TRANSLATE_NOOP("MainWindow", "

Appearance

" "
" "

Use this tab to customize the appearance of your Qt applications.

" @@ -95,9 +95,9 @@ static const char *appearance_text = "To customize colors further, press the Tune Palette button to open " "the advanced palette editor." "

The Preview Window shows what the selected Style and colors look " -"like."; +"like."); -static const char *font_text = +static const char *font_text = QT_TRANSLATE_NOOP("MainWindow", "

Fonts

" "
" "

Use this tab to select the default font for your Qt applications. " @@ -114,9 +114,9 @@ static const char *font_text = "Korean characters that are not found in the Lucida font will be taken " "from the Mincho font. Because the font substitutions are " "lists, you can also select multiple families, such as Song Ti (for " -"use with Chinese text)."; +"use with Chinese text)."); -static const char *interface_text = +static const char *interface_text = QT_TRANSLATE_NOOP("MainWindow", "

Interface

" "
" "

Use this tab to customize the feel of your Qt applications.

" @@ -131,10 +131,10 @@ static const char *interface_text = "at 0 will disable the Global Strut feature

" "

XIM (Extended Input Methods) are used for entering characters in " "languages that have large character sets, for example, Chinese and " -"Japanese."; +"Japanese."); // ### What does the 'Enhanced support for languages written R2L do? -static const char *printer_text = +static const char *printer_text = QT_TRANSLATE_NOOP("MainWindow", "

Printer

" "
" "

Use this tab to configure the way Qt generates output for the printer." @@ -145,14 +145,14 @@ static const char *printer_text = "size will be bigger." "

When using font embedding you can select additional directories where " "Qt should search for embeddable font files. By default, the X " -"server font path is used."; +"server font path is used."); -static const char *phonon_text = +static const char *phonon_text = QT_TRANSLATE_NOOP("MainWindow", "

Phonon

" "
" "

Use this tab to configure the Phonon GStreamer multimedia backend. " "

It is reccommended to leave all settings on \"Auto\" to let " -"Phonon determine your settings automatically."; +"Phonon determine your settings automatically."); static QColorGroup::ColorRole centralFromItem( int item ) { -- cgit v0.12 From b1a8c2e50a7d8768da97a9782c393a0cb29458f6 Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Mon, 11 Oct 2010 16:55:01 +0200 Subject: qmake/symbian: Add icons with backslashes in pkg files The destination path in pkg files always uses backslashes, not the path separator native to the build system. Merge-request: 853 Reviewed-by: Oswald Buddenhagen --- qmake/generators/symbian/symbiancommon.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp index 9af3fe4..6fea8fd 100644 --- a/qmake/generators/symbian/symbiancommon.cpp +++ b/qmake/generators/symbian/symbiancommon.cpp @@ -428,9 +428,9 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB t << QString("\"%1epoc32/data/z%2\" - \"!:%3\"") .arg(epocRoot()) .arg(iconFile) - .arg(QDir::toNativeSeparators(iconFile)) << endl << endl; + .arg(QString(iconFile).replace('/', '\\')) << endl << endl; ts << QString("\"\" - \"%1\"") - .arg(romPath(QDir::toNativeSeparators(iconFile))) << endl << endl; + .arg(romPath(QString(iconFile).replace('/', '\\'))) << endl << endl; } else { QDir mifIconDir(project->first("DESTDIR")); QFileInfo mifIcon(mifIconDir.relativeFilePath(project->first("TARGET"))); @@ -439,9 +439,9 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB t << QString("\"%1/%2\" - \"!:%3\"") .arg(mifIcon.path()) .arg(mifIconFileName) - .arg(QDir::toNativeSeparators(iconFile)) << endl << endl; + .arg(QString(iconFile).replace('/', '\\')) << endl << endl; ts << QString("\"\" - \"%1\"") - .arg(romPath(QDir::toNativeSeparators(iconFile))) << endl << endl; + .arg(romPath(QString(iconFile).replace('/', '\\'))) << endl << endl; } } } -- cgit v0.12 From 89a853370d94373c6ef1c9fabcfb5bf19c20f7c9 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Mon, 11 Oct 2010 17:15:44 +0200 Subject: use specified pkg-config Respect the pkg-config tool specified in qmake.conf. This is useful when crossbuilding. Merge-request: 850 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/link_pkgconfig.prf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mkspecs/features/link_pkgconfig.prf b/mkspecs/features/link_pkgconfig.prf index 4c528aa..d70e5de 100644 --- a/mkspecs/features/link_pkgconfig.prf +++ b/mkspecs/features/link_pkgconfig.prf @@ -1,6 +1,7 @@ # handle pkg-config files +isEmpty(PKG_CONFIG):PKG_CONFIG = pkg-config for(PKGCONFIG_LIB, $$list($$unique(PKGCONFIG))) { - QMAKE_CXXFLAGS += $$system(pkg-config --cflags $$PKGCONFIG_LIB) - QMAKE_CFLAGS += $$system(pkg-config --cflags $$PKGCONFIG_LIB) - LIBS += $$system(pkg-config --libs $$PKGCONFIG_LIB) + QMAKE_CXXFLAGS += $$system($$PKG_CONFIG --cflags $$PKGCONFIG_LIB) + QMAKE_CFLAGS += $$system($$PKG_CONFIG --cflags $$PKGCONFIG_LIB) + LIBS += $$system($$PKG_CONFIG --libs $$PKGCONFIG_LIB) } -- cgit v0.12 From cd4eaa9c8274559aa2b0ceaeed1644966b9a2d94 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 11 Oct 2010 17:00:35 +0200 Subject: qmake: pass include directories to MS resource compiler Task-number: QTBUG-13776 Reviewed-by: ossi --- qmake/generators/win32/msvc_vcproj.cpp | 1 + qmake/generators/win32/msvc_vcxproj.cpp | 1 + qmake/generators/win32/winmakefile.cpp | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index cff7a14..cd42d4d 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -1004,6 +1004,7 @@ void VcprojGenerator::initResourceTool() { VCConfiguration &conf = vcProject.Configuration; conf.resource.PreprocessorDefinitions = conf.compiler.PreprocessorDefinitions; + conf.resource.AdditionalIncludeDirectories = conf.compiler.AdditionalIncludeDirectories; // We need to add _DEBUG for the debug version of the project, since the normal compiler defines // do not contain it. (The compiler defines this symbol automatically, which is wy we don't need diff --git a/qmake/generators/win32/msvc_vcxproj.cpp b/qmake/generators/win32/msvc_vcxproj.cpp index 396d2bf..00702ae 100644 --- a/qmake/generators/win32/msvc_vcxproj.cpp +++ b/qmake/generators/win32/msvc_vcxproj.cpp @@ -365,6 +365,7 @@ void VcxprojGenerator::initResourceTool() { VCXConfiguration &conf = vcxProject.Configuration; conf.resource.PreprocessorDefinitions = conf.compiler.PreprocessorDefinitions; + conf.resource.AdditionalIncludeDirectories = conf.compiler.AdditionalIncludeDirectories; // We need to add _DEBUG for the debug version of the project, since the normal compiler defines // do not contain it. (The compiler defines this symbol automatically, which is wy we don't need diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index ecb20c7..8f148ad 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -760,7 +760,8 @@ void Win32MakefileGenerator::writeRcFilePart(QTextStream &t) // since the compiler defines this symbol by itself, and we use it in the automatically // created rc file when VERSION is define the .pro file. t << res_file << ": " << rc_file << "\n\t" - << var("QMAKE_RC") << (project->isActiveConfig("debug") ? " -D_DEBUG" : "") << " $(DEFINES) -fo " << res_file << " " << rc_file; + << var("QMAKE_RC") << (project->isActiveConfig("debug") ? " -D_DEBUG" : "") + << " $(DEFINES) $(INCPATH) -fo " << res_file << " " << rc_file; t << endl << endl; } } -- cgit v0.12 From 624267441e94e87ddb79f5e3748fc17a9a98c311 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 11 Oct 2010 17:26:13 +0200 Subject: qmake: delete .pdb file when making 'distclean' instead of 'clean' In Visual Studio builds "nmake clean" will now keep the .pdb files. Calling "nmake distclean" will delete them. Task-number: QTBUG-13853 Reviewed-by: ossi --- qmake/generators/win32/msvc_nmake.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index 907f8dc..b707607 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -213,7 +213,7 @@ void NmakeMakefileGenerator::init() project->values("QMAKE_CLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".exp"); } if(project->isActiveConfig("debug")) { - project->values("QMAKE_CLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".pdb"); + project->values("QMAKE_DISTCLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".pdb"); project->values("QMAKE_CLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".ilk"); project->values("QMAKE_CLEAN").append("vc*.pdb"); project->values("QMAKE_CLEAN").append("vc*.idb"); -- cgit v0.12 From 7ed040dd9f4769be9b254623d295aa93dbd569b8 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 12 Oct 2010 13:31:44 +1000 Subject: Rename .pro file to match directory name. Task-number: none Reviewed-by: Trust Me --- tests/manual/qtouchevent/multitouch.pro | 5 ----- tests/manual/qtouchevent/qtouchevent.pro | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 tests/manual/qtouchevent/multitouch.pro create mode 100644 tests/manual/qtouchevent/qtouchevent.pro diff --git a/tests/manual/qtouchevent/multitouch.pro b/tests/manual/qtouchevent/multitouch.pro deleted file mode 100644 index de1ee06..0000000 --- a/tests/manual/qtouchevent/multitouch.pro +++ /dev/null @@ -1,5 +0,0 @@ -QT += testlib -SOURCES = main.cpp \ - touchwidget.cpp -FORMS += form.ui -HEADERS += touchwidget.h diff --git a/tests/manual/qtouchevent/qtouchevent.pro b/tests/manual/qtouchevent/qtouchevent.pro new file mode 100644 index 0000000..de1ee06 --- /dev/null +++ b/tests/manual/qtouchevent/qtouchevent.pro @@ -0,0 +1,5 @@ +QT += testlib +SOURCES = main.cpp \ + touchwidget.cpp +FORMS += form.ui +HEADERS += touchwidget.h -- cgit v0.12 From 8bac84cba1cc1de4c3d0b87772168184a2540076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Tue, 12 Oct 2010 12:54:15 +0200 Subject: Revert "Don't define highp/mediump/lowp if desktop GL has them" This reverts commit 6155050f68cc86c445552da61a5f240c16f5e2cd. The GL_ARB_ES2_compatibility extension does not mention the lowp, mediump or highp keywords. Task-number: QTBUG-14384 Reviewed-by: Samuel Reviewed-by: Prasanth --- dist/changes-4.6.4 | 4 +--- src/opengl/qgl.cpp | 3 --- src/opengl/qgl_p.h | 3 +-- src/opengl/qglshaderprogram.cpp | 10 ++-------- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/dist/changes-4.6.4 b/dist/changes-4.6.4 index 389aa3a..3949b9a 100644 --- a/dist/changes-4.6.4 +++ b/dist/changes-4.6.4 @@ -66,8 +66,6 @@ QtOpenGL - QGLShaderProgram * [QTBUG-12478] Don't resolve GLSL extensions if no shaders. * [QTBUG-12591] setUniformValue(QSize) was setting (w,w) not (w,h). - * [QTBUG-12862] Don't #define highp/mediump/lowp if the desktop OpenGL - implementation has the GL_ARB_ES2_compatibility extension. * [QTBUG-12554] Wrong OpenGLVersionFlags on OpenGL 4.0 systems. QtScript @@ -109,7 +107,7 @@ Third party components Qt for Unix (X11 and Mac OS X) ------------------------------ - - + - Qt for Linux/X11 ---------------- diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index f3d0d81..49a362c 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -4933,8 +4933,6 @@ QGLExtensions::Extensions QGLExtensions::currentContextExtensions() glExtensions |= FragmentShader; if (extensions.match("GL_ARB_shader_objects")) glExtensions |= FragmentShader; - if (extensions.match("GL_ARB_ES2_compatibility")) - glExtensions |= ES2Compatibility; if (extensions.match("GL_ARB_texture_mirrored_repeat")) glExtensions |= MirroredRepeat; if (extensions.match("GL_EXT_framebuffer_object")) @@ -4953,7 +4951,6 @@ QGLExtensions::Extensions QGLExtensions::currentContextExtensions() glExtensions |= FramebufferObject; glExtensions |= GenerateMipmap; glExtensions |= FragmentShader; - glExtensions |= ES2Compatibility; #endif #if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL) if (extensions.match("GL_OES_framebuffer_object")) diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index 1603ca1..4facb65 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -291,8 +291,7 @@ public: DDSTextureCompression = 0x00008000, ETC1TextureCompression = 0x00010000, PVRTCTextureCompression = 0x00020000, - FragmentShader = 0x00040000, - ES2Compatibility = 0x00080000 + FragmentShader = 0x00040000 }; Q_DECLARE_FLAGS(Extensions, Extension) diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp index 9bfe027..edbb635 100644 --- a/src/opengl/qglshaderprogram.cpp +++ b/src/opengl/qglshaderprogram.cpp @@ -97,10 +97,6 @@ QT_BEGIN_NAMESPACE to just features that are present in GLSL/ES, and avoid standard variable names that only work on the desktop. - If the \c{GL_ARB_ES2_compatibility} extension is present, - then the above prefix is not added because the desktop OpenGL - implementation supports precision qualifiers. - \section1 Simple shader example \snippet doc/src/snippets/code/src_opengl_qglshaderprogram.cpp 1 @@ -394,10 +390,8 @@ bool QGLShader::compileSourceCode(const char *source) srclen.append(GLint(headerLen)); } #ifdef QGL_DEFINE_QUALIFIERS - if (!(QGLExtensions::glExtensions() & QGLExtensions::ES2Compatibility)) { - src.append(qualifierDefines); - srclen.append(GLint(sizeof(qualifierDefines) - 1)); - } + src.append(qualifierDefines); + srclen.append(GLint(sizeof(qualifierDefines) - 1)); #endif #ifdef QGL_REDEFINE_HIGHP if (d->shaderType == Fragment) { -- cgit v0.12 From 601fc892705c3aeb751f8bec9924200822f1a85d Mon Sep 17 00:00:00 2001 From: kh1 Date: Tue, 12 Oct 2010 14:25:24 +0200 Subject: Assistant: Insert all keywords with empty ids, as ids are not mendatory. Task-number: QTBUG-14393 Reviewed-by: ck --- tools/assistant/lib/qhelpgenerator.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/assistant/lib/qhelpgenerator.cpp b/tools/assistant/lib/qhelpgenerator.cpp index 85bdd75..f94031b 100644 --- a/tools/assistant/lib/qhelpgenerator.cpp +++ b/tools/assistant/lib/qhelpgenerator.cpp @@ -712,14 +712,15 @@ bool QHelpGenerator::insertKeywords(const QList &keywords, d->query->exec(QLatin1String("BEGIN")); QSet indices; foreach (const QHelpDataIndexItem &itm, keywords) { - - /* - * Identical ids make no sense and just confuse the Assistant user, - * so we ignore all repetitions. - */ + // Identical ids make no sense and just confuse the Assistant user, + // so we ignore all repetitions. if (indices.contains(itm.identifier)) continue; - indices.insert(itm.identifier); + + // Still empty ids should be ignored, as otherwise we will include only + // the first keyword with an empty id. + if (!itm.identifier.isEmpty()) + indices.insert(itm.identifier); pos = itm.reference.indexOf(QLatin1Char('#')); fileName = itm.reference.left(pos); -- cgit v0.12 From 6594e39808aecde42c1310f1ad800ffa4d7f0768 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 12 Oct 2010 14:33:27 +0200 Subject: Doc: Fixed minor documentation issues. --- src/corelib/tools/qstring.cpp | 2 +- src/gui/widgets/qdatetimeedit.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index d8dab43..bfbdb73 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -567,7 +567,7 @@ const QString::Null QString::null = { }; strings from a string list that contain a particular substring or that match a particular QRegExp using the QStringList::filter() function. -: + \section1 Querying String Data If you want to see if a QString starts or ends with a particular diff --git a/src/gui/widgets/qdatetimeedit.cpp b/src/gui/widgets/qdatetimeedit.cpp index bd6c577..8043747 100644 --- a/src/gui/widgets/qdatetimeedit.cpp +++ b/src/gui/widgets/qdatetimeedit.cpp @@ -832,11 +832,11 @@ QString QDateTimeEdit::sectionText(Section section) const This format is the same as the one used described in QDateTime::toString() and QDateTime::fromString() - Example format strings(assuming that the date is 2nd of July 1969): + Example format strings (assuming that the date is 2nd of July 1969): \table \header \i Format \i Result - \row \i dd.MM.yyyy \i 02.07.1969 + \row \i dd.MM.yyyy \i 02.07.1969 \row \i MMM d yy \i Jul 2 69 \row \i MMMM d yy \i July 2 69 \endtable -- cgit v0.12 From ca53010303bca1b686fdd0488e0549c0a42a60a1 Mon Sep 17 00:00:00 2001 From: Justin McPherson Date: Wed, 13 Oct 2010 11:43:25 +1000 Subject: Demo Spectrum wav data size is not calculated correctly - Grab length of audio data from Data chunk size - Read from the device no greater than the audio Data chunk size Task-number: QTBUG-13779 Reviewed-by: Andrew den Exter --- demos/spectrum/app/wavfile.cpp | 168 ++++++++++++++++++++++------------------- demos/spectrum/app/wavfile.h | 1 + 2 files changed, 90 insertions(+), 79 deletions(-) diff --git a/demos/spectrum/app/wavfile.cpp b/demos/spectrum/app/wavfile.cpp index b9467e3..74d5918 100644 --- a/demos/spectrum/app/wavfile.cpp +++ b/demos/spectrum/app/wavfile.cpp @@ -76,80 +76,84 @@ struct CombinedHeader { RIFFHeader riff; WAVEHeader wave; - DATAHeader data; }; -static const int HeaderLength = sizeof(CombinedHeader); WavFile::WavFile(const QAudioFormat &format, qint64 dataLength) - : m_format(format) - , m_dataLength(dataLength) + : m_format(format) + , m_dataLength(dataLength) + , m_dataPosition(0) { - } bool WavFile::readHeader(QIODevice &device) { - bool result = true; - - if (!device.isSequential()) - result = device.seek(0); - // else, assume that current position is the start of the header - - if (result) { - CombinedHeader header; - result = (device.read(reinterpret_cast(&header), HeaderLength) == HeaderLength); - if (result) { - if ((memcmp(&header.riff.descriptor.id, "RIFF", 4) == 0 - || memcmp(&header.riff.descriptor.id, "RIFX", 4) == 0) - && memcmp(&header.riff.type, "WAVE", 4) == 0 - && memcmp(&header.wave.descriptor.id, "fmt ", 4) == 0 - && header.wave.audioFormat == 1 // PCM - ) { - if (memcmp(&header.riff.descriptor.id, "RIFF", 4) == 0) - m_format.setByteOrder(QAudioFormat::LittleEndian); - else - m_format.setByteOrder(QAudioFormat::BigEndian); - - m_format.setChannels(qFromLittleEndian(header.wave.numChannels)); - m_format.setCodec("audio/pcm"); - m_format.setFrequency(qFromLittleEndian(header.wave.sampleRate)); - m_format.setSampleSize(qFromLittleEndian(header.wave.bitsPerSample)); - - switch(header.wave.bitsPerSample) { - case 8: - m_format.setSampleType(QAudioFormat::UnSignedInt); - break; - case 16: - m_format.setSampleType(QAudioFormat::SignedInt); - break; - default: - result = false; - } - - m_dataLength = device.size() - HeaderLength; - } else { - result = false; - } + if (!device.isSequential()) { + if (!device.seek(0)) + return false; + // XXX: else, assume that current position is the start of the header + } + + CombinedHeader header; + if (device.read(reinterpret_cast(&header), sizeof(CombinedHeader)) != sizeof(CombinedHeader)) + return false; + + if ((memcmp(&header.riff.descriptor.id, "RIFF", 4) == 0 + || memcmp(&header.riff.descriptor.id, "RIFX", 4) == 0) + && memcmp(&header.riff.type, "WAVE", 4) == 0 + && memcmp(&header.wave.descriptor.id, "fmt ", 4) == 0 + && (header.wave.audioFormat == 1 || header.wave.audioFormat == 0)) { + + // Read off remaining header information + DATAHeader dataHeader; + + if (qFromLittleEndian(header.wave.descriptor.size) > sizeof(WAVEHeader)) { + // Extended data available + quint16 extraFormatBytes; + if (device.peek((char*)&extraFormatBytes, sizeof(quint16)) != sizeof(quint16)) + return false; + const qint64 throwAwayBytes = sizeof(quint16) + qFromLittleEndian(extraFormatBytes); + if (device.read(throwAwayBytes).size() != throwAwayBytes) + return false; } + + if (device.read((char*)&dataHeader, sizeof(DATAHeader)) != sizeof(DATAHeader)) + return false; + + // Establish format + if (memcmp(&header.riff.descriptor.id, "RIFF", 4) == 0) + m_format.setByteOrder(QAudioFormat::LittleEndian); + else + m_format.setByteOrder(QAudioFormat::BigEndian); + + int bps = qFromLittleEndian(header.wave.bitsPerSample); + m_format.setChannels(qFromLittleEndian(header.wave.numChannels)); + m_format.setCodec("audio/pcm"); + m_format.setFrequency(qFromLittleEndian(header.wave.sampleRate)); + m_format.setSampleSize(qFromLittleEndian(header.wave.bitsPerSample)); + m_format.setSampleType(bps == 8 ? QAudioFormat::UnSignedInt : QAudioFormat::SignedInt); + + m_dataLength = qFromLittleEndian(dataHeader.descriptor.size); + m_dataPosition = 0; } - return result; + return true; } bool WavFile::writeHeader(QIODevice &device) { CombinedHeader header; + DATAHeader dataHeader; - memset(&header, 0, HeaderLength); + memset(&header, 0, sizeof(CombinedHeader)); // RIFF header if (m_format.byteOrder() == QAudioFormat::LittleEndian) strncpy(&header.riff.descriptor.id[0], "RIFF", 4); else strncpy(&header.riff.descriptor.id[0], "RIFX", 4); - qToLittleEndian(quint32(m_dataLength + HeaderLength - 8), + qToLittleEndian(quint32(m_dataLength + sizeof(CombinedHeader) + sizeof(DATAHeader) - sizeof(chunk)), reinterpret_cast(&header.riff.descriptor.size)); strncpy(&header.riff.type[0], "WAVE", 4); @@ -171,11 +175,12 @@ bool WavFile::writeHeader(QIODevice &device) reinterpret_cast(&header.wave.bitsPerSample)); // DATA header - strncpy(&header.data.descriptor.id[0], "data", 4); + strncpy(dataHeader.descriptor.id, "data", 4); qToLittleEndian(quint32(m_dataLength), - reinterpret_cast(&header.data.descriptor.size)); + reinterpret_cast(&dataHeader.descriptor.size)); - return (device.write(reinterpret_cast(&header), HeaderLength) == HeaderLength); + return device.write(reinterpret_cast(&header), sizeof(CombinedHeader)) == sizeof(CombinedHeader) + && device.write(reinterpret_cast(&dataHeader), sizeof(DATAHeader)) == sizeof(DATAHeader); } const QAudioFormat& WavFile::format() const @@ -190,7 +195,7 @@ qint64 WavFile::dataLength() const qint64 WavFile::headerLength() { - return HeaderLength; + return sizeof(CombinedHeader); } bool WavFile::writeDataLength(QIODevice &device, qint64 dataLength) @@ -205,42 +210,47 @@ bool WavFile::writeDataLength(QIODevice &device, qint64 dataLength) return result; } -#include -#include - qint64 WavFile::readData(QIODevice &device, QByteArray &buffer, QAudioFormat outputFormat) { - if (QAudioFormat() == outputFormat) + // Sanity checks + if (!outputFormat.isValid()) outputFormat = m_format; + if (!isPCMS16LE(outputFormat) || !isPCMS16LE(m_format)) + return 0; + + if (m_dataPosition == m_dataLength) + return 0; + + // Process qint64 result = 0; - QFile file("wav.txt"); - file.open(QIODevice::WriteOnly | QIODevice::Text); - QTextStream stream; - stream.setDevice(&file); - - if (isPCMS16LE(outputFormat) && isPCMS16LE(m_format)) { - QVector inputSample(2 * m_format.channels()); - - qint16 *output = reinterpret_cast(buffer.data()); - - while (result < buffer.size()) { - if (device.read(inputSample.data(), inputSample.count())) { - int inputIdx = 0; - for (int outputIdx = 0; outputIdx < outputFormat.channels(); ++outputIdx) { - const qint16* input = reinterpret_cast(inputSample.data() + 2 * inputIdx); - *output++ = qFromLittleEndian(*input); - result += 2; - if (inputIdx < m_format.channels()) - ++inputIdx; - } - } else { - break; + const int frameSize = 2 * m_format.channels(); // 16 bit samples + QVector inputSample(frameSize); + + qint16 *output = reinterpret_cast(buffer.data()); + + while (result < buffer.size()) { + if (m_dataPosition == m_dataLength) + break; + + // XXX only working with particular alignments + if (device.read(inputSample.data(), inputSample.count())) { + int inputIdx = 0; + for (int outputIdx = 0; outputIdx < outputFormat.channels(); ++outputIdx) { + const qint16* input = reinterpret_cast(inputSample.data() + 2 * inputIdx); + *output++ = qFromLittleEndian(*input); + result += 2; + if (inputIdx < m_format.channels()) + ++inputIdx; } + m_dataPosition += frameSize; + } else { + break; } } + return result; } diff --git a/demos/spectrum/app/wavfile.h b/demos/spectrum/app/wavfile.h index f2f3304..fc14b08 100644 --- a/demos/spectrum/app/wavfile.h +++ b/demos/spectrum/app/wavfile.h @@ -77,6 +77,7 @@ public: private: QAudioFormat m_format; qint64 m_dataLength; + qint64 m_dataPosition; }; #endif -- cgit v0.12 From 47827b076d3546e630dbfd6cfcfb8b627f41d13e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Tue, 12 Oct 2010 12:54:15 +0200 Subject: Revert "Don't define highp/mediump/lowp if desktop GL has them" This reverts commit 6155050f68cc86c445552da61a5f240c16f5e2cd. The GL_ARB_ES2_compatibility extension does not mention the lowp, mediump or highp keywords. Task-number: QTBUG-14384 Reviewed-by: Samuel Reviewed-by: Prasanth (cherry picked from commit 7cd0a90344d340f22b6b2d3afeef092dbaf2cd51) --- dist/changes-4.6.4 | 4 +--- src/opengl/qgl.cpp | 3 --- src/opengl/qgl_p.h | 3 +-- src/opengl/qglshaderprogram.cpp | 10 ++-------- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/dist/changes-4.6.4 b/dist/changes-4.6.4 index 389aa3a..3949b9a 100644 --- a/dist/changes-4.6.4 +++ b/dist/changes-4.6.4 @@ -66,8 +66,6 @@ QtOpenGL - QGLShaderProgram * [QTBUG-12478] Don't resolve GLSL extensions if no shaders. * [QTBUG-12591] setUniformValue(QSize) was setting (w,w) not (w,h). - * [QTBUG-12862] Don't #define highp/mediump/lowp if the desktop OpenGL - implementation has the GL_ARB_ES2_compatibility extension. * [QTBUG-12554] Wrong OpenGLVersionFlags on OpenGL 4.0 systems. QtScript @@ -109,7 +107,7 @@ Third party components Qt for Unix (X11 and Mac OS X) ------------------------------ - - + - Qt for Linux/X11 ---------------- diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 15070d4..3a4a244 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -5261,8 +5261,6 @@ QGLExtensions::Extensions QGLExtensions::currentContextExtensions() glExtensions |= FragmentShader; if (extensions.match("GL_ARB_shader_objects")) glExtensions |= FragmentShader; - if (extensions.match("GL_ARB_ES2_compatibility")) - glExtensions |= ES2Compatibility; if (extensions.match("GL_ARB_texture_mirrored_repeat")) glExtensions |= MirroredRepeat; if (extensions.match("GL_EXT_framebuffer_object")) @@ -5283,7 +5281,6 @@ QGLExtensions::Extensions QGLExtensions::currentContextExtensions() glExtensions |= FramebufferObject; glExtensions |= GenerateMipmap; glExtensions |= FragmentShader; - glExtensions |= ES2Compatibility; #endif #if defined(QT_OPENGL_ES_1) if (extensions.match("GL_OES_framebuffer_object")) diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index 623eeaf..387c8f7 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -284,8 +284,7 @@ public: DDSTextureCompression = 0x00008000, ETC1TextureCompression = 0x00010000, PVRTCTextureCompression = 0x00020000, - FragmentShader = 0x00040000, - ES2Compatibility = 0x00080000 + FragmentShader = 0x00040000 }; Q_DECLARE_FLAGS(Extensions, Extension) diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp index bc1c009..74382b0 100644 --- a/src/opengl/qglshaderprogram.cpp +++ b/src/opengl/qglshaderprogram.cpp @@ -97,10 +97,6 @@ QT_BEGIN_NAMESPACE to just features that are present in GLSL/ES, and avoid standard variable names that only work on the desktop. - If the \c{GL_ARB_ES2_compatibility} extension is present, - then the above prefix is not added because the desktop OpenGL - implementation supports precision qualifiers. - \section1 Simple shader example \snippet doc/src/snippets/code/src_opengl_qglshaderprogram.cpp 1 @@ -398,10 +394,8 @@ bool QGLShader::compileSourceCode(const char *source) srclen.append(GLint(headerLen)); } #ifdef QGL_DEFINE_QUALIFIERS - if (!(QGLExtensions::glExtensions() & QGLExtensions::ES2Compatibility)) { - src.append(qualifierDefines); - srclen.append(GLint(sizeof(qualifierDefines) - 1)); - } + src.append(qualifierDefines); + srclen.append(GLint(sizeof(qualifierDefines) - 1)); #endif #ifdef QGL_REDEFINE_HIGHP if (d->shaderType == Fragment) { -- cgit v0.12 From 4c9651219140141da49d0ea965544d8f64dbf323 Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Wed, 13 Oct 2010 16:57:35 +1000 Subject: Fix User 46 Panic in bearer management on Symbian. The active object made a request before it was set as active. Task-number: QT-3996 Written-by: Perttu Pohjonen --- src/plugins/bearer/symbian/symbianengine.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/plugins/bearer/symbian/symbianengine.cpp b/src/plugins/bearer/symbian/symbianengine.cpp index f759a95..ef273c1 100644 --- a/src/plugins/bearer/symbian/symbianengine.cpp +++ b/src/plugins/bearer/symbian/symbianengine.cpp @@ -1365,16 +1365,12 @@ void AccessPointsAvailabilityScanner::StartScanning() // don't need time-consuming scans (WLAN). // Note: EBearerIdWCDMA covers also GPRS bearer iConnectionMonitor.GetPckgAttribute(EBearerIdWCDMA, 0, KIapAvailability, iIapBuf, iStatus); - User::WaitForRequest(iStatus); - if (iStatus.Int() == KErrNone) { - iOwner.accessPointScanningReady(true,iIapBuf()); - } } else { iConnectionMonitor.GetPckgAttribute(EBearerIdAll, 0, KIapAvailability, iIapBuf, iStatus); - if (!IsActive()) { - SetActive(); - } } + + if (!IsActive()) + SetActive(); } void AccessPointsAvailabilityScanner::RunL() -- cgit v0.12 From 40b5c05b9921b5fa3ceae7f723c0b26c4861bda7 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 12 Oct 2010 16:38:30 +0200 Subject: tst_qcompleter: Add a test for QFileSystemModel Copied from the test for QDirModel Reviewed-by: Thierry --- tests/auto/qcompleter/tst_qcompleter.cpp | 82 +++++++++++++++++++++++++++++--- 1 file changed, 76 insertions(+), 6 deletions(-) diff --git a/tests/auto/qcompleter/tst_qcompleter.cpp b/tests/auto/qcompleter/tst_qcompleter.cpp index 1590528..3e05fbc 100644 --- a/tests/auto/qcompleter/tst_qcompleter.cpp +++ b/tests/auto/qcompleter/tst_qcompleter.cpp @@ -119,6 +119,8 @@ private slots: void directoryModel_data(); void directoryModel(); + void fileSystemModel_data(); + void fileSystemModel(); void changingModel_data(); void changingModel(); @@ -151,13 +153,14 @@ private slots: void task247560_keyboardNavigation(); private: - void filter(); + void filter(bool assync = false); void testRowCount(); enum ModelType { CASE_SENSITIVELY_SORTED_MODEL, CASE_INSENSITIVELY_SORTED_MODEL, DIRECTORY_MODEL, - HISTORY_MODEL + HISTORY_MODEL, + FILESYSTEM_MODEL }; void setSourceModel(ModelType); @@ -233,12 +236,21 @@ void tst_QCompleter::setSourceModel(ModelType type) completer->setModel(new QDirModel(completer)); completer->setCompletionColumn(0); break; + case FILESYSTEM_MODEL: + completer->setCsvCompletion(false); + { + QFileSystemModel *m = new QFileSystemModel(completer); + m->setRootPath("/"); + completer->setModel(m); + } + completer->setCompletionColumn(0); + break; default: qDebug() << "Invalid type"; } } -void tst_QCompleter::filter() +void tst_QCompleter::filter(bool assync) { QFETCH(QString, filterText); QFETCH(QString, step); @@ -250,6 +262,9 @@ void tst_QCompleter::filter() return; } + int times = 0; +retry: + completer->setCompletionPrefix(filterText); for (int i = 0; i < step.length(); i++) { @@ -265,9 +280,13 @@ void tst_QCompleter::filter() completer->setCurrentRow(row); } - //QModelIndex si = completer->currentIndex(); - //QCOMPARE(completer->model()->data(si).toString(), completion); - QVERIFY(0 == QString::compare(completer->currentCompletion(), completionText, completer->caseSensitivity())); + int r = QString::compare(completer->currentCompletion(), completionText, completer->caseSensitivity()); + if (assync && r && times < 10) { + times++; + QTest::qWait(50*times); + goto retry; + } + QVERIFY(!r); } // Testing get/set functions @@ -598,6 +617,57 @@ void tst_QCompleter::directoryModel() filter(); } +void tst_QCompleter::fileSystemModel_data() +{ + delete completer; + completer = new CsvCompleter; + completer->setModelSorting(QCompleter::CaseSensitivelySortedModel); + setSourceModel(FILESYSTEM_MODEL); + completer->setCaseSensitivity(Qt::CaseInsensitive); + + QTest::addColumn("filterText"); + QTest::addColumn("step"); + QTest::addColumn("completion"); + QTest::addColumn("completionText"); + + // NOTE: Add tests carefully, ensurely the paths exist on all systems + // Output is the sourceText; currentCompletionText() + + for (int i = 0; i < 2; i++) { + if (i == 1) + QTest::newRow("FILTERING_OFF") << "FILTERING_OFF" << "" << "" << ""; + +#if defined(Q_OS_WINCE) + QTest::newRow("()") << "" << "" << "/" << "/"; + QTest::newRow("()") << "\\Program" << "" << "Program Files" << "\\Program Files"; +#elif defined(Q_OS_WIN) + QTest::newRow("()") << "C" << "" << "C:" << "C:"; + QTest::newRow("()") << "C:\\Program" << "" << "Program Files" << "C:\\Program Files"; +#elif defined(Q_OS_SYMBIAN) + QTest::newRow("()") << "C" << "" << "C:" << "C:"; + QTest::newRow("()") << "C:\\re" << "" << "resource" << "C:\\resource"; +#elif defined (Q_OS_MAC) + QTest::newRow("()") << "" << "" << "/" << "/"; + QTest::newRow("(/a)") << "/a" << "" << "Applications" << "/Applications"; + QTest::newRow("(/d)") << "/d" << "" << "Developer" << "/Developer"; +#else + QTest::newRow("()") << "" << "" << "/" << "/"; +#if !defined(Q_OS_IRIX) && !defined(Q_OS_AIX) && !defined(Q_OS_HPUX) + QTest::newRow("(/h)") << "/h" << "" << "home" << "/home"; +#endif + QTest::newRow("(/et)") << "/et" << "" << "etc" << "/etc"; + QTest::newRow("(/etc/passw)") << "/etc/passw" << "" << "passwd" << "/etc/passwd"; +#endif + } +} + +void tst_QCompleter::fileSystemModel() +{ + //QFileSystemModel is assync. + filter(true); +} + + void tst_QCompleter::changingModel_data() { } -- cgit v0.12 From c416ec00e7c859a844a5bcb24c7a31147aed974c Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 13 Oct 2010 11:00:29 +0200 Subject: QCompleter: do not auto complete when directory is changed. Fixed regression for QCompleter associated with a QFileSystemModel. It would popup a popup each time the directory is changed. This was a regression in Qt 4.7.0, introduced with 319b0262418d74cc416a7d Task-number: QTBUG-14292 Reviewed-by: Thierry --- src/gui/util/qcompleter.cpp | 18 +++++--- src/gui/util/qcompleter_p.h | 1 + tests/auto/qcompleter/tst_qcompleter.cpp | 74 ++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 6 deletions(-) diff --git a/src/gui/util/qcompleter.cpp b/src/gui/util/qcompleter.cpp index e718212..bcd601b 100644 --- a/src/gui/util/qcompleter.cpp +++ b/src/gui/util/qcompleter.cpp @@ -782,7 +782,8 @@ QMatchData QUnsortedModelEngine::filter(const QString& part, const QModelIndex& /////////////////////////////////////////////////////////////////////////////// QCompleterPrivate::QCompleterPrivate() : widget(0), proxy(0), popup(0), cs(Qt::CaseSensitive), role(Qt::EditRole), column(0), - maxVisibleItems(7), sorting(QCompleter::UnsortedModel), wrap(true), eatFocusOut(true) + maxVisibleItems(7), sorting(QCompleter::UnsortedModel), wrap(true), eatFocusOut(true), + hiddenBecauseNoMatch(false) { } @@ -921,12 +922,14 @@ void QCompleterPrivate::showPopup(const QRect& rect) void QCompleterPrivate::_q_fileSystemModelDirectoryLoaded(const QString &path) { Q_Q(QCompleter); -#ifndef QT_NO_LINEEDIT - QLineEdit *lineEdit = qobject_cast(widget); - //the path given by QFileSystemModel does not end with / - if (lineEdit && !lineEdit->text().isEmpty() && !q->completionPrefix().isEmpty() && q->completionPrefix() != path + QLatin1Char('/')) + // Slot called when QFileSystemModel has finished loading. + // If we hide the popup because there was no match because the model was not loaded yet, + // we re-start the completion when we get the results + if (hiddenBecauseNoMatch + && prefix.startsWith(path) && prefix != (path + '/') + && widget) { q->complete(); -#endif + } } /*! @@ -1200,6 +1203,7 @@ bool QCompleter::eventFilter(QObject *o, QEvent *e) Q_D(QCompleter); if (d->eatFocusOut && o == d->widget && e->type() == QEvent::FocusOut) { + d->hiddenBecauseNoMatch = false; if (d->popup && d->popup->isVisible()) return true; } @@ -1378,6 +1382,7 @@ void QCompleter::complete(const QRect& rect) { Q_D(QCompleter); QModelIndex idx = d->proxy->currentIndex(false); + d->hiddenBecauseNoMatch = false; if (d->mode == QCompleter::InlineCompletion) { if (idx.isValid()) d->_q_complete(idx, true); @@ -1389,6 +1394,7 @@ void QCompleter::complete(const QRect& rect) || (d->mode == QCompleter::UnfilteredPopupCompletion && d->proxy->rowCount() == 0)) { if (d->popup) d->popup->hide(); // no suggestion, hide + d->hiddenBecauseNoMatch = true; return; } diff --git a/src/gui/util/qcompleter_p.h b/src/gui/util/qcompleter_p.h index 8f00793..19b76e5 100644 --- a/src/gui/util/qcompleter_p.h +++ b/src/gui/util/qcompleter_p.h @@ -93,6 +93,7 @@ public: bool eatFocusOut; QRect popupRect; + bool hiddenBecauseNoMatch; void showPopup(const QRect&); void _q_complete(QModelIndex, bool = false); diff --git a/tests/auto/qcompleter/tst_qcompleter.cpp b/tests/auto/qcompleter/tst_qcompleter.cpp index 3e05fbc..6d28f9f 100644 --- a/tests/auto/qcompleter/tst_qcompleter.cpp +++ b/tests/auto/qcompleter/tst_qcompleter.cpp @@ -151,6 +151,7 @@ private slots: void task253125_lineEditCompletion_data(); void task253125_lineEditCompletion(); void task247560_keyboardNavigation(); + void QTBUG_14292_filesystem(); private: void filter(bool assync = false); @@ -571,6 +572,7 @@ void tst_QCompleter::csMatchingOnCiSortedModel() void tst_QCompleter::directoryModel_data() { delete completer; + completer = new CsvCompleter; completer->setModelSorting(QCompleter::CaseSensitivelySortedModel); setSourceModel(DIRECTORY_MODEL); @@ -1451,5 +1453,77 @@ void tst_QCompleter::task247560_keyboardNavigation() QCOMPARE(edit.text(), QString("row 3 column 1")); } +void tst_QCompleter::QTBUG_14292_filesystem() +{ + QDir tmpDir = QDir::temp(); + qsrand(QTime::currentTime().msec()); + QString d = "tst_QCompleter_" + QString::number(qrand()); + QVERIFY(tmpDir.mkdir(d)); + +#if 0 + struct Cleanup { + QString dir; + ~Cleanup() { + qDebug() << dir << + QFile::remove(dir); } + } cleanup; + cleanup.dir = tmpDir.absolutePath()+"/" +d; +#endif + + QVERIFY(tmpDir.cd(d)); + QVERIFY(tmpDir.mkdir("hello")); + QVERIFY(tmpDir.mkdir("holla")); + + QLineEdit edit; + QCompleter comp; + QFileSystemModel model; + model.setRootPath(tmpDir.path()); + comp.setModel(&model); + edit.setCompleter(&comp); + + edit.show(); + QApplication::setActiveWindow(&edit); + QTest::qWaitForWindowShown(&edit); + QTRY_VERIFY(QApplication::activeWindow() == &edit); + + QVERIFY(!comp.popup()->isVisible()); + edit.setText(tmpDir.path()); + QTest::keyClick(&edit, '/'); + QTRY_VERIFY(comp.popup()->isVisible()); + QCOMPARE(comp.popup()->model()->rowCount(), 2); + QTest::keyClick(&edit, 'h'); + QCOMPARE(comp.popup()->model()->rowCount(), 2); + QTest::keyClick(&edit, 'e'); + QCOMPARE(comp.popup()->model()->rowCount(), 1); + QTest::keyClick(&edit, 'r'); + QTRY_VERIFY(!comp.popup()->isVisible()); + QVERIFY(tmpDir.mkdir("hero")); + QTRY_VERIFY(comp.popup()->isVisible()); + QCOMPARE(comp.popup()->model()->rowCount(), 1); + QTest::keyClick(comp.popup(), Qt::Key_Escape); + QTRY_VERIFY(!comp.popup()->isVisible()); + QVERIFY(tmpDir.mkdir("nothingThere")); + //there is no reason creating a file should open a popup, it did in Qt 4.7.0 + QTest::qWait(60); + QVERIFY(!comp.popup()->isVisible()); + + QTest::keyClick(&edit, Qt::Key_Backspace); + QTRY_VERIFY(comp.popup()->isVisible()); + QCOMPARE(comp.popup()->model()->rowCount(), 2); + QTest::keyClick(&edit, 'm'); + QTRY_VERIFY(!comp.popup()->isVisible()); + + QWidget w; + w.show(); + QApplication::setActiveWindow(&w); + QTest::qWaitForWindowShown(&w); + QTRY_VERIFY(!edit.hasFocus() && !comp.popup()->hasFocus()); + + QVERIFY(tmpDir.mkdir("hemo")); + //there is no reason creating a file should open a popup, it did in Qt 4.7.0 + QTest::qWait(60); + QVERIFY(!comp.popup()->isVisible()); +} + QTEST_MAIN(tst_QCompleter) #include "tst_qcompleter.moc" -- cgit v0.12 From ab3304c663a62acb26af139d120f27a49a9d22ff Mon Sep 17 00:00:00 2001 From: Michael Dominic K Date: Wed, 13 Oct 2010 11:38:38 +0200 Subject: In meego graphics system, use always 16bit textures. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use GL_RGB16 for no-alpha images and RGBA4 for alpha images. Merge-request: 854 Reviewed-by: Samuel Rødal --- .../graphicssystems/meego/qmeegopixmapdata.cpp | 48 ++++++++++++++++++---- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/src/plugins/graphicssystems/meego/qmeegopixmapdata.cpp b/src/plugins/graphicssystems/meego/qmeegopixmapdata.cpp index 84fc593..799a28e 100644 --- a/src/plugins/graphicssystems/meego/qmeegopixmapdata.cpp +++ b/src/plugins/graphicssystems/meego/qmeegopixmapdata.cpp @@ -51,6 +51,24 @@ static EGLint preserved_image_attribs[] = { EGL_IMAGE_PRESERVED_KHR, EGL_TRUE, E QHash QMeeGoPixmapData::sharedImagesMap; +// This helper method converts (in place) a QImage::Format_ARGB4444_Premultiplied to +// GL-friendly Format_RGBA4444_Premultiplied. Just swaps the bits around really. +static void qARGBA4ToRGBA4(QImage *image) +{ + unsigned char *raw = static_cast (image->data_ptr()->data); + // FIXME image.bytesPerLine() is broken. Returns 512 for 128x128 image while it should + // return 256 + int bytesPerLine = image->width() * 2; + + for (int y = 0; y < image->height(); y++) { + for (int x = 0; x < image->width(); x++) { + unsigned short *target = (unsigned short *) (raw + (y * bytesPerLine + (x * 2))); + // FIXME Oh yeah, that's broken with endianness. + *target = (*target << 4) | (* target >> 12); + } + } +} + /* Public */ QMeeGoPixmapData::QMeeGoPixmapData() : QGLPixmapData(QPixmapData::PixmapType) @@ -108,8 +126,6 @@ void QMeeGoPixmapData::fromEGLImage(Qt::HANDLE handle) QMeeGoExtensions::eglQueryImageNOK(QEgl::display(), (EGLImageKHR) handle, EGL_HEIGHT, &newHeight); if (textureIsBound) { - // FIXME Remove this ugly hasAlphaChannel check when Qt lands the NoOpaqueCheck flag fix - // for QGLPixmapData. fromTexture(newTextureId, newWidth, newHeight, true); } else { qWarning("Failed to create a texture from an egl image!"); @@ -152,10 +168,9 @@ void QMeeGoPixmapData::fromEGLSharedImage(Qt::HANDLE handle, const QImage &si) } if (textureIsBound) { - // FIXME Remove this ugly hasAlphaChannel check when Qt lands the NoOpaqueCheck flag fix - // for QGLPixmapData. fromTexture(newTextureId, newWidth, newHeight, - (si.hasAlphaChannel() && const_cast(si).data_ptr()->checkForAlphaPixels())); + si.hasAlphaChannel()); + texture()->options &= ~QGLContext::InvertedYBindOption; softImage = si; QMeeGoPixmapData::registerSharedImage(handle, softImage); } else { @@ -171,15 +186,31 @@ Qt::HANDLE QMeeGoPixmapData::imageToEGLSharedImage(const QImage &image) QMeeGoExtensions::ensureInitialized(); glFinish(); - QGLPixmapData pixmapData(QPixmapData::PixmapType); - pixmapData.fromImage(image, 0); - GLuint textureId = pixmapData.bind(); + + GLuint textureId; + + glGenTextures(1, &textureId); + glBindTexture(GL_TEXTURE_2D, textureId); + if (image.hasAlphaChannel()) { + QImage convertedImage = image.convertToFormat(QImage::Format_ARGB4444_Premultiplied, Qt::NoOpaqueDetection); + qARGBA4ToRGBA4(&convertedImage); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image.width(), image.height(), 0, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, convertedImage.bits()); + } else { + QImage convertedImage = image.convertToFormat(QImage::Format_RGB16, Qt::NoOpaqueDetection); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, image.width(), image.height(), 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, convertedImage.bits()); + } + + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glFinish(); + + glBindTexture(GL_TEXTURE_2D, textureId); EGLImageKHR eglimage = QEgl::eglCreateImageKHR(QEgl::display(), QEglContext::currentContext(QEgl::OpenGL)->context(), EGL_GL_TEXTURE_2D_KHR, (EGLClientBuffer) textureId, preserved_image_attribs); + glDeleteTextures(1, &textureId); glFinish(); if (eglimage) { @@ -195,6 +226,7 @@ Qt::HANDLE QMeeGoPixmapData::imageToEGLSharedImage(const QImage &image) void QMeeGoPixmapData::updateFromSoftImage() { + // FIXME That's broken with recent 16bit textures changes. m_dirty = true; m_source = softImage; ensureCreated(); -- cgit v0.12 From 1af2d09523e3808e4589f05a4b8d42c308eb0841 Mon Sep 17 00:00:00 2001 From: Michael Dominic K Date: Wed, 13 Oct 2010 11:38:39 +0200 Subject: Proper dither & proper alpha checking. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge-request: 854 Reviewed-by: Samuel Rødal --- src/plugins/graphicssystems/meego/qmeegopixmapdata.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/graphicssystems/meego/qmeegopixmapdata.cpp b/src/plugins/graphicssystems/meego/qmeegopixmapdata.cpp index 799a28e..5473d09 100644 --- a/src/plugins/graphicssystems/meego/qmeegopixmapdata.cpp +++ b/src/plugins/graphicssystems/meego/qmeegopixmapdata.cpp @@ -169,7 +169,7 @@ void QMeeGoPixmapData::fromEGLSharedImage(Qt::HANDLE handle, const QImage &si) if (textureIsBound) { fromTexture(newTextureId, newWidth, newHeight, - si.hasAlphaChannel()); + (si.hasAlphaChannel() && const_cast(si).data_ptr()->checkForAlphaPixels())); texture()->options &= ~QGLContext::InvertedYBindOption; softImage = si; QMeeGoPixmapData::registerSharedImage(handle, softImage); @@ -191,12 +191,12 @@ Qt::HANDLE QMeeGoPixmapData::imageToEGLSharedImage(const QImage &image) glGenTextures(1, &textureId); glBindTexture(GL_TEXTURE_2D, textureId); - if (image.hasAlphaChannel()) { - QImage convertedImage = image.convertToFormat(QImage::Format_ARGB4444_Premultiplied, Qt::NoOpaqueDetection); + if (image.hasAlphaChannel() && (image.hasAlphaChannel() && const_cast(image).data_ptr()->checkForAlphaPixels())) { + QImage convertedImage = image.convertToFormat(QImage::Format_ARGB4444_Premultiplied, Qt::DiffuseAlphaDither | Qt::DiffuseDither | Qt::PreferDither); qARGBA4ToRGBA4(&convertedImage); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image.width(), image.height(), 0, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, convertedImage.bits()); } else { - QImage convertedImage = image.convertToFormat(QImage::Format_RGB16, Qt::NoOpaqueDetection); + QImage convertedImage = image.convertToFormat(QImage::Format_RGB16, Qt::DiffuseAlphaDither | Qt::DiffuseDither | Qt::PreferDither); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, image.width(), image.height(), 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, convertedImage.bits()); } -- cgit v0.12 From fa6bad3c703fdb2d0218972c5774ed0a61948f84 Mon Sep 17 00:00:00 2001 From: Michael Dominic K Date: Wed, 13 Oct 2010 11:40:51 +0200 Subject: Correctly remove the egl alpha surface flags in meego graphics system. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge-request: 856 Reviewed-by: Samuel Rødal --- src/plugins/graphicssystems/meego/qmeegographicssystem.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp index f8b228c..b378b13 100644 --- a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp +++ b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp @@ -363,7 +363,9 @@ EGLSurface QMeeGoGraphicsSystem::getSurfaceForLiveTexturePixmap(QPixmap *pixmap) pixmapData->gl_surface = (void*)QEgl::createSurface(pixmap, config); if (hasAlpha) - pixmapData->flags = pixmapData->flags | QX11PixmapData::GlSurfaceCreatedWithAlpha; + pixmapData->flags |= QX11PixmapData::GlSurfaceCreatedWithAlpha; + else + pixmapData->flags &= ~QX11PixmapData::GlSurfaceCreatedWithAlpha; if (pixmapData->gl_surface == (void*)EGL_NO_SURFACE) return NULL; -- cgit v0.12 From 6f1f1317e68a261173ddb24a045dcc823b16a3bd Mon Sep 17 00:00:00 2001 From: Michael Dominic K Date: Wed, 13 Oct 2010 11:40:51 +0200 Subject: Correctly handle both 16bit and 32bit live pixmaps in meego graphics system. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge-request: 856 Reviewed-by: Samuel Rødal --- src/plugins/graphicssystems/meego/qmeegographicssystem.cpp | 14 +++++++++++--- src/plugins/graphicssystems/meego/qmeegographicssystem.h | 4 ++-- tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp | 6 +++--- tools/qmeegographicssystemhelper/qmeegoruntime.cpp | 6 +++--- tools/qmeegographicssystemhelper/qmeegoruntime.h | 2 +- 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp index b378b13..27e728a 100644 --- a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp +++ b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp @@ -275,7 +275,7 @@ bool QMeeGoGraphicsSystem::unlockLiveTexture(Qt::HANDLE h) } } -void QMeeGoGraphicsSystem::queryLiveTexture(Qt::HANDLE h, void **data, int *pitch) +void QMeeGoGraphicsSystem::queryLiveTexture(Qt::HANDLE h, void **data, int *pitch, QImage::Format *f) { // FIXME Only allow this on locked surfaces if (! liveTexturePixmaps.contains(h)) { @@ -289,6 +289,14 @@ void QMeeGoGraphicsSystem::queryLiveTexture(Qt::HANDLE h, void **data, int *pitc EGLSurface surface = getSurfaceForLiveTexturePixmap(liveTexturePixmaps.value(h)); eglQuerySurface(QEgl::display(), surface, EGL_BITMAP_POINTER_KHR, (EGLint*) data); eglQuerySurface(QEgl::display(), surface, EGL_BITMAP_PITCH_KHR, (EGLint*) pitch); + + // Ok, here we know we just support those two formats. Real solution would be: + // in liveTexturePixmaps store a small structure containing the pixmap and the + // original Qt format. + if (liveTexturePixmaps.value(h)->depth() > 16) + *f = QImage::Format_ARGB32_Premultiplied; + else + *f = QImage::Format_RGB16; } Qt::HANDLE QMeeGoGraphicsSystem::liveTextureToEGLImage(Qt::HANDLE h) @@ -441,9 +449,9 @@ bool qt_meego_live_texture_unlock(Qt::HANDLE h) return QMeeGoGraphicsSystem::unlockLiveTexture(h); } -void qt_meego_live_texture_query(Qt::HANDLE h, void **data, int *pitch) +void qt_meego_live_texture_query(Qt::HANDLE h, void **data, int *pitch, QImage::Format *f) { - return QMeeGoGraphicsSystem::queryLiveTexture(h, data, pitch); + return QMeeGoGraphicsSystem::queryLiveTexture(h, data, pitch, f); } Qt::HANDLE qt_meego_live_texture_to_egl_image(Qt::HANDLE h) diff --git a/src/plugins/graphicssystems/meego/qmeegographicssystem.h b/src/plugins/graphicssystems/meego/qmeegographicssystem.h index 934d32d..fad0db6 100644 --- a/src/plugins/graphicssystems/meego/qmeegographicssystem.h +++ b/src/plugins/graphicssystems/meego/qmeegographicssystem.h @@ -71,7 +71,7 @@ public: static void destroyLiveTexture(Qt::HANDLE h); static bool lockLiveTexture(Qt::HANDLE h); static bool unlockLiveTexture(Qt::HANDLE h); - static void queryLiveTexture(Qt::HANDLE h, void **data, int *pitch); + static void queryLiveTexture(Qt::HANDLE h, void **data, int *pitch, QImage::Format *format); static Qt::HANDLE liveTextureToEGLImage(Qt::HANDLE h); private: @@ -99,7 +99,7 @@ extern "C" { Q_DECL_EXPORT void m_live_texture_destroy(Qt::HANDLE h); Q_DECL_EXPORT bool m_live_texture_lock(Qt::HANDLE h); Q_DECL_EXPORT bool m_live_texture_unlock(Qt::HANDLE h); - Q_DECL_EXPORT void m_live_texture_query(Qt::HANDLE h, void **data, int *pitch); + Q_DECL_EXPORT void m_live_texture_query(Qt::HANDLE h, void **data, int *pitch, QImage::Format *f); Q_DECL_EXPORT Qt::HANDLE m_live_texture_to_egl_image(Qt::HANDLE h); } diff --git a/tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp b/tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp index b9dbb2b..5e36631 100644 --- a/tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp +++ b/tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp @@ -118,20 +118,20 @@ QImage* QMeeGoLivePixmap::lock() void *data = NULL; int pitch = 0; + QImage::Format format; if (! QMeeGoRuntime::lockLiveTexture(d->handle)) { qWarning("Failed to lock a live texture!"); return new QImage(); } - QMeeGoRuntime::queryLiveTexture(d->handle, &data, &pitch); + QMeeGoRuntime::queryLiveTexture(d->handle, &data, &pitch, &format); if (data == NULL || pitch == 0) { qWarning("Failed to query the live texture!"); return new QImage(); } - // FIXME Bug here! FIX FIX FIX FIX FIX FIX - return new QImage((uchar *) data, width(), height(), QImage::Format_RGB16); + return new QImage((uchar *) data, width(), height(), format); } void QMeeGoLivePixmap::release(QImage *img) diff --git a/tools/qmeegographicssystemhelper/qmeegoruntime.cpp b/tools/qmeegographicssystemhelper/qmeegoruntime.cpp index 44f9f58..215dffc 100644 --- a/tools/qmeegographicssystemhelper/qmeegoruntime.cpp +++ b/tools/qmeegographicssystemhelper/qmeegoruntime.cpp @@ -62,7 +62,7 @@ typedef Qt::HANDLE (*QMeeGoLiveTextureCreateFunc) (int w, int h, QImage::Format typedef bool (*QMeeGoLiveTextureLockFunc) (Qt::HANDLE h); typedef bool (*QMeeGoLiveTextureUnlockFunc) (Qt::HANDLE h); typedef void (*QMeeGoLiveTextureDestroyFunc) (Qt::HANDLE h); -typedef void (*QMeeGoLiveTextureQueryFunc) (Qt::HANDLE h, void **data, int *pitch); +typedef void (*QMeeGoLiveTextureQueryFunc) (Qt::HANDLE h, void **data, int *pitch, QImage::Format *format); typedef Qt::HANDLE (*QMeeGoLiveTextureToEglImageFunc) (Qt::HANDLE h); static QMeeGoImageToEglSharedImageFunc qt_meego_image_to_egl_shared_image = NULL; @@ -216,11 +216,11 @@ void QMeeGoRuntime::destroyLiveTexture(Qt::HANDLE h) qt_meego_live_texture_destroy(h); } -void QMeeGoRuntime::queryLiveTexture(Qt::HANDLE h, void **data, int *pitch) +void QMeeGoRuntime::queryLiveTexture(Qt::HANDLE h, void **data, int *pitch, QImage::Format *format) { ENSURE_INITIALIZED; Q_ASSERT(qt_meego_live_texture_query); - qt_meego_live_texture_query(h, data, pitch); + qt_meego_live_texture_query(h, data, pitch, format); } Qt::HANDLE QMeeGoRuntime::liveTextureToEGLImage(Qt::HANDLE handle) diff --git a/tools/qmeegographicssystemhelper/qmeegoruntime.h b/tools/qmeegographicssystemhelper/qmeegoruntime.h index 048b9be..9f2d505 100644 --- a/tools/qmeegographicssystemhelper/qmeegoruntime.h +++ b/tools/qmeegographicssystemhelper/qmeegoruntime.h @@ -60,7 +60,7 @@ public: static bool lockLiveTexture(Qt::HANDLE h); static bool unlockLiveTexture(Qt::HANDLE h); static void destroyLiveTexture(Qt::HANDLE h); - static void queryLiveTexture(Qt::HANDLE h, void **data, int *pitch); + static void queryLiveTexture(Qt::HANDLE h, void **data, int *pitch, QImage::Format *format); static Qt::HANDLE liveTextureToEGLImage(Qt::HANDLE); private: -- cgit v0.12 From 62dc9c9602987f4381481cc5642e3ea0782bb418 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 13 Oct 2010 11:42:10 +0200 Subject: Adjust the parent index for the itemsMoved call. Not doing this causes the parent QModelIndexes to be out of sync with the model. The fix in fe350ca756df6392b3d0b7840351fccc89f9ef6f is extended to also use adjusted indexes in the itemMove call. Merge-request: 849 Reviewed-by: Olivier Goffart --- src/corelib/kernel/qabstractitemmodel.cpp | 8 ++++---- tests/auto/modeltest/dynamictreemodel.cpp | 7 +++++++ tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp | 6 ++++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp index 9a99ea1..05cb271 100644 --- a/src/corelib/kernel/qabstractitemmodel.cpp +++ b/src/corelib/kernel/qabstractitemmodel.cpp @@ -2637,8 +2637,6 @@ void QAbstractItemModel::endMoveRows() QAbstractItemModelPrivate::Change insertChange = d->changes.pop(); QAbstractItemModelPrivate::Change removeChange = d->changes.pop(); - d->itemsMoved(removeChange.parent, removeChange.first, removeChange.last, insertChange.parent, insertChange.first, Qt::Vertical); - QModelIndex adjustedSource = removeChange.parent; QModelIndex adjustedDestination = insertChange.parent; @@ -2649,6 +2647,8 @@ void QAbstractItemModel::endMoveRows() if (removeChange.needsAdjust) adjustedSource = createIndex(adjustedSource.row() + numMoved, adjustedSource.column(), adjustedSource.internalPointer()); + d->itemsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first, Qt::Vertical); + emit rowsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first); emit layoutChanged(); } @@ -2861,8 +2861,6 @@ void QAbstractItemModel::endMoveColumns() QAbstractItemModelPrivate::Change insertChange = d->changes.pop(); QAbstractItemModelPrivate::Change removeChange = d->changes.pop(); - d->itemsMoved(removeChange.parent, removeChange.first, removeChange.last, insertChange.parent, insertChange.first, Qt::Horizontal); - QModelIndex adjustedSource = removeChange.parent; QModelIndex adjustedDestination = insertChange.parent; @@ -2873,6 +2871,8 @@ void QAbstractItemModel::endMoveColumns() if (removeChange.needsAdjust) adjustedSource = createIndex(adjustedSource.row(), adjustedSource.column() + numMoved, adjustedSource.internalPointer()); + d->itemsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first, Qt::Horizontal); + emit columnsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first); emit layoutChanged(); } diff --git a/tests/auto/modeltest/dynamictreemodel.cpp b/tests/auto/modeltest/dynamictreemodel.cpp index b572eb1..fa634b6 100644 --- a/tests/auto/modeltest/dynamictreemodel.cpp +++ b/tests/auto/modeltest/dynamictreemodel.cpp @@ -63,6 +63,13 @@ QModelIndex DynamicTreeModel::index(int row, int column, const QModelIndex &pare QList > childIdColumns = m_childItems.value(parent.internalId()); + const qint64 grandParent = findParentId(parent.internalId()); + if (grandParent >= 0) { + QList > parentTable = m_childItems.value(grandParent); + Q_ASSERT(parent.column() < parentTable.size()); + QList parentSiblings = parentTable.at(parent.column()); + Q_ASSERT(parent.row() < parentSiblings.size()); + } if (childIdColumns.size() == 0) return QModelIndex(); diff --git a/tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp b/tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp index dbcccc9..b723253 100644 --- a/tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp +++ b/tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp @@ -1167,6 +1167,7 @@ void tst_QAbstractItemModel::testMoveToGrandParent_data() // Moving everything from one parent to another QTest::newRow("move12") << 0 << 9 << 10; + QTest::newRow("move13") << 0 << 9 << 0; } void tst_QAbstractItemModel::testMoveToGrandParent() @@ -1314,6 +1315,11 @@ void tst_QAbstractItemModel::testMoveToSibling_data() QTest::newRow("move09") << 8 << 8 << 4; QTest::newRow("move10") << 8 << 8 << 5; QTest::newRow("move11") << 8 << 8 << 6; + + // Move such that the destination parent no longer valid after the move. + // The destination parent is always QMI(5, 0), but after this move the + // row count is 5, so (5, 0) (used internally in QAIM) no longer refers to a valid index. + QTest::newRow("move12") << 0 << 4 << 0; } void tst_QAbstractItemModel::testMoveToSibling() -- cgit v0.12 From 9f766c977a329c84023a15fc66f52d26ff03447b Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 13 Oct 2010 13:27:06 +0200 Subject: Revert "Revert "Fix (implement!) hfw/wfh in QGridLayoutEngine"" This reverts commit 5bd6f7eb5c7d87c08539b6c2df416990cc417ec7. This is a revert of the revert. It is required apply the merge-request 847, which itself revert back part of this commit but fixing it the (hopefuly) right way --- src/gui/graphicsview/qgraphicslayoutitem.cpp | 51 ++- src/gui/graphicsview/qgraphicslayoutitem_p.h | 6 + src/gui/graphicsview/qgridlayoutengine.cpp | 251 +++++++++++++- src/gui/graphicsview/qgridlayoutengine_p.h | 23 +- .../tst_qgraphicsgridlayout.cpp | 364 ++++++++++++++++++++- 5 files changed, 678 insertions(+), 17 deletions(-) diff --git a/src/gui/graphicsview/qgraphicslayoutitem.cpp b/src/gui/graphicsview/qgraphicslayoutitem.cpp index ad4b2b5..634f68c 100644 --- a/src/gui/graphicsview/qgraphicslayoutitem.cpp +++ b/src/gui/graphicsview/qgraphicslayoutitem.cpp @@ -48,6 +48,7 @@ #include "qgraphicslayoutitem.h" #include "qgraphicslayoutitem_p.h" #include "qwidget.h" +#include "qgraphicswidget.h" #include @@ -139,9 +140,11 @@ QSizeF *QGraphicsLayoutItemPrivate::effectiveSizeHints(const QSizeF &constraint) if (!sizeHintCacheDirty && cachedConstraint == constraint) return cachedSizeHints; + const bool hasConstraint = constraint.width() >= 0 || constraint.height() >= 0; + for (int i = 0; i < Qt::NSizeHints; ++i) { cachedSizeHints[i] = constraint; - if (userSizeHints) + if (userSizeHints && !hasConstraint) combineSize(cachedSizeHints[i], userSizeHints[i]); } @@ -259,6 +262,52 @@ void QGraphicsLayoutItemPrivate::setSizeComponent( q->updateGeometry(); } + +bool QGraphicsLayoutItemPrivate::hasHeightForWidth() const +{ + Q_Q(const QGraphicsLayoutItem); + if (isLayout) { + const QGraphicsLayout *l = static_cast(q); + for (int i = l->count() - 1; i >= 0; --i) { + if (QGraphicsLayoutItemPrivate::get(l->itemAt(i))->hasHeightForWidth()) + return true; + } + } else if (QGraphicsItem *item = q->graphicsItem()) { + if (item->isWidget()) { + QGraphicsWidget *w = static_cast(item); + if (w->layout()) { + return QGraphicsLayoutItemPrivate::get(w->layout())->hasHeightForWidth(); + } + } + } + return q->sizePolicy().hasHeightForWidth(); +} + +bool QGraphicsLayoutItemPrivate::hasWidthForHeight() const +{ + // enable this code when we add QSizePolicy::hasWidthForHeight() (For 4.8) +#if 1 + return false; +#else + Q_Q(const QGraphicsLayoutItem); + if (isLayout) { + const QGraphicsLayout *l = static_cast(q); + for (int i = l->count() - 1; i >= 0; --i) { + if (QGraphicsLayoutItemPrivate::get(l->itemAt(i))->hasWidthForHeight()) + return true; + } + } else if (QGraphicsItem *item = q->graphicsItem()) { + if (item->isWidget()) { + QGraphicsWidget *w = static_cast(item); + if (w->layout()) { + return QGraphicsLayoutItemPrivate::get(w->layout())->hasWidthForHeight(); + } + } + } + return q->sizePolicy().hasWidthForHeight(); +#endif +} + /*! \class QGraphicsLayoutItem \brief The QGraphicsLayoutItem class can be inherited to allow your custom diff --git a/src/gui/graphicsview/qgraphicslayoutitem_p.h b/src/gui/graphicsview/qgraphicslayoutitem_p.h index 15cc7a5..b752e03 100644 --- a/src/gui/graphicsview/qgraphicslayoutitem_p.h +++ b/src/gui/graphicsview/qgraphicslayoutitem_p.h @@ -65,6 +65,9 @@ class Q_AUTOTEST_EXPORT QGraphicsLayoutItemPrivate public: virtual ~QGraphicsLayoutItemPrivate(); QGraphicsLayoutItemPrivate(QGraphicsLayoutItem *parent, bool isLayout); + static QGraphicsLayoutItemPrivate *get(QGraphicsLayoutItem *q) { return q->d_func();} + static const QGraphicsLayoutItemPrivate *get(const QGraphicsLayoutItem *q) { return q->d_func();} + void init(); QSizeF *effectiveSizeHints(const QSizeF &constraint) const; QGraphicsItem *parentItem() const; @@ -73,6 +76,9 @@ public: enum SizeComponent { Width, Height }; void setSizeComponent(Qt::SizeHint which, SizeComponent component, qreal value); + bool hasHeightForWidth() const; + bool hasWidthForHeight() const; + QSizePolicy sizePolicy; QGraphicsLayoutItem *parent; diff --git a/src/gui/graphicsview/qgridlayoutengine.cpp b/src/gui/graphicsview/qgridlayoutengine.cpp index ae5bf90..1e3addc 100644 --- a/src/gui/graphicsview/qgridlayoutengine.cpp +++ b/src/gui/graphicsview/qgridlayoutengine.cpp @@ -545,6 +545,24 @@ QSizePolicy::Policy QGridLayoutItem::sizePolicy(Qt::Orientation orientation) con : sizePolicy.verticalPolicy(); } +/* + returns true if the size policy returns true for either hasHeightForWidth() + or hasWidthForHeight() + */ +bool QGridLayoutItem::hasDynamicConstraint() const +{ + return QGraphicsLayoutItemPrivate::get(q_layoutItem)->hasHeightForWidth() + || QGraphicsLayoutItemPrivate::get(q_layoutItem)->hasWidthForHeight(); +} + +Qt::Orientation QGridLayoutItem::dynamicConstraintOrientation() const +{ + if (QGraphicsLayoutItemPrivate::get(q_layoutItem)->hasHeightForWidth()) + return Qt::Vertical; + else //if (QGraphicsLayoutItemPrivate::get(q_layoutItem)->hasWidthForHeight()) + return Qt::Horizontal; +} + QSizePolicy::ControlTypes QGridLayoutItem::controlTypes(LayoutSide /* side */) const { return q_layoutItem->sizePolicy().controlType(); @@ -613,7 +631,14 @@ QRectF QGridLayoutItem::geometryWithin(qreal x, qreal y, qreal width, qreal heig qreal cellWidth = width; qreal cellHeight = height; - QSizeF size = effectiveMaxSize().boundedTo(QSizeF(cellWidth, cellHeight)); + QSize constraint; + if (hasDynamicConstraint()) { + if (dynamicConstraintOrientation() == Qt::Vertical) + constraint.setWidth(cellWidth); + else + constraint.setHeight(cellHeight); + } + QSizeF size = effectiveMaxSize(constraint).boundedTo(QSizeF(cellWidth, cellHeight)); width = size.width(); height = size.height(); @@ -675,13 +700,13 @@ void QGridLayoutItem::insertOrRemoveRows(int row, int delta, Qt::Orientation ori Note that effectiveSizeHint does not take sizePolicy into consideration, (since it only evaluates the hints, as the name implies) */ -QSizeF QGridLayoutItem::effectiveMaxSize() const +QSizeF QGridLayoutItem::effectiveMaxSize(const QSizeF &constraint) const { - QSizeF size; + QSizeF size = constraint; bool vGrow = (sizePolicy(Qt::Vertical) & QSizePolicy::GrowFlag) == QSizePolicy::GrowFlag; bool hGrow = (sizePolicy(Qt::Horizontal) & QSizePolicy::GrowFlag) == QSizePolicy::GrowFlag; if (!vGrow || !hGrow) { - QSizeF pref = layoutItem()->effectiveSizeHint(Qt::PreferredSize); + QSizeF pref = layoutItem()->effectiveSizeHint(Qt::PreferredSize, constraint); if (!vGrow) size.setHeight(pref.height()); if (!hGrow) @@ -689,7 +714,7 @@ QSizeF QGridLayoutItem::effectiveMaxSize() const } if (!size.isValid()) { - QSizeF maxSize = layoutItem()->effectiveSizeHint(Qt::MaximumSize); + QSizeF maxSize = layoutItem()->effectiveSizeHint(Qt::MaximumSize, constraint); if (size.width() == -1) size.setWidth(maxSize.width()); if (size.height() == -1) @@ -1010,6 +1035,7 @@ void QGridLayoutEngine::invalidate() q_cachedEffectiveLastRows[Ver] = -1; q_cachedDataForStyleInfo.invalidate(); q_cachedSize = QSizeF(); + q_cachedConstraintOrientation = UnknownConstraint; } static void visualRect(QRectF *geom, Qt::LayoutDirection dir, const QRectF &contentsRect) @@ -1074,10 +1100,13 @@ QRectF QGridLayoutEngine::cellRect(const QLayoutStyleInfo &styleInfo, } QSizeF QGridLayoutEngine::sizeHint(const QLayoutStyleInfo &styleInfo, Qt::SizeHint which, - const QSizeF & /* constraint */) const + const QSizeF &constraint) const { ensureColumnAndRowData(styleInfo); + if (hasDynamicConstraint()) + return dynamicallyConstrainedSizeHint(which, constraint); + switch (which) { case Qt::MinimumSize: return QSizeF(q_totalBoxes[Hor].q_minimumSize, q_totalBoxes[Ver].q_minimumSize); @@ -1375,7 +1404,11 @@ void QGridLayoutEngine::fillRowData(QGridLayoutRowData *rowData, const QLayoutSt box = &multiCell.q_box; multiCell.q_stretch = itemStretch; } - box->combine(item->box(orientation)); + // Items with constraints are not included in the orientation that + // they are constrained (since it depends on the hfw/constraint function). + // They must be combined at a later stage. + if (!item->hasDynamicConstraint() || orientation != item->dynamicConstraintOrientation()) + box->combine(item->box(orientation)); if (effectiveRowSpan == 1) { QSizePolicy::ControlTypes controls = item->controlTypes(top); @@ -1532,6 +1565,138 @@ void QGridLayoutEngine::ensureColumnAndRowData(const QLayoutStyleInfo &styleInfo q_cachedDataForStyleInfo = styleInfo; } +QSizeF QGridLayoutEngine::dynamicallyConstrainedSizeHint(Qt::SizeHint which, + const QSizeF &constraint) const +{ + Q_ASSERT(hasDynamicConstraint()); + if (constraint.width() < 0 && constraint.height() < 0) { + // Process the hfw / wfh items that we did not process in fillRowData() + const Qt::Orientation constraintOrient = constraintOrientation(); + + QGridLayoutRowData rowData = constraintOrient == Qt::Vertical ? q_rowData : q_columnData; + for (int i = q_items.count() - 1; i >= 0; --i) { + QGridLayoutItem *item = q_items.at(i); + if (item->hasDynamicConstraint()) { + QGridLayoutBox box = item->box(constraintOrient); + QGridLayoutBox &rowBox = rowData.boxes[item->firstRow(constraintOrient)]; + rowBox.combine(box); + } + } + + QGridLayoutBox totalBoxes[2]; + if (constraintOrient == Qt::Vertical) { + totalBoxes[Hor] = q_columnData.totalBox(0, columnCount()); + totalBoxes[Ver] = rowData.totalBox(0, rowCount()); + } else { + totalBoxes[Hor] = rowData.totalBox(0, columnCount()); + totalBoxes[Ver] = q_rowData.totalBox(0, rowCount()); + } + return QSizeF(totalBoxes[Hor].q_sizes(which), totalBoxes[Ver].q_sizes(which)); + } + + + Q_ASSERT(constraint.width() >= 0 || constraint.height() >= 0); + q_xx.resize(columnCount()); + q_yy.resize(rowCount()); + q_widths.resize(columnCount()); + q_heights.resize(rowCount()); + q_descents.resize(rowCount()); + + + const Qt::Orientation orientation = constraintOrientation(); + QGridLayoutRowData *colData; + QGridLayoutRowData constrainedRowData; + QGridLayoutBox *totalBox; + qreal *sizes; + qreal *pos; + qreal *descents; + qreal targetSize; + qreal cCount; + qreal rCount; + + if (orientation == Qt::Vertical) { + // height for width + colData = &q_columnData; + totalBox = &q_totalBoxes[Hor]; + sizes = q_widths.data(); + pos = q_xx.data(); + descents = 0; + targetSize = constraint.width(); + cCount = columnCount(); + rCount = rowCount(); + constrainedRowData = q_rowData; + } else { + // width for height + colData = &q_rowData; + totalBox = &q_totalBoxes[Ver]; + sizes = q_heights.data(); + pos = q_yy.data(); + descents = q_descents.data(); + targetSize = constraint.height(); + cCount = rowCount(); + rCount = columnCount(); + constrainedRowData = q_columnData; + } + colData->calculateGeometries(0, cCount, targetSize, pos, sizes, descents, *totalBox); + for (int i = q_items.count() - 1; i >= 0; --i) { + QGridLayoutItem *item = q_items.at(i); + + if (item->hasDynamicConstraint()) { + const qreal size = sizes[item->firstColumn(orientation)]; + QGridLayoutBox box = item->box(orientation, size); + QGridLayoutBox &rowBox = constrainedRowData.boxes[item->firstRow(orientation)]; + rowBox.combine(box); + } + } + const qreal newSize = constrainedRowData.totalBox(0, rCount).q_sizes(which); + + return (orientation == Qt::Vertical) ? QSizeF(targetSize, newSize) : QSizeF(newSize, targetSize); +} + + +/** + returns false if the layout has contradicting constraints (i.e. some items with a horizontal + constraint and other items with a vertical constraint) + */ +bool QGridLayoutEngine::ensureDynamicConstraint() const +{ + if (q_cachedConstraintOrientation == UnknownConstraint) { + for (int i = q_items.count() - 1; i >= 0; --i) { + QGridLayoutItem *item = q_items.at(i); + if (item->hasDynamicConstraint()) { + Qt::Orientation itemConstraintOrientation = item->dynamicConstraintOrientation(); + if (q_cachedConstraintOrientation == UnknownConstraint) { + q_cachedConstraintOrientation = itemConstraintOrientation; + } else if (q_cachedConstraintOrientation != itemConstraintOrientation) { + q_cachedConstraintOrientation = UnfeasibleConstraint; + qWarning("QGridLayoutEngine: Unfeasible, cannot mix horizontal and" + " vertical constraint in the same layout"); + return false; + } + } + } + if (q_cachedConstraintOrientation == UnknownConstraint) + q_cachedConstraintOrientation = NoConstraint; + } + return true; +} + +bool QGridLayoutEngine::hasDynamicConstraint() const +{ + if (!ensureDynamicConstraint()) + return false; + return q_cachedConstraintOrientation != NoConstraint; +} + +/* + * return value is only valid if hasConstraint() returns true + */ +Qt::Orientation QGridLayoutEngine::constraintOrientation() const +{ + (void)ensureDynamicConstraint(); + return (Qt::Orientation)q_cachedConstraintOrientation; +} + void QGridLayoutEngine::ensureGeometries(const QLayoutStyleInfo &styleInfo, const QSizeF &size) const { @@ -1544,10 +1709,74 @@ void QGridLayoutEngine::ensureGeometries(const QLayoutStyleInfo &styleInfo, q_widths.resize(columnCount()); q_heights.resize(rowCount()); q_descents.resize(rowCount()); - q_columnData.calculateGeometries(0, columnCount(), size.width(), q_xx.data(), q_widths.data(), - 0, q_totalBoxes[Hor]); - q_rowData.calculateGeometries(0, rowCount(), size.height(), q_yy.data(), q_heights.data(), - q_descents.data(), q_totalBoxes[Ver]); + + + Qt::Orientation orientation = Qt::Vertical; + if (hasDynamicConstraint()) + orientation = constraintOrientation(); + + /* + In order to do hfw we need to first distribute the columns, then the rows. + In order to do wfh we need to first distribute the rows, then the columns. + + If there is no constraint, the order of distributing the rows or columns first is irrelevant. + We choose horizontal just to keep the same behaviour as before (however, there shouldn't + be any behaviour difference). + */ + + QGridLayoutRowData *colData; + QGridLayoutRowData rowData; + qreal *widths; + qreal *heights; + qreal *xx; + qreal *yy; + qreal *xdescents = 0; + qreal *ydescents = 0; + qreal cCount; + qreal rCount; + QSizeF oSize = size; + if (orientation == Qt::Vertical) { + // height for width + colData = &q_columnData; + rowData = q_rowData; + widths = q_widths.data(); + heights = q_heights.data(); + xx = q_xx.data(); + yy = q_yy.data(); + cCount = columnCount(); + rCount = rowCount(); + ydescents = q_descents.data(); + } else { + // width for height + colData = &q_rowData; + rowData = q_columnData; + widths = q_heights.data(); + heights = q_widths.data(); + xx = q_yy.data(); + yy = q_xx.data(); + cCount = rowCount(); + rCount = columnCount(); + xdescents = q_descents.data(); + oSize.transpose(); + } + + colData->calculateGeometries(0, cCount, oSize.width(), xx, widths, + xdescents, q_totalBoxes[orientation == Qt::Horizontal]); + for (int i = q_items.count() - 1; i >= 0; --i) { + QGridLayoutItem *item = q_items.at(i); + const int col = item->firstColumn(orientation); + const int row = item->firstRow(orientation); + if (item->hasDynamicConstraint()) { + const qreal sz = widths[col]; + QGridLayoutBox box = item->box(orientation, sz); + rowData.boxes[row].combine(box); + } + } + + QGridLayoutBox &totalBox = q_totalBoxes[orientation == Qt::Vertical]; + totalBox = rowData.totalBox(0, rCount); + rowData.calculateGeometries(0, rCount, oSize.height(), yy, heights, + ydescents, totalBox); q_cachedSize = size; } diff --git a/src/gui/graphicsview/qgridlayoutengine_p.h b/src/gui/graphicsview/qgridlayoutengine_p.h index 9ac9a8e..580af7e 100644 --- a/src/gui/graphicsview/qgridlayoutengine_p.h +++ b/src/gui/graphicsview/qgridlayoutengine_p.h @@ -91,6 +91,14 @@ enum LayoutSide { Bottom }; +enum { + NoConstraint, + HorizontalConstraint, + VerticalConstraint, + UnknownConstraint, // need to update cache + UnfeasibleConstraint // not feasible, it be has some items with Vertical and others with Horizontal constraints +}; + template class QLayoutParameter { @@ -270,6 +278,10 @@ public: inline void setAlignment(Qt::Alignment alignment) { q_alignment = alignment; } QSizePolicy::Policy sizePolicy(Qt::Orientation orientation) const; + + bool hasDynamicConstraint() const; + Qt::Orientation dynamicConstraintOrientation() const; + QSizePolicy::ControlTypes controlTypes(LayoutSide side) const; QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const; QGridLayoutBox box(Qt::Orientation orientation, qreal constraint = -1.0) const; @@ -280,7 +292,7 @@ public: void setGeometry(const QRectF &rect); void transpose(); void insertOrRemoveRows(int row, int delta, Qt::Orientation orientation = Qt::Vertical); - QSizeF effectiveMaxSize() const; + QSizeF effectiveMaxSize(const QSizeF &constraint) const; #ifdef QT_DEBUG void dump(int indent = 0) const; @@ -372,6 +384,14 @@ public: int column, int rowSpan, int columnSpan) const; QSizeF sizeHint(const QLayoutStyleInfo &styleInfo, Qt::SizeHint which, const QSizeF &constraint) const; + + // heightForWidth / widthForHeight support + QSizeF dynamicallyConstrainedSizeHint(Qt::SizeHint which, const QSizeF &constraint) const; + bool ensureDynamicConstraint() const; + bool hasDynamicConstraint() const; + Qt::Orientation constraintOrientation() const; + + QSizePolicy::ControlTypes controlTypes(LayoutSide side) const; void transpose(); void setVisualDirection(Qt::LayoutDirection direction); @@ -405,6 +425,7 @@ private: // Lazily computed from the above user input mutable int q_cachedEffectiveFirstRows[NOrientations]; mutable int q_cachedEffectiveLastRows[NOrientations]; + mutable quint8 q_cachedConstraintOrientation : 2; // Layout item input mutable QLayoutStyleInfo q_cachedDataForStyleInfo; diff --git a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp index 5b03767..03c1d5b 100644 --- a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp +++ b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp @@ -107,12 +107,13 @@ private slots: void avoidRecursionInInsertItem(); void styleInfoLeak(); void task236367_maxSizeHint(); + void heightForWidth(); }; class RectWidget : public QGraphicsWidget { public: - RectWidget(QGraphicsItem *parent = 0) : QGraphicsWidget(parent){} + RectWidget(QGraphicsItem *parent = 0) : QGraphicsWidget(parent), m_fnConstraint(0) {} void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { @@ -125,9 +126,12 @@ public: QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const { - if (m_sizeHints[which].isValid()) { + if (constraint.width() < 0 && constraint.height() < 0 && m_sizeHints[which].isValid()) { return m_sizeHints[which]; } + if (m_fnConstraint) { + return m_fnConstraint(which, constraint); + } return QGraphicsWidget::sizeHint(which, constraint); } @@ -136,7 +140,13 @@ public: updateGeometry(); } + void setConstraintFunction(QSizeF (*fnConstraint)(Qt::SizeHint, const QSizeF &)) { + m_fnConstraint = fnConstraint; + } + QSizeF m_sizeHints[Qt::NSizeHints]; + QSizeF (*m_fnConstraint)(Qt::SizeHint, const QSizeF &); + }; struct ItemDesc @@ -146,7 +156,8 @@ struct ItemDesc m_rowSpan(1), m_colSpan(1), m_sizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred)), - m_align(0) + m_align(0), + m_fnConstraint(0) { } @@ -213,8 +224,20 @@ struct ItemDesc return (*this); } + ItemDesc &heightForWidth(QSizeF (*fnConstraint)(Qt::SizeHint, const QSizeF &)) { + m_fnConstraint = fnConstraint; + m_constraintOrientation = Qt::Vertical; + return (*this); + } + void apply(QGraphicsGridLayout *layout, QGraphicsWidget *item) { - item->setSizePolicy(m_sizePolicy); + QSizePolicy sp = m_sizePolicy; + if (m_fnConstraint) { + sp.setHeightForWidth(m_constraintOrientation == Qt::Vertical); + //sp.setWidthForHeight(m_constraintOrientation == Qt::Horizontal); + } + + item->setSizePolicy(sp); for (int i = 0; i < Qt::NSizeHints; ++i) { if (!m_sizes[i].isValid()) continue; @@ -233,6 +256,7 @@ struct ItemDesc break; } } + layout->addItem(item, m_pos.first, m_pos.second, m_rowSpan, m_colSpan); layout->setAlignment(item, m_align); } @@ -240,6 +264,7 @@ struct ItemDesc void apply(QGraphicsGridLayout *layout, RectWidget *item) { for (int i = 0; i < Qt::NSizeHints; ++i) item->setSizeHint((Qt::SizeHint)i, m_sizeHints[i]); + item->setConstraintFunction(m_fnConstraint); apply(layout, static_cast(item)); } @@ -251,6 +276,9 @@ struct ItemDesc QSizeF m_sizeHints[Qt::NSizeHints]; QSizeF m_sizes[Qt::NSizeHints]; Qt::Alignment m_align; + + Qt::Orientation m_constraintOrientation; + QSizeF (*m_fnConstraint)(Qt::SizeHint, const QSizeF &); }; typedef QList ItemList; @@ -2116,6 +2144,17 @@ void tst_QGraphicsGridLayout::alignment2() delete widget; } +static QSizeF hfw1(Qt::SizeHint, const QSizeF &constraint) +{ + QSizeF result(constraint); + if (constraint.width() < 0 && constraint.height() < 0) { + return QSizeF(50, 400); + } else if (constraint.width() >= 0) { + result.setHeight(20000./constraint.width()); + } + return result; +} + void tst_QGraphicsGridLayout::geometries_data() { @@ -2145,6 +2184,186 @@ void tst_QGraphicsGridLayout::geometries_data() << QRectF(0, 0, 60,10) << QRectF(0, 10, 60,10) ); + // change layout height and verify + QTest::newRow("hfw-h401") << (ItemList() + << ItemDesc(0,0) + .minSize(QSizeF(1,1)) + .preferredSize(QSizeF(50,10)) + .maxSize(QSizeF(100, 100)) + << ItemDesc(0,1) + .minSize(QSizeF(1,1)) + .preferredSize(QSizeF(50,10)) + .maxSize(QSizeF(100, 100)) + << ItemDesc(1,0) + .minSize(QSizeF(1,1)) + .preferredSize(QSizeF(50,10)) + .maxSize(QSizeF(100, 100)) + << ItemDesc(1,1) + .minSize(QSizeF(40,40)) + .preferredSize(QSizeF(50,400)) + .maxSize(QSizeF(500, 500)) + .heightForWidth(hfw1) + ) + << QSizeF(100, 401) + << (RectList() + << QRectF(0, 0, 50, 1) << QRectF(50, 0, 50, 1) + << QRectF(0, 1, 50,100) << QRectF(50, 1, 50,400) + ); + + + QTest::newRow("hfw-h408") << (ItemList() + << ItemDesc(0,0) + .minSize(QSizeF(1,1)) + .preferredSize(QSizeF(50,10)) + .maxSize(QSizeF(100, 100)) + << ItemDesc(0,1) + .minSize(QSizeF(1,1)) + .preferredSize(QSizeF(50,10)) + .maxSize(QSizeF(100, 100)) + << ItemDesc(1,0) + .minSize(QSizeF(1,1)) + .preferredSize(QSizeF(50,10)) + .maxSize(QSizeF(100, 100)) + << ItemDesc(1,1) + .minSize(QSizeF(40,40)) + .preferredSize(QSizeF(50,400)) + .maxSize(QSizeF(500, 500)) + .heightForWidth(hfw1) + ) + << QSizeF(100, 408) + << (RectList() + << QRectF(0, 0, 50, 8) << QRectF(50, 0, 50, 8) + << QRectF(0, 8, 50,100) << QRectF(50, 8, 50,400) + ); + + QTest::newRow("hfw-h410") << (ItemList() + << ItemDesc(0,0) + .minSize(QSizeF(1,1)) + .preferredSize(QSizeF(50,10)) + .maxSize(QSizeF(100, 100)) + << ItemDesc(0,1) + .minSize(QSizeF(1,1)) + .preferredSize(QSizeF(50,10)) + .maxSize(QSizeF(100, 100)) + << ItemDesc(1,0) + .minSize(QSizeF(1,1)) + .preferredSize(QSizeF(50,10)) + .maxSize(QSizeF(100, 100)) + << ItemDesc(1,1) + .minSize(QSizeF(40,40)) + .preferredSize(QSizeF(50,400)) + .maxSize(QSizeF(500, 500)) + .heightForWidth(hfw1) + ) + << QSizeF(100, 410) + << (RectList() + << QRectF(0, 0, 50,10) << QRectF(50, 0, 50,10) + << QRectF(0, 10, 50,100) << QRectF(50, 10, 50,400) + ); + + QTest::newRow("hfw-h470") << (ItemList() + << ItemDesc(0,0) + .minSize(QSizeF(1,1)) + .preferredSize(QSizeF(50,10)) + .maxSize(QSizeF(100, 100)) + << ItemDesc(0,1) + .minSize(QSizeF(1,1)) + .preferredSize(QSizeF(50,10)) + .maxSize(QSizeF(100, 100)) + << ItemDesc(1,0) + .minSize(QSizeF(1,1)) + .preferredSize(QSizeF(50,10)) + .maxSize(QSizeF(100, 100)) + << ItemDesc(1,1) + .minSize(QSizeF(40,40)) + .preferredSize(QSizeF(50,400)) + .maxSize(QSizeF(500, 500)) + .heightForWidth(hfw1) + ) + << QSizeF(100, 470) + << (RectList() + << QRectF(0, 0, 50,70) << QRectF(50, 0, 50,70) + << QRectF(0, 70, 50,100) << QRectF(50, 70, 50,400) + ); + + + // change layout width and verify + QTest::newRow("hfw-w100") << (ItemList() + << ItemDesc(0,0) + .minSize(QSizeF(1,1)) + .preferredSize(QSizeF(50,10)) + .maxSize(QSizeF(100, 100)) + << ItemDesc(0,1) + .minSize(QSizeF(1,1)) + .preferredSize(QSizeF(50,10)) + .maxSize(QSizeF(100, 100)) + << ItemDesc(1,0) + .minSize(QSizeF(1,1)) + .preferredSize(QSizeF(50,10)) + .maxSize(QSizeF(100, 100)) + << ItemDesc(1,1) + .minSize(QSizeF(40,40)) + .preferredSize(QSizeF(50,400)) + .maxSize(QSizeF(5000, 5000)) + .heightForWidth(hfw1) + ) + << QSizeF(100, 401) + << (RectList() + << QRectF( 0, 0, 50, 1) << QRectF( 50, 0, 50, 1) + << QRectF( 0, 1, 50, 100) << QRectF( 50, 1, 50, 400) + ); + + QTest::newRow("hfw-w160") << (ItemList() + << ItemDesc(0,0) + .minSize(QSizeF(1,1)) + .preferredSize(QSizeF(50,10)) + .maxSize(QSizeF(100, 100)) + << ItemDesc(0,1) + .minSize(QSizeF(1,1)) + .preferredSize(QSizeF(50,10)) + .maxSize(QSizeF(100, 100)) + << ItemDesc(1,0) + .minSize(QSizeF(1,1)) + .preferredSize(QSizeF(50,10)) + .maxSize(QSizeF(100, 100)) + << ItemDesc(1,1) + .minSize(QSizeF(40,40)) + .preferredSize(QSizeF(50,400)) + .maxSize(QSizeF(5000, 5000)) + .heightForWidth(hfw1) + ) + << QSizeF(160, 401) + << (RectList() + << QRectF( 0, 0, 80, 100) << QRectF( 80, 0, 80, 100) + << QRectF( 0, 100, 80, 100) << QRectF( 80, 100, 80, 250) + ); + + + QTest::newRow("hfw-w500") << (ItemList() + << ItemDesc(0,0) + .minSize(QSizeF(1,1)) + .preferredSize(QSizeF(50,10)) + .maxSize(QSizeF(100, 100)) + << ItemDesc(0,1) + .minSize(QSizeF(1,1)) + .preferredSize(QSizeF(50,10)) + .maxSize(QSizeF(100, 100)) + << ItemDesc(1,0) + .minSize(QSizeF(1,1)) + .preferredSize(QSizeF(50,10)) + .maxSize(QSizeF(100, 100)) + << ItemDesc(1,1) + .minSize(QSizeF(40,40)) + .preferredSize(QSizeF(50,400)) + .maxSize(QSizeF(5000, 5000)) + .heightForWidth(hfw1) + ) + << QSizeF(500, 401) + << (RectList() + << QRectF( 0, 0, 100, 100) << QRectF(100, 0, 100, 100) + << QRectF( 0, 100, 100, 100) << QRectF(100, 100, 400, 50) + ); + } void tst_QGraphicsGridLayout::geometries() @@ -2215,6 +2434,143 @@ void tst_QGraphicsGridLayout::task236367_maxSizeHint() QCOMPARE(widget->size(), QSizeF(w, h)); } +/* +static qreal hfw(qreal w) +{ + if (w == 0) + return 20000; + return 20000/w; +} +*/ +static QSizeF hfw(Qt::SizeHint /*which*/, const QSizeF &constraint) +{ + QSizeF result(constraint); + const qreal cw = constraint.width(); + const qreal ch = constraint.height(); + if (cw < 0 && ch < 0) { + return QSizeF(200, 100); + } else if (cw >= 0) { + result.setHeight(20000./cw); + } else if (cw == 0) { + result.setHeight(20000); + } else if (ch >= 0) { + result.setWidth(20000./ch); + } else if (ch == 0) { + result.setWidth(20000); + } + + return result; +} + +static qreal growthFactorBelowPreferredSize(qreal desired, qreal sumAvailable, qreal sumDesired) +{ + Q_ASSERT(sumDesired != 0.0); + return desired * qPow(sumAvailable / sumDesired, desired / sumDesired); +} + +static void expectedWidth(qreal minSize1, qreal prefSize1, + qreal minSize2, qreal prefSize2, + qreal targetSize, qreal *width1, qreal *width2) +{ + qreal sumAvail,factor1,factor2; + // stretch behaviour is different below and above preferred size... + if (targetSize < prefSize1 + prefSize2) { + sumAvail = targetSize - minSize1 - minSize2; + const qreal desired1 = prefSize1 - minSize1; + const qreal desired2 = prefSize2 - minSize2; + const qreal sumDesired = desired1 + desired2; + factor1 = growthFactorBelowPreferredSize(desired1, sumAvail, sumDesired); + factor2 = growthFactorBelowPreferredSize(desired2, sumAvail, sumDesired); + const qreal sumFactors = factor1 + factor2; + *width1 = sumAvail*factor1/sumFactors + minSize1; + *width2 = sumAvail*factor2/sumFactors + minSize2; + } else { + sumAvail = targetSize - prefSize1 - prefSize2; + factor1 = prefSize1; + factor2 = prefSize2; + const qreal sumFactors = factor1 + factor2; + *width1 = sumAvail*factor1/sumFactors + prefSize1; + *width2 = sumAvail*factor2/sumFactors + prefSize2; + } +} + + +bool qFuzzyCompare(const QSizeF &a, const QSizeF &b) +{ + return qFuzzyCompare(a.width(), b.width()) && qFuzzyCompare(a.height(), b.height()); +} + +void tst_QGraphicsGridLayout::heightForWidth() +{ + QGraphicsWidget *widget = new QGraphicsWidget; + QGraphicsGridLayout *layout = new QGraphicsGridLayout; + widget->setLayout(layout); + layout->setContentsMargins(0, 0, 0, 0); + layout->setSpacing(0); + RectWidget *w00 = new RectWidget; + w00->setSizeHint(Qt::MinimumSize, QSizeF(1,1)); + w00->setSizeHint(Qt::PreferredSize, QSizeF(10,10)); + w00->setSizeHint(Qt::MaximumSize, QSizeF(100,100)); + layout->addItem(w00, 0, 0); + + RectWidget *w01 = new RectWidget; + w01->setSizeHint(Qt::MinimumSize, QSizeF(1,1)); + w01->setSizeHint(Qt::PreferredSize, QSizeF(10,10)); + w01->setSizeHint(Qt::MaximumSize, QSizeF(100,100)); + layout->addItem(w01, 0, 1); + + RectWidget *w10 = new RectWidget; + w10->setSizeHint(Qt::MinimumSize, QSizeF(1,1)); + w10->setSizeHint(Qt::PreferredSize, QSizeF(10,10)); + w10->setSizeHint(Qt::MaximumSize, QSizeF(100,100)); + layout->addItem(w10, 1, 0); + + RectWidget *w11 = new RectWidget; + w11->setSizeHint(Qt::MinimumSize, QSizeF(1,1)); + w11->setSizeHint(Qt::MaximumSize, QSizeF(30000,30000)); + w11->setConstraintFunction(hfw); + QSizePolicy sp(QSizePolicy::Preferred, QSizePolicy::Preferred); + sp.setHeightForWidth(true); + w11->setSizePolicy(sp); + layout->addItem(w11, 1, 1); + + QSizeF prefSize = layout->effectiveSizeHint(Qt::PreferredSize, QSizeF(-1, -1)); + QCOMPARE(prefSize, QSizeF(10+200, 10+100)); + + QCOMPARE(layout->effectiveSizeHint(Qt::MinimumSize, QSizeF(2, -1)), QSizeF(2, 20001)); + QCOMPARE(layout->effectiveSizeHint(Qt::PreferredSize, QSizeF(2, -1)), QSizeF(2, 20010)); + QCOMPARE(layout->effectiveSizeHint(Qt::MaximumSize, QSizeF(2, -1)), QSizeF(2, 20100)); + qreal width1; + qreal width2; + expectedWidth(1, 10, 1, 200, 20, &width1, &width2); + QSizeF expectedSize = hfw(Qt::MinimumSize, QSizeF(width2, -1)) + QSizeF(width1, 1); + QCOMPARE(layout->effectiveSizeHint(Qt::MinimumSize, QSizeF(20, -1)), expectedSize); + expectedSize.rheight()+=9; + QCOMPARE(layout->effectiveSizeHint(Qt::PreferredSize, QSizeF(20, -1)), expectedSize); + expectedSize.rheight()+=90; + QCOMPARE(layout->effectiveSizeHint(Qt::MaximumSize, QSizeF(20, -1)), expectedSize); + + expectedWidth(1, 10, 1, 200, 300, &width1, &width2); + expectedSize = hfw(Qt::MinimumSize, QSizeF(width2, -1)) + QSizeF(width1, 1); + QCOMPARE(layout->effectiveSizeHint(Qt::MinimumSize, QSizeF(300, -1)), expectedSize); + expectedSize.rheight()+=9; + QCOMPARE(layout->effectiveSizeHint(Qt::PreferredSize, QSizeF(300, -1)), expectedSize); + // the height of the hfw widget is shorter than the one to the left, which is 100, so + // the total height of the last row is 100 (which leaves the layout height to be 200) + QCOMPARE(layout->effectiveSizeHint(Qt::MaximumSize, QSizeF(300, -1)), QSizeF(300, 200)); + + // the hfw item is shorter than the item to the left + expectedWidth(1, 10, 1, 200, 500, &width1, &width2); + expectedSize = hfw(Qt::MinimumSize, QSizeF(width2, -1)) + QSizeF(width1, 1); + QCOMPARE(layout->effectiveSizeHint(Qt::MinimumSize, QSizeF(500, -1)), expectedSize); + expectedSize.rheight()+=9; + QCOMPARE(layout->effectiveSizeHint(Qt::PreferredSize, QSizeF(500, -1)), expectedSize); + // the height of the hfw widget is shorter than the one to the left, which is 100, so + // the total height of the last row is 100 (which leaves the layout height to be 200) + QCOMPARE(layout->effectiveSizeHint(Qt::MaximumSize, QSizeF(500, -1)), QSizeF(500, 200)); + +} + QTEST_MAIN(tst_QGraphicsGridLayout) #include "tst_qgraphicsgridlayout.moc" -- cgit v0.12 From 6d4d265e7e67dde58e45d7d89f4974d0bd8b70e4 Mon Sep 17 00:00:00 2001 From: John Tapsell Date: Mon, 4 Oct 2010 01:03:41 +0100 Subject: QGridLayoutEngine - Rework height-for-width support so that row/col spanning works Task-number: QTBUG-13547 Reviewed-by: Olivier Goffart Merge-request: 847 --- src/gui/graphicsview/qgridlayoutengine.cpp | 300 ++++++++------------- src/gui/graphicsview/qgridlayoutengine_p.h | 13 +- .../tst_qgraphicsgridlayout.cpp | 35 +++ 3 files changed, 157 insertions(+), 191 deletions(-) diff --git a/src/gui/graphicsview/qgridlayoutengine.cpp b/src/gui/graphicsview/qgridlayoutengine.cpp index 1e3addc..acac46f 100644 --- a/src/gui/graphicsview/qgridlayoutengine.cpp +++ b/src/gui/graphicsview/qgridlayoutengine.cpp @@ -1102,20 +1102,76 @@ QRectF QGridLayoutEngine::cellRect(const QLayoutStyleInfo &styleInfo, QSizeF QGridLayoutEngine::sizeHint(const QLayoutStyleInfo &styleInfo, Qt::SizeHint which, const QSizeF &constraint) const { - ensureColumnAndRowData(styleInfo); + QGridLayoutBox sizehint_totalBoxes[NOrientations]; - if (hasDynamicConstraint()) - return dynamicallyConstrainedSizeHint(which, constraint); + if(rowCount() < 1 || columnCount() < 1 || !hasDynamicConstraint()) { + //No items with height for width, so it doesn't matter which order we do these in + if(q_cachedDataForStyleInfo != styleInfo) { + ensureColumnAndRowData(&q_columnData, &sizehint_totalBoxes[Hor], styleInfo, NULL, NULL, Qt::Horizontal); + ensureColumnAndRowData(&q_rowData, &sizehint_totalBoxes[Ver], styleInfo, NULL, NULL, Qt::Vertical); + } else { + sizehint_totalBoxes[Hor] = q_totalBoxes[Hor]; + sizehint_totalBoxes[Ver] = q_totalBoxes[Ver]; + } + } else if(constraintOrientation() == Qt::Vertical) { + //We have items whose width depends on their height + if(q_cachedDataForStyleInfo != styleInfo) + ensureColumnAndRowData(&q_columnData, &sizehint_totalBoxes[Hor], styleInfo, NULL, NULL, Qt::Horizontal); + else + sizehint_totalBoxes[Hor] = q_totalBoxes[Hor]; + QVector sizehint_xx; + QVector sizehint_widths; + + sizehint_xx.resize(columnCount()); + sizehint_widths.resize(columnCount()); + qreal width = constraint.width(); + if(width < 0) { + /* It's not obvious what the behaviour should be. */ +/* if(which == Qt::MaximumSize) + width = sizehint_totalBoxes[Hor].q_maximumSize; + else if(which == Qt::MinimumSize) + width = sizehint_totalBoxes[Hor].q_minimumSize; + else*/ + width = sizehint_totalBoxes[Hor].q_preferredSize; + } + //Calculate column widths and positions, and put results in q_xx.data() and q_widths.data() so that we can use this information as + //constraints to find the row heights + q_columnData.calculateGeometries(0, columnCount(), width, sizehint_xx.data(), sizehint_widths.data(), + 0, sizehint_totalBoxes[Hor]); + ensureColumnAndRowData(&q_rowData, &sizehint_totalBoxes[Ver], styleInfo, sizehint_xx.data(), sizehint_widths.data(), Qt::Vertical); + } else { + //We have items whose height depends on their width + ensureColumnAndRowData(&q_rowData, &sizehint_totalBoxes[Ver], styleInfo, NULL, NULL, Qt::Vertical); + QVector sizehint_yy; + QVector sizehint_heights; + + sizehint_yy.resize(rowCount()); + sizehint_heights.resize(rowCount()); + qreal height = constraint.height(); + if(height < 0) { +/* if(which == Qt::MaximumSize) + height = sizehint_totalBoxes[Ver].q_maximumSize; + else if(which == Qt::MinimumSize) + height = sizehint_totalBoxes[Ver].q_minimumSize; + else*/ + height = sizehint_totalBoxes[Ver].q_preferredSize; + } + //Calculate row heights and positions, and put results in q_yy.data() and q_heights.data() so that we can use this information as + //constraints to find the column widths + q_rowData.calculateGeometries(0, rowCount(), height, sizehint_yy.data(), sizehint_heights.data(), + 0, sizehint_totalBoxes[Ver]); + ensureColumnAndRowData(&q_columnData, &sizehint_totalBoxes[Hor], styleInfo, sizehint_yy.data(), sizehint_heights.data(), Qt::Vertical); + } switch (which) { case Qt::MinimumSize: - return QSizeF(q_totalBoxes[Hor].q_minimumSize, q_totalBoxes[Ver].q_minimumSize); + return QSizeF(sizehint_totalBoxes[Hor].q_minimumSize, sizehint_totalBoxes[Ver].q_minimumSize); case Qt::PreferredSize: - return QSizeF(q_totalBoxes[Hor].q_preferredSize, q_totalBoxes[Ver].q_preferredSize); + return QSizeF(sizehint_totalBoxes[Hor].q_preferredSize, sizehint_totalBoxes[Ver].q_preferredSize); case Qt::MaximumSize: - return QSizeF(q_totalBoxes[Hor].q_maximumSize, q_totalBoxes[Ver].q_maximumSize); + return QSizeF(sizehint_totalBoxes[Hor].q_maximumSize, sizehint_totalBoxes[Ver].q_maximumSize); case Qt::MinimumDescent: - return QSizeF(-1.0, q_totalBoxes[Hor].q_minimumDescent); // ### doesn't work + return QSizeF(-1.0, sizehint_totalBoxes[Hor].q_minimumDescent); // ### doesn't work default: break; } @@ -1291,6 +1347,7 @@ void QGridLayoutEngine::insertOrRemoveRows(int row, int delta, Qt::Orientation o } void QGridLayoutEngine::fillRowData(QGridLayoutRowData *rowData, const QLayoutStyleInfo &styleInfo, + qreal *colPositions, qreal *colSizes, Qt::Orientation orientation) const { const int ButtonMask = QSizePolicy::ButtonBox | QSizePolicy::PushButton; @@ -1404,11 +1461,21 @@ void QGridLayoutEngine::fillRowData(QGridLayoutRowData *rowData, const QLayoutSt box = &multiCell.q_box; multiCell.q_stretch = itemStretch; } - // Items with constraints are not included in the orientation that - // they are constrained (since it depends on the hfw/constraint function). - // They must be combined at a later stage. - if (!item->hasDynamicConstraint() || orientation != item->dynamicConstraintOrientation()) + // Items with constraints need to be passed the constraint + if (colSizes && colPositions && item->hasDynamicConstraint() && orientation == item->dynamicConstraintOrientation()) { + /* Get the width of the item by summing up the widths of the columns that it spans. + * We need to have already calculated the widths of the columns by calling + * q_columns->calculateGeometries() before hand and passing the value in the colSizes + * and colPositions parameters. + * The variable name is still colSizes even when it actually has the row sizes + */ + qreal length = colSizes[item->lastColumn(orientation)]; + if (item->columnSpan(orientation) != 1) + length += colPositions[item->lastColumn(orientation)] - colPositions[item->firstColumn(orientation)]; + box->combine(item->box(orientation, length)); + } else { box->combine(item->box(orientation)); + } if (effectiveRowSpan == 1) { QSizePolicy::ControlTypes controls = item->controlTypes(top); @@ -1545,115 +1612,18 @@ void QGridLayoutEngine::ensureEffectiveFirstAndLastRows() const } } -void QGridLayoutEngine::ensureColumnAndRowData(const QLayoutStyleInfo &styleInfo) const +void QGridLayoutEngine::ensureColumnAndRowData(QGridLayoutRowData *rowData, QGridLayoutBox *totalBox, + const QLayoutStyleInfo &styleInfo, + qreal *colPositions, qreal *colSizes, + Qt::Orientation orientation) const { - if (q_cachedDataForStyleInfo == styleInfo) - return; - - q_columnData.reset(columnCount()); - q_rowData.reset(rowCount()); - - fillRowData(&q_columnData, styleInfo, Qt::Horizontal); - fillRowData(&q_rowData, styleInfo, Qt::Vertical); - - q_columnData.distributeMultiCells(); - q_rowData.distributeMultiCells(); - - q_totalBoxes[Hor] = q_columnData.totalBox(0, columnCount()); - q_totalBoxes[Ver] = q_rowData.totalBox(0, rowCount()); - - q_cachedDataForStyleInfo = styleInfo; + rowData->reset(rowCount(orientation)); + fillRowData(rowData, styleInfo, colPositions, colSizes, orientation); + rowData->distributeMultiCells(); + *totalBox = rowData->totalBox(0, rowCount(orientation)); + //We have items whose width depends on their height } -QSizeF QGridLayoutEngine::dynamicallyConstrainedSizeHint(Qt::SizeHint which, - const QSizeF &constraint) const -{ - Q_ASSERT(hasDynamicConstraint()); - if (constraint.width() < 0 && constraint.height() < 0) { - // Process the hfw / wfh items that we did not process in fillRowData() - const Qt::Orientation constraintOrient = constraintOrientation(); - - QGridLayoutRowData rowData = constraintOrient == Qt::Vertical ? q_rowData : q_columnData; - for (int i = q_items.count() - 1; i >= 0; --i) { - QGridLayoutItem *item = q_items.at(i); - if (item->hasDynamicConstraint()) { - QGridLayoutBox box = item->box(constraintOrient); - QGridLayoutBox &rowBox = rowData.boxes[item->firstRow(constraintOrient)]; - rowBox.combine(box); - } - } - - QGridLayoutBox totalBoxes[2]; - if (constraintOrient == Qt::Vertical) { - totalBoxes[Hor] = q_columnData.totalBox(0, columnCount()); - totalBoxes[Ver] = rowData.totalBox(0, rowCount()); - } else { - totalBoxes[Hor] = rowData.totalBox(0, columnCount()); - totalBoxes[Ver] = q_rowData.totalBox(0, rowCount()); - } - return QSizeF(totalBoxes[Hor].q_sizes(which), totalBoxes[Ver].q_sizes(which)); - } - - - Q_ASSERT(constraint.width() >= 0 || constraint.height() >= 0); - q_xx.resize(columnCount()); - q_yy.resize(rowCount()); - q_widths.resize(columnCount()); - q_heights.resize(rowCount()); - q_descents.resize(rowCount()); - - - const Qt::Orientation orientation = constraintOrientation(); - QGridLayoutRowData *colData; - QGridLayoutRowData constrainedRowData; - QGridLayoutBox *totalBox; - qreal *sizes; - qreal *pos; - qreal *descents; - qreal targetSize; - qreal cCount; - qreal rCount; - - if (orientation == Qt::Vertical) { - // height for width - colData = &q_columnData; - totalBox = &q_totalBoxes[Hor]; - sizes = q_widths.data(); - pos = q_xx.data(); - descents = 0; - targetSize = constraint.width(); - cCount = columnCount(); - rCount = rowCount(); - constrainedRowData = q_rowData; - } else { - // width for height - colData = &q_rowData; - totalBox = &q_totalBoxes[Ver]; - sizes = q_heights.data(); - pos = q_yy.data(); - descents = q_descents.data(); - targetSize = constraint.height(); - cCount = rowCount(); - rCount = columnCount(); - constrainedRowData = q_columnData; - } - colData->calculateGeometries(0, cCount, targetSize, pos, sizes, descents, *totalBox); - for (int i = q_items.count() - 1; i >= 0; --i) { - QGridLayoutItem *item = q_items.at(i); - - if (item->hasDynamicConstraint()) { - const qreal size = sizes[item->firstColumn(orientation)]; - QGridLayoutBox box = item->box(orientation, size); - QGridLayoutBox &rowBox = constrainedRowData.boxes[item->firstRow(orientation)]; - rowBox.combine(box); - } - } - const qreal newSize = constrainedRowData.totalBox(0, rCount).q_sizes(which); - - return (orientation == Qt::Vertical) ? QSizeF(targetSize, newSize) : QSizeF(newSize, targetSize); -} - - /** returns false if the layout has contradicting constraints (i.e. some items with a horizontal constraint and other items with a vertical constraint) @@ -1700,85 +1670,41 @@ Qt::Orientation QGridLayoutEngine::constraintOrientation() const void QGridLayoutEngine::ensureGeometries(const QLayoutStyleInfo &styleInfo, const QSizeF &size) const { - ensureColumnAndRowData(styleInfo); - if (q_cachedSize == size) + if (q_cachedDataForStyleInfo == styleInfo && q_cachedSize == size) return; + q_cachedDataForStyleInfo = styleInfo; + q_cachedSize = size; + q_xx.resize(columnCount()); - q_yy.resize(rowCount()); q_widths.resize(columnCount()); + q_yy.resize(rowCount()); q_heights.resize(rowCount()); q_descents.resize(rowCount()); - - Qt::Orientation orientation = Qt::Vertical; - if (hasDynamicConstraint()) - orientation = constraintOrientation(); - - /* - In order to do hfw we need to first distribute the columns, then the rows. - In order to do wfh we need to first distribute the rows, then the columns. - - If there is no constraint, the order of distributing the rows or columns first is irrelevant. - We choose horizontal just to keep the same behaviour as before (however, there shouldn't - be any behaviour difference). - */ - - QGridLayoutRowData *colData; - QGridLayoutRowData rowData; - qreal *widths; - qreal *heights; - qreal *xx; - qreal *yy; - qreal *xdescents = 0; - qreal *ydescents = 0; - qreal cCount; - qreal rCount; - QSizeF oSize = size; - if (orientation == Qt::Vertical) { - // height for width - colData = &q_columnData; - rowData = q_rowData; - widths = q_widths.data(); - heights = q_heights.data(); - xx = q_xx.data(); - yy = q_yy.data(); - cCount = columnCount(); - rCount = rowCount(); - ydescents = q_descents.data(); + if(constraintOrientation() != Qt::Horizontal) { + //We might have items whose width depends on their height + ensureColumnAndRowData(&q_columnData, &q_totalBoxes[Hor], styleInfo, NULL, NULL, Qt::Horizontal); + //Calculate column widths and positions, and put results in q_xx.data() and q_widths.data() so that we can use this information as + //constraints to find the row heights + q_columnData.calculateGeometries(0, columnCount(), size.width(), q_xx.data(), q_widths.data(), + 0, q_totalBoxes[Hor]); + ensureColumnAndRowData(&q_rowData, &q_totalBoxes[Ver], styleInfo, q_xx.data(), q_widths.data(), Qt::Vertical); + //Calculate row heights and positions, and put results in q_yy.data() and q_heights.data() + q_rowData.calculateGeometries(0, rowCount(), size.height(), q_yy.data(), q_heights.data(), + q_descents.data(), q_totalBoxes[Ver]); } else { - // width for height - colData = &q_rowData; - rowData = q_columnData; - widths = q_heights.data(); - heights = q_widths.data(); - xx = q_yy.data(); - yy = q_xx.data(); - cCount = rowCount(); - rCount = columnCount(); - xdescents = q_descents.data(); - oSize.transpose(); + //We have items whose height depends on their width + ensureColumnAndRowData(&q_rowData, &q_totalBoxes[Ver], styleInfo, NULL, NULL, Qt::Vertical); + //Calculate row heights and positions, and put results in q_yy.data() and q_heights.data() so that we can use this information as + //constraints to find the column widths + q_rowData.calculateGeometries(0, rowCount(), size.height(), q_yy.data(), q_heights.data(), + q_descents.data(), q_totalBoxes[Ver]); + ensureColumnAndRowData(&q_columnData, &q_totalBoxes[Hor], styleInfo, q_yy.data(), q_heights.data(), Qt::Horizontal); + //Calculate row heights and positions, and put results in q_yy.data() and q_heights.data() + q_columnData.calculateGeometries(0, columnCount(), size.width(), q_xx.data(), q_widths.data(), + 0, q_totalBoxes[Hor]); } - - colData->calculateGeometries(0, cCount, oSize.width(), xx, widths, - xdescents, q_totalBoxes[orientation == Qt::Horizontal]); - for (int i = q_items.count() - 1; i >= 0; --i) { - QGridLayoutItem *item = q_items.at(i); - const int col = item->firstColumn(orientation); - const int row = item->firstRow(orientation); - if (item->hasDynamicConstraint()) { - const qreal sz = widths[col]; - QGridLayoutBox box = item->box(orientation, sz); - rowData.boxes[row].combine(box); - } - } - - QGridLayoutBox &totalBox = q_totalBoxes[orientation == Qt::Vertical]; - totalBox = rowData.totalBox(0, rCount); - rowData.calculateGeometries(0, rCount, oSize.height(), yy, heights, - ydescents, totalBox); - - q_cachedSize = size; } QT_END_NAMESPACE diff --git a/src/gui/graphicsview/qgridlayoutengine_p.h b/src/gui/graphicsview/qgridlayoutengine_p.h index 580af7e..02c74b0 100644 --- a/src/gui/graphicsview/qgridlayoutengine_p.h +++ b/src/gui/graphicsview/qgridlayoutengine_p.h @@ -93,8 +93,8 @@ enum LayoutSide { enum { NoConstraint, - HorizontalConstraint, - VerticalConstraint, + HorizontalConstraint, // Width depends on the height + VerticalConstraint, // Height depends on the width UnknownConstraint, // need to update cache UnfeasibleConstraint // not feasible, it be has some items with Vertical and others with Horizontal constraints }; @@ -410,9 +410,14 @@ private: void setItemAt(int row, int column, QGridLayoutItem *item); void insertOrRemoveRows(int row, int delta, Qt::Orientation orientation = Qt::Vertical); void fillRowData(QGridLayoutRowData *rowData, const QLayoutStyleInfo &styleInfo, - Qt::Orientation orientation = Qt::Vertical) const; + qreal *colPositions, qreal *colSizes, + Qt::Orientation orientation = Qt::Vertical) const; void ensureEffectiveFirstAndLastRows() const; - void ensureColumnAndRowData(const QLayoutStyleInfo &styleInfo) const; + void ensureColumnAndRowData(QGridLayoutRowData *rowData, QGridLayoutBox *totalBox, + const QLayoutStyleInfo &styleInfo, + qreal *colPositions, qreal *colSizes, + Qt::Orientation orientation) const; + void ensureGeometries(const QLayoutStyleInfo &styleInfo, const QSizeF &size) const; // User input diff --git a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp index 03c1d5b..3827018 100644 --- a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp +++ b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp @@ -108,6 +108,7 @@ private slots: void styleInfoLeak(); void task236367_maxSizeHint(); void heightForWidth(); + void heightForWidthWithSpanning(); }; class RectWidget : public QGraphicsWidget @@ -2571,6 +2572,40 @@ void tst_QGraphicsGridLayout::heightForWidth() } +void tst_QGraphicsGridLayout::heightForWidthWithSpanning() +{ + QGraphicsWidget *widget = new QGraphicsWidget; + QGraphicsGridLayout *layout = new QGraphicsGridLayout; + widget->setLayout(layout); + layout->setContentsMargins(0, 0, 0, 0); + layout->setSpacing(0); + + RectWidget *w = new RectWidget; + w->setSizeHint(Qt::MinimumSize, QSizeF(1,1)); + w->setSizeHint(Qt::MaximumSize, QSizeF(30000,30000)); + w->setConstraintFunction(hfw); + QSizePolicy sp(QSizePolicy::Preferred, QSizePolicy::Preferred); + sp.setHeightForWidth(true); + w->setSizePolicy(sp); + layout->addItem(w, 0,0,2,2); + + QCOMPARE(layout->effectiveSizeHint(Qt::MinimumSize, QSizeF(-1, -1)), QSizeF(1, 100)); + QCOMPARE(layout->effectiveSizeHint(Qt::PreferredSize, QSizeF(-1, -1)), QSizeF(200, 100)); + QCOMPARE(layout->effectiveSizeHint(Qt::MaximumSize, QSizeF(-1, -1)), QSizeF(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX)); + + QCOMPARE(layout->effectiveSizeHint(Qt::MinimumSize, QSizeF(200, -1)), QSizeF(200, 100)); + QCOMPARE(layout->effectiveSizeHint(Qt::PreferredSize, QSizeF(200, -1)), QSizeF(200, 100)); + QCOMPARE(layout->effectiveSizeHint(Qt::MaximumSize, QSizeF(200, -1)), QSizeF(200, QWIDGETSIZE_MAX)); + + QCOMPARE(layout->effectiveSizeHint(Qt::MinimumSize, QSizeF(2, -1)), QSizeF(2, 10000)); + QCOMPARE(layout->effectiveSizeHint(Qt::PreferredSize, QSizeF(2, -1)), QSizeF(2, 10000)); + QCOMPARE(layout->effectiveSizeHint(Qt::MaximumSize, QSizeF(2, -1)), QSizeF(2, QWIDGETSIZE_MAX)); + + QCOMPARE(layout->effectiveSizeHint(Qt::MinimumSize, QSizeF(200, -1)), QSizeF(200, 100)); + QCOMPARE(layout->effectiveSizeHint(Qt::PreferredSize, QSizeF(200, -1)), QSizeF(200, 100)); + QCOMPARE(layout->effectiveSizeHint(Qt::MaximumSize, QSizeF(200, -1)), QSizeF(200, QWIDGETSIZE_MAX)); +} + QTEST_MAIN(tst_QGraphicsGridLayout) #include "tst_qgraphicsgridlayout.moc" -- cgit v0.12 From fcda1b785bd7d86011f49bfe96cb22b04202933f Mon Sep 17 00:00:00 2001 From: John Tapsell Date: Fri, 8 Oct 2010 15:10:20 +0100 Subject: QGraphicsLayoutItem - user set sizes should always override, even if there's a constraint Notes: * I have had to remove some of the old unit tests because the tested for strange behaviour. Now that height for width items behave more like normal items, it's no longer so easy to calculate what the geometries should be in strangely-sized layouts. * This also fixes alignment of height-for-width objects and adds a unit test for this. This couldn't be done in a seperate commit since the two fixes are related. Merge-request: 847 Reviewed-by: Olivier Goffart --- src/gui/graphicsview/qgraphicslayoutitem.cpp | 4 +- src/gui/graphicsview/qgridlayoutengine.cpp | 17 +- .../tst_qgraphicsgridlayout.cpp | 333 +++++++++++---------- 3 files changed, 188 insertions(+), 166 deletions(-) diff --git a/src/gui/graphicsview/qgraphicslayoutitem.cpp b/src/gui/graphicsview/qgraphicslayoutitem.cpp index 634f68c..e43f7fa 100644 --- a/src/gui/graphicsview/qgraphicslayoutitem.cpp +++ b/src/gui/graphicsview/qgraphicslayoutitem.cpp @@ -140,11 +140,9 @@ QSizeF *QGraphicsLayoutItemPrivate::effectiveSizeHints(const QSizeF &constraint) if (!sizeHintCacheDirty && cachedConstraint == constraint) return cachedSizeHints; - const bool hasConstraint = constraint.width() >= 0 || constraint.height() >= 0; - for (int i = 0; i < Qt::NSizeHints; ++i) { cachedSizeHints[i] = constraint; - if (userSizeHints && !hasConstraint) + if (userSizeHints) combineSize(cachedSizeHints[i], userSizeHints[i]); } diff --git a/src/gui/graphicsview/qgridlayoutengine.cpp b/src/gui/graphicsview/qgridlayoutengine.cpp index acac46f..e486b4d 100644 --- a/src/gui/graphicsview/qgridlayoutengine.cpp +++ b/src/gui/graphicsview/qgridlayoutengine.cpp @@ -631,14 +631,17 @@ QRectF QGridLayoutItem::geometryWithin(qreal x, qreal y, qreal width, qreal heig qreal cellWidth = width; qreal cellHeight = height; - QSize constraint; + + QSizeF size = effectiveMaxSize(QSizeF(-1,-1)); if (hasDynamicConstraint()) { - if (dynamicConstraintOrientation() == Qt::Vertical) - constraint.setWidth(cellWidth); - else - constraint.setHeight(cellHeight); + if (dynamicConstraintOrientation() == Qt::Vertical) { + if (size.width() > cellWidth) + size = effectiveMaxSize(QSizeF(cellWidth, -1)); + } else if(size.height() > cellHeight) { + size = effectiveMaxSize(QSizeF(-1, cellHeight)); + } } - QSizeF size = effectiveMaxSize(constraint).boundedTo(QSizeF(cellWidth, cellHeight)); + size = size.boundedTo(QSizeF(cellWidth, cellHeight)); width = size.width(); height = size.height(); @@ -714,7 +717,7 @@ QSizeF QGridLayoutItem::effectiveMaxSize(const QSizeF &constraint) const } if (!size.isValid()) { - QSizeF maxSize = layoutItem()->effectiveSizeHint(Qt::MaximumSize, constraint); + QSizeF maxSize = layoutItem()->effectiveSizeHint(Qt::MaximumSize, size); if (size.width() == -1) size.setWidth(maxSize.width()); if (size.height() == -1) diff --git a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp index 3827018..174e4aa 100644 --- a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp +++ b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp @@ -61,13 +61,19 @@ private slots: void qgraphicsgridlayout(); void addItem_data(); void addItem(); + void alignment_data(); void alignment(); void alignment2(); void alignment2_data(); + void columnAlignment_data(); void columnAlignment(); + void columnCount_data(); void columnCount(); + void columnMaximumWidth_data(); void columnMaximumWidth(); + void columnMinimumWidth_data(); void columnMinimumWidth(); + void columnPreferredWidth_data(); void columnPreferredWidth(); void setColumnFixedWidth(); void columnSpacing(); @@ -78,12 +84,18 @@ private slots: void horizontalSpacing(); void itemAt(); void removeAt(); + void rowAlignment_data(); void rowAlignment(); + void rowCount_data(); void rowCount(); + void rowMaximumHeight_data(); void rowMaximumHeight(); + void rowMinimumHeight_data(); void rowMinimumHeight(); + void rowPreferredHeight_data(); void rowPreferredHeight(); void rowSpacing(); + void rowStretchFactor_data(); void rowStretchFactor(); void setColumnSpacing_data(); void setColumnSpacing(); @@ -98,6 +110,7 @@ private slots: void sizeHint(); void verticalSpacing_data(); void verticalSpacing(); + void layoutDirection_data(); void layoutDirection(); void removeLayout(); void defaultStretchFactors_data(); @@ -371,7 +384,7 @@ void tst_QGraphicsGridLayout::qgraphicsgridlayout() layout.verticalSpacing(); } -static void populateLayout(QGraphicsGridLayout *gridLayout, int width, int height) +static void populateLayout(QGraphicsGridLayout *gridLayout, int width, int height, bool hasHeightForWidth = false) { for (int y = 0; y < height; ++y) { for (int x = 0; x < width; ++x) { @@ -380,6 +393,9 @@ static void populateLayout(QGraphicsGridLayout *gridLayout, int width, int heigh item->setPreferredSize(25, 25); item->setMaximumSize(50, 50); gridLayout->addItem(item, y, x); + QSizePolicy policy = item->sizePolicy(); + policy.setHeightForWidth(hasHeightForWidth); + item->setSizePolicy(policy); } } } @@ -396,18 +412,22 @@ static void populateLayout(QGraphicsGridLayout *gridLayout, int width, int heigh * |xxxx|+---|---+| * +----+----+----+ */ -static void populateLayoutWithSpansAndHoles(QGraphicsGridLayout *gridLayout) +static void populateLayoutWithSpansAndHoles(QGraphicsGridLayout *gridLayout, bool hasHeightForWidth = false) { QGraphicsWidget *item = new RectWidget(); item->setMinimumSize(10, 10); item->setPreferredSize(25, 25); item->setMaximumSize(50, 50); + QSizePolicy sizepolicy = item->sizePolicy(); + sizepolicy.setHeightForWidth(hasHeightForWidth); + item->setSizePolicy(sizepolicy); gridLayout->addItem(item, 0, 0, 1, 2); item = new RectWidget(); item->setMinimumSize(10, 10); item->setPreferredSize(25, 25); item->setMaximumSize(50, 50); + item->setSizePolicy(sizepolicy); gridLayout->addItem(item, 1, 1, 1, 2); } @@ -460,19 +480,28 @@ void tst_QGraphicsGridLayout::addItem() delete layout; } +void tst_QGraphicsGridLayout::alignment_data() +{ + QTest::addColumn("hasHeightForWidth"); + + QTest::newRow("") << false; + QTest::newRow("hasHeightForWidth") << true; +} + // public Qt::Alignment alignment(QGraphicsLayoutItem* item) const void tst_QGraphicsGridLayout::alignment() { #ifdef Q_WS_MAC QSKIP("Resizing a QGraphicsWidget to effectiveSizeHint(Qt::MaximumSize) is currently not supported on mac", SkipAll); #endif + QFETCH(bool, hasHeightForWidth); QGraphicsScene scene; QGraphicsView view(&scene); QGraphicsWidget *widget = new QGraphicsWidget(0, Qt::Window); QGraphicsGridLayout *layout = new QGraphicsGridLayout(); scene.addItem(widget); widget->setLayout(layout); - populateLayout(layout, 3, 2); + populateLayout(layout, 3, 2, hasHeightForWidth); layout->setContentsMargins(0, 0, 0, 0); layout->setSpacing(0); @@ -524,6 +553,14 @@ void tst_QGraphicsGridLayout::alignment() delete widget; } +void tst_QGraphicsGridLayout::columnAlignment_data() +{ + QTest::addColumn("hasHeightForWidth"); + + QTest::newRow("") << false; + QTest::newRow("hasHeightForWidth") << true; +} + // public void setColumnAlignment(int column, Qt::Alignment alignment) // public Qt::Alignment columnAlignment(int column) const void tst_QGraphicsGridLayout::columnAlignment() @@ -531,13 +568,14 @@ void tst_QGraphicsGridLayout::columnAlignment() #ifdef Q_WS_MAC QSKIP("Resizing a QGraphicsWidget to effectiveSizeHint(Qt::MaximumSize) is currently not supported on mac", SkipAll); #endif + QFETCH(bool, hasHeightForWidth); QGraphicsScene scene; QGraphicsView view(&scene); QGraphicsWidget *widget = new QGraphicsWidget(0, Qt::Window); QGraphicsGridLayout *layout = new QGraphicsGridLayout(); scene.addItem(widget); widget->setLayout(layout); - populateLayout(layout, 3, 2); + populateLayout(layout, 3, 2, hasHeightForWidth); layout->setContentsMargins(0, 0, 0, 0); layout->setSpacing(1); widget->setContentsMargins(0, 0, 0, 0); @@ -583,9 +621,17 @@ void tst_QGraphicsGridLayout::columnAlignment() delete widget; } +void tst_QGraphicsGridLayout::columnCount_data() +{ + QTest::addColumn("hasHeightForWidth"); + + QTest::newRow("") << false; + QTest::newRow("hasHeightForWidth") << true; +} // public int columnCount() const void tst_QGraphicsGridLayout::columnCount() { + QFETCH(bool, hasHeightForWidth); QGraphicsScene scene; QGraphicsView view(&scene); QGraphicsWidget *widget = new QGraphicsWidget(0, Qt::Window); @@ -617,7 +663,7 @@ void tst_QGraphicsGridLayout::columnCount() // ### Talk with Jasmin. Not sure if removeAt() should adjust columnCount(). widget->setLayout(0); layout = new QGraphicsGridLayout(); - populateLayout(layout, 3, 2); + populateLayout(layout, 3, 2, hasHeightForWidth); QCOMPARE(layout->columnCount(), 3); layout->removeAt(5); layout->removeAt(3); @@ -632,16 +678,24 @@ void tst_QGraphicsGridLayout::columnCount() delete widget; } +void tst_QGraphicsGridLayout::columnMaximumWidth_data() +{ + QTest::addColumn("hasHeightForWidth"); + + QTest::newRow("") << false; + QTest::newRow("hasHeightForWidth") << true; +} // public qreal columnMaximumWidth(int column) const void tst_QGraphicsGridLayout::columnMaximumWidth() { + QFETCH(bool, hasHeightForWidth); QGraphicsScene scene; QGraphicsView view(&scene); QGraphicsWidget *widget = new QGraphicsWidget(0, Qt::Window); QGraphicsGridLayout *layout = new QGraphicsGridLayout(); scene.addItem(widget); widget->setLayout(layout); - populateLayout(layout, 3, 2); + populateLayout(layout, 3, 2, hasHeightForWidth); layout->setContentsMargins(0, 0, 0, 0); layout->setSpacing(0); @@ -667,16 +721,24 @@ void tst_QGraphicsGridLayout::columnMaximumWidth() delete widget; } +void tst_QGraphicsGridLayout::columnMinimumWidth_data() +{ + QTest::addColumn("hasHeightForWidth"); + + QTest::newRow("") << false; + QTest::newRow("hasHeightForWidth") << true; +} // public qreal columnMinimumWidth(int column) const void tst_QGraphicsGridLayout::columnMinimumWidth() { + QFETCH(bool, hasHeightForWidth); QGraphicsScene scene; QGraphicsView view(&scene); QGraphicsWidget *widget = new QGraphicsWidget(0, Qt::Window); QGraphicsGridLayout *layout = new QGraphicsGridLayout(); scene.addItem(widget); widget->setLayout(layout); - populateLayout(layout, 3, 2); + populateLayout(layout, 3, 2, hasHeightForWidth); layout->setContentsMargins(0, 0, 0, 0); layout->setSpacing(0); @@ -702,16 +764,24 @@ void tst_QGraphicsGridLayout::columnMinimumWidth() delete widget; } +void tst_QGraphicsGridLayout::columnPreferredWidth_data() +{ + QTest::addColumn("hasHeightForWidth"); + + QTest::newRow("") << false; + QTest::newRow("hasHeightForWidth") << true; +} // public qreal columnPreferredWidth(int column) const void tst_QGraphicsGridLayout::columnPreferredWidth() { + QFETCH(bool, hasHeightForWidth); QGraphicsScene scene; QGraphicsView view(&scene); QGraphicsWidget *widget = new QGraphicsWidget(0, Qt::Window); QGraphicsGridLayout *layout = new QGraphicsGridLayout(); scene.addItem(widget); widget->setLayout(layout); - populateLayout(layout, 3, 2); + populateLayout(layout, 3, 2, hasHeightForWidth); layout->setContentsMargins(0, 0, 0, 0); layout->setSpacing(0); @@ -1021,16 +1091,25 @@ void tst_QGraphicsGridLayout::removeAt() delete widget; } +void tst_QGraphicsGridLayout::rowAlignment_data() +{ + QTest::addColumn("hasHeightForWidth"); + + QTest::newRow("") << false; + QTest::newRow("hasHeightForWidth") << true; +} + // public Qt::Alignment rowAlignment(int row) const void tst_QGraphicsGridLayout::rowAlignment() { + QFETCH(bool, hasHeightForWidth); QGraphicsScene scene; QGraphicsView view(&scene); QGraphicsWidget *widget = new QGraphicsWidget(0, Qt::Window); QGraphicsGridLayout *layout = new QGraphicsGridLayout(); scene.addItem(widget); widget->setLayout(layout); - populateLayout(layout, 2, 3); + populateLayout(layout, 2, 3, hasHeightForWidth); layout->setContentsMargins(0, 0, 0, 0); layout->setSpacing(1); widget->setContentsMargins(0, 0, 0, 0); @@ -1080,17 +1159,26 @@ void tst_QGraphicsGridLayout::rowAlignment() delete widget; } +void tst_QGraphicsGridLayout::rowCount_data() +{ + QTest::addColumn("hasHeightForWidth"); + + QTest::newRow("") << false; + QTest::newRow("hasHeightForWidth") << true; +} + // public int rowCount() const // public int columnCount() const void tst_QGraphicsGridLayout::rowCount() { + QFETCH(bool, hasHeightForWidth); QGraphicsScene scene; QGraphicsView view(&scene); QGraphicsWidget *widget = new QGraphicsWidget(0, Qt::Window); QGraphicsGridLayout *layout = new QGraphicsGridLayout(); scene.addItem(widget); widget->setLayout(layout); - populateLayout(layout, 2, 3); + populateLayout(layout, 2, 3, hasHeightForWidth); layout->setContentsMargins(0, 0, 0, 0); layout->setSpacing(0); widget->setContentsMargins(0, 0, 0, 0); @@ -1100,23 +1188,32 @@ void tst_QGraphicsGridLayout::rowCount() // with spans and holes... widget->setLayout(0); layout = new QGraphicsGridLayout(); - populateLayoutWithSpansAndHoles(layout); + populateLayoutWithSpansAndHoles(layout, hasHeightForWidth); QCOMPARE(layout->rowCount(), 2); QCOMPARE(layout->columnCount(), 3); delete widget; } +void tst_QGraphicsGridLayout::rowMaximumHeight_data() +{ + QTest::addColumn("hasHeightForWidth"); + + QTest::newRow("") << false; + QTest::newRow("hasHeightForWidth") << true; +} + // public qreal rowMaximumHeight(int row) const void tst_QGraphicsGridLayout::rowMaximumHeight() { + QFETCH(bool, hasHeightForWidth); QGraphicsScene scene; QGraphicsView view(&scene); QGraphicsWidget *widget = new QGraphicsWidget(0, Qt::Window); QGraphicsGridLayout *layout = new QGraphicsGridLayout; scene.addItem(widget); widget->setLayout(layout); - populateLayout(layout, 2, 3); + populateLayout(layout, 2, 3, hasHeightForWidth); layout->setContentsMargins(0, 0, 0, 0); layout->setSpacing(0); @@ -1142,16 +1239,24 @@ void tst_QGraphicsGridLayout::rowMaximumHeight() delete widget; } +void tst_QGraphicsGridLayout::rowMinimumHeight_data() +{ + QTest::addColumn("hasHeightForWidth"); + + QTest::newRow("") << false; + QTest::newRow("hasHeightForWidth") << true; +} // public qreal rowMinimumHeight(int row) const void tst_QGraphicsGridLayout::rowMinimumHeight() { + QFETCH(bool, hasHeightForWidth); QGraphicsScene scene; QGraphicsView view(&scene); QGraphicsWidget *widget = new QGraphicsWidget(0, Qt::Window); QGraphicsGridLayout *layout = new QGraphicsGridLayout(); scene.addItem(widget); widget->setLayout(layout); - populateLayout(layout, 2, 3); + populateLayout(layout, 2, 3, hasHeightForWidth); layout->setContentsMargins(0, 0, 0, 0); layout->setSpacing(0); @@ -1177,16 +1282,24 @@ void tst_QGraphicsGridLayout::rowMinimumHeight() delete widget; } +void tst_QGraphicsGridLayout::rowPreferredHeight_data() +{ + QTest::addColumn("hasHeightForWidth"); + + QTest::newRow("") << false; + QTest::newRow("hasHeightForWidth") << true; +} // public qreal rowPreferredHeight(int row) const void tst_QGraphicsGridLayout::rowPreferredHeight() { + QFETCH(bool, hasHeightForWidth); QGraphicsScene scene; QGraphicsView view(&scene); QGraphicsWidget *widget = new QGraphicsWidget(0, Qt::Window); QGraphicsGridLayout *layout = new QGraphicsGridLayout(); scene.addItem(widget); widget->setLayout(layout); - populateLayout(layout, 2, 3); + populateLayout(layout, 2, 3, hasHeightForWidth); layout->setContentsMargins(0, 0, 0, 0); layout->setSpacing(0); @@ -1275,16 +1388,25 @@ void tst_QGraphicsGridLayout::rowSpacing() } +void tst_QGraphicsGridLayout::rowStretchFactor_data() +{ + QTest::addColumn("hasHeightForWidth"); + + QTest::newRow("") << false; + QTest::newRow("hasHeightForWidth") << true; +} + // public int rowStretchFactor(int row) const void tst_QGraphicsGridLayout::rowStretchFactor() { + QFETCH(bool, hasHeightForWidth); QGraphicsScene scene; QGraphicsView view(&scene); QGraphicsWidget *widget = new QGraphicsWidget(0, Qt::Window); QGraphicsGridLayout *layout = new QGraphicsGridLayout(); scene.addItem(widget); widget->setLayout(layout); - populateLayout(layout, 2, 3); + populateLayout(layout, 2, 3, hasHeightForWidth); layout->setContentsMargins(0, 0, 0, 0); layout->setSpacing(0); @@ -1308,9 +1430,12 @@ void tst_QGraphicsGridLayout::setColumnSpacing_data() { QTest::addColumn("column"); QTest::addColumn("spacing"); - QTest::newRow("null") << 0 << qreal(0.0); - QTest::newRow("10") << 0 << qreal(10.0); + QTest::addColumn("hasHeightForWidth"); + QTest::newRow("null") << 0 << qreal(0.0) << false; + QTest::newRow("10") << 0 << qreal(10.0) << false; + QTest::newRow("null, hasHeightForWidth") << 0 << qreal(0.0) << true; + QTest::newRow("10, hasHeightForWidth") << 0 << qreal(10.0) << true; } // public void setColumnSpacing(int column, qreal spacing) @@ -1318,6 +1443,7 @@ void tst_QGraphicsGridLayout::setColumnSpacing() { QFETCH(int, column); QFETCH(qreal, spacing); + QFETCH(bool, hasHeightForWidth); QGraphicsScene scene; QGraphicsView view(&scene); @@ -1325,7 +1451,7 @@ void tst_QGraphicsGridLayout::setColumnSpacing() QGraphicsGridLayout *layout = new QGraphicsGridLayout(); scene.addItem(widget); widget->setLayout(layout); - populateLayout(layout, 3, 2); + populateLayout(layout, 3, 2, hasHeightForWidth); layout->setSpacing(0); layout->setContentsMargins(0, 0, 0, 0); qreal oldSpacing = layout->columnSpacing(column); @@ -1362,9 +1488,12 @@ void tst_QGraphicsGridLayout::setRowSpacing_data() { QTest::addColumn("row"); QTest::addColumn("spacing"); - QTest::newRow("null") << 0 << qreal(0.0); - QTest::newRow("10") << 0 << qreal(10.0); + QTest::addColumn("hasHeightForWidth"); + QTest::newRow("null") << 0 << qreal(0.0) << false; + QTest::newRow("10") << 0 << qreal(10.0) << false; + QTest::newRow("null, hasHeightForWidth") << 0 << qreal(0.0) << true; + QTest::newRow("10, hasHeightForWidth") << 0 << qreal(10.0) << true; } // public void setRowSpacing(int row, qreal spacing) @@ -1372,6 +1501,7 @@ void tst_QGraphicsGridLayout::setRowSpacing() { QFETCH(int, row); QFETCH(qreal, spacing); + QFETCH(bool, hasHeightForWidth); QGraphicsScene scene; QGraphicsView view(&scene); @@ -1379,7 +1509,7 @@ void tst_QGraphicsGridLayout::setRowSpacing() QGraphicsGridLayout *layout = new QGraphicsGridLayout(); scene.addItem(widget); widget->setLayout(layout); - populateLayout(layout, 3, 2); + populateLayout(layout, 3, 2, hasHeightForWidth); layout->setSpacing(0); layout->setContentsMargins(0, 0, 0, 0); qreal oldSpacing = layout->rowSpacing(row); @@ -1393,21 +1523,25 @@ void tst_QGraphicsGridLayout::setRowSpacing() void tst_QGraphicsGridLayout::setSpacing_data() { QTest::addColumn("spacing"); - QTest::newRow("zero") << qreal(0.0); - QTest::newRow("17") << qreal(17.0); + QTest::addColumn("hasHeightForWidth"); + QTest::newRow("zero") << qreal(0.0) << false; + QTest::newRow("17") << qreal(17.0) << false; + QTest::newRow("zero, hasHeightForWidth") << qreal(0.0) << true; + QTest::newRow("17, hasHeightForWidth") << qreal(17.0) << true; } // public void setSpacing(qreal spacing) void tst_QGraphicsGridLayout::setSpacing() { QFETCH(qreal, spacing); + QFETCH(bool, hasHeightForWidth); QGraphicsScene scene; QGraphicsView view(&scene); QGraphicsWidget *widget = new QGraphicsWidget(0, Qt::Window); QGraphicsGridLayout *layout = new QGraphicsGridLayout(); scene.addItem(widget); widget->setLayout(layout); - populateLayout(layout, 3, 2); + populateLayout(layout, 3, 2, hasHeightForWidth); layout->setContentsMargins(0, 0, 0, 0); QSizeF sh = layout->sizeHint(Qt::PreferredSize, QSizeF()); qreal oldVSpacing = layout->verticalSpacing(); @@ -1538,8 +1672,18 @@ void tst_QGraphicsGridLayout::verticalSpacing() delete widget; } +void tst_QGraphicsGridLayout::layoutDirection_data() +{ + QTest::addColumn("hasHeightForWidth"); + + QTest::newRow("") << false; + QTest::newRow("hasHeightForWidth") << true; +} + void tst_QGraphicsGridLayout::layoutDirection() { + QFETCH(bool, hasHeightForWidth); + QGraphicsScene scene; QGraphicsView view(&scene); @@ -1562,6 +1706,12 @@ void tst_QGraphicsGridLayout::layoutDirection() w4->setMinimumSize(30, 20); layout->addItem(w4, 1, 1); + QSizePolicy policy = w1->sizePolicy(); + policy.setHeightForWidth(hasHeightForWidth); + w1->setSizePolicy(policy); + w2->setSizePolicy(policy); + w4->setSizePolicy(policy); + layout->setAlignment(w2, Qt::AlignRight); layout->setAlignment(w3, Qt::AlignLeft); @@ -2200,9 +2350,9 @@ void tst_QGraphicsGridLayout::geometries_data() .preferredSize(QSizeF(50,10)) .maxSize(QSizeF(100, 100)) << ItemDesc(1,1) - .minSize(QSizeF(40,40)) - .preferredSize(QSizeF(50,400)) - .maxSize(QSizeF(500, 500)) + .minSize(QSizeF(40,-1)) + .preferredSize(QSizeF(50,-1)) + .maxSize(QSizeF(500, -1)) .heightForWidth(hfw1) ) << QSizeF(100, 401) @@ -2211,32 +2361,6 @@ void tst_QGraphicsGridLayout::geometries_data() << QRectF(0, 1, 50,100) << QRectF(50, 1, 50,400) ); - - QTest::newRow("hfw-h408") << (ItemList() - << ItemDesc(0,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(0,1) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,1) - .minSize(QSizeF(40,40)) - .preferredSize(QSizeF(50,400)) - .maxSize(QSizeF(500, 500)) - .heightForWidth(hfw1) - ) - << QSizeF(100, 408) - << (RectList() - << QRectF(0, 0, 50, 8) << QRectF(50, 0, 50, 8) - << QRectF(0, 8, 50,100) << QRectF(50, 8, 50,400) - ); - QTest::newRow("hfw-h410") << (ItemList() << ItemDesc(0,0) .minSize(QSizeF(1,1)) @@ -2262,109 +2386,6 @@ void tst_QGraphicsGridLayout::geometries_data() << QRectF(0, 10, 50,100) << QRectF(50, 10, 50,400) ); - QTest::newRow("hfw-h470") << (ItemList() - << ItemDesc(0,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(0,1) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,1) - .minSize(QSizeF(40,40)) - .preferredSize(QSizeF(50,400)) - .maxSize(QSizeF(500, 500)) - .heightForWidth(hfw1) - ) - << QSizeF(100, 470) - << (RectList() - << QRectF(0, 0, 50,70) << QRectF(50, 0, 50,70) - << QRectF(0, 70, 50,100) << QRectF(50, 70, 50,400) - ); - - - // change layout width and verify - QTest::newRow("hfw-w100") << (ItemList() - << ItemDesc(0,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(0,1) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,1) - .minSize(QSizeF(40,40)) - .preferredSize(QSizeF(50,400)) - .maxSize(QSizeF(5000, 5000)) - .heightForWidth(hfw1) - ) - << QSizeF(100, 401) - << (RectList() - << QRectF( 0, 0, 50, 1) << QRectF( 50, 0, 50, 1) - << QRectF( 0, 1, 50, 100) << QRectF( 50, 1, 50, 400) - ); - - QTest::newRow("hfw-w160") << (ItemList() - << ItemDesc(0,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(0,1) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,1) - .minSize(QSizeF(40,40)) - .preferredSize(QSizeF(50,400)) - .maxSize(QSizeF(5000, 5000)) - .heightForWidth(hfw1) - ) - << QSizeF(160, 401) - << (RectList() - << QRectF( 0, 0, 80, 100) << QRectF( 80, 0, 80, 100) - << QRectF( 0, 100, 80, 100) << QRectF( 80, 100, 80, 250) - ); - - - QTest::newRow("hfw-w500") << (ItemList() - << ItemDesc(0,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(0,1) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,0) - .minSize(QSizeF(1,1)) - .preferredSize(QSizeF(50,10)) - .maxSize(QSizeF(100, 100)) - << ItemDesc(1,1) - .minSize(QSizeF(40,40)) - .preferredSize(QSizeF(50,400)) - .maxSize(QSizeF(5000, 5000)) - .heightForWidth(hfw1) - ) - << QSizeF(500, 401) - << (RectList() - << QRectF( 0, 0, 100, 100) << QRectF(100, 0, 100, 100) - << QRectF( 0, 100, 100, 100) << QRectF(100, 100, 400, 50) - ); - } void tst_QGraphicsGridLayout::geometries() -- cgit v0.12 From e3edb0f6f10d8ae25dad3e4dfe0026313dab8f39 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 13 Oct 2010 13:58:38 +0200 Subject: Revert "qmake: pass include directories to MS resource compiler" This reverts commit cd4eaa9c8274559aa2b0ceaeed1644966b9a2d94. We need a better plan to handle the command-line-is-too-long case. Reviewed-by: ossi --- qmake/generators/win32/msvc_vcproj.cpp | 1 - qmake/generators/win32/msvc_vcxproj.cpp | 1 - qmake/generators/win32/winmakefile.cpp | 3 +-- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index cd42d4d..cff7a14 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -1004,7 +1004,6 @@ void VcprojGenerator::initResourceTool() { VCConfiguration &conf = vcProject.Configuration; conf.resource.PreprocessorDefinitions = conf.compiler.PreprocessorDefinitions; - conf.resource.AdditionalIncludeDirectories = conf.compiler.AdditionalIncludeDirectories; // We need to add _DEBUG for the debug version of the project, since the normal compiler defines // do not contain it. (The compiler defines this symbol automatically, which is wy we don't need diff --git a/qmake/generators/win32/msvc_vcxproj.cpp b/qmake/generators/win32/msvc_vcxproj.cpp index 00702ae..396d2bf 100644 --- a/qmake/generators/win32/msvc_vcxproj.cpp +++ b/qmake/generators/win32/msvc_vcxproj.cpp @@ -365,7 +365,6 @@ void VcxprojGenerator::initResourceTool() { VCXConfiguration &conf = vcxProject.Configuration; conf.resource.PreprocessorDefinitions = conf.compiler.PreprocessorDefinitions; - conf.resource.AdditionalIncludeDirectories = conf.compiler.AdditionalIncludeDirectories; // We need to add _DEBUG for the debug version of the project, since the normal compiler defines // do not contain it. (The compiler defines this symbol automatically, which is wy we don't need diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 8f148ad..ecb20c7 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -760,8 +760,7 @@ void Win32MakefileGenerator::writeRcFilePart(QTextStream &t) // since the compiler defines this symbol by itself, and we use it in the automatically // created rc file when VERSION is define the .pro file. t << res_file << ": " << rc_file << "\n\t" - << var("QMAKE_RC") << (project->isActiveConfig("debug") ? " -D_DEBUG" : "") - << " $(DEFINES) $(INCPATH) -fo " << res_file << " " << rc_file; + << var("QMAKE_RC") << (project->isActiveConfig("debug") ? " -D_DEBUG" : "") << " $(DEFINES) -fo " << res_file << " " << rc_file; t << endl << endl; } } -- cgit v0.12 From 896cf6f1523afcf5237efc1ca135672ca3cb8058 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 14 Oct 2010 14:41:15 +1000 Subject: Optimization: Don't generate intermediate QDeclarativeComponent's --- src/declarative/qml/qdeclarativecompileddata.cpp | 2 +- src/declarative/qml/qdeclarativecompiler.cpp | 8 ++-- src/declarative/qml/qdeclarativecompiler_p.h | 5 ++- src/declarative/qml/qdeclarativecomponent.cpp | 57 +++++++++++++----------- src/declarative/qml/qdeclarativecomponent_p.h | 7 +-- src/declarative/qml/qdeclarativetypeloader.cpp | 19 +------- src/declarative/qml/qdeclarativetypeloader_p.h | 2 - src/declarative/qml/qdeclarativevme.cpp | 12 +++-- 8 files changed, 48 insertions(+), 64 deletions(-) diff --git a/src/declarative/qml/qdeclarativecompileddata.cpp b/src/declarative/qml/qdeclarativecompileddata.cpp index 5d73d89..a4ecc77 100644 --- a/src/declarative/qml/qdeclarativecompileddata.cpp +++ b/src/declarative/qml/qdeclarativecompileddata.cpp @@ -205,7 +205,7 @@ const QMetaObject *QDeclarativeCompiledData::TypeReference::metaObject() const return type->metaObject(); } else { Q_ASSERT(component); - return static_cast(QObjectPrivate::get(component))->cc->root; + return component->root; } } diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index 74bc5bd..b2740b8 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -590,7 +590,7 @@ bool QDeclarativeCompiler::compile(QDeclarativeEngine *engine, COMPILE_EXCEPTION(parserRef->refObjects.first(), err); } } else if (tref.typeData) { - ref.component = tref.typeData->component(); + ref.component = tref.typeData->compiledData(); ref.ref = tref.typeData; ref.ref->addref(); } @@ -722,7 +722,7 @@ bool QDeclarativeCompiler::buildObject(Object *obj, const BindingContext &ctxt) obj->metatype = tr.metaObject(); if (tr.component) - obj->url = tr.component->url(); + obj->url = tr.component->url; if (tr.type) obj->typeName = tr.type->qmlTypeName(); obj->className = tr.className; @@ -940,7 +940,7 @@ void QDeclarativeCompiler::genObject(QDeclarativeParser::Object *obj) // ### Surely the creation of this property cache could be more efficient QDeclarativePropertyCache *propertyCache = 0; if (tr.component) - propertyCache = QDeclarativeComponentPrivate::get(tr.component)->cc->rootPropertyCache->copy(); + propertyCache = tr.component->rootPropertyCache->copy(); else propertyCache = enginePrivate->cache(obj->metaObject()->superClass())->copy(); @@ -957,7 +957,7 @@ void QDeclarativeCompiler::genObject(QDeclarativeParser::Object *obj) output->bytecode << meta; } else if (obj == unitRoot) { if (tr.component) - output->rootPropertyCache = QDeclarativeComponentPrivate::get(tr.component)->cc->rootPropertyCache; + output->rootPropertyCache = tr.component->rootPropertyCache; else output->rootPropertyCache = enginePrivate->cache(obj->metaObject()); diff --git a/src/declarative/qml/qdeclarativecompiler_p.h b/src/declarative/qml/qdeclarativecompiler_p.h index 89eef09..43a0901 100644 --- a/src/declarative/qml/qdeclarativecompiler_p.h +++ b/src/declarative/qml/qdeclarativecompiler_p.h @@ -93,10 +93,11 @@ public: QByteArray className; QDeclarativeType *type; - QDeclarativeComponent *component; +// QDeclarativeComponent *component; + QDeclarativeCompiledData *component; QDeclarativeRefCount *ref; - QObject *createInstance(QDeclarativeContextData *, const QBitField &) const; + QObject *createInstance(QDeclarativeContextData *, const QBitField &, QList *) const; const QMetaObject *metaObject() const; }; QList types; diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index cfef9cf..0a2a6db 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -733,48 +733,45 @@ QDeclarativeComponentPrivate::beginCreate(QDeclarativeContextData *context, cons return 0; } - QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(engine); + return begin(context, creationContext, cc, start, count, &state, 0, bindings); +} + +QObject * QDeclarativeComponentPrivate::begin(QDeclarativeContextData *parentContext, + QDeclarativeContextData *componentCreationContext, + QDeclarativeCompiledData *component, int start, int count, + ConstructionState *state, QList *errors, + const QBitField &bindings) +{ + QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(parentContext->engine); + bool isRoot = !enginePriv->inBeginCreate; + + Q_ASSERT(!isRoot || state); // Either this isn't a root component, or a state data must be provided + Q_ASSERT((state != 0) ^ (errors != 0)); // One of state or errors (but not both) must be provided - bool isRoot = !ep->inBeginCreate; if (isRoot) QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Creating); - QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::Creating, cc->url); QDeclarativeContextData *ctxt = new QDeclarativeContextData; ctxt->isInternal = true; - ctxt->url = cc->url; - ctxt->imports = cc->importCache; + ctxt->url = component->url; + ctxt->imports = component->importCache; // Nested global imports - if (creationContext && start != -1) - ctxt->importedScripts = creationContext->importedScripts; - - cc->importCache->addref(); - ctxt->setParent(context); + if (componentCreationContext && start != -1) + ctxt->importedScripts = componentCreationContext->importedScripts; - QObject *rv = begin(ctxt, ep, cc, start, count, &state, bindings); + component->importCache->addref(); + ctxt->setParent(parentContext); - if (ep->isDebugging && rv) { - if (!context->isInternal) - context->asQDeclarativeContextPrivate()->instances.append(rv); - QDeclarativeEngineDebugServer::instance()->objectCreated(engine, rv); - } - - return rv; -} - -QObject * QDeclarativeComponentPrivate::begin(QDeclarativeContextData *ctxt, QDeclarativeEnginePrivate *enginePriv, - QDeclarativeCompiledData *component, int start, int count, - ConstructionState *state, const QBitField &bindings) -{ - bool isRoot = !enginePriv->inBeginCreate; enginePriv->inBeginCreate = true; QDeclarativeVME vme; QObject *rv = vme.run(ctxt, component, start, count, bindings); - if (vme.isError()) - state->errors = vme.errors(); + if (vme.isError()) { + if(errors) *errors = vme.errors(); + else state->errors = vme.errors(); + } if (isRoot) { enginePriv->inBeginCreate = false; @@ -794,6 +791,12 @@ QObject * QDeclarativeComponentPrivate::begin(QDeclarativeContextData *ctxt, QDe enginePriv->inProgressCreations++; } + if (enginePriv->isDebugging && rv) { + if (!parentContext->isInternal) + parentContext->asQDeclarativeContextPrivate()->instances.append(rv); + QDeclarativeEngineDebugServer::instance()->objectCreated(parentContext->engine, rv); + } + return rv; } diff --git a/src/declarative/qml/qdeclarativecomponent_p.h b/src/declarative/qml/qdeclarativecomponent_p.h index a551cc8..7b30bad 100644 --- a/src/declarative/qml/qdeclarativecomponent_p.h +++ b/src/declarative/qml/qdeclarativecomponent_p.h @@ -109,9 +109,10 @@ public: }; ConstructionState state; - static QObject *begin(QDeclarativeContextData *ctxt, QDeclarativeEnginePrivate *enginePriv, - QDeclarativeCompiledData *component, int start, int count, - ConstructionState *state, const QBitField &bindings = QBitField()); + static QObject *begin(QDeclarativeContextData *parentContext, QDeclarativeContextData *componentCreationContext, + QDeclarativeCompiledData *component, int start, int count, + ConstructionState *state, QList *errors, + const QBitField &bindings = QBitField()); static void beginDeferred(QDeclarativeEnginePrivate *enginePriv, QObject *object, ConstructionState *state); static void complete(QDeclarativeEnginePrivate *enginePriv, ConstructionState *state); diff --git a/src/declarative/qml/qdeclarativetypeloader.cpp b/src/declarative/qml/qdeclarativetypeloader.cpp index c8e1a07..c015519 100644 --- a/src/declarative/qml/qdeclarativetypeloader.cpp +++ b/src/declarative/qml/qdeclarativetypeloader.cpp @@ -719,7 +719,7 @@ void QDeclarativeTypeLoader::clearCache() QDeclarativeTypeData::QDeclarativeTypeData(const QUrl &url, QDeclarativeTypeLoader::Options options, QDeclarativeTypeLoader *manager) : QDeclarativeDataBlob(url, QmlFile), m_options(options), m_typesResolved(false), - m_compiledData(0), m_component(0), m_typeLoader(manager) + m_compiledData(0), m_typeLoader(manager) { } @@ -768,23 +768,6 @@ QDeclarativeCompiledData *QDeclarativeTypeData::compiledData() const return m_compiledData; } -QDeclarativeComponent *QDeclarativeTypeData::component() const -{ - if (!m_component) { - - if (m_compiledData) { - m_component = new QDeclarativeComponent(typeLoader()->engine(), m_compiledData, -1, -1, 0); - } else { - m_component = new QDeclarativeComponent(typeLoader()->engine()); - QDeclarativeComponentPrivate::get(m_component)->url = finalUrl(); - QDeclarativeComponentPrivate::get(m_component)->state.errors = errors(); - } - - } - - return m_component; -} - void QDeclarativeTypeData::registerCallback(TypeDataCallback *callback) { Q_ASSERT(!m_callbacks.contains(callback)); diff --git a/src/declarative/qml/qdeclarativetypeloader_p.h b/src/declarative/qml/qdeclarativetypeloader_p.h index 7381f28..718537a 100644 --- a/src/declarative/qml/qdeclarativetypeloader_p.h +++ b/src/declarative/qml/qdeclarativetypeloader_p.h @@ -243,7 +243,6 @@ public: const QList &resolvedScripts() const; QDeclarativeCompiledData *compiledData() const; - QDeclarativeComponent *component() const; // Used by QDeclarativeComponent to get notifications struct TypeDataCallback { @@ -278,7 +277,6 @@ private: bool m_typesResolved:1; QDeclarativeCompiledData *m_compiledData; - mutable QDeclarativeComponent *m_component; QList m_callbacks; diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp index 360186c..db90aff 100644 --- a/src/declarative/qml/qdeclarativevme.cpp +++ b/src/declarative/qml/qdeclarativevme.cpp @@ -185,12 +185,9 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack &stack, bindings = bindings.united(bindingSkipList); QObject *o = - types.at(instr.create.type).createInstance(ctxt, bindings); + types.at(instr.create.type).createInstance(ctxt, bindings, &vmeErrors); if (!o) { - if(types.at(instr.create.type).component) - vmeErrors << types.at(instr.create.type).component->errors(); - VME_EXCEPTION(QCoreApplication::translate("QDeclarativeVME","Unable to create object of type %1").arg(QString::fromLatin1(types.at(instr.create.type).className))); } @@ -933,8 +930,9 @@ QList QDeclarativeVME::errors() const } QObject * -QDeclarativeCompiledData::TypeReference::createInstance(QDeclarativeContextData *ctxt, - const QBitField &bindings) const +QDeclarativeCompiledData::TypeReference::createInstance(QDeclarativeContextData *ctxt, + const QBitField &bindings, + QList *errors) const { if (type) { QObject *rv = 0; @@ -948,7 +946,7 @@ QDeclarativeCompiledData::TypeReference::createInstance(QDeclarativeContextData return rv; } else { Q_ASSERT(component); - return QDeclarativeComponentPrivate::get(component)->create(ctxt, bindings); + return QDeclarativeComponentPrivate::begin(ctxt, 0, component, -1, -1, 0, errors, bindings); } } -- cgit v0.12 From bccb1a82fd796ca31b8b4777c29344bafc6d71d6 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 14 Oct 2010 14:54:33 +1000 Subject: Fix consistency of setting currentIndex in ListView and GridView. The behaviour of setting the currentIndex out of bounds, was different depending upon whether it was set -ve, beyond the end, or before component completed. The behaviour is now consistent - setting the currentIndex out of bounds is allowed and will cause the currentItem and highlightItem to become null. Task-number: QTBUG-12571 Reviewed-by: Michael Brasser --- .../graphicsitems/qdeclarativegridview.cpp | 67 ++++++++++++++-------- .../graphicsitems/qdeclarativelistview.cpp | 35 +++++++---- .../data/gridview-noCurrent.qml | 52 +++++++++++++++++ .../tst_qdeclarativegridview.cpp | 43 ++++++++++++++ .../data/listview-noCurrent.qml | 50 ++++++++++++++++ .../tst_qdeclarativelistview.cpp | 44 ++++++++++++++ 6 files changed, 257 insertions(+), 34 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativegridview/data/gridview-noCurrent.qml create mode 100644 tests/auto/declarative/qdeclarativelistview/data/listview-noCurrent.qml diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 6ee6b0d..f53625f 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -112,7 +112,7 @@ public: , bufferMode(BufferBefore | BufferAfter), snapMode(QDeclarativeGridView::NoSnap) , ownModel(false), wrap(false), autoHighlight(true) , fixCurrentVisibility(false), lazyRelease(false), layoutScheduled(false) - , deferredRelease(false), haveHighlightRange(false) {} + , deferredRelease(false), haveHighlightRange(false), currentIndexSet(false) {} void init(); void clear(); @@ -392,6 +392,7 @@ public: bool layoutScheduled : 1; bool deferredRelease : 1; bool haveHighlightRange : 1; + bool currentIndexSet : 1; }; void QDeclarativeGridViewPrivate::init() @@ -730,6 +731,8 @@ void QDeclarativeGridViewPrivate::createHighlight() QDeclarative_setParent_noEvent(item, q->contentItem()); item->setParentItem(q->contentItem()); highlight = new FxGridItem(item, q); + if (currentItem) + highlight->setPosition(currentItem->colPos(), currentItem->rowPos()); highlightXAnimator = new QSmoothedAnimation(q); highlightXAnimator->target = QDeclarativeProperty(highlight->item, QLatin1String("x")); highlightXAnimator->userDuration = highlightMoveDuration; @@ -771,8 +774,11 @@ void QDeclarativeGridViewPrivate::updateCurrent(int modelIndex) currentItem->attached->setIsCurrentItem(false); releaseItem(currentItem); currentItem = 0; - currentIndex = -1; + currentIndex = modelIndex; + emit q->currentIndexChanged(); updateHighlight(); + } else if (currentIndex != modelIndex) { + currentIndex = modelIndex; emit q->currentIndexChanged(); } return; @@ -1236,7 +1242,7 @@ void QDeclarativeGridView::setModel(const QVariant &model) d->bufferMode = QDeclarativeGridViewPrivate::BufferBefore | QDeclarativeGridViewPrivate::BufferAfter; if (isComponentComplete()) { refill(); - if (d->currentIndex >= d->model->count() || d->currentIndex < 0) { + if ((d->currentIndex >= d->model->count() || d->currentIndex < 0) && !d->currentIndexSet) { setCurrentIndex(0); } else { d->moveReason = QDeclarativeGridViewPrivate::SetIndex; @@ -1344,10 +1350,13 @@ void QDeclarativeGridView::setCurrentIndex(int index) Q_D(QDeclarativeGridView); if (d->requestedIndex >= 0) // currently creating item return; - if (isComponentComplete() && d->isValid() && index != d->currentIndex && index < d->model->count() && index >= 0) { + d->currentIndexSet = true; + if (index == d->currentIndex) + return; + if (isComponentComplete() && d->isValid()) { d->moveReason = QDeclarativeGridViewPrivate::SetIndex; d->updateCurrent(index); - } else if (index != d->currentIndex) { + } else { d->currentIndex = index; emit currentIndexChanged(); } @@ -1983,22 +1992,25 @@ void QDeclarativeGridView::keyPressEvent(QKeyEvent *event) Move the currentIndex up one item in the view. The current index will wrap if keyNavigationWraps is true and it - is currently at the end. + is currently at the end. This method has no effect if the \l count is zero. \bold Note: methods should only be called after the Component has completed. */ void QDeclarativeGridView::moveCurrentIndexUp() { Q_D(QDeclarativeGridView); + const int count = d->model ? d->model->count() : 0; + if (!count) + return; if (d->flow == QDeclarativeGridView::LeftToRight) { if (currentIndex() >= d->columns || d->wrap) { int index = currentIndex() - d->columns; - setCurrentIndex(index >= 0 ? index : d->model->count()-1); + setCurrentIndex((index >= 0 && index < count) ? index : count-1); } } else { if (currentIndex() > 0 || d->wrap) { int index = currentIndex() - 1; - setCurrentIndex(index >= 0 ? index : d->model->count()-1); + setCurrentIndex((index >= 0 && index < count) ? index : count-1); } } } @@ -2008,22 +2020,25 @@ void QDeclarativeGridView::moveCurrentIndexUp() Move the currentIndex down one item in the view. The current index will wrap if keyNavigationWraps is true and it - is currently at the end. + is currently at the end. This method has no effect if the \l count is zero. \bold Note: methods should only be called after the Component has completed. */ void QDeclarativeGridView::moveCurrentIndexDown() { Q_D(QDeclarativeGridView); + const int count = d->model ? d->model->count() : 0; + if (!count) + return; if (d->flow == QDeclarativeGridView::LeftToRight) { - if (currentIndex() < d->model->count() - d->columns || d->wrap) { + if (currentIndex() < count - d->columns || d->wrap) { int index = currentIndex()+d->columns; - setCurrentIndex(index < d->model->count() ? index : 0); + setCurrentIndex((index >= 0 && index < count) ? index : 0); } } else { - if (currentIndex() < d->model->count() - 1 || d->wrap) { + if (currentIndex() < count - 1 || d->wrap) { int index = currentIndex() + 1; - setCurrentIndex(index < d->model->count() ? index : 0); + setCurrentIndex((index >= 0 && index < count) ? index : 0); } } } @@ -2033,22 +2048,25 @@ void QDeclarativeGridView::moveCurrentIndexDown() Move the currentIndex left one item in the view. The current index will wrap if keyNavigationWraps is true and it - is currently at the end. + is currently at the end. This method has no effect if the \l count is zero. \bold Note: methods should only be called after the Component has completed. */ void QDeclarativeGridView::moveCurrentIndexLeft() { Q_D(QDeclarativeGridView); + const int count = d->model ? d->model->count() : 0; + if (!count) + return; if (d->flow == QDeclarativeGridView::LeftToRight) { if (currentIndex() > 0 || d->wrap) { int index = currentIndex() - 1; - setCurrentIndex(index >= 0 ? index : d->model->count()-1); + setCurrentIndex((index >= 0 && index < count) ? index : count-1); } } else { if (currentIndex() >= d->columns || d->wrap) { int index = currentIndex() - d->columns; - setCurrentIndex(index >= 0 ? index : d->model->count()-1); + setCurrentIndex((index >= 0 && index < count) ? index : count-1); } } } @@ -2058,22 +2076,25 @@ void QDeclarativeGridView::moveCurrentIndexLeft() Move the currentIndex right one item in the view. The current index will wrap if keyNavigationWraps is true and it - is currently at the end. + is currently at the end. This method has no effect if the \l count is zero. \bold Note: methods should only be called after the Component has completed. */ void QDeclarativeGridView::moveCurrentIndexRight() { Q_D(QDeclarativeGridView); + const int count = d->model ? d->model->count() : 0; + if (!count) + return; if (d->flow == QDeclarativeGridView::LeftToRight) { - if (currentIndex() < d->model->count() - 1 || d->wrap) { + if (currentIndex() < count - 1 || d->wrap) { int index = currentIndex() + 1; - setCurrentIndex(index < d->model->count() ? index : 0); + setCurrentIndex((index >= 0 && index < count) ? index : 0); } } else { - if (currentIndex() < d->model->count() - d->columns || d->wrap) { + if (currentIndex() < count - d->columns || d->wrap) { int index = currentIndex()+d->columns; - setCurrentIndex(index < d->model->count() ? index : 0); + setCurrentIndex((index >= 0 && index < count) ? index : 0); } } } @@ -2201,7 +2222,7 @@ void QDeclarativeGridView::componentComplete() if (d->isValid()) { refill(); d->moveReason = QDeclarativeGridViewPrivate::SetIndex; - if (d->currentIndex < 0) + if (d->currentIndex < 0 && !d->currentIndexSet) d->updateCurrent(0); else d->updateCurrent(d->currentIndex); @@ -2282,7 +2303,7 @@ void QDeclarativeGridView::itemsInserted(int modelIndex, int count) if (d->currentItem) d->currentItem->index = d->currentIndex; emit currentIndexChanged(); - } else if (d->currentIndex < 0) { + } else if (d->currentIndex < 0 && !d->currentIndexSet) { d->updateCurrent(0); } d->itemCount += count; diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 6fd3b71..7dd5c75 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -182,7 +182,8 @@ public: , bufferMode(BufferBefore | BufferAfter) , ownModel(false), wrap(false), autoHighlight(true), haveHighlightRange(false) , correctFlick(false), inFlickCorrection(false), lazyRelease(false) - , deferredRelease(false), layoutScheduled(false), minExtentDirty(true), maxExtentDirty(true) + , deferredRelease(false), layoutScheduled(false), currentIndexSet(false) + , minExtentDirty(true), maxExtentDirty(true) {} void init(); @@ -544,6 +545,7 @@ public: bool lazyRelease : 1; bool deferredRelease : 1; bool layoutScheduled : 1; + bool currentIndexSet : 1; mutable bool minExtentDirty : 1; mutable bool maxExtentDirty : 1; }; @@ -881,6 +883,7 @@ void QDeclarativeListViewPrivate::createHighlight() } else { highlight->item->setWidth(currentItem->item->width()); } + highlight->setPosition(currentItem->itemPosition()); } QDeclarativeItemPrivate *itemPrivate = static_cast(QGraphicsItemPrivate::get(item)); itemPrivate->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry); @@ -1045,8 +1048,11 @@ void QDeclarativeListViewPrivate::updateCurrent(int modelIndex) currentItem->attached->setIsCurrentItem(false); releaseItem(currentItem); currentItem = 0; - currentIndex = -1; + currentIndex = modelIndex; + emit q->currentIndexChanged(); updateHighlight(); + } else if (currentIndex != modelIndex) { + currentIndex = modelIndex; emit q->currentIndexChanged(); } return; @@ -1598,7 +1604,7 @@ void QDeclarativeListView::setModel(const QVariant &model) if (isComponentComplete()) { updateSections(); refill(); - if (d->currentIndex >= d->model->count() || d->currentIndex < 0) { + if ((d->currentIndex >= d->model->count() || d->currentIndex < 0) && !d->currentIndexSet) { setCurrentIndex(0); } else { d->moveReason = QDeclarativeListViewPrivate::SetIndex; @@ -1708,10 +1714,13 @@ void QDeclarativeListView::setCurrentIndex(int index) Q_D(QDeclarativeListView); if (d->requestedIndex >= 0) // currently creating item return; - if (isComponentComplete() && d->isValid() && index != d->currentIndex && index < d->model->count() && index >= 0) { + d->currentIndexSet = true; + if (index == d->currentIndex) + return; + if (isComponentComplete() && d->isValid()) { d->moveReason = QDeclarativeListViewPrivate::SetIndex; d->updateCurrent(index); - } else if (index != d->currentIndex) { + } else { d->currentIndex = index; emit currentIndexChanged(); } @@ -2523,16 +2532,18 @@ void QDeclarativeListView::geometryChanged(const QRectF &newGeometry, Increments the current index. The current index will wrap if keyNavigationWraps is true and it is currently at the end. + This method has no effect if the \l count is zero. \bold Note: methods should only be called after the Component has completed. */ void QDeclarativeListView::incrementCurrentIndex() { Q_D(QDeclarativeListView); - if (currentIndex() < d->model->count() - 1 || d->wrap) { + int count = d->model ? d->model->count() : 0; + if (count && (currentIndex() < count - 1 || d->wrap)) { d->moveReason = QDeclarativeListViewPrivate::SetIndex; int index = currentIndex()+1; - d->updateCurrent(index < d->model->count() ? index : 0); + d->updateCurrent((index >= 0 && index < count) ? index : 0); } } @@ -2541,16 +2552,18 @@ void QDeclarativeListView::incrementCurrentIndex() Decrements the current index. The current index will wrap if keyNavigationWraps is true and it is currently at the beginning. + This method has no effect if the \l count is zero. \bold Note: methods should only be called after the Component has completed. */ void QDeclarativeListView::decrementCurrentIndex() { Q_D(QDeclarativeListView); - if (currentIndex() > 0 || d->wrap) { + int count = d->model ? d->model->count() : 0; + if (count && (currentIndex() > 0 || d->wrap)) { d->moveReason = QDeclarativeListViewPrivate::SetIndex; int index = currentIndex()-1; - d->updateCurrent(index >= 0 ? index : d->model->count()-1); + d->updateCurrent((index >= 0 && index < count) ? index : count-1); } } @@ -2684,7 +2697,7 @@ void QDeclarativeListView::componentComplete() if (d->isValid()) { refill(); d->moveReason = QDeclarativeListViewPrivate::SetIndex; - if (d->currentIndex < 0) + if (d->currentIndex < 0 && !d->currentIndexSet) d->updateCurrent(0); else d->updateCurrent(d->currentIndex); @@ -2790,7 +2803,7 @@ void QDeclarativeListView::itemsInserted(int modelIndex, int count) if (d->currentItem) d->currentItem->index = d->currentIndex; emit currentIndexChanged(); - } else if (d->currentIndex < 0) { + } else if (d->currentIndex < 0 && !d->currentIndexSet) { d->updateCurrent(0); } d->itemCount += count; diff --git a/tests/auto/declarative/qdeclarativegridview/data/gridview-noCurrent.qml b/tests/auto/declarative/qdeclarativegridview/data/gridview-noCurrent.qml new file mode 100644 index 0000000..1189649 --- /dev/null +++ b/tests/auto/declarative/qdeclarativegridview/data/gridview-noCurrent.qml @@ -0,0 +1,52 @@ +import QtQuick 1.0 + +Rectangle { + property int current: grid.currentIndex + width: 240 + height: 320 + color: "#ffffff" + resources: [ + Component { + id: myDelegate + Rectangle { + id: wrapper + objectName: "wrapper" + width: 80 + height: 60 + border.color: "blue" + Text { + text: index + } + Text { + x: 40 + text: wrapper.x + ", " + wrapper.y + } + Text { + y: 20 + id: textName + objectName: "textName" + text: name + } + Text { + y: 40 + id: textNumber + objectName: "textNumber" + text: number + } + color: GridView.isCurrentItem ? "lightsteelblue" : "white" + } + } + ] + GridView { + id: grid + objectName: "grid" + focus: true + width: 240 + height: 320 + currentIndex: -1 + cellWidth: 80 + cellHeight: 60 + delegate: myDelegate + model: testModel + } +} diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp index f7acd87..327bba2 100644 --- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp +++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp @@ -71,6 +71,7 @@ private slots: void moved(); void changeFlow(); void currentIndex(); + void noCurrentIndex(); void defaultValues(); void properties(); void propertyChanges(); @@ -696,9 +697,51 @@ void tst_QDeclarativeGridView::currentIndex() model.insertItem(0, "Foo", "1111"); QTRY_COMPARE(canvas->rootObject()->property("current").toInt(), 29); + // check removing highlight by setting currentIndex to -1; + gridview->setCurrentIndex(-1); + + QCOMPARE(gridview->currentIndex(), -1); + QVERIFY(!gridview->highlightItem()); + QVERIFY(!gridview->currentItem()); + delete canvas; } +void tst_QDeclarativeGridView::noCurrentIndex() +{ + TestModel model; + for (int i = 0; i < 60; i++) + model.addItem("Item" + QString::number(i), QString::number(i)); + + QDeclarativeView *canvas = new QDeclarativeView(0); + canvas->setFixedSize(240,320); + + QDeclarativeContext *ctxt = canvas->rootContext(); + ctxt->setContextProperty("testModel", &model); + + QString filename(SRCDIR "/data/gridview-noCurrent.qml"); + canvas->setSource(QUrl::fromLocalFile(filename)); + + qApp->processEvents(); + + QDeclarativeGridView *gridview = findItem(canvas->rootObject(), "grid"); + QVERIFY(gridview != 0); + + QDeclarativeItem *contentItem = gridview->contentItem(); + QVERIFY(contentItem != 0); + + // current index should be -1 + QCOMPARE(gridview->currentIndex(), -1); + QVERIFY(!gridview->currentItem()); + QVERIFY(!gridview->highlightItem()); + QCOMPARE(gridview->contentY(), 0.0); + + gridview->setCurrentIndex(5); + QCOMPARE(gridview->currentIndex(), 5); + QVERIFY(gridview->currentItem()); + QVERIFY(gridview->highlightItem()); +} + void tst_QDeclarativeGridView::changeFlow() { QDeclarativeView *canvas = createView(); diff --git a/tests/auto/declarative/qdeclarativelistview/data/listview-noCurrent.qml b/tests/auto/declarative/qdeclarativelistview/data/listview-noCurrent.qml new file mode 100644 index 0000000..1997010 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelistview/data/listview-noCurrent.qml @@ -0,0 +1,50 @@ +import QtQuick 1.0 + +Rectangle { + property int current: list.currentIndex + width: 240 + height: 320 + color: "#ffffff" + resources: [ + Component { + id: myDelegate + Rectangle { + id: wrapper + objectName: "wrapper" + height: 20 + width: 240 + Text { + text: index + } + Text { + x: 30 + id: textName + objectName: "textName" + text: name + } + Text { + x: 120 + id: textNumber + objectName: "textNumber" + text: number + } + Text { + x: 200 + text: wrapper.y + } + color: ListView.isCurrentItem ? "lightsteelblue" : "white" + } + } + ] + ListView { + id: list + objectName: "list" + focus: true + currentIndex: -1 + width: 240 + height: 320 + delegate: myDelegate + highlightMoveSpeed: 1000 + model: testModel + } +} diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp index 2649c0d..080631c 100644 --- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp +++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp @@ -85,6 +85,7 @@ private slots: void itemList(); void currentIndex(); + void noCurrentIndex(); void enforceRange(); void spacing(); void sections(); @@ -1087,9 +1088,52 @@ void tst_QDeclarativeListView::currentIndex() model.insertItem(0, "Foo", "1111"); QTRY_COMPARE(canvas->rootObject()->property("current").toInt(), 29); + // check removing highlight by setting currentIndex to -1; + listview->setCurrentIndex(-1); + + QCOMPARE(listview->currentIndex(), -1); + QVERIFY(!listview->highlightItem()); + QVERIFY(!listview->currentItem()); + delete canvas; } +void tst_QDeclarativeListView::noCurrentIndex() +{ + TestModel model; + for (int i = 0; i < 30; i++) + model.addItem("Item" + QString::number(i), QString::number(i)); + + QDeclarativeView *canvas = new QDeclarativeView(0); + canvas->setFixedSize(240,320); + + QDeclarativeContext *ctxt = canvas->rootContext(); + ctxt->setContextProperty("testModel", &model); + + QString filename(SRCDIR "/data/listview-noCurrent.qml"); + canvas->setSource(QUrl::fromLocalFile(filename)); + + qApp->processEvents(); + + QDeclarativeListView *listview = findItem(canvas->rootObject(), "list"); + QTRY_VERIFY(listview != 0); + + QDeclarativeItem *contentItem = listview->contentItem(); + QTRY_VERIFY(contentItem != 0); + + // current index should be -1 at startup + // and we should not have a currentItem or highlightItem + QCOMPARE(listview->currentIndex(), -1); + QCOMPARE(listview->contentY(), 0.0); + QVERIFY(!listview->highlightItem()); + QVERIFY(!listview->currentItem()); + + listview->setCurrentIndex(2); + QCOMPARE(listview->currentIndex(), 2); + QVERIFY(listview->highlightItem()); + QVERIFY(listview->currentItem()); +} + void tst_QDeclarativeListView::itemList() { QDeclarativeView *canvas = createView(); -- cgit v0.12 From c407d79f79c67f2f2bb84efc93061fd57fe4cf54 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 14 Oct 2010 18:22:57 +1000 Subject: Correctly splice properties from derived metaobjects together Task-number: QTBUG-14449 --- src/declarative/qml/qdeclarativepropertycache.cpp | 77 ++++++---------------- src/declarative/qml/qdeclarativepropertycache_p.h | 9 ++- .../data/propertySplicing.qml | 10 +++ .../qdeclarativeecmascript/testtypes.cpp | 1 + .../declarative/qdeclarativeecmascript/testtypes.h | 9 +++ .../tst_qdeclarativeecmascript.cpp | 13 ++++ 6 files changed, 61 insertions(+), 58 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/propertySplicing.qml diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp index 9e1ceb8..82fa98f 100644 --- a/src/declarative/qml/qdeclarativepropertycache.cpp +++ b/src/declarative/qml/qdeclarativepropertycache.cpp @@ -252,7 +252,8 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb } int methodCount = metaObject->methodCount(); - int methodOffset = qMax(2, metaObject->methodOffset()); // 2 to block the destroyed signal + // 3 to block the destroyed signal and the deleteLater() slot + int methodOffset = qMax(3, metaObject->methodOffset()); methodIndexCache.resize(methodCount); for (int ii = methodOffset; ii < methodCount; ++ii) { @@ -268,17 +269,17 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb RData *data = new RData; data->identifier = enginePriv->objectClass->createPersistentIdentifier(methodName); - if (stringCache.contains(methodName)) { - stringCache[methodName]->release(); - identifierCache[data->identifier.identifier]->release(); - } - data->load(m); if (m.methodType() == QMetaMethod::Slot || m.methodType() == QMetaMethod::Method) data->flags |= methodFlags; else if (m.methodType() == QMetaMethod::Signal) data->flags |= signalFlags; + if (stringCache.contains(methodName)) { + stringCache[methodName]->release(); + identifierCache[data->identifier.identifier]->release(); + } + methodIndexCache[ii] = data; stringCache.insert(methodName, data); @@ -287,6 +288,16 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb } } +void QDeclarativePropertyCache::updateRecur(QDeclarativeEngine *engine, const QMetaObject *metaObject) +{ + if (!metaObject) + return; + + updateRecur(engine, metaObject->superClass()); + + append(engine, metaObject); +} + void QDeclarativePropertyCache::update(QDeclarativeEngine *engine, const QMetaObject *metaObject) { Q_ASSERT(engine); @@ -295,57 +306,11 @@ void QDeclarativePropertyCache::update(QDeclarativeEngine *engine, const QMetaOb clear(); - // ### The properties/methods should probably be spliced on a per-metaobject basis - int propCount = metaObject->propertyCount(); - - indexCache.resize(propCount); - for (int ii = propCount - 1; ii >= 0; --ii) { - QMetaProperty p = metaObject->property(ii); - if (!p.isScriptable()) { - indexCache[ii] = 0; - continue; - } - QString propName = QString::fromUtf8(p.name()); + // Optimization to prevent unnecessary reallocation of lists + indexCache.reserve(metaObject->propertyCount()); + methodIndexCache.reserve(metaObject->methodCount()); - RData *data = new RData; - data->identifier = enginePriv->objectClass->createPersistentIdentifier(propName); - - data->load(p, engine); - - indexCache[ii] = data; - - if (stringCache.contains(propName)) - continue; - - stringCache.insert(propName, data); - identifierCache.insert(data->identifier.identifier, data); - data->addref(); - data->addref(); - } - - int methodCount = metaObject->methodCount(); - for (int ii = methodCount - 1; ii >= 3; --ii) { // >=3 to block the destroyed signal and deleteLater() slot - QMetaMethod m = metaObject->method(ii); - if (m.access() == QMetaMethod::Private) - continue; - QString methodName = QString::fromUtf8(m.signature()); - - int parenIdx = methodName.indexOf(QLatin1Char('(')); - Q_ASSERT(parenIdx != -1); - methodName = methodName.left(parenIdx); - - if (stringCache.contains(methodName)) - continue; - - RData *data = new RData; - data->identifier = enginePriv->objectClass->createPersistentIdentifier(methodName); - - data->load(m); - - stringCache.insert(methodName, data); - identifierCache.insert(data->identifier.identifier, data); - data->addref(); - } + updateRecur(engine,metaObject); } QDeclarativePropertyCache::Data * diff --git a/src/declarative/qml/qdeclarativepropertycache_p.h b/src/declarative/qml/qdeclarativepropertycache_p.h index 79b126d..922010d 100644 --- a/src/declarative/qml/qdeclarativepropertycache_p.h +++ b/src/declarative/qml/qdeclarativepropertycache_p.h @@ -96,7 +96,7 @@ public: IsVMEFunction = 0x00000400, HasArguments = 0x00000800, IsSignal = 0x00001000, - IsVMESignal = 0x00002000, + IsVMESignal = 0x00002000 }; Q_DECLARE_FLAGS(Flags, Flag) @@ -105,7 +105,10 @@ public: Flags flags; int propType; int coreIndex; - int notifyIndex; + union { + int notifyIndex; // When !IsFunction + int relatedIndex; // When IsFunction + }; static Flags flagsForProperty(const QMetaProperty &, QDeclarativeEngine *engine = 0); void load(const QMetaProperty &, QDeclarativeEngine *engine = 0); @@ -152,6 +155,8 @@ private: typedef QHash StringCache; typedef QHash IdentifierCache; + void updateRecur(QDeclarativeEngine *, const QMetaObject *); + QDeclarativeEngine *engine; IndexCache indexCache; IndexCache methodIndexCache; diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/propertySplicing.qml b/tests/auto/declarative/qdeclarativeecmascript/data/propertySplicing.qml new file mode 100644 index 0000000..7deb84a --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/propertySplicing.qml @@ -0,0 +1,10 @@ +import Qt.test 1.0 +import QtQuick 1.0 + +MyDerivedObject { + property bool test: false + + Component.onCompleted: { + test = intProperty() + } +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp b/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp index 810a0f7..94135f9 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp @@ -109,6 +109,7 @@ void registerTypes() qmlRegisterExtendedType("Qt.test", 1,0, "MyBaseExtendedObject"); qmlRegisterExtendedType("Qt.test", 1,0, "MyExtendedObject"); qmlRegisterType("Qt.test", 1,0, "MyTypeObject"); + qmlRegisterType("Qt.test", 1,0, "MyDerivedObject"); qmlRegisterType("Qt.test", 1,0, "NumberAssignment"); qmlRegisterExtendedType("Qt.test", 1,0, "DefaultPropertyExtendedObject"); qmlRegisterType("Qt.test", 1,0, "OverrideDefaultPropertyObject"); diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h index 220318d..182c4fa 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h +++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h @@ -562,6 +562,15 @@ signals: }; Q_DECLARE_OPERATORS_FOR_FLAGS(MyTypeObject::MyFlags) +class MyDerivedObject : public MyTypeObject +{ + Q_OBJECT +public: + Q_INVOKABLE bool intProperty() const { + return true; + } +}; + Q_DECLARE_METATYPE(QScriptValue); class MyInvokableObject : public QObject { diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 02832f3..66dc160 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -139,6 +139,7 @@ private slots: void strictlyEquals(); void compiled(); void numberAssignment(); + void propertySplicing(); void bug1(); void bug2(); @@ -2175,6 +2176,18 @@ void tst_qdeclarativeecmascript::numberAssignment() delete object; } +void tst_qdeclarativeecmascript::propertySplicing() +{ + QDeclarativeComponent component(&engine, TEST_FILE("propertySplicing.qml")); + + QObject *object = component.create(); + QVERIFY(object != 0); + + QCOMPARE(object->property("test").toBool(), true); + + delete object; +} + // Test that assigning a null object works // Regressed with: df1788b4dbbb2826ae63f26bdf166342595343f4 void tst_qdeclarativeecmascript::nullObjectBinding() -- cgit v0.12 From 0a0842ce6bc6a2d2731092c50c69a5ff3dc9b010 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 14 Oct 2010 19:00:02 +1000 Subject: Fix potential memory corruption in QDeclarativePropertyCache Task-number: QTBUG-14449 --- src/declarative/qml/qdeclarativepropertycache.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp index 82fa98f..259e492 100644 --- a/src/declarative/qml/qdeclarativepropertycache.cpp +++ b/src/declarative/qml/qdeclarativepropertycache.cpp @@ -140,6 +140,10 @@ void QDeclarativePropertyCache::clear() if (indexCache.at(ii)) indexCache.at(ii)->release(); } + for (int ii = 0; ii < methodIndexCache.count(); ++ii) { + if (methodIndexCache.at(ii)) methodIndexCache.at(ii)->release(); + } + for (StringCache::ConstIterator iter = stringCache.begin(); iter != stringCache.end(); ++iter) (*iter)->release(); @@ -234,12 +238,11 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb RData *data = new RData; data->identifier = enginePriv->objectClass->createPersistentIdentifier(propName); + indexCache[ii] = data; data->load(p, engine); data->flags |= propertyFlags; - indexCache[ii] = data; - if (stringCache.contains(propName)) { stringCache[propName]->release(); identifierCache[data->identifier.identifier]->release(); @@ -268,6 +271,7 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb RData *data = new RData; data->identifier = enginePriv->objectClass->createPersistentIdentifier(methodName); + methodIndexCache[ii] = data; data->load(m); if (m.methodType() == QMetaMethod::Slot || m.methodType() == QMetaMethod::Method) @@ -280,11 +284,10 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb identifierCache[data->identifier.identifier]->release(); } - methodIndexCache[ii] = data; - stringCache.insert(methodName, data); identifierCache.insert(data->identifier.identifier, data); data->addref(); + data->addref(); } } -- cgit v0.12 From af9e4976bea7193a6f4ad09d823aaa1ffee25a3b Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 14 Oct 2010 11:01:33 +0200 Subject: Fixed autotest that was missing focus on Windows Reviewed-by: ogoffart --- tests/auto/qcompleter/tst_qcompleter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/auto/qcompleter/tst_qcompleter.cpp b/tests/auto/qcompleter/tst_qcompleter.cpp index 6d28f9f..bdd105c 100644 --- a/tests/auto/qcompleter/tst_qcompleter.cpp +++ b/tests/auto/qcompleter/tst_qcompleter.cpp @@ -1483,8 +1483,10 @@ void tst_QCompleter::QTBUG_14292_filesystem() edit.show(); QApplication::setActiveWindow(&edit); + edit.setFocus(); QTest::qWaitForWindowShown(&edit); QTRY_VERIFY(QApplication::activeWindow() == &edit); + QTRY_VERIFY(edit.hasFocus()); QVERIFY(!comp.popup()->isVisible()); edit.setText(tmpDir.path()); -- cgit v0.12 From f3180713921f73ea529b22379ce5f87392ce749a Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 14 Oct 2010 10:44:35 +0200 Subject: tst_qcompleter.cpp: fix test on mac. Disable the one that does not work --- tests/auto/qcompleter/tst_qcompleter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/qcompleter/tst_qcompleter.cpp b/tests/auto/qcompleter/tst_qcompleter.cpp index bdd105c..425a230 100644 --- a/tests/auto/qcompleter/tst_qcompleter.cpp +++ b/tests/auto/qcompleter/tst_qcompleter.cpp @@ -651,7 +651,7 @@ void tst_QCompleter::fileSystemModel_data() #elif defined (Q_OS_MAC) QTest::newRow("()") << "" << "" << "/" << "/"; QTest::newRow("(/a)") << "/a" << "" << "Applications" << "/Applications"; - QTest::newRow("(/d)") << "/d" << "" << "Developer" << "/Developer"; +// QTest::newRow("(/d)") << "/d" << "" << "Developer" << "/Developer"; #else QTest::newRow("()") << "" << "" << "/" << "/"; #if !defined(Q_OS_IRIX) && !defined(Q_OS_AIX) && !defined(Q_OS_HPUX) -- cgit v0.12 From f38e8394eae20f7290688629ab66720ebacd64c9 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Thu, 14 Oct 2010 15:21:28 +0200 Subject: Workaround for QFileSystemWatcher regression Don't call removePath() when it was not added before. Reviewed-by: con Task-number: QTBUG-14435 --- tools/designer/src/lib/shared/qtresourcemodel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/designer/src/lib/shared/qtresourcemodel.cpp b/tools/designer/src/lib/shared/qtresourcemodel.cpp index 709f389..e3fc805 100644 --- a/tools/designer/src/lib/shared/qtresourcemodel.cpp +++ b/tools/designer/src/lib/shared/qtresourcemodel.cpp @@ -428,10 +428,10 @@ void QtResourceModelPrivate::removeOldPaths(QtResourceSet *resourceSet, const QS void QtResourceModelPrivate::setWatcherEnabled(const QString &path, bool enable) { - m_fileWatcher->removePath(path); - - if (!enable) + if (!enable) { + m_fileWatcher->removePath(path); return; + } QFileInfo fi(path); if (fi.exists()) -- cgit v0.12 From c089696d8de41762a1e8abb067b2721ce3de4d27 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Thu, 14 Oct 2010 15:46:22 +0200 Subject: QNAM: Do not need QNetworkSession for data:// This was already fixed in 4.8, this is a hotfix for 4.7 Task-Number: QT-4096 Reviewed-by: Olivier Goffart --- src/network/access/qnetworkaccessmanager.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index a637474..12fe094 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -944,6 +944,22 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera { Q_D(QNetworkAccessManager); + // 4.7 only hotfix fast path for data:// URLs + // In 4.8 this is solved with QNetworkReplyDataImpl and will work there + // This hotfix is done for not needing a QNetworkSession for data:// + if ((op == QNetworkAccessManager::GetOperation || op == QNetworkAccessManager::HeadOperation) + && (req.url().scheme() == QLatin1String("data"))) { + QNetworkReplyImpl *reply = new QNetworkReplyImpl(this); + QNetworkReplyImplPrivate *priv = reply->d_func(); + priv->manager = this; + priv->backend = new QNetworkAccessDataBackend(); + priv->backend->manager = this->d_func(); + priv->backend->setParent(reply); + priv->backend->reply = priv; + priv->setup(op, req, outgoingData); + return reply; + } + // fast path for GET on file:// URLs // Also if the scheme is empty we consider it a file. // The QNetworkAccessFileBackend will right now only be used for PUT -- cgit v0.12 From 17ff53f665ad5de15ce7b073edd1b10b2b397b05 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 14 Oct 2010 17:57:34 +0200 Subject: Doc: Made Qt::TextLongestVariant internal again. This undoes change 43e6ec9f01693044f7bc1. This enum value is internal and not generally supported by Qt. Reviewed-by: Olivier Goffart --- src/corelib/global/qnamespace.qdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 1c41eca..73f28d6 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -470,9 +470,9 @@ text; otherwise this width is excluded. \value TextIncludeTrailingSpaces Same as IncludeTrailingSpaces \value TextJustificationForced Ensures that text lines are justified. - \value TextLongestVariant Ensures that the longest variant is always used - when computing the size of a multi-variant string. + \omitvalue TextLongestVariant Ensures that the longest variant is always used + when computing the size of a multi-variant string. (Internal) \omitvalue TextBypassShaping \omitvalue BreakAnywhere \omitvalue DontClip -- cgit v0.12 From 830df741afc987f12d744bfab8a4b9ee538c212a Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 14 Oct 2010 18:29:32 +0200 Subject: tst_qcompleter: Fix the QTBUG_14292_filesystem test on X11 The last fix on Windows broke it on linux Reviewed-by: thierry --- tests/auto/qcompleter/tst_qcompleter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/auto/qcompleter/tst_qcompleter.cpp b/tests/auto/qcompleter/tst_qcompleter.cpp index 425a230..650c328 100644 --- a/tests/auto/qcompleter/tst_qcompleter.cpp +++ b/tests/auto/qcompleter/tst_qcompleter.cpp @@ -1483,9 +1483,9 @@ void tst_QCompleter::QTBUG_14292_filesystem() edit.show(); QApplication::setActiveWindow(&edit); - edit.setFocus(); QTest::qWaitForWindowShown(&edit); QTRY_VERIFY(QApplication::activeWindow() == &edit); + edit.setFocus(); QTRY_VERIFY(edit.hasFocus()); QVERIFY(!comp.popup()->isVisible()); @@ -1493,6 +1493,7 @@ void tst_QCompleter::QTBUG_14292_filesystem() QTest::keyClick(&edit, '/'); QTRY_VERIFY(comp.popup()->isVisible()); QCOMPARE(comp.popup()->model()->rowCount(), 2); + QApplication::processEvents(); QTest::keyClick(&edit, 'h'); QCOMPARE(comp.popup()->model()->rowCount(), 2); QTest::keyClick(&edit, 'e'); -- cgit v0.12 From 8c48c7b9bca8074c48b78f6d089a3882b2d73a9d Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Fri, 15 Oct 2010 11:32:07 +1000 Subject: Recalculate Text Element's alignment when width changes Task-number: QTBUG-14463 Reviewed-by: Aaron Kennedy --- src/declarative/graphicsitems/qdeclarativetext.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index 308aefa..22282d2 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -1143,9 +1143,10 @@ QRectF QDeclarativeText::boundingRect() const void QDeclarativeText::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) { Q_D(QDeclarativeText); - if (!d->internalWidthUpdate && newGeometry.width() != oldGeometry.width() && - (d->wrapMode != QDeclarativeText::NoWrap || d->elideMode != QDeclarativeText::ElideNone)) { - + if ((!d->internalWidthUpdate && newGeometry.width() != oldGeometry.width()) + && (d->wrapMode != QDeclarativeText::NoWrap + || d->elideMode != QDeclarativeText::ElideNone + || d->hAlign != Qt::AlignLeft)) { if (d->singleline && d->elideMode != QDeclarativeText::ElideNone && widthValid()) { // We need to re-elide d->updateLayout(); -- cgit v0.12 From 64a05cfa97b1192ac247558c0601ba0e4ec464c9 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Fri, 15 Oct 2010 13:04:23 +1000 Subject: Snake demo now pauses when the window loses focus. Task-number: QTBUG-11592 --- demos/declarative/snake/content/pics/pause.png | Bin 0 -> 4327 bytes demos/declarative/snake/content/snake.js | 4 ++-- demos/declarative/snake/snake.qml | 12 +++++++++++- 3 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 demos/declarative/snake/content/pics/pause.png diff --git a/demos/declarative/snake/content/pics/pause.png b/demos/declarative/snake/content/pics/pause.png new file mode 100644 index 0000000..056d97d Binary files /dev/null and b/demos/declarative/snake/content/pics/pause.png differ diff --git a/demos/declarative/snake/content/snake.js b/demos/declarative/snake/content/snake.js index c2e9d3a..5c089de 100644 --- a/demos/declarative/snake/content/snake.js +++ b/demos/declarative/snake/content/snake.js @@ -32,7 +32,7 @@ function startNewGame() if (state == "starting") return; - if (heartbeat.running) { + if (activeGame) { endGame(); startNewGameTimer.running = true; state = ""; @@ -87,7 +87,7 @@ function startNewGame() function endGame() { - heartbeat.running = false; + activeGame = false; for(var i in snake) snake[i].dying = true; if (cookie) { diff --git a/demos/declarative/snake/snake.qml b/demos/declarative/snake/snake.qml index 5b69217..6eaa976 100644 --- a/demos/declarative/snake/snake.qml +++ b/demos/declarative/snake/snake.qml @@ -47,6 +47,7 @@ Rectangle { id: screen; SystemPalette { id: activePalette } color: activePalette.window + property bool activeGame: false property int gridSize : 34 property int margin: 4 @@ -75,6 +76,7 @@ Rectangle { Timer { id: heartbeat; interval: heartbeatInterval; + running: activeGame && runtime.isActiveWindow repeat: true onTriggered: { Logic.move() } } @@ -94,9 +96,17 @@ Rectangle { Timer { id: startHeartbeatTimer; interval: 1000 ; - onTriggered: { state = "running"; heartbeat.running = true; } + onTriggered: { state = "running"; activeGame = true; } } + Image{ + id: pauseDialog + z: 1 + source: "content/pics/pause.png" + anchors.centerIn: parent; + //opacity is deliberately not animated + opacity: gameActive && !runtime.isActiveWindow + } Image { Image { -- cgit v0.12 From 11c3a750147f9f79d555a60915d8229e86108ca9 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Fri, 1 Oct 2010 17:18:39 +1000 Subject: Update change log. (cherry picked from commit 976391c5ce2bbe3b992298e140bbbbc596ca756f) --- dist/changes-4.7.1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index 2d79ac1..68b23ba 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -109,7 +109,11 @@ QtDBus QtMultimedia ------------ - + - QAudioOutput + * [QTBUG-11586] Support audio with more than two channels. + * [QTBUG-11755] Fixed outputing audio in push mode with ALSA. + * [QTBUG-11883] Fixed segmentation fault when closing a QAudioInput or + QAudioOutput. QtNetwork --------- -- cgit v0.12 From 9559ec4082563b4b46d13d179dc13360f63566d3 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 4 Oct 2010 14:27:10 +0300 Subject: My changes for 4.7.1 Reviewed-by: TrustMe (cherry picked from commit 0b905d602ffb24b8cad4f09d84a5f762cc6a6603) --- dist/changes-4.7.1 | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index 68b23ba..51a10a3 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -308,7 +308,7 @@ Qt for Symbian * [QTBUG-4586] Fixed wrong paths in include/ActiveQt/headers.pri. * [QTBUG-11671] Fixed audio-backend detection in configure tests. - - qmake + - qmake & mkspecs * [QTBUG-13523] Added support for using -L notation in the LIBS variable when building with the symbian/linux-armcc or gcce mkspec. * [QTBUG-12851] Fix assertion on Windows when DESTDIR is empty in static @@ -318,6 +318,31 @@ Qt for Symbian .pro file. * [QTBUG-13081] vc[x]proj generators: support /MAP option without file name. + * [QTBUG-13902] Added support for unsigned smart installer package creation. + * [QTBUG-13991] No longer need to manually edit smart installer pkg file for publishing. + * [QT-3949] Load environment.prf from Symbian SDK if it exists there. + * [QTBUG-13499] Provide a way to compile with RVCT 4.0 using generated Makefile. + * [QTBUG-13336] Ignore MAKEFILE variable for Symbian abld and sbsv2 builds. + * [QTBUG-13363] Fix Symbian handling of projects with special characters in TARGET. + * [QTBUG-12762 & QTBUG-13307] Gcce building support for symbian-sbsv2 + * [QTBUG-13147] Added support for DEPLOYMENT.pkg_build_version + * [QTBUG-12884] Fix "installer_sis" and "deploy" targets when TARGET has path. + * [QTBUG-12879] Fix check to remove unnecessary deployments in Symbian. + * [QTBUG-12716] Make bld.inf target in Symbian mkspecs to depend on .pro file. + * [QTBUG-12715] Rename Symbian generated mmp/mk files to include target in filename. + * [QTBUG-12617] Fix package header in cases where VERSION doesn't contain all values. + * Fix run and runonphone targets for projects that have TARGET with path. + * Fix QT_LIBINFIX for QT_PLUGINS_BASE_DIR. + * No longer require PRE_TARGETDEPS items to be absolute for symbian-sbsv2 mkspec. + * Do smart command replacement for commands containing $$QMAKE_* + command variables, such as $$QMAKE_COPY, when generating bld.inf + extensions for QMAKE_EXTRA_* variables for symbian-sbsv2 mkspec. + + - s60installs + * Fixed qsymbianbearer.qtplugin exports in s60installs.pro. + + - patch_capabilities.pl + * [QTBUG-13760] Improved output of patch_capabilities.pl script. - QInputContext * [QTBUG-12949] Fixed a bug where passwords would not be committed when @@ -325,6 +350,23 @@ Qt for Symbian * [QTBUG-13472] Fixed crash in input methods when using symbols menu and numbers only. + - QDesktopWidget + * [QTBUG-14058] Fix QApplication::desktop()->availableGeometry(). + + - QtCore + * [QTBUG-13802] Symbian^4 platform detection for QSysInfo::symbianVersion(). + * [QTBUG-13612] Do not wait for QThread exit when destroying global statics. + * [QT-3895] Change RLibrary handle in QS60PluginResolver to be process wide. + * [QTBUG-11218] Fix QProcessManager destruction. + + - Qt Plugins + * [QT-3949] Remove pre-Symbian3 plugins from Symbian3 and later builds and + Check S60_VERSION instead of existence of certain files in bearer plugin. + + - Demos & Examples + * [QTBUG-13461] Remove some .pro statements left behind after IAP usage cleanup + * [QTBUG-12276] Assigned valid UID3 for fortuneserver example. + Qt for Windows CE ----------------- - Gui -- cgit v0.12 From eb625b3112c241047e8d08146b63545165d33ebf Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Fri, 15 Oct 2010 13:36:02 +1000 Subject: Cleanup changelog for 4.7.1. --- dist/changes-4.7.1 | 328 ++++++++++++++++++++++++++++------------------------- 1 file changed, 173 insertions(+), 155 deletions(-) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index 51a10a3..b25b95c 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -13,7 +13,6 @@ corresponding to tasks in the Qt Bug Tracker, the (now obsolete) Task Tracker, or the Merge Request queue of the public source repository. Qt Bug Tracker: http://bugreports.qt.nokia.com -Task Tracker: http://qt.nokia.com/developer/task-tracker Merge Request: http://qt.gitorious.org **************************************************************************** @@ -31,8 +30,6 @@ Optimizations - On x86 and 86_64, the memory access has been improved for alpha blending and for some composition functions. - * See list of Important Behavior Changes below - **************************************************************************** * Library * @@ -42,69 +39,68 @@ QtCore ------ - Containers - * [QTBUG-13079] Fix assingment of a container included in the container itself + * [QTBUG-13079] Fix assignment of a container included in the container + itself. - - QLibrary - * [QT-3825] System libraries are only loaded from the system directories + - QEventDispatcherUnix + * [QTBUG-13633] Do not process too many timer events if other events need + to be processed first. + - QLibrary + * [QT-3825] System libraries are only loaded from the system directories. - QUuid - * [QTBUG-11213] QUuid::createUuid() should not generate identical sequences on UNIX - - - QEventDispatcherUnix - * [QTBUG-13633] Do not process too many timer events if other events need - to be processed first + * [QTBUG-11213] QUuid::createUuid() should not generate identical sequences + on UNIX. QtGui ----- - - QGraphicsWidget - * [QTBUG-13188] Make sure a font that has propagated from a parent can - be set on a QPainter. - * [QT-3808] Issues when applying effects in combination with ItemHasNoContents flag. + - QGraphicsEffect + * [QT-3633] Wrong bounding rect. - QGraphicsItem * [QTBUG-3633, QT-3828] Wrong children bounding rect when applying effects. - - QGraphicsEffect - * [QT-3633] Wrong bounding rect. - - QGraphicsScene * [QT-3674] Spurious assert triggered from render(). + - QGraphicsWidget + * [QTBUG-13188] Make sure a font that has propagated from a parent can + be set on a QPainter. + * [QT-3808] Issues when applying effects in combination with + ItemHasNoContents flag. + + - QGtkStyle + * [QTBUG-13125] Fixed a regression with custom itemview background color. + + - QLineEdit + * [QTBUG-13520] Fixed the scrolling of text with right alignment. + - QPainter * [QTBUG-13429] Fixed scale point drawing with square cap in the raster engine, plus some potential floating point overflows in the rasterizer. * Optimized pixmap drawing with SmoothPixmapTransform. - - QStaticText - * [QTBUG-12614] Fix crash with zero-width string. - * [QTBUG-12540] Fix rendering of large glyphs with OpenGL2 paint engine. - - - QPinchGesture * The scaleFactor and totalScaleFactor now represent a value that allows an object to track a touchpoint during a Pinch Gesture even when using sequences for zooming. - Therefor the scale factors are initialized to 1.0 and for every new + Therefore the scale factors are initialized to 1.0 and for every new sequence the totalScaleFactor is multiplied with the scaleFactor of the new sequence. - - QLineEdit - * [QTBUG-13520] Fixed the scrolling of text with right alignment - - QPixmap - * [QTBUG-12560] Fixed a regression preventing loading images without extensions + * [QTBUG-12560] Fixed a regression preventing loading images without + extensions. - - QTreeView - * [QTBUG-13567] Do not scroll to top if last item is removed - - - QGtkStyle - * [QTBUG-13125] Fixed a regression with custom itemview background color. + - QStaticText + * [QTBUG-12614] Fix crash with zero-width string. + * [QTBUG-12540] Fix rendering of large glyphs with OpenGL2 paint engine. -QtDBus ------- + - QTreeView + * [QTBUG-13567] Do not scroll to top if last item is removed. QtMultimedia @@ -115,151 +111,170 @@ QtMultimedia * [QTBUG-11883] Fixed segmentation fault when closing a QAudioInput or QAudioOutput. + QtNetwork --------- - - QSslConfiguration - * [QTBUG-13265] fix crash with empty configuration - - QSslCertificate - * [QTBUG-12489] support dates > 2049 - Bearer Management * Improved reliability on Symbian and Maemo. * Added connman/meego backend. - IPv6 - * Disable on Symbian until OpenC properly supports it + * Disable on Symbian until OpenC properly supports it. + - QSslConfiguration + * [QTBUG-13265] Fixed crash with empty configuration. + - QSslCertificate + * [QTBUG-12489] Support dates > 2049. - QNetworkAccessManager - * [QTBUG-12285] Crash fix related to aborted uploads + * [QTBUG-12285] Crash fix related to aborted uploads. QtOpenGL -------- - QGL2PaintEngineEx * Fixed drawing a large number of glyphs with the same font on systems - with small texure size limits. - -QtOpenVG --------- - - -QtWebKit --------- - - -QtSql ------ - + with small texture size limits. -QtSvg ------ QtXml ----- * Fixed a crash when parsing invalid tag names. + QtXmlPatterns ------------- - XML Schema internals: - * [QTBUG-11559] Only parse 3 digits of time fraction + * [QTBUG-11559] Only parse 3 digits of time fraction. + QtDeclarative ------------- - QML language - * [QTBUG-13799] QML core module renamed to QtQuick to decouple it from Qt releases. - Old "import Qt 4.7" will co-exist with "import QtQuick 1.0' at least during Qt 4.7 releases. - * [QTBUG-13047] Support passing QObject derived types to QML methods - * [QTBUG-12837] Support JS "in" operator on QML objects - * [QTBUG-13045] Prevent calling deleteLater() from QML - * [QTBUG-13043] Ignore non-scriptable properties in QML - * [QTBUG-13114] Don't double call classBegin() - * [QTBUG-12946] Ensure the onDestruction handlers are called before the expressions are cleared - * [QTBUG-12599] Re-enabled script program caching on Symbian - * [QTBUG-13374] Don't modify the signal order on the second dynamic meta object pass - * Support for qsTrId and meta-data in comments for QML - - QML debugging: + * [QTBUG-13799] QML core module renamed to QtQuick to decouple it from Qt + releases. Old "import Qt 4.7" will co-exist with "import QtQuick 1.0' at + least during Qt 4.7 releases. + * [QTBUG-13047] Support passing QObject derived types to QML methods. + * [QTBUG-12837] Support JS "in" operator on QML objects. + * [QTBUG-13045] Prevent calling deleteLater() from QML. + * [QTBUG-13043] Ignore non-scriptable properties in QML. + * [QTBUG-13114] Don't double call classBegin(). + * [QTBUG-12946] Ensure the onDestruction handlers are called before the + expressions are cleared. + * [QTBUG-12599] Re-enabled script program caching on Symbian. + * [QTBUG-13374] Don't modify the signal order on the second dynamic meta + object pass. + * Support for qsTrId and meta-data in comments for QML. + - QML debugging * [QTBUG-5162] The debugger is now activated with -qmljsdebugger command - line arg to enable support for platforms without environment variables - * Various improvements to ease debugging in creator + line arg to enable support for platforms without environment variables. + * Various improvements to ease debugging in creator. - AnchorAnimation - * [QTBUG-13398] Fix AnchorAnimation for multiple AnchorChanges with dependancies + * [QTBUG-13398] Fix AnchorAnimation for multiple AnchorChanges with + dependancies. - AnchorChanges - * [QTBUG-11834] Restore any absolute geometry changed by AnchorChanges when returning to the base state + * [QTBUG-11834] Restore any absolute geometry changed by AnchorChanges when + returning to the base state. - Component - * [QTBUG-13170] Complete Component::createObject() creation after setting the parent + * [QTBUG-13170] Complete Component::createObject() creation after setting + the parent. - GridView - * [QTBUG-13166] GridView.view property should not be writable + * [QTBUG-13166] GridView.view property should not be writable. - Flickable - * [QTBUG-13095] Ensure Flickable visibleArea is updated when view height changes - * [QTBUG-13176] Avoid Flickable view jumping when drag threashold is exceeded - * [QTBUG-13078] Fix poor flicking behavior with slower flicks - * Handle QGraphicsWidgets in Flickable + * [QTBUG-13095] Ensure Flickable visibleArea is updated when view height + changes. + * [QTBUG-13176] Avoid Flickable view jumping when drag threashold is + exceeded. + * [QTBUG-13078] Fix poor flicking behavior with slower flicks. + * Handle QGraphicsWidgets in Flickable. - FocusScope - * [QTBUG-12649] Make sure onFocusChanged is correctly emitted for items in a FocusScope. + * [QTBUG-12649] Make sure onFocusChanged is correctly emitted for items + in a FocusScope. - FontLoader - * [QTBUG-13419] Don't add the same font to the font database multiple times + * [QTBUG-13419] Don't add the same font to the font database multiple + times. + - Image + * [QTBUG-13454] Changing the Image 'source' no longer goes through the + 'Loading' state if the image is cached. + * [QTBUG-13383] Do not reset sourceSize when changing image source url. + * [QTBUG-13002] Setting one dimension of the sourceSize should set the other + dimension. + * [QTBUG-12302] Fix remote image url redirects are done in the right thread. + * Ensure all image states are updated before emitting statusChanged signals. - ListModel - * [QTBUG-12363] Modifying an object returned by ListModel.get(0) didn't update the view - * [QTBUG-13666] Calling set() and setProperty() on ListModel from a WorkerScript didn't update the view - * Fix Worker ListModel to emit the right signal when items change - * Fix crash with invalid role indexes - * improved ListModel error messages + * [QTBUG-12363] Modifying an object returned by ListModel.get(0) didn't + update the view. + * [QTBUG-13666] Calling set() and setProperty() on ListModel from a + WorkerScript didn't update the view. + * Fix Worker ListModel to emit the right signal when items change. + * Fix crash with invalid role indexes. + * improved ListModel error messages. - ListView - * [QTBUG-13664] Models with a single role didn't always update correctly - * [QTBUG-13543] Ensure flickable velocity is updated when view is moved by setCurrentIndex - * [QTBUG-12664] Ensure highlight is positioned correctly in positionViewAtIndex() - * [QTBUG-13166] Fix ListView.view attached property with VisualItemModel - * [QTBUG-13039] Fix crash in synchronization of ListModel in WorkerThread - * [QTBUG-11341] Flicking a ListView sometimes made it loose focus - * [QTBUG-13166] ListView.view property should not be writable + * [QTBUG-13664] Models with a single role didn't always update correctly. + * [QTBUG-13543] Ensure flickable velocity is updated when view is moved by + setCurrentIndex. + * [QTBUG-12664] Ensure highlight is positioned correctly in + positionViewAtIndex(). + * [QTBUG-13166] Fix ListView.view attached property with VisualItemModel. + * [QTBUG-13039] Fix crash in synchronization of ListModel in WorkerThread. + * [QTBUG-11341] Flicking a ListView sometimes made it lose focus. + * [QTBUG-13166] ListView.view property should not be writable. + - MouseArea + * [QTBUG-12250] When onDoubleClicked: is handled don't emit a second + onPressed/onClicked. + - NumberAnimation + * [QTBUG-12805] Clear previous animation data for non-triggering animations. + - ParentChange + * [QTBUG-13554] ParentChange fails to apply rotation changes of exactly 180 + degrees. - PathView - * [QTBUG-13689] Moving items in a PathView caused PathView.onPath to be set to false - * [QTBUG-13687] PathView didn't accept mouse events, preventing it from working in a Flickable - * [QTBUG-13416] Fix PathView item position on insertion and removal - * [QTBUG-13017] Fix PathView when setting an empty model that is later filled - * [QTBUG-12747] PathView required some diagonal movement before a drag was initiated + * [QTBUG-13689] Moving items in a PathView caused PathView.onPath to be set + to false. + * [QTBUG-13687] PathView didn't accept mouse events, preventing it from + working in a Flickable. + * [QTBUG-13416] Fix PathView item position on insertion and removal. + * [QTBUG-13017] Fix PathView when setting an empty model that is later + filled. + * [QTBUG-12747] PathView required some diagonal movement before a drag was + initiated. - Positioners - * made positioners work with QGraphicsWidgets + * made positioners work with QGraphicsWidgets. - PropertyChanges - * [QTBUG-12559] Correctly apply PropertyChanges when entering an extended state directly from the base state - - VisualDataModel - * [QTBUG-13754] Fixed a crash when updating a property in ListModel with multiple roles - * [QTBUG-13038] Fix VisualDataModel model update handling when rootIndex is specified - * [QTBUG-13146] Handle layoutChanged() properly in QML views - - XmlListModel - * [QTBUG-13041] XmlListModel thread was left hanging on Symbian application exit - - ParentChange - * [QTBUG-13554] ParentChange fails to apply rotation changes of exactly 180 degrees - - MouseArea - * [QTBUG-12250] When onDoubleClicked: is handled don't emit a second onPressed/onClicked - - Image - * [QTBUG-13454] Changing the Image 'source' no longer goes through the 'Loading' state if the image is cached. - * [QTBUG-13383] Do not reset sourceSize when changing image source url - * [QTBUG-13002] Setting one dimension of the sourceSize should set the other dimensio - * [QTBUG-12302] Fix remote image url redirects are done in the right thread - * Ensure all image states are updated before emitting statusChanged signals - - NumberAnimation - * [QTBUG-12805] Clear previous animation data for non-triggering animations + * [QTBUG-12559] Correctly apply PropertyChanges when entering an extended + state directly from the base state. + - QDeclarativeImageProvider: + * Fixed memory leak. + * Improved concurrency when using in asynchronus mode. - Repeater - * [QTBUG-12905] Emit countChanged where appropriate in Repeater + * [QTBUG-12905] Emit countChanged where appropriate in Repeater. - SmoothedAnimation - * [QTBUG-12336] Update running animations if a SmoothedAnimation is changed + * [QTBUG-12336] Update running animations if a SmoothedAnimation is changed. - SpringAnimation - * [QTBUG-13044] SpringAnimation velocity animation stop logic was fragile + * [QTBUG-13044] SpringAnimation velocity animation stop logic was fragile. - Text - * [QTBUG-13453] Fix jerky scrolling caused by unnecessary repaints of Text element - * [QTBUG-13142] Fix alignment of shadow for rich text when using text styles - * [QTBUG-11002] Improve QML text rendering when LCD smoothing is enabled for OS X + * [QTBUG-13453] Fix jerky scrolling caused by unnecessary repaints of Text + element. + * [QTBUG-13142] Fix alignment of shadow for rich text when using text + styles. + * [QTBUG-11002] Improve QML text rendering when LCD smoothing is enabled + for OS X. - TextInput - * [QTBUG-11127] Fix autoScroll implementation - - XmlHttpRequest - * [QTBUG-13117] Fix responseText to check the charset encoding field and also to not assume that the data is xml + * [QTBUG-11127] Fix autoScroll implementation. + - VisualDataModel + * [QTBUG-13754] Fixed a crash when updating a property in ListModel with + multiple roles. + * [QTBUG-13038] Fix VisualDataModel model update handling when rootIndex is + specified. + * [QTBUG-13146] Handle layoutChanged() properly in QML views. - WebView - * [QTBUG-13342] Ensure WebView gets focus when an editable node is clicked on - - QDeclarativeImageProvider: - * Fixed memory leak - * Improved concurrency when using in assynchronus mode. + * [QTBUG-13342] Ensure WebView gets focus when an editable node is clicked. + - XmlHttpRequest + * [QTBUG-13117] Fix responseText to check the charset encoding field and + also to not assume that the data is xml. + - XmlListModel + * [QTBUG-13041] XmlListModel thread was left hanging on Symbian application + exit. + Qt Plugins ---------- - - Jpeg image IO plugin * [QTBUG-13653] Fixed infinite loop when loading jpeg without EOI marker from memory. @@ -275,15 +290,16 @@ Qt for Unix (X11 and Mac OS X) Qt for Linux/X11 ---------------- - - The configure script now detects all vector extensions of x86 and x86_64 + - The configure script now detects all vector extensions of x86 and x86_64. Qt for Windows -------------- - Event System: - * [QTBUG-12721] Fix Qt applications freezing until mouse/keyboard events occur. + * [QTBUG-12721] Fix Qt applications freezing until mouse/keyboard events + occur. - Drag & Drop: - * [QTBUG-13787] Fixed a possible crash with mingw + * [QTBUG-13787] Fixed a possible crash with mingw. - QPrinter * [QTBUG-12263] Strokes were in some cases not printed with the correct @@ -303,7 +319,6 @@ Qt for Mac OS X Qt for Symbian -------------- - - configure * [QTBUG-4586] Fixed wrong paths in include/ActiveQt/headers.pri. * [QTBUG-11671] Fixed audio-backend detection in configure tests. @@ -319,21 +334,27 @@ Qt for Symbian * [QTBUG-13081] vc[x]proj generators: support /MAP option without file name. * [QTBUG-13902] Added support for unsigned smart installer package creation. - * [QTBUG-13991] No longer need to manually edit smart installer pkg file for publishing. + * [QTBUG-13991] No longer need to manually edit smart installer pkg file for + publishing. * [QT-3949] Load environment.prf from Symbian SDK if it exists there. - * [QTBUG-13499] Provide a way to compile with RVCT 4.0 using generated Makefile. + * [QTBUG-13499] Provide a way to compile with RVCT 4.0 using generated + Makefile. * [QTBUG-13336] Ignore MAKEFILE variable for Symbian abld and sbsv2 builds. - * [QTBUG-13363] Fix Symbian handling of projects with special characters in TARGET. + * [QTBUG-13363] Fix Symbian handling of projects with special characters in + TARGET. * [QTBUG-12762 & QTBUG-13307] Gcce building support for symbian-sbsv2 * [QTBUG-13147] Added support for DEPLOYMENT.pkg_build_version * [QTBUG-12884] Fix "installer_sis" and "deploy" targets when TARGET has path. * [QTBUG-12879] Fix check to remove unnecessary deployments in Symbian. * [QTBUG-12716] Make bld.inf target in Symbian mkspecs to depend on .pro file. - * [QTBUG-12715] Rename Symbian generated mmp/mk files to include target in filename. - * [QTBUG-12617] Fix package header in cases where VERSION doesn't contain all values. + * [QTBUG-12715] Rename Symbian generated mmp/mk files to include target in + filename. + * [QTBUG-12617] Fix package header in cases where VERSION doesn't contain all + values. * Fix run and runonphone targets for projects that have TARGET with path. * Fix QT_LIBINFIX for QT_PLUGINS_BASE_DIR. - * No longer require PRE_TARGETDEPS items to be absolute for symbian-sbsv2 mkspec. + * No longer require PRE_TARGETDEPS items to be absolute for symbian-sbsv2 + mkspec. * Do smart command replacement for commands containing $$QMAKE_* command variables, such as $$QMAKE_COPY, when generating bld.inf extensions for QMAKE_EXTRA_* variables for symbian-sbsv2 mkspec. @@ -364,7 +385,8 @@ Qt for Symbian Check S60_VERSION instead of existence of certain files in bearer plugin. - Demos & Examples - * [QTBUG-13461] Remove some .pro statements left behind after IAP usage cleanup + * [QTBUG-13461] Remove some .pro statements left behind after IAP usage + cleanup. * [QTBUG-12276] Assigned valid UID3 for fortuneserver example. Qt for Windows CE @@ -372,25 +394,21 @@ Qt for Windows CE - Gui * [QTBUG-8408] Show the [X] button on Windows mobile when maximizing. + **************************************************************************** * Tools * **************************************************************************** - - Designer - - uic - * Improve warnings and error reports + * Improve warnings and error reports. - moc - * Show an error if NOTIFY refer to a wrong signal in Q_PROPERTY + * Show an error if NOTIFY refer to a wrong signal in Q_PROPERTY. - QML Viewer - * [QTBUG-13347] Paused orientation sensors in Qml Viewer when the application window is not active to save device battery - * [QTBUG-11019] Add a menu option to open remote files in the QML viewer - * QML Viewer is deployed under QtDemos folder instead of QtExamples folder in Symbian application menu - -**************************************************************************** -* Important Behavior Changes * -**************************************************************************** - + * [QTBUG-13347] Paused orientation sensors in Qml Viewer when the + application window is not active to save device battery. + * [QTBUG-11019] Add a menu option to open remote files in the QML viewer. + * QML Viewer is deployed under QtDemos folder instead of QtExamples + folder in Symbian application menu. -- cgit v0.12 From 88c9c3c1d8db356e69573c626618a979ac005b21 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Fri, 15 Oct 2010 13:37:49 +1000 Subject: Actually call update in the Text Element Task-number: QTBUG-14469 Reviewed-by: Aaron Kennedy --- src/declarative/graphicsitems/qdeclarativetext.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index 22282d2..0717b78 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -270,6 +270,7 @@ void QDeclarativeTextPrivate::updateSize() internalWidthUpdate = false; q->setImplicitHeight(size.height()); emit q->paintedSizeChanged(); + q->update(); } /*! -- cgit v0.12 From 671e13acdd0b5b65e1842bad7e47d2f8c170f586 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Fri, 15 Oct 2010 13:36:02 +1000 Subject: Cleanup changelog for 4.7.1. (cherry picked from commit eb625b3112c241047e8d08146b63545165d33ebf) --- dist/changes-4.7.1 | 328 ++++++++++++++++++++++++++++------------------------- 1 file changed, 173 insertions(+), 155 deletions(-) diff --git a/dist/changes-4.7.1 b/dist/changes-4.7.1 index 51a10a3..b25b95c 100644 --- a/dist/changes-4.7.1 +++ b/dist/changes-4.7.1 @@ -13,7 +13,6 @@ corresponding to tasks in the Qt Bug Tracker, the (now obsolete) Task Tracker, or the Merge Request queue of the public source repository. Qt Bug Tracker: http://bugreports.qt.nokia.com -Task Tracker: http://qt.nokia.com/developer/task-tracker Merge Request: http://qt.gitorious.org **************************************************************************** @@ -31,8 +30,6 @@ Optimizations - On x86 and 86_64, the memory access has been improved for alpha blending and for some composition functions. - * See list of Important Behavior Changes below - **************************************************************************** * Library * @@ -42,69 +39,68 @@ QtCore ------ - Containers - * [QTBUG-13079] Fix assingment of a container included in the container itself + * [QTBUG-13079] Fix assignment of a container included in the container + itself. - - QLibrary - * [QT-3825] System libraries are only loaded from the system directories + - QEventDispatcherUnix + * [QTBUG-13633] Do not process too many timer events if other events need + to be processed first. + - QLibrary + * [QT-3825] System libraries are only loaded from the system directories. - QUuid - * [QTBUG-11213] QUuid::createUuid() should not generate identical sequences on UNIX - - - QEventDispatcherUnix - * [QTBUG-13633] Do not process too many timer events if other events need - to be processed first + * [QTBUG-11213] QUuid::createUuid() should not generate identical sequences + on UNIX. QtGui ----- - - QGraphicsWidget - * [QTBUG-13188] Make sure a font that has propagated from a parent can - be set on a QPainter. - * [QT-3808] Issues when applying effects in combination with ItemHasNoContents flag. + - QGraphicsEffect + * [QT-3633] Wrong bounding rect. - QGraphicsItem * [QTBUG-3633, QT-3828] Wrong children bounding rect when applying effects. - - QGraphicsEffect - * [QT-3633] Wrong bounding rect. - - QGraphicsScene * [QT-3674] Spurious assert triggered from render(). + - QGraphicsWidget + * [QTBUG-13188] Make sure a font that has propagated from a parent can + be set on a QPainter. + * [QT-3808] Issues when applying effects in combination with + ItemHasNoContents flag. + + - QGtkStyle + * [QTBUG-13125] Fixed a regression with custom itemview background color. + + - QLineEdit + * [QTBUG-13520] Fixed the scrolling of text with right alignment. + - QPainter * [QTBUG-13429] Fixed scale point drawing with square cap in the raster engine, plus some potential floating point overflows in the rasterizer. * Optimized pixmap drawing with SmoothPixmapTransform. - - QStaticText - * [QTBUG-12614] Fix crash with zero-width string. - * [QTBUG-12540] Fix rendering of large glyphs with OpenGL2 paint engine. - - - QPinchGesture * The scaleFactor and totalScaleFactor now represent a value that allows an object to track a touchpoint during a Pinch Gesture even when using sequences for zooming. - Therefor the scale factors are initialized to 1.0 and for every new + Therefore the scale factors are initialized to 1.0 and for every new sequence the totalScaleFactor is multiplied with the scaleFactor of the new sequence. - - QLineEdit - * [QTBUG-13520] Fixed the scrolling of text with right alignment - - QPixmap - * [QTBUG-12560] Fixed a regression preventing loading images without extensions + * [QTBUG-12560] Fixed a regression preventing loading images without + extensions. - - QTreeView - * [QTBUG-13567] Do not scroll to top if last item is removed - - - QGtkStyle - * [QTBUG-13125] Fixed a regression with custom itemview background color. + - QStaticText + * [QTBUG-12614] Fix crash with zero-width string. + * [QTBUG-12540] Fix rendering of large glyphs with OpenGL2 paint engine. -QtDBus ------- + - QTreeView + * [QTBUG-13567] Do not scroll to top if last item is removed. QtMultimedia @@ -115,151 +111,170 @@ QtMultimedia * [QTBUG-11883] Fixed segmentation fault when closing a QAudioInput or QAudioOutput. + QtNetwork --------- - - QSslConfiguration - * [QTBUG-13265] fix crash with empty configuration - - QSslCertificate - * [QTBUG-12489] support dates > 2049 - Bearer Management * Improved reliability on Symbian and Maemo. * Added connman/meego backend. - IPv6 - * Disable on Symbian until OpenC properly supports it + * Disable on Symbian until OpenC properly supports it. + - QSslConfiguration + * [QTBUG-13265] Fixed crash with empty configuration. + - QSslCertificate + * [QTBUG-12489] Support dates > 2049. - QNetworkAccessManager - * [QTBUG-12285] Crash fix related to aborted uploads + * [QTBUG-12285] Crash fix related to aborted uploads. QtOpenGL -------- - QGL2PaintEngineEx * Fixed drawing a large number of glyphs with the same font on systems - with small texure size limits. - -QtOpenVG --------- - - -QtWebKit --------- - - -QtSql ------ - + with small texture size limits. -QtSvg ------ QtXml ----- * Fixed a crash when parsing invalid tag names. + QtXmlPatterns ------------- - XML Schema internals: - * [QTBUG-11559] Only parse 3 digits of time fraction + * [QTBUG-11559] Only parse 3 digits of time fraction. + QtDeclarative ------------- - QML language - * [QTBUG-13799] QML core module renamed to QtQuick to decouple it from Qt releases. - Old "import Qt 4.7" will co-exist with "import QtQuick 1.0' at least during Qt 4.7 releases. - * [QTBUG-13047] Support passing QObject derived types to QML methods - * [QTBUG-12837] Support JS "in" operator on QML objects - * [QTBUG-13045] Prevent calling deleteLater() from QML - * [QTBUG-13043] Ignore non-scriptable properties in QML - * [QTBUG-13114] Don't double call classBegin() - * [QTBUG-12946] Ensure the onDestruction handlers are called before the expressions are cleared - * [QTBUG-12599] Re-enabled script program caching on Symbian - * [QTBUG-13374] Don't modify the signal order on the second dynamic meta object pass - * Support for qsTrId and meta-data in comments for QML - - QML debugging: + * [QTBUG-13799] QML core module renamed to QtQuick to decouple it from Qt + releases. Old "import Qt 4.7" will co-exist with "import QtQuick 1.0' at + least during Qt 4.7 releases. + * [QTBUG-13047] Support passing QObject derived types to QML methods. + * [QTBUG-12837] Support JS "in" operator on QML objects. + * [QTBUG-13045] Prevent calling deleteLater() from QML. + * [QTBUG-13043] Ignore non-scriptable properties in QML. + * [QTBUG-13114] Don't double call classBegin(). + * [QTBUG-12946] Ensure the onDestruction handlers are called before the + expressions are cleared. + * [QTBUG-12599] Re-enabled script program caching on Symbian. + * [QTBUG-13374] Don't modify the signal order on the second dynamic meta + object pass. + * Support for qsTrId and meta-data in comments for QML. + - QML debugging * [QTBUG-5162] The debugger is now activated with -qmljsdebugger command - line arg to enable support for platforms without environment variables - * Various improvements to ease debugging in creator + line arg to enable support for platforms without environment variables. + * Various improvements to ease debugging in creator. - AnchorAnimation - * [QTBUG-13398] Fix AnchorAnimation for multiple AnchorChanges with dependancies + * [QTBUG-13398] Fix AnchorAnimation for multiple AnchorChanges with + dependancies. - AnchorChanges - * [QTBUG-11834] Restore any absolute geometry changed by AnchorChanges when returning to the base state + * [QTBUG-11834] Restore any absolute geometry changed by AnchorChanges when + returning to the base state. - Component - * [QTBUG-13170] Complete Component::createObject() creation after setting the parent + * [QTBUG-13170] Complete Component::createObject() creation after setting + the parent. - GridView - * [QTBUG-13166] GridView.view property should not be writable + * [QTBUG-13166] GridView.view property should not be writable. - Flickable - * [QTBUG-13095] Ensure Flickable visibleArea is updated when view height changes - * [QTBUG-13176] Avoid Flickable view jumping when drag threashold is exceeded - * [QTBUG-13078] Fix poor flicking behavior with slower flicks - * Handle QGraphicsWidgets in Flickable + * [QTBUG-13095] Ensure Flickable visibleArea is updated when view height + changes. + * [QTBUG-13176] Avoid Flickable view jumping when drag threashold is + exceeded. + * [QTBUG-13078] Fix poor flicking behavior with slower flicks. + * Handle QGraphicsWidgets in Flickable. - FocusScope - * [QTBUG-12649] Make sure onFocusChanged is correctly emitted for items in a FocusScope. + * [QTBUG-12649] Make sure onFocusChanged is correctly emitted for items + in a FocusScope. - FontLoader - * [QTBUG-13419] Don't add the same font to the font database multiple times + * [QTBUG-13419] Don't add the same font to the font database multiple + times. + - Image + * [QTBUG-13454] Changing the Image 'source' no longer goes through the + 'Loading' state if the image is cached. + * [QTBUG-13383] Do not reset sourceSize when changing image source url. + * [QTBUG-13002] Setting one dimension of the sourceSize should set the other + dimension. + * [QTBUG-12302] Fix remote image url redirects are done in the right thread. + * Ensure all image states are updated before emitting statusChanged signals. - ListModel - * [QTBUG-12363] Modifying an object returned by ListModel.get(0) didn't update the view - * [QTBUG-13666] Calling set() and setProperty() on ListModel from a WorkerScript didn't update the view - * Fix Worker ListModel to emit the right signal when items change - * Fix crash with invalid role indexes - * improved ListModel error messages + * [QTBUG-12363] Modifying an object returned by ListModel.get(0) didn't + update the view. + * [QTBUG-13666] Calling set() and setProperty() on ListModel from a + WorkerScript didn't update the view. + * Fix Worker ListModel to emit the right signal when items change. + * Fix crash with invalid role indexes. + * improved ListModel error messages. - ListView - * [QTBUG-13664] Models with a single role didn't always update correctly - * [QTBUG-13543] Ensure flickable velocity is updated when view is moved by setCurrentIndex - * [QTBUG-12664] Ensure highlight is positioned correctly in positionViewAtIndex() - * [QTBUG-13166] Fix ListView.view attached property with VisualItemModel - * [QTBUG-13039] Fix crash in synchronization of ListModel in WorkerThread - * [QTBUG-11341] Flicking a ListView sometimes made it loose focus - * [QTBUG-13166] ListView.view property should not be writable + * [QTBUG-13664] Models with a single role didn't always update correctly. + * [QTBUG-13543] Ensure flickable velocity is updated when view is moved by + setCurrentIndex. + * [QTBUG-12664] Ensure highlight is positioned correctly in + positionViewAtIndex(). + * [QTBUG-13166] Fix ListView.view attached property with VisualItemModel. + * [QTBUG-13039] Fix crash in synchronization of ListModel in WorkerThread. + * [QTBUG-11341] Flicking a ListView sometimes made it lose focus. + * [QTBUG-13166] ListView.view property should not be writable. + - MouseArea + * [QTBUG-12250] When onDoubleClicked: is handled don't emit a second + onPressed/onClicked. + - NumberAnimation + * [QTBUG-12805] Clear previous animation data for non-triggering animations. + - ParentChange + * [QTBUG-13554] ParentChange fails to apply rotation changes of exactly 180 + degrees. - PathView - * [QTBUG-13689] Moving items in a PathView caused PathView.onPath to be set to false - * [QTBUG-13687] PathView didn't accept mouse events, preventing it from working in a Flickable - * [QTBUG-13416] Fix PathView item position on insertion and removal - * [QTBUG-13017] Fix PathView when setting an empty model that is later filled - * [QTBUG-12747] PathView required some diagonal movement before a drag was initiated + * [QTBUG-13689] Moving items in a PathView caused PathView.onPath to be set + to false. + * [QTBUG-13687] PathView didn't accept mouse events, preventing it from + working in a Flickable. + * [QTBUG-13416] Fix PathView item position on insertion and removal. + * [QTBUG-13017] Fix PathView when setting an empty model that is later + filled. + * [QTBUG-12747] PathView required some diagonal movement before a drag was + initiated. - Positioners - * made positioners work with QGraphicsWidgets + * made positioners work with QGraphicsWidgets. - PropertyChanges - * [QTBUG-12559] Correctly apply PropertyChanges when entering an extended state directly from the base state - - VisualDataModel - * [QTBUG-13754] Fixed a crash when updating a property in ListModel with multiple roles - * [QTBUG-13038] Fix VisualDataModel model update handling when rootIndex is specified - * [QTBUG-13146] Handle layoutChanged() properly in QML views - - XmlListModel - * [QTBUG-13041] XmlListModel thread was left hanging on Symbian application exit - - ParentChange - * [QTBUG-13554] ParentChange fails to apply rotation changes of exactly 180 degrees - - MouseArea - * [QTBUG-12250] When onDoubleClicked: is handled don't emit a second onPressed/onClicked - - Image - * [QTBUG-13454] Changing the Image 'source' no longer goes through the 'Loading' state if the image is cached. - * [QTBUG-13383] Do not reset sourceSize when changing image source url - * [QTBUG-13002] Setting one dimension of the sourceSize should set the other dimensio - * [QTBUG-12302] Fix remote image url redirects are done in the right thread - * Ensure all image states are updated before emitting statusChanged signals - - NumberAnimation - * [QTBUG-12805] Clear previous animation data for non-triggering animations + * [QTBUG-12559] Correctly apply PropertyChanges when entering an extended + state directly from the base state. + - QDeclarativeImageProvider: + * Fixed memory leak. + * Improved concurrency when using in asynchronus mode. - Repeater - * [QTBUG-12905] Emit countChanged where appropriate in Repeater + * [QTBUG-12905] Emit countChanged where appropriate in Repeater. - SmoothedAnimation - * [QTBUG-12336] Update running animations if a SmoothedAnimation is changed + * [QTBUG-12336] Update running animations if a SmoothedAnimation is changed. - SpringAnimation - * [QTBUG-13044] SpringAnimation velocity animation stop logic was fragile + * [QTBUG-13044] SpringAnimation velocity animation stop logic was fragile. - Text - * [QTBUG-13453] Fix jerky scrolling caused by unnecessary repaints of Text element - * [QTBUG-13142] Fix alignment of shadow for rich text when using text styles - * [QTBUG-11002] Improve QML text rendering when LCD smoothing is enabled for OS X + * [QTBUG-13453] Fix jerky scrolling caused by unnecessary repaints of Text + element. + * [QTBUG-13142] Fix alignment of shadow for rich text when using text + styles. + * [QTBUG-11002] Improve QML text rendering when LCD smoothing is enabled + for OS X. - TextInput - * [QTBUG-11127] Fix autoScroll implementation - - XmlHttpRequest - * [QTBUG-13117] Fix responseText to check the charset encoding field and also to not assume that the data is xml + * [QTBUG-11127] Fix autoScroll implementation. + - VisualDataModel + * [QTBUG-13754] Fixed a crash when updating a property in ListModel with + multiple roles. + * [QTBUG-13038] Fix VisualDataModel model update handling when rootIndex is + specified. + * [QTBUG-13146] Handle layoutChanged() properly in QML views. - WebView - * [QTBUG-13342] Ensure WebView gets focus when an editable node is clicked on - - QDeclarativeImageProvider: - * Fixed memory leak - * Improved concurrency when using in assynchronus mode. + * [QTBUG-13342] Ensure WebView gets focus when an editable node is clicked. + - XmlHttpRequest + * [QTBUG-13117] Fix responseText to check the charset encoding field and + also to not assume that the data is xml. + - XmlListModel + * [QTBUG-13041] XmlListModel thread was left hanging on Symbian application + exit. + Qt Plugins ---------- - - Jpeg image IO plugin * [QTBUG-13653] Fixed infinite loop when loading jpeg without EOI marker from memory. @@ -275,15 +290,16 @@ Qt for Unix (X11 and Mac OS X) Qt for Linux/X11 ---------------- - - The configure script now detects all vector extensions of x86 and x86_64 + - The configure script now detects all vector extensions of x86 and x86_64. Qt for Windows -------------- - Event System: - * [QTBUG-12721] Fix Qt applications freezing until mouse/keyboard events occur. + * [QTBUG-12721] Fix Qt applications freezing until mouse/keyboard events + occur. - Drag & Drop: - * [QTBUG-13787] Fixed a possible crash with mingw + * [QTBUG-13787] Fixed a possible crash with mingw. - QPrinter * [QTBUG-12263] Strokes were in some cases not printed with the correct @@ -303,7 +319,6 @@ Qt for Mac OS X Qt for Symbian -------------- - - configure * [QTBUG-4586] Fixed wrong paths in include/ActiveQt/headers.pri. * [QTBUG-11671] Fixed audio-backend detection in configure tests. @@ -319,21 +334,27 @@ Qt for Symbian * [QTBUG-13081] vc[x]proj generators: support /MAP option without file name. * [QTBUG-13902] Added support for unsigned smart installer package creation. - * [QTBUG-13991] No longer need to manually edit smart installer pkg file for publishing. + * [QTBUG-13991] No longer need to manually edit smart installer pkg file for + publishing. * [QT-3949] Load environment.prf from Symbian SDK if it exists there. - * [QTBUG-13499] Provide a way to compile with RVCT 4.0 using generated Makefile. + * [QTBUG-13499] Provide a way to compile with RVCT 4.0 using generated + Makefile. * [QTBUG-13336] Ignore MAKEFILE variable for Symbian abld and sbsv2 builds. - * [QTBUG-13363] Fix Symbian handling of projects with special characters in TARGET. + * [QTBUG-13363] Fix Symbian handling of projects with special characters in + TARGET. * [QTBUG-12762 & QTBUG-13307] Gcce building support for symbian-sbsv2 * [QTBUG-13147] Added support for DEPLOYMENT.pkg_build_version * [QTBUG-12884] Fix "installer_sis" and "deploy" targets when TARGET has path. * [QTBUG-12879] Fix check to remove unnecessary deployments in Symbian. * [QTBUG-12716] Make bld.inf target in Symbian mkspecs to depend on .pro file. - * [QTBUG-12715] Rename Symbian generated mmp/mk files to include target in filename. - * [QTBUG-12617] Fix package header in cases where VERSION doesn't contain all values. + * [QTBUG-12715] Rename Symbian generated mmp/mk files to include target in + filename. + * [QTBUG-12617] Fix package header in cases where VERSION doesn't contain all + values. * Fix run and runonphone targets for projects that have TARGET with path. * Fix QT_LIBINFIX for QT_PLUGINS_BASE_DIR. - * No longer require PRE_TARGETDEPS items to be absolute for symbian-sbsv2 mkspec. + * No longer require PRE_TARGETDEPS items to be absolute for symbian-sbsv2 + mkspec. * Do smart command replacement for commands containing $$QMAKE_* command variables, such as $$QMAKE_COPY, when generating bld.inf extensions for QMAKE_EXTRA_* variables for symbian-sbsv2 mkspec. @@ -364,7 +385,8 @@ Qt for Symbian Check S60_VERSION instead of existence of certain files in bearer plugin. - Demos & Examples - * [QTBUG-13461] Remove some .pro statements left behind after IAP usage cleanup + * [QTBUG-13461] Remove some .pro statements left behind after IAP usage + cleanup. * [QTBUG-12276] Assigned valid UID3 for fortuneserver example. Qt for Windows CE @@ -372,25 +394,21 @@ Qt for Windows CE - Gui * [QTBUG-8408] Show the [X] button on Windows mobile when maximizing. + **************************************************************************** * Tools * **************************************************************************** - - Designer - - uic - * Improve warnings and error reports + * Improve warnings and error reports. - moc - * Show an error if NOTIFY refer to a wrong signal in Q_PROPERTY + * Show an error if NOTIFY refer to a wrong signal in Q_PROPERTY. - QML Viewer - * [QTBUG-13347] Paused orientation sensors in Qml Viewer when the application window is not active to save device battery - * [QTBUG-11019] Add a menu option to open remote files in the QML viewer - * QML Viewer is deployed under QtDemos folder instead of QtExamples folder in Symbian application menu - -**************************************************************************** -* Important Behavior Changes * -**************************************************************************** - + * [QTBUG-13347] Paused orientation sensors in Qml Viewer when the + application window is not active to save device battery. + * [QTBUG-11019] Add a menu option to open remote files in the QML viewer. + * QML Viewer is deployed under QtDemos folder instead of QtExamples + folder in Symbian application menu. -- cgit v0.12 From 98161f191ba6f3353404c61829e88419d7c4688a Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Thu, 14 Oct 2010 15:21:28 +0200 Subject: Workaround for QFileSystemWatcher regression Don't call removePath() when it was not added before. Reviewed-by: con Task-number: QTBUG-14435 (cherry picked from commit f38e8394eae20f7290688629ab66720ebacd64c9) --- tools/designer/src/lib/shared/qtresourcemodel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/designer/src/lib/shared/qtresourcemodel.cpp b/tools/designer/src/lib/shared/qtresourcemodel.cpp index 709f389..e3fc805 100644 --- a/tools/designer/src/lib/shared/qtresourcemodel.cpp +++ b/tools/designer/src/lib/shared/qtresourcemodel.cpp @@ -428,10 +428,10 @@ void QtResourceModelPrivate::removeOldPaths(QtResourceSet *resourceSet, const QS void QtResourceModelPrivate::setWatcherEnabled(const QString &path, bool enable) { - m_fileWatcher->removePath(path); - - if (!enable) + if (!enable) { + m_fileWatcher->removePath(path); return; + } QFileInfo fi(path); if (fi.exists()) -- cgit v0.12 From f2b11f645531ec5c31c839faa933cebde1440c8e Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 15 Oct 2010 14:17:31 +1000 Subject: Additional autotests for VisualDataModel. --- .../data/modelproperties.qml | 17 ++++ .../data/modelproperties2.qml | 17 ++++ .../tst_qdeclarativevisualdatamodel.cpp | 108 +++++++++++++++++++++ 3 files changed, 142 insertions(+) create mode 100644 tests/auto/declarative/qdeclarativevisualdatamodel/data/modelproperties.qml create mode 100644 tests/auto/declarative/qdeclarativevisualdatamodel/data/modelproperties2.qml diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/data/modelproperties.qml b/tests/auto/declarative/qdeclarativevisualdatamodel/data/modelproperties.qml new file mode 100644 index 0000000..8cd5763 --- /dev/null +++ b/tests/auto/declarative/qdeclarativevisualdatamodel/data/modelproperties.qml @@ -0,0 +1,17 @@ +import QtQuick 1.0 + +ListView { + model: myModel + delegate: Item { + objectName: "delegate" + property variant test1: name + property variant test2: model.name + property variant test3: modelData + property variant test4: model.modelData + property variant test5: modelData.name + property variant test6: model + property variant test7: index + property variant test8: model.index + property variant test9: model.modelData.name + } +} diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/data/modelproperties2.qml b/tests/auto/declarative/qdeclarativevisualdatamodel/data/modelproperties2.qml new file mode 100644 index 0000000..67721c9 --- /dev/null +++ b/tests/auto/declarative/qdeclarativevisualdatamodel/data/modelproperties2.qml @@ -0,0 +1,17 @@ +import QtQuick 1.0 + +ListView { + model: myModel + delegate: Item { + objectName: "delegate" + property variant test1: display + property variant test2: model.display + property variant test3: modelData + property variant test4: model.modelData + property variant test5: modelData.display + property variant test6: model + property variant test7: index + property variant test8: model.index + property variant test9: model.modelData.display + } +} diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp index d73a872..0aad099 100644 --- a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp +++ b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp @@ -120,6 +120,7 @@ private slots: void childChanged(); void objectListModel(); void singleRole(); + void modelProperties(); private: QDeclarativeEngine engine; @@ -364,6 +365,113 @@ void tst_qdeclarativevisualdatamodel::singleRole() } } +void tst_qdeclarativevisualdatamodel::modelProperties() +{ + { + QDeclarativeView view; + + SingleRoleModel model; + + QDeclarativeContext *ctxt = view.rootContext(); + ctxt->setContextProperty("myModel", &model); + + view.setSource(QUrl::fromLocalFile(SRCDIR "/data/modelproperties.qml")); + + QDeclarativeListView *listview = qobject_cast(view.rootObject()); + QVERIFY(listview != 0); + + QDeclarativeItem *contentItem = listview->contentItem(); + QVERIFY(contentItem != 0); + + QDeclarativeItem *delegate = findItem(contentItem, "delegate", 1); + QCOMPARE(delegate->property("test1").toString(),QString("two")); + QCOMPARE(delegate->property("test2").toString(),QString("two")); + QCOMPARE(delegate->property("test3").toString(),QString("two")); + QCOMPARE(delegate->property("test4").toString(),QString("two")); + QVERIFY(!delegate->property("test9").isValid()); + QCOMPARE(delegate->property("test5").toString(),QString("")); + QVERIFY(delegate->property("test6").value() != 0); + QCOMPARE(delegate->property("test7").toInt(),1); + QCOMPARE(delegate->property("test8").toInt(),1); + } + + { + QDeclarativeView view; + + QList dataList; + dataList.append(new DataObject("Item 1", "red")); + dataList.append(new DataObject("Item 2", "green")); + dataList.append(new DataObject("Item 3", "blue")); + dataList.append(new DataObject("Item 4", "yellow")); + + QDeclarativeContext *ctxt = view.rootContext(); + ctxt->setContextProperty("myModel", QVariant::fromValue(dataList)); + + view.setSource(QUrl::fromLocalFile(SRCDIR "/data/modelproperties.qml")); + + QDeclarativeListView *listview = qobject_cast(view.rootObject()); + QVERIFY(listview != 0); + + QDeclarativeItem *contentItem = listview->contentItem(); + QVERIFY(contentItem != 0); + + QDeclarativeItem *delegate = findItem(contentItem, "delegate", 1); + QCOMPARE(delegate->property("test1").toString(),QString("Item 2")); + QEXPECT_FAIL("", "QTBUG-13576", Continue); + QCOMPARE(delegate->property("test2").toString(),QString("Item 2")); + QVERIFY(qobject_cast(delegate->property("test3").value()) != 0); + QVERIFY(qobject_cast(delegate->property("test4").value()) != 0); + QCOMPARE(delegate->property("test5").toString(),QString("Item 2")); + QCOMPARE(delegate->property("test9").toString(),QString("Item 2")); + QVERIFY(delegate->property("test6").value() != 0); + QCOMPARE(delegate->property("test7").toInt(),1); + QCOMPARE(delegate->property("test8").toInt(),1); + } + + { + QDeclarativeView view; + + QStandardItemModel model; + initStandardTreeModel(&model); + + view.rootContext()->setContextProperty("myModel", &model); + + QUrl source(QUrl::fromLocalFile(SRCDIR "/data/modelproperties2.qml")); + + //3 items, 3 warnings each + QTest::ignoreMessage(QtWarningMsg, source.toString().toLatin1() + ":11: ReferenceError: Can't find variable: modelData"); + QTest::ignoreMessage(QtWarningMsg, source.toString().toLatin1() + ":11: ReferenceError: Can't find variable: modelData"); + QTest::ignoreMessage(QtWarningMsg, source.toString().toLatin1() + ":11: ReferenceError: Can't find variable: modelData"); + QTest::ignoreMessage(QtWarningMsg, source.toString().toLatin1() + ":9: ReferenceError: Can't find variable: modelData"); + QTest::ignoreMessage(QtWarningMsg, source.toString().toLatin1() + ":9: ReferenceError: Can't find variable: modelData"); + QTest::ignoreMessage(QtWarningMsg, source.toString().toLatin1() + ":9: ReferenceError: Can't find variable: modelData"); + QTest::ignoreMessage(QtWarningMsg, source.toString().toLatin1() + ":15: TypeError: Result of expression 'model.modelData' [undefined] is not an object."); + QTest::ignoreMessage(QtWarningMsg, source.toString().toLatin1() + ":15: TypeError: Result of expression 'model.modelData' [undefined] is not an object."); + QTest::ignoreMessage(QtWarningMsg, source.toString().toLatin1() + ":15: TypeError: Result of expression 'model.modelData' [undefined] is not an object."); + + view.setSource(source); + + QDeclarativeListView *listview = qobject_cast(view.rootObject()); + QVERIFY(listview != 0); + + QDeclarativeItem *contentItem = listview->contentItem(); + QVERIFY(contentItem != 0); + + QDeclarativeItem *delegate = findItem(contentItem, "delegate", 1); + QCOMPARE(delegate->property("test1").toString(),QString("Row 2 Item")); + QCOMPARE(delegate->property("test2").toString(),QString("Row 2 Item")); + QVERIFY(!delegate->property("test3").isValid()); + QVERIFY(!delegate->property("test4").isValid()); + QVERIFY(!delegate->property("test5").isValid()); + QVERIFY(!delegate->property("test9").isValid()); + QVERIFY(delegate->property("test6").value() != 0); + QCOMPARE(delegate->property("test7").toInt(),1); + QCOMPARE(delegate->property("test8").toInt(),1); + } + + //### should also test QStringList and QVariantList +} + template T *tst_qdeclarativevisualdatamodel::findItem(QGraphicsObject *parent, const QString &objectName, int index) { -- cgit v0.12 From 6a007684823298721ba2bdb26c8c0f726201547a Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 13 Oct 2010 11:42:10 +0200 Subject: Adjust the parent index for the itemsMoved call. Not doing this causes the parent QModelIndexes to be out of sync with the model. The fix in fe350ca756df6392b3d0b7840351fccc89f9ef6f is extended to also use adjusted indexes in the itemMove call. Merge-request: 849 Reviewed-by: Olivier Goffart (cherry picked from commit 62dc9c9602987f4381481cc5642e3ea0782bb418) --- src/corelib/kernel/qabstractitemmodel.cpp | 8 ++++---- tests/auto/modeltest/dynamictreemodel.cpp | 7 +++++++ tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp | 6 ++++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp index 9a99ea1..05cb271 100644 --- a/src/corelib/kernel/qabstractitemmodel.cpp +++ b/src/corelib/kernel/qabstractitemmodel.cpp @@ -2637,8 +2637,6 @@ void QAbstractItemModel::endMoveRows() QAbstractItemModelPrivate::Change insertChange = d->changes.pop(); QAbstractItemModelPrivate::Change removeChange = d->changes.pop(); - d->itemsMoved(removeChange.parent, removeChange.first, removeChange.last, insertChange.parent, insertChange.first, Qt::Vertical); - QModelIndex adjustedSource = removeChange.parent; QModelIndex adjustedDestination = insertChange.parent; @@ -2649,6 +2647,8 @@ void QAbstractItemModel::endMoveRows() if (removeChange.needsAdjust) adjustedSource = createIndex(adjustedSource.row() + numMoved, adjustedSource.column(), adjustedSource.internalPointer()); + d->itemsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first, Qt::Vertical); + emit rowsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first); emit layoutChanged(); } @@ -2861,8 +2861,6 @@ void QAbstractItemModel::endMoveColumns() QAbstractItemModelPrivate::Change insertChange = d->changes.pop(); QAbstractItemModelPrivate::Change removeChange = d->changes.pop(); - d->itemsMoved(removeChange.parent, removeChange.first, removeChange.last, insertChange.parent, insertChange.first, Qt::Horizontal); - QModelIndex adjustedSource = removeChange.parent; QModelIndex adjustedDestination = insertChange.parent; @@ -2873,6 +2871,8 @@ void QAbstractItemModel::endMoveColumns() if (removeChange.needsAdjust) adjustedSource = createIndex(adjustedSource.row(), adjustedSource.column() + numMoved, adjustedSource.internalPointer()); + d->itemsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first, Qt::Horizontal); + emit columnsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first); emit layoutChanged(); } diff --git a/tests/auto/modeltest/dynamictreemodel.cpp b/tests/auto/modeltest/dynamictreemodel.cpp index b572eb1..fa634b6 100644 --- a/tests/auto/modeltest/dynamictreemodel.cpp +++ b/tests/auto/modeltest/dynamictreemodel.cpp @@ -63,6 +63,13 @@ QModelIndex DynamicTreeModel::index(int row, int column, const QModelIndex &pare QList > childIdColumns = m_childItems.value(parent.internalId()); + const qint64 grandParent = findParentId(parent.internalId()); + if (grandParent >= 0) { + QList > parentTable = m_childItems.value(grandParent); + Q_ASSERT(parent.column() < parentTable.size()); + QList parentSiblings = parentTable.at(parent.column()); + Q_ASSERT(parent.row() < parentSiblings.size()); + } if (childIdColumns.size() == 0) return QModelIndex(); diff --git a/tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp b/tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp index dbcccc9..b723253 100644 --- a/tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp +++ b/tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp @@ -1167,6 +1167,7 @@ void tst_QAbstractItemModel::testMoveToGrandParent_data() // Moving everything from one parent to another QTest::newRow("move12") << 0 << 9 << 10; + QTest::newRow("move13") << 0 << 9 << 0; } void tst_QAbstractItemModel::testMoveToGrandParent() @@ -1314,6 +1315,11 @@ void tst_QAbstractItemModel::testMoveToSibling_data() QTest::newRow("move09") << 8 << 8 << 4; QTest::newRow("move10") << 8 << 8 << 5; QTest::newRow("move11") << 8 << 8 << 6; + + // Move such that the destination parent no longer valid after the move. + // The destination parent is always QMI(5, 0), but after this move the + // row count is 5, so (5, 0) (used internally in QAIM) no longer refers to a valid index. + QTest::newRow("move12") << 0 << 4 << 0; } void tst_QAbstractItemModel::testMoveToSibling() -- cgit v0.12 From c23962debbc856ce8b808c5f1c6e8a9cdd4f5dbe Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Fri, 15 Oct 2010 14:32:01 +1000 Subject: Update some tests to modern syntax --- tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide2.qml | 2 +- tests/auto/declarative/qmlvisual/qdeclarativetext/elide/multilength.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide2.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide2.qml index edf0cb5..b772982 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide2.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/elide2.qml @@ -5,7 +5,7 @@ Rectangle { height: 100 Text { - width: NumberAnimation { from: 500; to: 0; loops: Animation.Infinite; duration: 5000 } + NumberAnimation on width { from: 500; to: 0; loops: Animation.Infinite; duration: 5000 } elide: Text.ElideRight text: 'Here is some very long text that we should truncate when sizing window' } diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/multilength.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/multilength.qml index 6698421..3ef64ef 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/multilength.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/elide/multilength.qml @@ -11,7 +11,7 @@ Rectangle { anchors.centerIn: parent Text { id: myText - width: NumberAnimation { from: 500; to: 0; loops: Animation.Infinite; duration: 1000 } + NumberAnimation on width { from: 500; to: 0; loops: Animation.Infinite; duration: 5000 } elide: "ElideRight" text: "Brevity is the soul of wit, and tediousness the limbs and outward flourishes.\x9CBrevity is a great charm of eloquence.\x9CBe concise!\x9CSHHHHHHHHHHHHHHHHHHHHHHHHHHHH" } -- cgit v0.12 From de8c9d69fa7c7cc50e9a238e58f6e9370f158fc4 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Fri, 15 Oct 2010 14:40:25 +1000 Subject: Keep qmlviewer from disappearing qmlviewer was disappearing if the scene was 0x0. Now it's just unusably small, which is correct as it will highlight the problem to the developer. --- tools/qml/qmlruntime.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index 5e169d8..9f9eba0 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -1518,6 +1518,7 @@ void QDeclarativeViewer::updateSizeHints(bool initial) //qWarning() << "USH: R2V: setting free size "; layout()->setSizeConstraint(QLayout::SetNoConstraint); layout()->activate(); + setMinimumSize(QSize(1,1)); setMaximumSize(QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX)); canvas->setMinimumSize(QSize(0,0)); canvas->setMaximumSize(QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX)); -- cgit v0.12 From eafec04685e0a1e5ea1fe32dbc562c5dfa2abfb1 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Fri, 15 Oct 2010 15:52:05 +1000 Subject: Fix autotest failure caused by commit 92365268 --- doc/src/snippets/declarative/keys/keys-handler.qml | 2 +- doc/src/snippets/declarative/keys/keys-pressed.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/snippets/declarative/keys/keys-handler.qml b/doc/src/snippets/declarative/keys/keys-handler.qml index 9e3a3b4..be0eedb 100644 --- a/doc/src/snippets/declarative/keys/keys-handler.qml +++ b/doc/src/snippets/declarative/keys/keys-handler.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { width: 400; height: 400 diff --git a/doc/src/snippets/declarative/keys/keys-pressed.qml b/doc/src/snippets/declarative/keys/keys-pressed.qml index 523c95b..90a4e37 100644 --- a/doc/src/snippets/declarative/keys/keys-pressed.qml +++ b/doc/src/snippets/declarative/keys/keys-pressed.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { width: 400; height: 400 -- cgit v0.12 From 4c4734cae65b7c5907dc786e02b13b020eb22aaf Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Fri, 15 Oct 2010 16:25:58 +1000 Subject: Allow overloaded methods, and methods with default params, to be called in QML Task-number: QTBUG-11604 --- .../qml/qdeclarativeobjectscriptclass.cpp | 298 ++++++++++++++++++++- .../qml/qdeclarativeobjectscriptclass_p.h | 9 + src/declarative/qml/qdeclarativepropertycache.cpp | 31 ++- .../declarative/qdeclarativeecmascript/testtypes.h | 32 ++- .../tst_qdeclarativeecmascript.cpp | 40 ++- 5 files changed, 382 insertions(+), 28 deletions(-) diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp index 61a1f55..ea92111 100644 --- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp +++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp @@ -838,9 +838,19 @@ QDeclarativeObjectMethodScriptClass::Value QDeclarativeObjectMethodScriptClass:: { MethodData *method = static_cast(o); - if (method->data.flags & QDeclarativePropertyCache::Data::HasArguments) { + if (method->data.relatedIndex == -1) + return callPrecise(method->object, method->data, ctxt); + else + return callOverloaded(method, ctxt); +} - QMetaMethod m = method->object->metaObject()->method(method->data.coreIndex); +QDeclarativeObjectMethodScriptClass::Value +QDeclarativeObjectMethodScriptClass::callPrecise(QObject *object, const QDeclarativePropertyCache::Data &data, + QScriptContext *ctxt) +{ + if (data.flags & QDeclarativePropertyCache::Data::HasArguments) { + + QMetaMethod m = object->metaObject()->method(data.coreIndex); QList argTypeNames = m.parameterTypes(); QVarLengthArray argTypes(argTypeNames.count()); @@ -848,7 +858,7 @@ QDeclarativeObjectMethodScriptClass::Value QDeclarativeObjectMethodScriptClass:: for (int ii = 0; ii < argTypeNames.count(); ++ii) { argTypes[ii] = QMetaType::type(argTypeNames.at(ii)); if (argTypes[ii] == QVariant::Invalid) - argTypes[ii] = enumType(method->object->metaObject(), QString::fromLatin1(argTypeNames.at(ii))); + argTypes[ii] = enumType(object->metaObject(), QString::fromLatin1(argTypeNames.at(ii))); if (argTypes[ii] == QVariant::Invalid) return Value(ctxt, ctxt->throwError(QString::fromLatin1("Unknown method parameter type: %1").arg(QLatin1String(argTypeNames.at(ii))))); } @@ -856,39 +866,301 @@ QDeclarativeObjectMethodScriptClass::Value QDeclarativeObjectMethodScriptClass:: if (argTypes.count() > ctxt->argumentCount()) return Value(ctxt, ctxt->throwError(QLatin1String("Insufficient arguments"))); - QVarLengthArray args(argTypes.count() + 1); - args[0].initAsType(method->data.propType, engine); + return callMethod(object, data.coreIndex, data.propType, argTypes.count(), argTypes.data(), ctxt); + + } else { + + return callMethod(object, data.coreIndex, data.propType, 0, 0, ctxt); + + } +} + +QDeclarativeObjectMethodScriptClass::Value +QDeclarativeObjectMethodScriptClass::callMethod(QObject *object, int index, + int returnType, int argCount, int *argTypes, + QScriptContext *ctxt) +{ + if (argCount > 0) { - for (int ii = 0; ii < argTypes.count(); ++ii) + QVarLengthArray args(argCount + 1); + args[0].initAsType(returnType, engine); + + for (int ii = 0; ii < argCount; ++ii) args[ii + 1].fromScriptValue(argTypes[ii], engine, ctxt->argument(ii)); QVarLengthArray argData(args.count()); for (int ii = 0; ii < args.count(); ++ii) argData[ii] = args[ii].dataPtr(); - QMetaObject::metacall(method->object, QMetaObject::InvokeMetaMethod, method->data.coreIndex, argData.data()); + QMetaObject::metacall(object, QMetaObject::InvokeMetaMethod, index, argData.data()); return args[0].toValue(engine); - } else if (method->data.propType != 0) { - + } else if (returnType != 0) { + MetaCallArgument arg; - arg.initAsType(method->data.propType, engine); + arg.initAsType(returnType, engine); void *args[] = { arg.dataPtr() }; - QMetaObject::metacall(method->object, QMetaObject::InvokeMetaMethod, method->data.coreIndex, args); + QMetaObject::metacall(object, QMetaObject::InvokeMetaMethod, index, args); return arg.toValue(engine); } else { void *args[] = { 0 }; - QMetaObject::metacall(method->object, QMetaObject::InvokeMetaMethod, method->data.coreIndex, args); + QMetaObject::metacall(object, QMetaObject::InvokeMetaMethod, index, args); return Value(); } - return Value(); +} + +/*! +Resolve the overloaded method to call. The algorithm works conceptually like this: + 1. Resolve the set of overloads it is *possible* to call. + Impossible overloads include those that have too many parameters or have parameters + of unknown type. + 2. Filter the set of overloads to only contain those with the closest number of + parameters. + For example, if we are called with 3 parameters and there are 2 overloads that + take 2 parameters and one that takes 3, eliminate the 2 parameter overloads. + 3. Find the best remaining overload based on its match score. + If two or more overloads have the same match score, call the last one. The match + score is constructed by adding the matchScore() result for each of the parameters. +*/ +QDeclarativeObjectMethodScriptClass::Value +QDeclarativeObjectMethodScriptClass::callOverloaded(MethodData *method, QScriptContext *ctxt) +{ + int argumentCount = ctxt->argumentCount(); + + QDeclarativePropertyCache::Data *best = 0; + int bestParameterScore = INT_MAX; + int bestMatchScore = INT_MAX; + + QDeclarativePropertyCache::Data dummy; + QDeclarativePropertyCache::Data *attempt = &method->data; + + do { + QList methodArgTypeNames; + + if (attempt->flags & QDeclarativePropertyCache::Data::HasArguments) + methodArgTypeNames = method->object->metaObject()->method(attempt->coreIndex).parameterTypes(); + + int methodArgumentCount = methodArgTypeNames.count(); + + if (methodArgumentCount > argumentCount) + continue; // We don't have sufficient arguments to call this method + + int methodParameterScore = argumentCount - methodArgumentCount; + if (methodParameterScore > bestParameterScore) + continue; // We already have a better option + + int methodMatchScore = 0; + QVarLengthArray methodArgTypes(methodArgumentCount); + + bool unknownArgument = false; + for (int ii = 0; ii < methodArgumentCount; ++ii) { + methodArgTypes[ii] = QMetaType::type(methodArgTypeNames.at(ii)); + if (methodArgTypes[ii] == QVariant::Invalid) + methodArgTypes[ii] = enumType(method->object->metaObject(), + QString::fromLatin1(methodArgTypeNames.at(ii))); + if (methodArgTypes[ii] == QVariant::Invalid) { + unknownArgument = true; + break; + } + methodMatchScore += matchScore(ctxt->argument(ii), methodArgTypes[ii], methodArgTypeNames.at(ii)); + } + if (unknownArgument) + continue; // We don't understand all the parameters + + if (bestParameterScore > methodParameterScore || bestMatchScore > methodMatchScore) { + best = attempt; + bestParameterScore = methodParameterScore; + bestMatchScore = methodMatchScore; + } + + if (bestParameterScore == 0 && bestMatchScore == 0) + break; // We can't get better than that + + } while((attempt = relatedMethod(method->object, attempt, dummy)) != 0); + + if (best) { + return callPrecise(method->object, *best, ctxt); + } else { + QString error = QLatin1String("Unable to determine callable overload. Candidates are:"); + QDeclarativePropertyCache::Data *candidate = &method->data; + while (candidate) { + error += QLatin1String("\n ") + QString::fromUtf8(method->object->metaObject()->method(candidate->coreIndex).signature()); + candidate = relatedMethod(method->object, candidate, dummy); + } + return Value(ctxt, ctxt->throwError(error)); + } +} + +/*! + Returns the match score for converting \a actual to be of type \a conversionType. A + zero score means "perfect match" whereas a higher score is worse. + + The conversion table is copied out of the QtScript callQtMethod() function. +*/ +int QDeclarativeObjectMethodScriptClass::matchScore(const QScriptValue &actual, int conversionType, + const QByteArray &conversionTypeName) +{ + if (actual.isNumber()) { + switch (conversionType) { + case QMetaType::Double: + return 0; + case QMetaType::Float: + return 1; + case QMetaType::LongLong: + case QMetaType::ULongLong: + return 2; + case QMetaType::Long: + case QMetaType::ULong: + return 3; + case QMetaType::Int: + case QMetaType::UInt: + return 4; + case QMetaType::Short: + case QMetaType::UShort: + return 5; + break; + case QMetaType::Char: + case QMetaType::UChar: + return 6; + default: + return 10; + } + } else if (actual.isString()) { + switch (conversionType) { + case QMetaType::QString: + return 0; + default: + return 10; + } + } else if (actual.isBoolean()) { + switch (conversionType) { + case QMetaType::Bool: + return 0; + default: + return 10; + } + } else if (actual.isDate()) { + switch (conversionType) { + case QMetaType::QDateTime: + return 0; + case QMetaType::QDate: + return 1; + case QMetaType::QTime: + return 2; + default: + return 10; + } + } else if (actual.isRegExp()) { + switch (conversionType) { + case QMetaType::QRegExp: + return 0; + default: + return 10; + } + } else if (actual.isVariant()) { + if (conversionType == qMetaTypeId()) + return 0; + else if (actual.toVariant().userType() == conversionType) + return 0; + else + return 10; + } else if (actual.isArray()) { + switch (conversionType) { + case QMetaType::QStringList: + case QMetaType::QVariantList: + return 5; + default: + return 10; + } + } else if (actual.isQObject()) { + switch (conversionType) { + case QMetaType::QObjectStar: + return 0; + default: + return 10; + } + } else if (actual.isNull()) { + switch (conversionType) { + case QMetaType::VoidStar: + case QMetaType::QObjectStar: + return 0; + default: + if (!conversionTypeName.endsWith('*')) + return 10; + else + return 0; + } + } else { + return 10; + } +} + +static inline int QMetaObject_methods(const QMetaObject *metaObject) +{ + struct Private + { + int revision; + int className; + int classInfoCount, classInfoData; + int methodCount, methodData; + }; + + return reinterpret_cast(metaObject->d.data)->methodCount; +} + +static QByteArray QMetaMethod_name(const QMetaMethod &m) +{ + QByteArray sig = m.signature(); + int paren = sig.indexOf('('); + if (paren == -1) + return sig; + else + return sig.left(paren); +} + +/*! +Returns the next related method, if one, or 0. +*/ +QDeclarativePropertyCache::Data * +QDeclarativeObjectMethodScriptClass::relatedMethod(QObject *object, QDeclarativePropertyCache::Data *current, + QDeclarativePropertyCache::Data &dummy) +{ + QDeclarativePropertyCache *cache = QDeclarativeData::get(object)->propertyCache; + if (current->relatedIndex == -1) + return 0; + + if (cache) { + return cache->method(current->relatedIndex); + } else { + const QMetaObject *mo = object->metaObject(); + int methodOffset = mo->methodCount() - QMetaObject_methods(mo); + + while (methodOffset > current->relatedIndex) { + mo = mo->superClass(); + methodOffset -= QMetaObject_methods(mo); + } + + QMetaMethod method = mo->method(current->relatedIndex); + dummy.load(method); + + // Look for overloaded methods + QByteArray methodName = QMetaMethod_name(method); + for (int ii = current->relatedIndex - 1; ii >= methodOffset; --ii) { + if (methodName == QMetaMethod_name(mo->method(ii))) { + dummy.relatedIndex = ii; + return &dummy; + } + } + + return &dummy; + } } QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass_p.h b/src/declarative/qml/qdeclarativeobjectscriptclass_p.h index 75e384c..7956c40 100644 --- a/src/declarative/qml/qdeclarativeobjectscriptclass_p.h +++ b/src/declarative/qml/qdeclarativeobjectscriptclass_p.h @@ -65,6 +65,7 @@ class QDeclarativeEngine; class QScriptContext; class QScriptEngine; class QDeclarativeContextData; +class MethodData; class Q_AUTOTEST_EXPORT QDeclarativeObjectMethodScriptClass : public QScriptDeclarativeClass { @@ -82,6 +83,14 @@ protected: private: int enumType(const QMetaObject *, const QString &); + Value callPrecise(QObject *, const QDeclarativePropertyCache::Data &, QScriptContext *); + Value callOverloaded(MethodData *, QScriptContext *); + Value callMethod(QObject *, int index, int returnType, int argCount, int *argTypes, QScriptContext *ctxt); + + int matchScore(const QScriptValue &, int, const QByteArray &); + QDeclarativePropertyCache::Data *relatedMethod(QObject *, QDeclarativePropertyCache::Data *current, + QDeclarativePropertyCache::Data &dummy); + PersistentIdentifier m_connectId; PersistentIdentifier m_disconnectId; QScriptValue m_connect; diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp index 259e492..91aaaa4 100644 --- a/src/declarative/qml/qdeclarativepropertycache.cpp +++ b/src/declarative/qml/qdeclarativepropertycache.cpp @@ -93,6 +93,7 @@ void QDeclarativePropertyCache::Data::load(const QMetaProperty &p, QDeclarativeE void QDeclarativePropertyCache::Data::load(const QMetaMethod &m) { coreIndex = m.methodIndex(); + relatedIndex = -1; flags |= Data::IsFunction; if (m.methodType() == QMetaMethod::Signal) flags |= Data::IsSignal; @@ -141,18 +142,24 @@ void QDeclarativePropertyCache::clear() } for (int ii = 0; ii < methodIndexCache.count(); ++ii) { - if (methodIndexCache.at(ii)) methodIndexCache.at(ii)->release(); + RData *data = methodIndexCache.at(ii); + if (data) data->release(); } for (StringCache::ConstIterator iter = stringCache.begin(); - iter != stringCache.end(); ++iter) - (*iter)->release(); + iter != stringCache.end(); ++iter) { + RData *data = (*iter); + data->release(); + } for (IdentifierCache::ConstIterator iter = identifierCache.begin(); - iter != identifierCache.end(); ++iter) - (*iter)->release(); + iter != identifierCache.end(); ++iter) { + RData *data = (*iter); + data->release(); + } indexCache.clear(); + methodIndexCache.clear(); stringCache.clear(); identifierCache.clear(); } @@ -206,12 +213,16 @@ QDeclarativePropertyCache *QDeclarativePropertyCache::copy() const { QDeclarativePropertyCache *cache = new QDeclarativePropertyCache(engine); cache->indexCache = indexCache; + cache->methodIndexCache = methodIndexCache; cache->stringCache = stringCache; cache->identifierCache = identifierCache; for (int ii = 0; ii < indexCache.count(); ++ii) { if (indexCache.at(ii)) indexCache.at(ii)->addref(); } + for (int ii = 0; ii < methodIndexCache.count(); ++ii) { + if (methodIndexCache.at(ii)) methodIndexCache.at(ii)->addref(); + } for (StringCache::ConstIterator iter = stringCache.begin(); iter != stringCache.end(); ++iter) (*iter)->addref(); for (IdentifierCache::ConstIterator iter = identifierCache.begin(); iter != identifierCache.end(); ++iter) @@ -231,7 +242,7 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb indexCache.resize(propCount); for (int ii = propOffset; ii < propCount; ++ii) { QMetaProperty p = metaObject->property(ii); - if (!p.isScriptable()) + if (!p.isScriptable()) continue; QString propName = QString::fromUtf8(p.name()); @@ -261,7 +272,7 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb methodIndexCache.resize(methodCount); for (int ii = methodOffset; ii < methodCount; ++ii) { QMetaMethod m = metaObject->method(ii); - if (m.access() == QMetaMethod::Private) + if (m.access() == QMetaMethod::Private) continue; QString methodName = QString::fromUtf8(m.signature()); @@ -271,7 +282,7 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb RData *data = new RData; data->identifier = enginePriv->objectClass->createPersistentIdentifier(methodName); - methodIndexCache[ii] = data; + methodIndexCache[ii] = data; data->load(m); if (m.methodType() == QMetaMethod::Slot || m.methodType() == QMetaMethod::Method) @@ -280,6 +291,10 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb data->flags |= signalFlags; if (stringCache.contains(methodName)) { + RData *old = stringCache[methodName]; + // We only overload methods in the same class, exactly like C++ + if (old->flags & Data::IsFunction && old->coreIndex >= methodOffset) + data->relatedIndex = old->coreIndex; stringCache[methodName]->release(); identifierCache[data->identifier.identifier]->release(); } diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h index 182c4fa..40451c3 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h +++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h @@ -572,7 +572,17 @@ public: }; Q_DECLARE_METATYPE(QScriptValue); -class MyInvokableObject : public QObject +class MyInvokableBaseObject : public QObject +{ + Q_OBJECT +public: + inline ~MyInvokableBaseObject() = 0; + + Q_INVOKABLE inline void method_inherited(int a); + Q_INVOKABLE inline void method_overload(); +}; + +class MyInvokableObject : public MyInvokableBaseObject { Q_OBJECT Q_ENUMS(TestEnum) @@ -608,16 +618,34 @@ public: Q_INVOKABLE void method_overload(int a) { invoke(16); m_actuals << a; } Q_INVOKABLE void method_overload(int a, int b) { invoke(17); m_actuals << a << b; } + Q_INVOKABLE void method_overload(QString a) { invoke(18); m_actuals << a; } - Q_INVOKABLE void method_with_enum(TestEnum e) { invoke(18); m_actuals << (int)e; } + Q_INVOKABLE void method_with_enum(TestEnum e) { invoke(19); m_actuals << (int)e; } + + Q_INVOKABLE int method_default(int a, int b = 19) { invoke(20); m_actuals << a << b; return b; } private: + friend class MyInvokableBaseObject; void invoke(int idx) { if (m_invoked != -1) m_invokedError = true; m_invoked = idx;} int m_invoked; bool m_invokedError; QVariantList m_actuals; }; +MyInvokableBaseObject::~MyInvokableBaseObject() {} + +void MyInvokableBaseObject::method_inherited(int a) +{ + static_cast(this)->invoke(-3); + static_cast(this)->m_actuals << a; +} + +// This is a hidden overload of the MyInvokableObject::method_overload() method +void MyInvokableBaseObject::method_overload() +{ + static_cast(this)->invoke(-2); +} + class NumberAssignment : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 66dc160..e4e5a54 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -1710,7 +1710,6 @@ void tst_qdeclarativeecmascript::callQtInvokables() QCOMPARE(o.actuals().at(0), QVariant(44)); QVERIFY(qvariant_cast(o.actuals().at(1)).isArray()); - // Test overloads - QML will always invoke the *last* method o.reset(); QCOMPARE(engine->evaluate("object.method_overload()").isError(), true); QCOMPARE(o.error(), false); @@ -1718,10 +1717,11 @@ void tst_qdeclarativeecmascript::callQtInvokables() QCOMPARE(o.actuals().count(), 0); o.reset(); - QCOMPARE(engine->evaluate("object.method_overload(10)").isError(), true); + QCOMPARE(engine->evaluate("object.method_overload(10)").isUndefined(), true); QCOMPARE(o.error(), false); - QCOMPARE(o.invoked(), -1); - QCOMPARE(o.actuals().count(), 0); + QCOMPARE(o.invoked(), 16); + QCOMPARE(o.actuals().count(), 1); + QCOMPARE(o.actuals().at(0), QVariant(10)); o.reset(); QCOMPARE(engine->evaluate("object.method_overload(10, 11)").isUndefined(), true); @@ -1732,10 +1732,40 @@ void tst_qdeclarativeecmascript::callQtInvokables() QCOMPARE(o.actuals().at(1), QVariant(11)); o.reset(); - QCOMPARE(engine->evaluate("object.method_with_enum(9)").isUndefined(), true); + QCOMPARE(engine->evaluate("object.method_overload(\"Hello\")").isUndefined(), true); QCOMPARE(o.error(), false); QCOMPARE(o.invoked(), 18); QCOMPARE(o.actuals().count(), 1); + QCOMPARE(o.actuals().at(0), QVariant(QString("Hello"))); + + o.reset(); + QCOMPARE(engine->evaluate("object.method_with_enum(9)").isUndefined(), true); + QCOMPARE(o.error(), false); + QCOMPARE(o.invoked(), 19); + QCOMPARE(o.actuals().count(), 1); + QCOMPARE(o.actuals().at(0), QVariant(9)); + + o.reset(); + QVERIFY(engine->evaluate("object.method_default(10)").strictlyEquals(QScriptValue(19))); + QCOMPARE(o.error(), false); + QCOMPARE(o.invoked(), 20); + QCOMPARE(o.actuals().count(), 2); + QCOMPARE(o.actuals().at(0), QVariant(10)); + QCOMPARE(o.actuals().at(1), QVariant(19)); + + o.reset(); + QVERIFY(engine->evaluate("object.method_default(10, 13)").strictlyEquals(QScriptValue(13))); + QCOMPARE(o.error(), false); + QCOMPARE(o.invoked(), 20); + QCOMPARE(o.actuals().count(), 2); + QCOMPARE(o.actuals().at(0), QVariant(10)); + QCOMPARE(o.actuals().at(1), QVariant(13)); + + o.reset(); + QCOMPARE(engine->evaluate("object.method_inherited(9)").isUndefined(), true); + QCOMPARE(o.error(), false); + QCOMPARE(o.invoked(), -3); + QCOMPARE(o.actuals().count(), 1); QCOMPARE(o.actuals().at(0), QVariant(9)); } -- cgit v0.12 From 69005b4cbae57928df7ade8f9f60ad0aabd128bc Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Fri, 15 Oct 2010 10:06:53 +0200 Subject: Changed Javascript guide link in Intro to the QML Language page. Replaced link to commercial Javascript book. Reviewed-by: Geir Vattekar --- doc/src/declarative/qdeclarativeintro.qdoc | 6 +++--- doc/src/external-resources.qdoc | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/src/declarative/qdeclarativeintro.qdoc b/doc/src/declarative/qdeclarativeintro.qdoc index 87dafb0..1d807e3 100644 --- a/doc/src/declarative/qdeclarativeintro.qdoc +++ b/doc/src/declarative/qdeclarativeintro.qdoc @@ -37,7 +37,7 @@ interface is specified as a tree of objects with properties. This introduction is meant for those with little or no programming experience. JavaScript is used as a scripting language in QML, so you may want -to learn a bit more about it (\l{JavaScript: The Definitive Guide}) before diving +to learn a bit more about it (\l{Javascript Guide}) before diving deeper into QML. It's also helpful to have a basic understanding of other web technologies like HTML and CSS, but it's not required. @@ -65,8 +65,8 @@ types always begin with a capital letter. In the above example, there are two objects, a \l Rectangle, and an \l Image. Between the braces, we can specify information about the object, such as its properties. -Properties are specified as \c {property: value}. In the above example, we -can see the Image has a property named \c source, which has been assigned the +Properties are specified as \c {property: value}. In the above example, we +can see the Image has a property named \c source, which has been assigned the value \c "pics/logo.png". The property and its value are separated by a colon. Properties can be specified one-per-line: diff --git a/doc/src/external-resources.qdoc b/doc/src/external-resources.qdoc index 3041046..a23ae4d 100644 --- a/doc/src/external-resources.qdoc +++ b/doc/src/external-resources.qdoc @@ -440,6 +440,11 @@ */ /*! + \externalpage https://developer.mozilla.org/en/JavaScript/Guide + \title JavaScript Guide +*/ + +/*! \externalpage https://developer.mozilla.org/en/JavaScript/About_JavaScript \title About JavaScript */ -- cgit v0.12 From 0a299be472da5829e17b886450dd134302b861a0 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Fri, 15 Oct 2010 10:42:21 +0200 Subject: Changed language of the AutoConnection description. Task-number: QTBUG-14223 Reviewed-by: Olivier Goffart --- src/corelib/global/qnamespace.qdoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 1c41eca..dd02e17 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -511,11 +511,11 @@ delivery at a later time. \value AutoConnection - (default) If the object sending the signal is in a different thread - than the receiving object, the signal is queued, behaving as - Qt::QueuedConnection. If both objects are in the same thread, - the slot is invoked directly, behaving as Qt::DirectConnection. The - type of connection is determined when the signal is emitted. + (default) If the signal is emitted from a different thread than the + receiving object, the signal is queued, behaving as + Qt::QueuedConnection. Otherwise, the slot is invoked directly, + behaving as Qt::DirectConnection. The type of connection is + determined when the signal is emitted. \value DirectConnection The slot is invoked immediately, when the signal is -- cgit v0.12 From a9cddeb760e85fbce2c1604b7e7b9b2affaaccd9 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 15 Oct 2010 10:43:07 +0200 Subject: Fix tst_moduleqt47::accidentalImport --- doc/src/snippets/declarative/keys/keys-handler.qml | 2 +- doc/src/snippets/declarative/keys/keys-pressed.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/snippets/declarative/keys/keys-handler.qml b/doc/src/snippets/declarative/keys/keys-handler.qml index 9e3a3b4..be0eedb 100644 --- a/doc/src/snippets/declarative/keys/keys-handler.qml +++ b/doc/src/snippets/declarative/keys/keys-handler.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { width: 400; height: 400 diff --git a/doc/src/snippets/declarative/keys/keys-pressed.qml b/doc/src/snippets/declarative/keys/keys-pressed.qml index 523c95b..90a4e37 100644 --- a/doc/src/snippets/declarative/keys/keys-pressed.qml +++ b/doc/src/snippets/declarative/keys/keys-pressed.qml @@ -38,7 +38,7 @@ ** ****************************************************************************/ -import Qt 4.7 +import QtQuick 1.0 Item { width: 400; height: 400 -- cgit v0.12 From db8a5038137f730ba4dd8169e4b5ab96971a5dfe Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Fri, 15 Oct 2010 12:50:16 +0300 Subject: Clean up ARM SIMD drawhelper code and make sure it works. Blending argb32_pre pixmaps is now ARM SIMD boosted because it's the most crucial and most used feature in applications. ARM SIMD boosted blending is 30% faster than non ARM SIMD boosted blending. Task-number: QTBUG-4891 Reviewed-by: Samuel --- src/gui/painting/painting.pri | 7 +- src/gui/painting/qblendfunctions_armv6_rvct.s | 222 ------------ src/gui/painting/qdrawhelper.cpp | 159 ++------- src/gui/painting/qdrawhelper_arm_simd.cpp | 313 ++++++++++++++++ src/gui/painting/qdrawhelper_arm_simd_p.h | 76 ++++ src/gui/painting/qdrawhelper_armv6_p.h | 81 ----- src/gui/painting/qdrawhelper_armv6_rvct.inc | 496 -------------------------- src/gui/painting/qdrawhelper_armv6_rvct.s | 177 --------- 8 files changed, 424 insertions(+), 1107 deletions(-) delete mode 100644 src/gui/painting/qblendfunctions_armv6_rvct.s create mode 100644 src/gui/painting/qdrawhelper_arm_simd.cpp create mode 100644 src/gui/painting/qdrawhelper_arm_simd_p.h delete mode 100644 src/gui/painting/qdrawhelper_armv6_p.h delete mode 100644 src/gui/painting/qdrawhelper_armv6_rvct.inc delete mode 100644 src/gui/painting/qdrawhelper_armv6_rvct.s diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri index 793d380..bd37d9f 100644 --- a/src/gui/painting/painting.pri +++ b/src/gui/painting/painting.pri @@ -234,13 +234,14 @@ embedded { symbian { - HEADERS += painting/qwindowsurface_s60_p.h + HEADERS += painting/qwindowsurface_s60_p.h \ + painting/qdrawhelper_arm_simd_p.h SOURCES += painting/qwindowsurface_s60.cpp armccIfdefBlock = \ "$${LITERAL_HASH}if defined(ARMV6)" \ + "MACRO QT_HAVE_ARM_SIMD" \ "SOURCEPATH painting" \ - "SOURCE qblendfunctions_armv6_rvct.s" \ - "SOURCE qdrawhelper_armv6_rvct.s" \ + "SOURCE qdrawhelper_arm_simd.cpp" \ "$${LITERAL_HASH}endif" MMP_RULES += armccIfdefBlock diff --git a/src/gui/painting/qblendfunctions_armv6_rvct.s b/src/gui/painting/qblendfunctions_armv6_rvct.s deleted file mode 100644 index 1e3faa9..0000000 --- a/src/gui/painting/qblendfunctions_armv6_rvct.s +++ /dev/null @@ -1,222 +0,0 @@ -;**************************************************************************** -;** -;** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -;** All rights reserved. -;** Contact: Nokia Corporation (qt-info@nokia.com) -;** -;** This file is part of the QtGui module of the Qt Toolkit. -;** -;** $QT_BEGIN_LICENSE:LGPL$ -;** No Commercial Usage -;** This file contains pre-release code and may not be distributed. -;** You may use this file in accordance with the terms and conditions -;** contained in the Technology Preview License Agreement accompanying -;** this package. -;** -;** GNU Lesser General Public License Usage -;** Alternatively, this file may be used under the terms of the GNU Lesser -;** General Public License version 2.1 as published by the Free Software -;** Foundation and appearing in the file LICENSE.LGPL included in the -;** packaging of this file. Please review the following information to -;** ensure the GNU Lesser General Public License version 2.1 requirements -;** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -;** -;** In addition, as a special exception, Nokia gives you certain additional -;** rights. These rights are described in the Nokia Qt LGPL Exception -;** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -;** -;** If you have questions regarding the use of this file, please contact -;** Nokia at qt-info@nokia.com. -;** -;** -;** -;** -;** -;** -;** -;** -;** $QT_END_LICENSE$ -;** -;**************************************************************************** - -; -; W A R N I N G -; ------------- -; -; This file is not part of the Qt API. It exists purely as an -; implementation detail. This header file may change from version to -; version without notice, or even be removed. -; -; We mean it. -; - - - ARM - PRESERVE8 - - INCLUDE qdrawhelper_armv6_rvct.inc - - -;----------------------------------------------------------------------------- -; qt_blend_rgb32_on_rgb32_arm -; -; @brief -; -; @param dest Destination pixels (r0) -; @param dbpl Destination bytes per line (r1) -; @param src Source pixels (r2) -; @param sbpl Source bytes per line (r3) -; @param w Width (s0 -> r4) -; @param h Height (s1 -> r5) -; @param const_alpha Constant alpha (s2 -> r6) -; -;--------------------------------------------------------------------------- -qt_blend_rgb32_on_rgb32_armv6 Function - stmfd sp!, {r4-r12, r14} - - ; read arguments off the stack - add r8, sp, #10 * 4 - ldmia r8, {r9-r11} - - ; Reorganize registers - - mov r4, r10 - mov r5, r1 - mov r6, r3 - - mov r1, r2 - mov r2, r9 - mov r3, r11 - - ; Now we have registers - ; @param dest Destination pixels (r0) - ; @param src Source pixels (r1) - ; @param w Width (r2) - ; @param const_alpha Constant alpha (r3) - ; @param h Height (r4) - ; @param dbpl Destination bytes per line (r5) - ; @param sbpl Source bytes per line (r6) - - cmp r3, #256 ; test if we have fully opaque constant alpha value - bne rgb32_blend_const_alpha ; branch if not - -rgb32_blend_loop - - subs r4, r4, #1 - bmi rgb32_blend_exit ; while(h--) - -rgb321 PixCpySafe r0, r1, r2 - - add r0, r0, r5 ; dest = dest + dbpl - add r1, r1, r6 ; src = src + sbpl - - b rgb32_blend_loop - - -rgb32_blend_const_alpha - - ;ldr r14, =ComponentHalf ; load 0x800080 to r14 - mov r14, #0x800000 - add r14, r14, #0x80 - - sub r3, r3, #1 ; const_alpha -= 1; - -rgb32_blend_loop_const_alpha - - subs r4, r4, #1 - bmi rgb32_blend_exit ; while(h--) - -rgb322 BlendRowSafe PixelSourceOverConstAlpha - - add r0, r0, r5 ; dest = dest + dbpl - add r1, r1, r6 ; src = src + sbpl - - b rgb32_blend_loop_const_alpha - -rgb32_blend_exit - - ldmfd sp!, {r4-r12, pc} ; pop and return - - - -;----------------------------------------------------------------------------- -; qt_blend_argb32_on_argb32_arm -; -; @brief -; -; @param dest Destination pixels (r0) -; @param dbpl Destination bytes per line (r1) -; @param src Source pixels (r2) -; @param sbpl Source bytes per line (r3) -; @param w Width (s0 -> r4) -; @param h Height (s1 -> r5) -; @param const_alpha Constant alpha (s2 -> r6) -; -;--------------------------------------------------------------------------- -qt_blend_argb32_on_argb32_armv6 Function - stmfd sp!, {r4-r12, r14} - - ; read arguments off the stack - add r8, sp, #10 * 4 - ldmia r8, {r9-r11} - - ; Reorganize registers - - mov r4, r10 - mov r5, r1 - mov r6, r3 - - mov r1, r2 - mov r2, r9 - mov r3, r11 - - ; Now we have registers - ; @param dest Destination pixels (r0) - ; @param src Source pixels (r1) - ; @param w Width (r2) - ; @param const_alpha Constant alpha (r3) - ; @param h Height (r4) - ; @param dbpl Destination bytes per line (r5) - ; @param sbpl Source bytes per line (r6) - - ;ldr r14, =ComponentHalf ; load 0x800080 to r14 - mov r14, #0x800000 - add r14, r14, #0x80 - - cmp r3, #256 ; test if we have fully opaque constant alpha value - bne argb32_blend_const_alpha ; branch if not - -argb32_blend_loop - - subs r4, r4, #1 - bmi argb32_blend_exit ; while(h--) - -argb321 BlendRowSafe PixelSourceOver - - add r0, r0, r5 ; dest = dest + dbpl - add r1, r1, r6 ; src = src + sbpl - - b argb32_blend_loop - -argb32_blend_const_alpha - - sub r3, r3, #1 ; const_alpha -= 1; - -argb32_blend_loop_const_alpha - - subs r4, r4, #1 - bmi argb32_blend_exit ; while(h--) - -argb322 BlendRowSafe PixelSourceOverConstAlpha - - add r0, r0, r5 ; dest = dest + dbpl - add r1, r1, r6 ; src = src + sbpl - - b argb32_blend_loop_const_alpha - -argb32_blend_exit - - ldmfd sp!, {r4-r12, pc} ; pop and return - - - END ; File end diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 5f190ba..a4ab278 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include #include @@ -7678,96 +7678,6 @@ static void qt_memfill16_setup(quint16 *dest, quint16 value, int count); qt_memfill32_func qt_memfill32 = qt_memfill32_setup; qt_memfill16_func qt_memfill16 = qt_memfill16_setup; -#if defined(Q_CC_RVCT) && defined(QT_HAVE_ARMV6) -// Move these to qdrawhelper_arm.c when all -// functions are implemented using arm assembly. -static CompositionFunctionSolid qt_functionForModeSolid_ARMv6[numCompositionFunctions] = { - comp_func_solid_SourceOver, - comp_func_solid_DestinationOver, - comp_func_solid_Clear, - comp_func_solid_Source, - comp_func_solid_Destination, - comp_func_solid_SourceIn, - comp_func_solid_DestinationIn, - comp_func_solid_SourceOut, - comp_func_solid_DestinationOut, - comp_func_solid_SourceAtop, - comp_func_solid_DestinationAtop, - comp_func_solid_XOR, - comp_func_solid_Plus, - comp_func_solid_Multiply, - comp_func_solid_Screen, - comp_func_solid_Overlay, - comp_func_solid_Darken, - comp_func_solid_Lighten, - comp_func_solid_ColorDodge, - comp_func_solid_ColorBurn, - comp_func_solid_HardLight, - comp_func_solid_SoftLight, - comp_func_solid_Difference, - comp_func_solid_Exclusion, - rasterop_solid_SourceOrDestination, - rasterop_solid_SourceAndDestination, - rasterop_solid_SourceXorDestination, - rasterop_solid_NotSourceAndNotDestination, - rasterop_solid_NotSourceOrNotDestination, - rasterop_solid_NotSourceXorDestination, - rasterop_solid_NotSource, - rasterop_solid_NotSourceAndDestination, - rasterop_solid_SourceAndNotDestination -}; - -static CompositionFunction qt_functionForMode_ARMv6[numCompositionFunctions] = { - comp_func_SourceOver_armv6, - comp_func_DestinationOver, - comp_func_Clear, - comp_func_Source_armv6, - comp_func_Destination, - comp_func_SourceIn, - comp_func_DestinationIn, - comp_func_SourceOut, - comp_func_DestinationOut, - comp_func_SourceAtop, - comp_func_DestinationAtop, - comp_func_XOR, - comp_func_Plus, - comp_func_Multiply, - comp_func_Screen, - comp_func_Overlay, - comp_func_Darken, - comp_func_Lighten, - comp_func_ColorDodge, - comp_func_ColorBurn, - comp_func_HardLight, - comp_func_SoftLight, - comp_func_Difference, - comp_func_Exclusion, - rasterop_SourceOrDestination, - rasterop_SourceAndDestination, - rasterop_SourceXorDestination, - rasterop_NotSourceAndNotDestination, - rasterop_NotSourceOrNotDestination, - rasterop_NotSourceXorDestination, - rasterop_NotSource, - rasterop_NotSourceAndDestination, - rasterop_SourceAndNotDestination -}; - -static void qt_blend_color_argb_armv6(int count, const QSpan *spans, void *userData) -{ - QSpanData *data = reinterpret_cast(userData); - - CompositionFunctionSolid func = qt_functionForModeSolid_ARMv6[data->rasterBuffer->compositionMode]; - while (count--) { - uint *target = ((uint *)data->rasterBuffer->scanLine(spans->y)) + spans->x; - func(target, spans->len, data->solid.color, spans->coverage); - ++spans; - } -} - -#endif // Q_CC_RVCT && QT_HAVE_ARMV6 - - void qInitDrawhelperAsm() { @@ -7938,46 +7848,39 @@ void qInitDrawhelperAsm() } #endif // IWMMXT -#if defined(Q_CC_RVCT) && defined(QT_HAVE_ARMV6) - functionForModeAsm = qt_functionForMode_ARMv6; - functionForModeSolidAsm = qt_functionForModeSolid_ARMv6; +#if defined(QT_HAVE_ARM_SIMD) + qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_arm_simd; + qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_arm_simd; + qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_arm_simd; + qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_arm_simd; +#elif defined(QT_HAVE_NEON) + if (features & NEON) { + qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_neon; + qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_neon; + qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_neon; + qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_neon; + qBlendFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_rgb16_neon; + qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB16] = qt_blend_rgb16_on_argb32_neon; + qBlendFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_blend_rgb16_on_rgb16_neon; + + qScaleFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_scale_image_argb32_on_rgb16_neon; + qScaleFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_scale_image_rgb16_on_rgb16_neon; - qt_memfill32 = qt_memfill32_armv6; + qTransformFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_transform_image_argb32_on_rgb16_neon; + qTransformFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_transform_image_rgb16_on_rgb16_neon; - qDrawHelper[QImage::Format_ARGB32_Premultiplied].blendColor = qt_blend_color_argb_armv6; + qDrawHelper[QImage::Format_RGB16].alphamapBlit = qt_alphamapblit_quint16_neon; - qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_armv6; - qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_armv6; - qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_armv6; - qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_armv6; -#elif defined(QT_HAVE_NEON) - if (features & NEON) { - qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_neon; - qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_neon; - qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_neon; - qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_neon; - qBlendFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_rgb16_neon; - qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB16] = qt_blend_rgb16_on_argb32_neon; - qBlendFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_blend_rgb16_on_rgb16_neon; - - qScaleFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_scale_image_argb32_on_rgb16_neon; - qScaleFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_scale_image_rgb16_on_rgb16_neon; - - qTransformFunctions[QImage::Format_RGB16][QImage::Format_ARGB32_Premultiplied] = qt_transform_image_argb32_on_rgb16_neon; - qTransformFunctions[QImage::Format_RGB16][QImage::Format_RGB16] = qt_transform_image_rgb16_on_rgb16_neon; - - qDrawHelper[QImage::Format_RGB16].alphamapBlit = qt_alphamapblit_quint16_neon; - - functionForMode_C[QPainter::CompositionMode_SourceOver] = qt_blend_argb32_on_argb32_scanline_neon; - functionForModeSolid_C[QPainter::CompositionMode_SourceOver] = comp_func_solid_SourceOver_neon; - functionForMode_C[QPainter::CompositionMode_Plus] = comp_func_Plus_neon; - destFetchProc[QImage::Format_RGB16] = qt_destFetchRGB16_neon; - destStoreProc[QImage::Format_RGB16] = qt_destStoreRGB16_neon; - - qMemRotateFunctions[QImage::Format_RGB16][0] = qt_memrotate90_16_neon; - qMemRotateFunctions[QImage::Format_RGB16][2] = qt_memrotate270_16_neon; - qt_memfill32 = qt_memfill32_neon; - } + functionForMode_C[QPainter::CompositionMode_SourceOver] = qt_blend_argb32_on_argb32_scanline_neon; + functionForModeSolid_C[QPainter::CompositionMode_SourceOver] = comp_func_solid_SourceOver_neon; + functionForMode_C[QPainter::CompositionMode_Plus] = comp_func_Plus_neon; + destFetchProc[QImage::Format_RGB16] = qt_destFetchRGB16_neon; + destStoreProc[QImage::Format_RGB16] = qt_destStoreRGB16_neon; + + qMemRotateFunctions[QImage::Format_RGB16][0] = qt_memrotate90_16_neon; + qMemRotateFunctions[QImage::Format_RGB16][2] = qt_memrotate270_16_neon; + qt_memfill32 = qt_memfill32_neon; + } #endif if (functionForModeSolidAsm) { diff --git a/src/gui/painting/qdrawhelper_arm_simd.cpp b/src/gui/painting/qdrawhelper_arm_simd.cpp new file mode 100644 index 0000000..61dac5e --- /dev/null +++ b/src/gui/painting/qdrawhelper_arm_simd.cpp @@ -0,0 +1,313 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qdrawhelper_arm_simd_p.h" + +#include +#include + +#ifdef QT_HAVE_ARM_SIMD + +#if defined(Q_OS_SYMBIAN) +#include +#endif + +#if defined(Q_OS_SYMBIAN) && defined(Q_CC_RVCT) +__asm void qt_blend_argb32_on_argb32_arm_simd(uchar *destPixels, int dbpl, + const uchar *srcPixels, int sbpl, + int w, int h, + int const_alpha) +{ +#ifndef __ARMCC__ + __SWITCH_TO_ARM; +#else + CODE32 +#endif // __ARMCC__ + + stmfd sp!, {r4-r12, r14} + + // read arguments off the stack + add r8, sp, #10 * 4 + ldmia r8, {r4-r6} + + // adjust dbpl and sbpl + mov r14, #4 + mul r14, r4, r14 + sub r1, r1, r14 + sub r3, r3, r14 + + // load 0xFF00FF00 to r12 + mov r12, #0xFF000000 + add r12, r12, #0xFF00 + + // load 0x800080 to r14 + mov r14, #0x800000 + add r14, r14, #0x80 + + /* + Registers: + r0 dst + r1 dbpl + r2 src + r3 sbpl + r4 w + r5 h + r6 const_alpha + r12 0xFF0000 + r14 0x800080 + */ + + cmp r6, #256 //test if we have fully opaque constant alpha value + bne argb32constalpha // branch if not + +argb32_next_row + + mov r7, r4 + +argb32_next_pixel + + ldr r8, [r2], #4 // load src pixel + + // Negate r8 and extract src alpha + mvn r11, r8 // bitwise not + uxtb r11, r11, ror #24 + + cmp r11, #0 // test for full src opacity (negated) + beq argb32_no_blend + + cmp r11, #255 // test for full src transparency (negated) + addeq r0, #4 + beq argb32_nop + + ldr r9, [r0] // load dst pixel + + // blend + uxtb16 r10, r9 + uxtb16 r6, r9, ror #8 + mla r10, r11, r10, r14 + mla r9, r6, r11, r14 + uxtab16 r10, r10, r10, ror #8 + uxtab16 r9, r9, r9, ror #8 + and r9, r9, r12 + uxtab16 r10, r9, r10, ror #8 + + uqadd8 r8, r10, r8 + +argb32_no_blend + + str r8, [r0], #4 + +argb32_nop + + subs r7, r7, #1 + bgt argb32_next_pixel + + add r0, r0, r1 // dest = dest + dbpl + add r2, r2, r3 // src = src + sbpl + + subs r5, r5, #1 + bgt argb32_next_row + + b argb32_blend_exit + +argb32constalpha + + cmp r6, #0 + beq argb32_blend_exit + + ; const_alpha = (const_alpha * 255) >> 8; + mov r11, #255 + mul r6, r6, r11 + mov r11, r6, lsr #8 + +argb32constalpha_next_row + + mov r7, r4 + +argb32constalpha_next_pixel + + ldr r9, [r2], #4 // load src pixel + + // blend + uxtb16 r10, r9 + uxtb16 r6, r9, ror #8 + mla r10, r11, r10, r14 + mla r9, r6, r11, r14 + uxtab16 r10, r10, r10, ror #8 + uxtab16 r9, r9, r9, ror #8 + and r9, r9, r12 + uxtab16 r8, r9, r10, ror #8 + + ldr r9, [r0] // load dst pixel + + // blend + uxtb16 r10, r9 + uxtb16 r6, r9, ror #8 + + // Negate r11 and extract src alpha + mvn r9, r11 // bitwise not + uxtb r9, r9, ror #24 + + mla r10, r9, r10, r14 + mla r9, r6, r9, r14 + uxtab16 r10, r10, r10, ror #8 + uxtab16 r9, r9, r9, ror #8 + and r9, r9, r12 + uxtab16 r10, r9, r10, ror #8 + + uqadd8 r8, r10, r8 + + str r8, [r0], #4 + + subs r7, r7, #1 + bgt argb32constalpha_next_pixel + + add r0, r0, r1 // dest = dest + dbpl + add r2, r2, r3 // src = src + sbpl + + subs r5, r5, #1 + bgt argb32constalpha_next_row + +argb32_blend_exit + + // Restore registers + ldmfd sp!, {r4-r12, lr} + bx lr + + __END_ARM +} + +void qt_blend_rgb32_on_rgb32_arm_simd(uchar *destPixels, int dbpl, + const uchar *srcPixels, int sbpl, + int w, int h, + int const_alpha) +{ + if (const_alpha != 256) { + qt_blend_argb32_on_argb32_arm_simd(destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha); + return; + } + + const uint *src = (const uint *) srcPixels; + uint *dst = (uint *) destPixels; + if (w <= 64) { + for (int y=0; y= 0xff000000) + dst[x] = s; + else if (s != 0) + dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s)); + } + dst = (quint32 *)(((uchar *) dst) + dbpl); + src = (const quint32 *)(((const uchar *) src) + sbpl); + } + } else if (const_alpha != 0) { + const_alpha = (const_alpha * 255) >> 8; + for (int y=0; y + +QT_BEGIN_NAMESPACE + +#if defined(QT_HAVE_ARM_SIMD) + +void qt_blend_argb32_on_argb32_arm_simd(uchar *destPixels, int dbpl, + const uchar *srcPixels, int sbpl, + int w, int h, + int const_alpha); + +void qt_blend_rgb32_on_rgb32_arm_simd(uchar *destPixels, int dbpl, + const uchar *srcPixels, int sbpl, + int w, int h, + int const_alpha); + +#endif // QT_HAVE_ARM_SIMD + +QT_END_NAMESPACE + +#endif // QDRAWHELPER_ARM_SIMD_P_H diff --git a/src/gui/painting/qdrawhelper_armv6_p.h b/src/gui/painting/qdrawhelper_armv6_p.h deleted file mode 100644 index e58f8bb..0000000 --- a/src/gui/painting/qdrawhelper_armv6_p.h +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QDRAWHELPER_ARMV6_P_H -#define QDRAWHELPER_ARMV6_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -QT_BEGIN_NAMESPACE - -#if defined(Q_CC_RVCT) && defined(QT_HAVE_ARMV6) - -extern "C" void qt_blend_rgb32_on_rgb32_armv6(uchar *destPixels, int dbpl, - const uchar *srcPixels, int sbpl, - int w, int h, - int const_alpha); - -extern "C" void qt_blend_argb32_on_argb32_armv6(uchar *destPixels, int dbpl, - const uchar *srcPixels, int sbpl, - int w, int h, - int const_alpha); - -extern "C" void qt_memfill32_armv6(quint32 *dest, quint32 value, int count); - -extern "C" void comp_func_Source_armv6(uint *dest, const uint *src, int length, uint const_alpha); -extern "C" void comp_func_SourceOver_armv6(uint *dest, const uint *src, int length, uint const_alpha); - -#endif // QT_HAVE_ARMV6 - -QT_END_NAMESPACE - -#endif // QDRAWHELPER_ARMV6_P_H diff --git a/src/gui/painting/qdrawhelper_armv6_rvct.inc b/src/gui/painting/qdrawhelper_armv6_rvct.inc deleted file mode 100644 index 8c6d803..0000000 --- a/src/gui/painting/qdrawhelper_armv6_rvct.inc +++ /dev/null @@ -1,496 +0,0 @@ -;**************************************************************************** -;** -;** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -;** All rights reserved. -;** Contact: Nokia Corporation (qt-info@nokia.com) -;** -;** This file is part of the QtGui module of the Qt Toolkit. -;** -;** $QT_BEGIN_LICENSE:LGPL$ -;** No Commercial Usage -;** This file contains pre-release code and may not be distributed. -;** You may use this file in accordance with the terms and conditions -;** contained in the Technology Preview License Agreement accompanying -;** this package. -;** -;** GNU Lesser General Public License Usage -;** Alternatively, this file may be used under the terms of the GNU Lesser -;** General Public License version 2.1 as published by the Free Software -;** Foundation and appearing in the file LICENSE.LGPL included in the -;** packaging of this file. Please review the following information to -;** ensure the GNU Lesser General Public License version 2.1 requirements -;** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -;** -;** In addition, as a special exception, Nokia gives you certain additional -;** rights. These rights are described in the Nokia Qt LGPL Exception -;** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -;** -;** If you have questions regarding the use of this file, please contact -;** Nokia at qt-info@nokia.com. -;** -;** -;** -;** -;** -;** -;** -;** -;** $QT_END_LICENSE$ -;** -;**************************************************************************** - -; -; W A R N I N G -; ------------- -; -; This file is not part of the Qt API. It exists purely as an -; implementation detail. This header file may change from version to -; version without notice, or even be removed. -; -; We mean it. -; - -;----------------------------------------------------------------------------- -; Globals. -; Earch marcro expects that caller has loaded 0x800080 to r14. -;----------------------------------------------------------------------------- - -ComponentHalf EQU 0x800080 - -;----------------------------------------------------------------------------- -; ARM assembly implementations of accelerated graphics operations. -; -; Conventions: -; -; - r0 = Target buffer pointer -; - r1 = Source buffer pointer -; - r2 = Length of the buffer to blend -; - r3 = Constant alpha for source buffer -; -;----------------------------------------------------------------------------- - -; A macro for transparently defining ARM functions - MACRO -$func Function - AREA Function_$func, CODE - GLOBAL $func - ALIGN 4 - CODE32 -$func - MEND - - -;----------------------------------------------------------------------------- -; Armv6 boosted implementation of BYTE_MUL(...) function found in qdrawhelper_p.h. -; -; @param dst Destination register where to store the result -; @param x Value to multiply -; @param a Multiplicator byte -; @param r14 Component half 0x800080 -; -; @note Trashes x, r8 -;----------------------------------------------------------------------------- - MACRO - ByteMul $dst, $x, $a - - ; static inline uint BYTE_MUL(uint x, uint a) - - ; uint r8 = (x & 0xff00ff) * a + 0x800080 - uxtb16 r8, $x ; r8 = r8 & 0x00FF00FF - mla r8, r8, $a, r14 - - ; x = ((r >> 8) & 0xff00ff) * a + 0x800080 - uxtb16 $x, $x, ror #8 - mla $x, $x, $a, r14 - - - ; r8 = (r8 + ((r8 >> 8) & 0xff00ff) ) >> 8 - ; r8 &= 0xff00ff - uxtab16 r8, r8, r8, ror #8 - uxtb16 r8, r8, ror #8 - - ; x = x + ((x >>8) & 0xff00ff) - uxtab16 $x, $x, $x, ror #8 - - ; x &= 0xff00ff00 - ; x |= r8 - uxtb16 $x, $x, ror #8 - orr $dst, r8, $x, lsl #8 - - MEND - -;----------------------------------------------------------------------------- -; Armv6 boosted implementation of INTERPOLATE_PIXEL_255(...) function found in -; qdrawhelper_p.h. -; -; @param dst Destination register where to store the result -; @param x First value to multiply -; @param a Multiplicator byte for first value -; @param y Second value to multiply -; @param b Multiplicator byte for second value -; @param r14 Component half 0x800080 -; -; -; @note Trashes x, r8, r14 -;----------------------------------------------------------------------------- - MACRO - InterpolatePixel255 $dst, $x, $a, $y, $b - - ; static inline uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b) - - ; First calculate the parts where we need 0x800080 - - ; uint r8 = (((x & 0xff00ff) * a) + 0x800080) - uxtb16 r8, $x ; r8 = r8 & 0x00FF00FF - mla r8, r8, $a, r14 - - ; x = ((((x >> 8) & 0xff00ff) * a) + 0x800080) - uxtb16 $x, $x, ror #8 - mla $x, $x, $a, r14 - - ; Now we are trashing r14 to free it for other purposes - - ; uint r14 = (y & 0xff00ff) * b - uxtb16 r14, $y ; r14 = y & 0x00FF00FF - mul r14, r14, $b - - ; r8 = r8 + r14 - add r8, r8, r14 - - ; r8 = (r8 + ((r8 >> 8) & 0xff00ff) ) >> 8 - ; r8 &= 0xff00ff - uxtab16 r8, r8, r8, ror #8 - uxtb16 r8, r8, ror #8 - - ; r14 = ((y >> 8) & 0xff00ff) * b - uxtb16 r14, $y, ror #8 ; r14 = ((y >> 8) & 0xFF00FF) - mul r14, r14, $b - - ; x = x + r14 - add $x, $x, r14 - - ; x = x + ((x >>8) & 0xff00ff) - uxtab16 $x, $x, $x, ror #8 - - ; x &= 0xff00ff00 - ; x |= r8 - uxtb16 $x, $x, ror #8 - orr $dst, r8, $x, lsl #8 - - MEND - -;----------------------------------------------------------------------------- -; -;----------------------------------------------------------------------------- - MACRO -$label Blend4Pixels $BlendPixel - - ; Blend first 4 pixels - - ldmia r1!, {r4-r7} - ldm r0, {r9-r12} - -b4p1_$label $BlendPixel r9, r4, r3 -b4p2_$label $BlendPixel r10, r5, r3 -b4p3_$label $BlendPixel r11, r6, r3 -b4p4_$label $BlendPixel r12, r7, r3 - - stmia r0!, {r9-r12} - - MEND - -;----------------------------------------------------------------------------- -; -;----------------------------------------------------------------------------- - MACRO -$label Blend8Pixels $BlendPixel - -b8p1_$label Blend4Pixels $BlendPixel -b8p2_$label Blend4Pixels $BlendPixel - - MEND - -;----------------------------------------------------------------------------- -; -;----------------------------------------------------------------------------- - MACRO -$label Blend16Pixels $BlendPixel - -b16p1_$label Blend8Pixels $BlendPixel -b16p2_$label Blend8Pixels $BlendPixel - - MEND - -;----------------------------------------------------------------------------- -; -;----------------------------------------------------------------------------- - MACRO -$label Blend32Pixels $BlendPixel - -b32p1_$label Blend16Pixels $BlendPixel -b32p2_$label Blend16Pixels $BlendPixel - - MEND - -;----------------------------------------------------------------------------- -; A macro for source over compositing one row of pixels and saving the results -; to destination buffer. -; -; @param dest Destination buffer (r0) -; @param src Source buffer (r1) -; @param length Length (r2) -; @param const_alpha Constant alpha (r3) -; @param r14 Component Half (0x800080) (r14) -; -; @note Advances r0, r1 -; @note Trashes r2, r4-r12 -;----------------------------------------------------------------------------- - MACRO -$label BlendRow $BlendPixel - - pld [r1] - -bloop_$label - ; Blend 32 pixels per loop iteration - subs r2, r2, #32 - bmi b_remaining_$label - -brp1_$label Blend32Pixels $BlendPixel - - b bloop_$label - -b_remaining_$label - - ; Remaining 31 pixels - - addmi r2, r2, #32 - - ; Blend 16 pixels - tst r2, #16 - beq b_remaining8_$label - -brp2_$label Blend16Pixels $BlendPixel - -b_remaining8_$label - - ; Blend 8 pixels - tst r2, #8 - beq b_remaining4_$label - -brp3_$label Blend8Pixels $BlendPixel - -b_remaining4_$label - - ; Blend 4 pixels - tst r2, #4 - beq b_remaining3_$label - -brp4_$label Blend4Pixels $BlendPixel - -b_remaining3_$label - - ; Remaining 3 pixels - - tst r2, #2 - beq b_last_$label - - ldmia r1!, {r4-r5} - ldm r0, {r9-r10} - -brp5_$label $BlendPixel r9, r4, r3 -brp6_$label $BlendPixel r10, r5, r3 - - stmia r0!, {r9-r10} - -b_last_$label - - tst r2, #1 - beq bexit_$label - - ldr r4, [r1] - ldr r9, [r0] - -bpl_$label $BlendPixel r9, r4, r3 - - str r9, [r0] - -bexit_$label - - MEND - -;----------------------------------------------------------------------------- -; A macro for source over compositing one row of pixels and saving the results -; to destination buffer. Restores all registers. -; -; @param dest Destination buffer (r0) -; @param src Source buffer (r1) -; @param length Length (r2) -; @param const_alpha Constant alpha (r3) -; @param r14 Component Half (0x800080) (r14) -; -; @note Advances r0, r1 -; @note Trashes r2, r4-r12 -;----------------------------------------------------------------------------- - MACRO -$label BlendRowSafe $BlendPixel - - stmfd sp!, {r0-r6} ; Preserves registers only up to r6 - -brs_$label BlendRow $BlendPixel - - ldmfd sp!, {r0-r6} - - MEND - - -;----------------------------------------------------------------------------- -; Pix Copy. -; NOTE! Cache line size of ARM1136JF-S and ARM1136J-S is 32 bytes (8 pixels). -; -; @param dst Destination pixels (r0) -; @param src Source pixels (r1) -; @param len Length (r2) -; -; @note Trashes r3-r10 -;----------------------------------------------------------------------------- - MACRO -$label PixCpy $dst, $src, $len - - pld [$src] - -pcpy_loop_$label - ; Copy 8 pixels per loop iteration - pld [$src, #96] - subs $len, $len, #8 - ldmgeia $src!, {r3-r10} - stmgeia $dst!, {r3-r10} - bgt pcpy_loop_$label - -pcpy_remaining_$label - - ; Copy up to 7 remaining pixels - - ; Copy 4 pixels - tst $len, #4 - ldmneia $src!, {r3-r6} - stmneia $dst!, {r3-r6} - - tst $len, #2 - ldmneia $src!, {r3-r4} - stmneia $dst!, {r3-r4} - - tst $len, #1 - ldrne r3, [$src] - strne r3, [$dst] - - MEND - -;----------------------------------------------------------------------------- -; General Pix Copy. Maximum 8 pixels at time. Restores all registers. -; -; @param dst Destination pixels (r0) -; @param src Source pixels (r1) -; @param len Length (r2) -; -; @note Trashes r3-r10 -;----------------------------------------------------------------------------- - MACRO -$label PixCpySafe $dst, $src, $len - - stmfd sp!, {r0-r6} ; Preserves registers only up to r6 - -pcs_$label PixCpy $dst, $src, $len - - ldmfd sp!, {r0-r6} ; pop - - MEND - - -;----------------------------------------------------------------------------- -; A macro for source over compositing one pixel and saving the result to -; dst register. -; -; @param dst Destination register, must contain destination pixel upon entry -; @param src Source register, must contain source pixel upon entry -; @param const_alpha Constant source alpha -; @param r14 Component half 0x800080 -; -; @note Trashes const_alpha, r8 -;----------------------------------------------------------------------------- - MACRO -$label PixelSourceOver $dst, $src, $const_alpha - - ; Negate src and extract alpha - mvn $const_alpha, $src ; bitwise not - uxtb $const_alpha, $const_alpha, ror #24 ; r3 = ((r3 & 0xFF000000) >> 24); - - ;cmp $const_alpha, #255 ; test for full transparency ( negated ) - ;beq exit_$label - cmp $const_alpha, #0 ; test for full opacity ( negated ) - moveq $dst, $src - beq exit_$label - - ByteMul $dst, $dst, $const_alpha - add $dst, $src, $dst - -exit_$label - MEND - -;----------------------------------------------------------------------------- -; A macro for source over compositing one pixel and saving the result to -; dst register. -; -; @param dst Destination register, must contain destination pixel upon entry -; @param src Source register, must contain source pixel upon entry -; @param const_alpha Constant source alpha -; @param r14 Component half 0x800080 -; -; @note Trashes src, const_alpha, r8 -;----------------------------------------------------------------------------- - MACRO -$label PixelSourceOverConstAlpha $dst, $src, $const_alpha - - ; store alpha because we are going to trash it - stmfd sp!, {$const_alpha} - - ByteMul $src, $src, $const_alpha - - ; Negate src and extract alpha - mvn $const_alpha, $src ; bitwise not - uxtb $const_alpha, $const_alpha, ror #24 ; r3 = ((r3 & 0xFF000000) >> 24); - - ByteMul $dst, $dst, $const_alpha - - add $dst, $src, $dst - - ; recover alpha - ldmfd sp!, {$const_alpha} - - MEND - -;----------------------------------------------------------------------------- -; A macro for source over compositing one pixel and saving the result to -; a register. -; -; @param dst Destination register, must contain destination pixel upon entry -; @param src Source register, must contain source pixel upon entry -; @param const_alpha Constant source alpha -; @param r14 Component half 0x800080 -; -; @note Trashes src, r8 -;----------------------------------------------------------------------------- - MACRO -$label PixelSourceConstAlpha $dst, $src, $const_alpha - - ; store r2 and r14 because we are going to trash them - stmfd sp!, {r2, r14} - - rsb r2, $const_alpha, #255 - InterpolatePixel255 $dst, $src, $const_alpha, $dst, r2 - - ; recover r2 and r14 - ldmfd sp!, {r2, r14} - - MEND - - END ; File end diff --git a/src/gui/painting/qdrawhelper_armv6_rvct.s b/src/gui/painting/qdrawhelper_armv6_rvct.s deleted file mode 100644 index 180980a..0000000 --- a/src/gui/painting/qdrawhelper_armv6_rvct.s +++ /dev/null @@ -1,177 +0,0 @@ -;**************************************************************************** -;** -;** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -;** All rights reserved. -;** Contact: Nokia Corporation (qt-info@nokia.com) -;** -;** This file is part of the QtGui module of the Qt Toolkit. -;** -;** $QT_BEGIN_LICENSE:LGPL$ -;** No Commercial Usage -;** This file contains pre-release code and may not be distributed. -;** You may use this file in accordance with the terms and conditions -;** contained in the Technology Preview License Agreement accompanying -;** this package. -;** -;** GNU Lesser General Public License Usage -;** Alternatively, this file may be used under the terms of the GNU Lesser -;** General Public License version 2.1 as published by the Free Software -;** Foundation and appearing in the file LICENSE.LGPL included in the -;** packaging of this file. Please review the following information to -;** ensure the GNU Lesser General Public License version 2.1 requirements -;** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -;** -;** In addition, as a special exception, Nokia gives you certain additional -;** rights. These rights are described in the Nokia Qt LGPL Exception -;** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -;** -;** If you have questions regarding the use of this file, please contact -;** Nokia at qt-info@nokia.com. -;** -;** -;** -;** -;** -;** -;** -;** -;** $QT_END_LICENSE$ -;** -;**************************************************************************** - -; -; W A R N I N G -; ------------- -; -; This file is not part of the Qt API. It exists purely as an -; implementation detail. This header file may change from version to -; version without notice, or even be removed. -; -; We mean it. -; - - ARM - PRESERVE8 - - INCLUDE qdrawhelper_armv6_rvct.inc - -;----------------------------------------------------------------------------- -; qt_memfill32_armv6 -; -; @brief Not yet in use! -; -; @param dest Destination buffer (r0) -; @param value Value (r1) -; @param count Count (r2) -; -;--------------------------------------------------------------------------- -qt_memfill32_armv6 Function - stmfd sp!, {r4-r12, r14} - - mov r3, r1 - mov r4, r1 - mov r5, r1 - mov r6, r1 - mov r7, r1 - mov r8, r1 - mov r9, r1 - -mfill_loop - ; Fill 32 pixels per loop iteration - subs r2, r2, #32 - stmgeia r0!, {r1, r3, r4, r5, r6, r7, r8, r9} - stmgeia r0!, {r1, r3, r4, r5, r6, r7, r8, r9} - stmgeia r0!, {r1, r3, r4, r5, r6, r7, r8, r9} - stmgeia r0!, {r1, r3, r4, r5, r6, r7, r8, r9} - bgt mfill_loop - -mfill_remaining - - ; Fill up to 31 remaining pixels - - ; Fill 16 pixels - tst r2, #16 - stmneia r0!, {r1, r3, r4, r5, r6, r7, r8, r9} - stmneia r0!, {r1, r3, r4, r5, r6, r7, r8, r9} - - ; Fill 8 pixels - tst r2, #8 - stmneia r0!, {r1, r3, r4, r5, r6, r7, r8, r9} - - ; Fill 4 pixels - tst r2, #4 - stmneia r0!, {r1, r3, r4, r5} - - ; Fill 2 pixels - tst r2, #2 - stmneia r0!, {r1, r3} - - ; Fill last one - tst r2, #1 - strne r1, [r0] - - ldmfd sp!, {r4-r12, pc} ; pop and return - -;----------------------------------------------------------------------------- -; comp_func_Source_arm -; -; @brief -; -; @param dest Destination buffer (r0) -; @param src Source buffer (r1) -; @param length Length (r2) -; @param const_alpha Constant alpha (r3) -; -;--------------------------------------------------------------------------- -comp_func_Source_armv6 Function - stmfd sp!, {r4-r12, r14} - - cmp r3, #255 ; if(r3 == 255) - bne src2 ; branch if not - -src1 PixCpy r0, r1, r2 - - ldmfd sp!, {r4-r12, pc} ; pop and return - -src2 - ;ldr r14, =ComponentHalf ; load 0x800080 to r14 - mov r14, #0x800000 - add r14, r14, #0x80 - -src22 BlendRow PixelSourceConstAlpha - - ldmfd sp!, {r4-r12, pc} ; pop and return - -;----------------------------------------------------------------------------- -; comp_func_SourceOver_arm -; -; @brief -; -; @param dest Destination buffer (r0) -; @param src Source buffer (r1) -; @param length Length (r2) -; @param const_alpha Constant alpha (r3) -; -;--------------------------------------------------------------------------- -comp_func_SourceOver_armv6 Function - stmfd sp!, {r4-r12, r14} - - ;ldr r14, =ComponentHalf ; load 0x800080 to r14 - mov r14, #0x800000 - add r14, r14, #0x80 - - cmp r3, #255 ; if(r3 == 255) - bne srcovr2 ; branch if not - -srcovr1 BlendRow PixelSourceOver - - ldmfd sp!, {r4-r12, pc} ; pop and return - -srcovr2 - -srcovr22 BlendRow PixelSourceOverConstAlpha - - ldmfd sp!, {r4-r12, pc} ; pop and return - - - END ; File end -- cgit v0.12 From cc6bc2c286d2638f428f4d25f7eac00875578d3f Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Fri, 15 Oct 2010 13:04:58 +0300 Subject: Implemented Qt::WA_ShowWithoutActivating for Symbian. Task-number: QTBUG-14476 Reviewed-by: Jason Barron --- src/gui/kernel/qwidget_s60.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 9a451ce..5df5e19 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -544,7 +544,7 @@ void QWidgetPrivate::show_sys() id->MakeVisible(true); - if(q->isWindow()) + if(q->isWindow()&&!q->testAttribute(Qt::WA_ShowWithoutActivating)) id->setFocusSafely(true); } -- cgit v0.12 From 9e378145294da33495d48b2c0742461ae6c2a3ba Mon Sep 17 00:00:00 2001 From: David Faure Date: Thu, 15 Jul 2010 16:08:43 +0200 Subject: QWorkspace: fix hardcoded min size overwriting the real min size The setMinimumSize call was having precedence over the minimumSizeHint, so when having a sizegrip enabled it was possible to resize a MDI window to a much smaller size than its min size (actually it would flicker between the two sizes, on each resize). Fixed by moving that min size (for the titlebar contents) to the calculations in minimumSizeHint(). Reviewed-by: mariusso --- src/gui/widgets/qworkspace.cpp | 15 +++++++++------ tests/auto/qworkspace/tst_qworkspace.cpp | 10 ++++++++++ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/gui/widgets/qworkspace.cpp b/src/gui/widgets/qworkspace.cpp index 7180c4d..3a9b30c 100644 --- a/src/gui/widgets/qworkspace.cpp +++ b/src/gui/widgets/qworkspace.cpp @@ -2551,7 +2551,6 @@ QWorkspaceChild::QWorkspaceChild(QWidget* window, QWorkspace *parent, Qt::Window this, SLOT(titleBarDoubleClicked())); } - setMinimumSize(128, 0); int fw = style()->pixelMetric(QStyle::PM_MdiSubWindowFrameWidth, 0, this); setContentsMargins(fw, fw, fw, fw); @@ -2702,11 +2701,15 @@ QSize QWorkspaceChild::sizeHint() const QSize QWorkspaceChild::minimumSizeHint() const { - if (!childWidget) - return QWidget::minimumSizeHint() + baseSize(); - QSize s = childWidget->minimumSize(); - if (s.isEmpty()) - s = childWidget->minimumSizeHint(); + QSize s; + if (!childWidget) { + s = QWidget::minimumSizeHint(); + } else { + s = childWidget->minimumSize(); + if (s.isEmpty()) + s = childWidget->minimumSizeHint(); + } + s = s.expandedTo(QSize(128, 0)); return s + baseSize(); } diff --git a/tests/auto/qworkspace/tst_qworkspace.cpp b/tests/auto/qworkspace/tst_qworkspace.cpp index 4cf76b5..9039eb3 100644 --- a/tests/auto/qworkspace/tst_qworkspace.cpp +++ b/tests/auto/qworkspace/tst_qworkspace.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #include #if defined(QT3_SUPPORT) #include @@ -591,16 +592,25 @@ void tst_QWorkspace::childSize() MyChild *child = new MyChild(&ws); child->show(); + ws.addWindow(child); QCOMPARE(child->size(), child->sizeHint()); delete child; child = new MyChild(&ws); child->setFixedSize(200, 200); child->show(); + ws.addWindow(child); QCOMPARE(child->size(), child->minimumSize()); + QCOMPARE(child->parentWidget()->metaObject()->className(), "QWorkspaceChild"); + QVERIFY(child->parentWidget()->width() >= 200); + // check that the minimum size is respected, using closestAcceptableSize + // like QSizeGrip does. + const QSize newSize = QLayout::closestAcceptableSize(child->parentWidget(), QSize(100, 100)); + QVERIFY(newSize.width() >= 200); delete child; child = new MyChild(&ws); + ws.addWindow(child); child->resize(150, 150); child->show(); QCOMPARE(child->size(), QSize(150,150)); -- cgit v0.12 From 5fd505cac71e97cf181c0d05867a77e640814fc6 Mon Sep 17 00:00:00 2001 From: Fabien Freling Date: Fri, 15 Oct 2010 13:20:42 +0200 Subject: Disable the unified toolbar before entering fullscreen on Mac OS X. We are just enforcing what the documentation recommended. Task-number: QTBUG-13772 Reviewed-by: Samuel --- src/gui/kernel/qwidget.cpp | 34 ++++++++++++++++++++++++++++++++++ src/gui/widgets/qmainwindow.cpp | 4 ++-- src/gui/widgets/qmainwindowlayout_p.h | 1 + 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index f7c795e..9b44f15 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -68,6 +68,7 @@ # include "qt_cocoa_helpers_mac_p.h" # include "qmainwindow.h" # include "qtoolbar.h" +# include #endif #if defined(Q_WS_QWS) # include "qwsdisplay_qws.h" @@ -3002,6 +3003,15 @@ bool QWidget::isFullScreen() const */ void QWidget::showFullScreen() { +#ifdef Q_WS_MAC + // If the unified toolbar is enabled, we have to disable it before going fullscreen. + QMainWindow *mainWindow = qobject_cast(this); + if (mainWindow && mainWindow->unifiedTitleAndToolBarOnMac()) { + mainWindow->setUnifiedTitleAndToolBarOnMac(false); + QMainWindowLayout *mainLayout = qobject_cast(mainWindow->layout()); + mainLayout->activateUnifiedToolbarAfterFullScreen = true; + } +#endif // Q_WS_MAC ensurePolished(); #ifdef QT3_SUPPORT if (parent()) @@ -3034,6 +3044,18 @@ void QWidget::showMaximized() setWindowState((windowState() & ~(Qt::WindowMinimized | Qt::WindowFullScreen)) | Qt::WindowMaximized); +#ifdef Q_WS_MAC + // If the unified toolbar was enabled before going fullscreen, we have to enable it back. + QMainWindow *mainWindow = qobject_cast(this); + if (mainWindow) + { + QMainWindowLayout *mainLayout = qobject_cast(mainWindow->layout()); + if (mainLayout->activateUnifiedToolbarAfterFullScreen) { + mainWindow->setUnifiedTitleAndToolBarOnMac(true); + mainLayout->activateUnifiedToolbarAfterFullScreen = false; + } + } +#endif // Q_WS_MAC show(); } @@ -3055,6 +3077,18 @@ void QWidget::showNormal() setWindowState(windowState() & ~(Qt::WindowMinimized | Qt::WindowMaximized | Qt::WindowFullScreen)); +#ifdef Q_WS_MAC + // If the unified toolbar was enabled before going fullscreen, we have to enable it back. + QMainWindow *mainWindow = qobject_cast(this); + if (mainWindow) + { + QMainWindowLayout *mainLayout = qobject_cast(mainWindow->layout()); + if (mainLayout->activateUnifiedToolbarAfterFullScreen) { + mainWindow->setUnifiedTitleAndToolBarOnMac(true); + mainLayout->activateUnifiedToolbarAfterFullScreen = false; + } + } +#endif // Q_WS_MAC show(); } diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp index 1183be6..d971f61 100644 --- a/src/gui/widgets/qmainwindow.cpp +++ b/src/gui/widgets/qmainwindow.cpp @@ -78,6 +78,7 @@ public: : layout(0), explicitIconSize(false), toolButtonStyle(Qt::ToolButtonIconOnly) #ifdef Q_WS_MAC , useHIToolBar(false) + , activateUnifiedToolbarAfterFullScreen(false) #endif #if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_CURSOR) , hasOldCursor(false) , cursorAdjusted(false) @@ -89,6 +90,7 @@ public: Qt::ToolButtonStyle toolButtonStyle; #ifdef Q_WS_MAC bool useHIToolBar; + bool activateUnifiedToolbarAfterFullScreen; #endif void init(); QList hoverSeparator; @@ -1501,8 +1503,6 @@ bool QMainWindow::event(QEvent *event) \i Before Qt 4.5, if you called showFullScreen() on the main window, the QToolbar would disappear since it is considered to be part of the title bar. Qt 4.5 and up will now work around this by pulling the toolbars out and back into the regular toolbar and vice versa when you swap out. - However, a good practice would be that turning off the unified toolbar before you call - showFullScreen() and restoring it after you call showNormal(). \endlist Setting this back to false will remove these restrictions. diff --git a/src/gui/widgets/qmainwindowlayout_p.h b/src/gui/widgets/qmainwindowlayout_p.h index e1b981c..3e1a95d 100644 --- a/src/gui/widgets/qmainwindowlayout_p.h +++ b/src/gui/widgets/qmainwindowlayout_p.h @@ -335,6 +335,7 @@ public: void cleanUpMacToolbarItems(); void fixSizeInUnifiedToolbar(QToolBar *tb) const; bool useHIToolBar; + bool activateUnifiedToolbarAfterFullScreen; void syncUnifiedToolbarVisibility(); bool blockVisiblityCheck; #endif -- cgit v0.12 From 13bc1e0b99dd1d32bc0fef1dbdf0813ff5f4c66c Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Fri, 15 Oct 2010 14:27:26 +0300 Subject: Make s60pixelmetrics harvester utility app more robust There were some exceptional situations where the utility app caused either a memory leak, or outright crashed. Reviewed-by: TrustMe --- util/s60pixelmetrics/pm_mapperapp.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/util/s60pixelmetrics/pm_mapperapp.cpp b/util/s60pixelmetrics/pm_mapperapp.cpp index a88499d..d68a0b0 100644 --- a/util/s60pixelmetrics/pm_mapperapp.cpp +++ b/util/s60pixelmetrics/pm_mapperapp.cpp @@ -166,6 +166,7 @@ void CPixelMetricsMapperAppUi::HandleCommandL( TInt aCommand ) else bufferPtr.Append(_L("screen.")); ShowL( *buffer, last ); + CleanupStack::PopAndDestroy( buffer ); } break; case ECmdStatus: @@ -257,7 +258,7 @@ void CPixelMetricsMapperAppUi::HandleCommandL( TInt aCommand ) bufferPtr.Append(_L("Orientation cannot be changed.")); ShowL( *buffer, last ); bufferPtr.Zero(); - delete buffer; + CleanupStack::PopAndDestroy( buffer ); break; } #endif //__SERIES60_31__ @@ -278,7 +279,7 @@ void CPixelMetricsMapperAppUi::HandleCommandL( TInt aCommand ) bufferPtr.Append(_L("Orientation changed.")); ShowL( *buffer, last ); bufferPtr.Zero(); - delete buffer; + CleanupStack::PopAndDestroy( buffer ); break; } case ECmdStartCalculations: @@ -787,11 +788,14 @@ void CPixelMetricsMapperAppUi::CreateHeaderFileL() const CleanupStack::PopAndDestroy(); //sourceFile } - bufferLayoutHdr = bufferLayoutHdr.Left(bufferLayoutHdr.Length()-2); - bufferPMData = bufferPMData.Left(bufferPMData.Length()-2); - textFile.Write(bufferLayoutHdr); - textFile.Write(KCRLF); - textFile.Write(bufferPMData); + if (fileCount > 0) + { + bufferLayoutHdr = bufferLayoutHdr.Left(bufferLayoutHdr.Length()-2); + bufferPMData = bufferPMData.Left(bufferPMData.Length()-2); + textFile.Write(bufferLayoutHdr); + textFile.Write(KCRLF); + textFile.Write(bufferPMData); + } delete dirList; CleanupStack::PopAndDestroy(); //file -- cgit v0.12 From 71745cab0d112edf3755f1883b3f9b34c0f251c9 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Fri, 15 Oct 2010 13:38:48 +0200 Subject: Doc: fixing unclosed

--- tools/qdoc3/htmlgenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index c804d09..7b719c8 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -4234,7 +4234,7 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, if (qpgn->isDefault()) out() << "default"; generateQmlItem(qpn, relative, marker, false); - out() << ""; + out() << "

"; } ++p; } -- cgit v0.12 From b44ca15776227c8d04e88e1c343a87fd6c54fee0 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Fri, 15 Oct 2010 13:42:45 +0200 Subject: tst_qnetworkreply: New auto test for unreachable IPs This test fails right now and we should fix the underlying issue :-) Task-number: QT-4155 --- tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index 306b5f8..88714e6 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -291,6 +291,8 @@ private Q_SLOTS: void qtbug12908compressedHttpReply(); + void getFromUnreachableIp(); + // NOTE: This test must be last! void parentingRepliesToTheApp(); }; @@ -4301,6 +4303,19 @@ void tst_QNetworkReply::qtbug12908compressedHttpReply() QCOMPARE(reply->error(), QNetworkReply::NoError); } +void tst_QNetworkReply::getFromUnreachableIp() +{ + QNetworkAccessManager manager; + + QNetworkRequest request(QUrl("http://255.255.255.255/42/23/narf/narf/narf")); + QNetworkReplyPtr reply = manager.get(request); + + connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); + QTestEventLoop::instance().enterLoop(5); + QVERIFY(!QTestEventLoop::instance().timeout()); + + QVERIFY(reply->error() != QNetworkReply::NoError); +} // NOTE: This test must be last testcase in tst_qnetworkreply! void tst_QNetworkReply::parentingRepliesToTheApp() -- cgit v0.12 From 05231f486b93dfb3992bfb96568f8c71d877e104 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 15 Oct 2010 15:14:27 +0300 Subject: Fix epocroot handling in createpackage.pl script Before this fix, creating stub sis failed if epocroot was simply a forward slash. Mixing forward slashes and backslashes also caused issues. Reviewed-by: Janne Koskinen --- bin/createpackage.pl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/bin/createpackage.pl b/bin/createpackage.pl index 41ba2e3..522d1fb 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -140,7 +140,12 @@ unless (GetOptions('i|install' => \$install, } my $epocroot = $ENV{EPOCROOT}; -$epocroot =~ s,[\\/]$,,x; +if ($epocroot ne "") { + $epocroot =~ s,\\,/,g; + if ($epocroot =~ m,[^/]$,) { + $epocroot = $epocroot."/"; + } +} my $certfilepath = abs_path(dirname($certfile)); @@ -328,11 +333,11 @@ if ($preprocessonly) { if($stub) { if(!($epocroot)) { die("ERROR: EPOCROOT must be set to create stub sis files"); } - my $systeminstall = "$epocroot/epoc32/data/z/system/install"; + my $systeminstall = "${epocroot}epoc32/data/z/system/install"; mkpath($systeminstall); my $stub_sis_name = $systeminstall."/".$stub_sis_name; # Create stub SIS. - system ("$epocroot/epoc32/tools/makesis -s $pkgoutput $stub_sis_name"); + system ("${epocroot}epoc32/tools/makesis -s $pkgoutput $stub_sis_name"); } else { if ($certtext eq "Self Signed" && !@certificates @@ -346,7 +351,7 @@ if($stub) { # Create SIS. # The 'and' is because system uses 0 to indicate success. if($epocroot) { - system ("$epocroot/epoc32/tools/makesis $pkgoutput $unsigned_sis_name") and die ("ERROR: makesis failed"); + system ("${epocroot}epoc32/tools/makesis $pkgoutput $unsigned_sis_name") and die ("ERROR: makesis failed"); } else { system ("makesis $pkgoutput $unsigned_sis_name") and die ("ERROR: makesis failed"); } -- cgit v0.12 From 534ba3c7314820604ba5aeeffa6051c91e7c1d09 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Fri, 15 Oct 2010 13:48:51 +0200 Subject: Cocoa: fix child window issues (QTBUG 13867, 14420, 13126) The main problem behind these issues is the fact that when two windows exists in a parent-child relationship (using the [NSWindow addChild] API), Cocoa will automatically hide both windows even when just hiding one of them. This turns out really bad when the child is a tool window, because those will automatically be hidden when the application becomes deactivated. And as such, the parent will hide as well, tool or not. So after a LOT of investigation, involving manually trying to level windows rather than using the addChild API, the conclusing is that we cannot do it; Cocoa and Qt just tries to outsmart each other. So instead, we now say that only normal windows and dialogs can be part of a parent-child relationship (which seems to be how Apple intended it as well). The rest, and in particular tool windows, we just ignore. This will differ from some other platforms, but at the same time, since tool windows are on a level above other windows on mac from before, and the docs specifies that this can be different from platform to platform, we see it as acceptable. Rev-By: prasanth Rev-By: msorvig --- src/gui/kernel/qwidget_mac.mm | 47 ++++++++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 1e2aa9f..b3b9183 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -2794,19 +2794,36 @@ void QWidgetPrivate::transferChildren() #ifdef QT_MAC_USE_COCOA void QWidgetPrivate::setSubWindowStacking(bool set) { + // This will set/remove a visual relationship between parent and child on screen. + // The reason for doing this is to ensure that a child always stacks infront of + // its parent. Unfortunatly is turns out that [NSWindow addChildWindow] has + // several unwanted side-effects, one of them being the moving of a child when + // moving the parent, which we choose to accept. A way tougher side-effect is + // that Cocoa will hide the parent if you hide the child. And in the case of + // a tool window, since it will normally hide when you deactivate the + // application, Cocoa will hide the parent upon deactivate as well. The result often + // being no more visible windows on screen. So, to make a long story short, we only + // allow parent-child relationships between windows that both are on the NSNormalWindowLevel + // (because Cocoa will also use the window level to decide upon strange behaviour). + Q_Q(QWidget); - if (!q->isWindow() || !q->testAttribute(Qt::WA_WState_Created)) + if (!q->isWindow()) + return; + NSWindow *qwin = [qt_mac_nativeview_for(q) window]; + if (!qwin) + return; + if (set && [qwin level] != NSNormalWindowLevel) + return; + if (set && ![qwin isVisible]) return; if (QWidget *parent = q->parentWidget()) { - if (parent->testAttribute(Qt::WA_WState_Created)) { + if (NSWindow *pwin = [qt_mac_nativeview_for(parent) window]) { if (set) { - if (parent->isVisible()) { - NSWindow *childwin = qt_mac_window_for(q); - [qt_mac_window_for(parent) addChildWindow:childwin ordered:NSWindowAbove]; - } + if ([pwin isVisible] && [pwin level] == NSNormalWindowLevel && ![qwin parentWindow]) + [pwin addChildWindow:qwin ordered:NSWindowAbove]; } else { - [qt_mac_window_for(parent) removeChildWindow:qt_mac_window_for(q)]; + [pwin removeChildWindow:qwin]; } } } @@ -2814,12 +2831,14 @@ void QWidgetPrivate::setSubWindowStacking(bool set) QList widgets = q->findChildren(); for (int i=0; iisWindow() && child->testAttribute(Qt::WA_WState_Created) && child->isVisibleTo(q)) { - if (set) { - NSWindow *childwin = qt_mac_window_for(child); - [qt_mac_window_for(q) addChildWindow:childwin ordered:NSWindowAbove]; - } else { - [qt_mac_window_for(q) removeChildWindow:qt_mac_window_for(child)]; + if (child && child->isWindow()) { + if (NSWindow *cwin = [qt_mac_nativeview_for(child) window]) { + if (set) { + if ([cwin isVisible] && [cwin level] == NSNormalWindowLevel && ![cwin parentWindow]) + [qwin addChildWindow:cwin ordered:NSWindowAbove]; + } else { + [qwin removeChildWindow:qt_mac_window_for(child)]; + } } } } @@ -3442,7 +3461,6 @@ void QWidgetPrivate::show_sys() #else // sync the opacity value back (in case of a fade). [window setAlphaValue:q->windowOpacity()]; - setSubWindowStacking(true); QWidget *top = 0; if (QApplicationPrivate::tryModalHelper(q, &top)) { @@ -3461,6 +3479,7 @@ void QWidgetPrivate::show_sys() [modalWin orderFront:window]; } } + setSubWindowStacking(true); #endif if (q->windowType() == Qt::Popup) { if (q->focusWidget()) -- cgit v0.12 From 82e03a66d18a27ea06dfa35f1e236bbe9ef972f7 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Fri, 15 Oct 2010 15:02:26 +0200 Subject: Change git commit template Add "pending" to Reviewed-by to prevent accidental git push --- .commit-template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.commit-template b/.commit-template index 589ca89..6e0e3a4 100644 --- a/.commit-template +++ b/.commit-template @@ -5,6 +5,6 @@ # ---[ Fields ]-----------------[ uncomment and edit as applicable ]---| #Task-number: -#Reviewed-by: +Reviewed-by: pending # ==================================[ please wrap at 72 characters ]===| -- cgit v0.12 From 7b32da4af8b6f305185d1c22d1425164b00e5391 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Fri, 15 Oct 2010 15:23:33 +0200 Subject: Cocoa: small update to 534ba3c7314820604ba5aeeffa6051c91e7c1d09 Rather than checking window level directly, we check the Qt window type. This has the advantage that we also include dialogs that are modal. --- src/gui/kernel/qwidget_mac.mm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index b3b9183..997419b 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -2803,8 +2803,8 @@ void QWidgetPrivate::setSubWindowStacking(bool set) // a tool window, since it will normally hide when you deactivate the // application, Cocoa will hide the parent upon deactivate as well. The result often // being no more visible windows on screen. So, to make a long story short, we only - // allow parent-child relationships between windows that both are on the NSNormalWindowLevel - // (because Cocoa will also use the window level to decide upon strange behaviour). + // allow parent-child relationships between windows that both are either a plain window + // or a dialog. Q_Q(QWidget); if (!q->isWindow()) @@ -2812,7 +2812,8 @@ void QWidgetPrivate::setSubWindowStacking(bool set) NSWindow *qwin = [qt_mac_nativeview_for(q) window]; if (!qwin) return; - if (set && [qwin level] != NSNormalWindowLevel) + Qt::WindowType qtype = q->windowType(); + if (set && !(qtype == Qt::Window || qtype == Qt::Dialog)) return; if (set && ![qwin isVisible]) return; @@ -2820,7 +2821,8 @@ void QWidgetPrivate::setSubWindowStacking(bool set) if (QWidget *parent = q->parentWidget()) { if (NSWindow *pwin = [qt_mac_nativeview_for(parent) window]) { if (set) { - if ([pwin isVisible] && [pwin level] == NSNormalWindowLevel && ![qwin parentWindow]) + Qt::WindowType ptype = parent->window()->windowType(); + if ([pwin isVisible] && (ptype == Qt::Window || ptype == Qt::Dialog) && ![qwin parentWindow]) [pwin addChildWindow:qwin ordered:NSWindowAbove]; } else { [pwin removeChildWindow:qwin]; @@ -2834,7 +2836,8 @@ void QWidgetPrivate::setSubWindowStacking(bool set) if (child && child->isWindow()) { if (NSWindow *cwin = [qt_mac_nativeview_for(child) window]) { if (set) { - if ([cwin isVisible] && [cwin level] == NSNormalWindowLevel && ![cwin parentWindow]) + Qt::WindowType ctype = child->window()->windowType(); + if ([cwin isVisible] && (ctype == Qt::Window || ctype == Qt::Dialog) && ![cwin parentWindow]) [qwin addChildWindow:cwin ordered:NSWindowAbove]; } else { [qwin removeChildWindow:qt_mac_window_for(child)]; -- cgit v0.12 From b498c15ebbf120819f73fe761388fd63c2de4b23 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Fri, 15 Oct 2010 17:01:37 +0200 Subject: QNAM HTTP: Fix error signal emission for unreachable IPs This commit fixes getFromUnreachableIp() Reviewed-by: Thiago Macieira Task-Number: QTBUG-10679 --- src/network/access/qhttpnetworkconnectionchannel.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 6437f6f..d10f951 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -105,12 +105,22 @@ void QHttpNetworkConnectionChannel::init() QObject::connect(socket, SIGNAL(readyRead()), this, SLOT(_q_readyRead()), Qt::DirectConnection); + + // The disconnected() and error() signals may already come + // while calling connectToHost(). + // In case of a cached hostname or an IP this + // will then emit a signal to the user of QNetworkReply + // but cannot be caught because the user did not have a chance yet + // to connect to QNetworkReply's signals. + qRegisterMetaType("QAbstractSocket::SocketError"); QObject::connect(socket, SIGNAL(disconnected()), this, SLOT(_q_disconnected()), - Qt::DirectConnection); + Qt::QueuedConnection); QObject::connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(_q_error(QAbstractSocket::SocketError)), - Qt::DirectConnection); + Qt::QueuedConnection); + + #ifndef QT_NO_NETWORKPROXY QObject::connect(socket, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), this, SLOT(_q_proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), -- cgit v0.12 From fa0b5ef33467868d895d925e34f539f28ddb2d8b Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Sat, 16 Oct 2010 11:27:00 +0200 Subject: Revert "QWorkspace: fix hardcoded min size overwriting the real min size" This reverts commit 9e378145294da33495d48b2c0742461ae6c2a3ba. QWorkspace is obsolete. And it does not pass the tests. TESTFUNCTION_FAIL tst_qaccessibility::workspaceTest (macx-g++_cocoa) TESTFUNCTION_FAIL tst_qaccessibility::workspaceTest (macx-g++_cocoa_osx106) --- src/gui/widgets/qworkspace.cpp | 15 ++++++--------- tests/auto/qworkspace/tst_qworkspace.cpp | 10 ---------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/src/gui/widgets/qworkspace.cpp b/src/gui/widgets/qworkspace.cpp index 3a9b30c..7180c4d 100644 --- a/src/gui/widgets/qworkspace.cpp +++ b/src/gui/widgets/qworkspace.cpp @@ -2551,6 +2551,7 @@ QWorkspaceChild::QWorkspaceChild(QWidget* window, QWorkspace *parent, Qt::Window this, SLOT(titleBarDoubleClicked())); } + setMinimumSize(128, 0); int fw = style()->pixelMetric(QStyle::PM_MdiSubWindowFrameWidth, 0, this); setContentsMargins(fw, fw, fw, fw); @@ -2701,15 +2702,11 @@ QSize QWorkspaceChild::sizeHint() const QSize QWorkspaceChild::minimumSizeHint() const { - QSize s; - if (!childWidget) { - s = QWidget::minimumSizeHint(); - } else { - s = childWidget->minimumSize(); - if (s.isEmpty()) - s = childWidget->minimumSizeHint(); - } - s = s.expandedTo(QSize(128, 0)); + if (!childWidget) + return QWidget::minimumSizeHint() + baseSize(); + QSize s = childWidget->minimumSize(); + if (s.isEmpty()) + s = childWidget->minimumSizeHint(); return s + baseSize(); } diff --git a/tests/auto/qworkspace/tst_qworkspace.cpp b/tests/auto/qworkspace/tst_qworkspace.cpp index 9039eb3..4cf76b5 100644 --- a/tests/auto/qworkspace/tst_qworkspace.cpp +++ b/tests/auto/qworkspace/tst_qworkspace.cpp @@ -44,7 +44,6 @@ #include #include #include -#include #include #if defined(QT3_SUPPORT) #include @@ -592,25 +591,16 @@ void tst_QWorkspace::childSize() MyChild *child = new MyChild(&ws); child->show(); - ws.addWindow(child); QCOMPARE(child->size(), child->sizeHint()); delete child; child = new MyChild(&ws); child->setFixedSize(200, 200); child->show(); - ws.addWindow(child); QCOMPARE(child->size(), child->minimumSize()); - QCOMPARE(child->parentWidget()->metaObject()->className(), "QWorkspaceChild"); - QVERIFY(child->parentWidget()->width() >= 200); - // check that the minimum size is respected, using closestAcceptableSize - // like QSizeGrip does. - const QSize newSize = QLayout::closestAcceptableSize(child->parentWidget(), QSize(100, 100)); - QVERIFY(newSize.width() >= 200); delete child; child = new MyChild(&ws); - ws.addWindow(child); child->resize(150, 150); child->show(); QCOMPARE(child->size(), QSize(150,150)); -- cgit v0.12 From da74568ede8faf587b2f312874632a537cb712c0 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Mon, 18 Oct 2010 11:43:52 +1000 Subject: Add additional documentation for the qmltime benchmark. --- tests/benchmarks/declarative/qmltime/qmltime.cpp | 65 +++++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/tests/benchmarks/declarative/qmltime/qmltime.cpp b/tests/benchmarks/declarative/qmltime/qmltime.cpp index e1b73ca..f0a24f6 100644 --- a/tests/benchmarks/declarative/qmltime/qmltime.cpp +++ b/tests/benchmarks/declarative/qmltime/qmltime.cpp @@ -148,7 +148,68 @@ void Timer::runTest(QDeclarativeContext *context, uint iterations) void usage(const char *name) { - qWarning("Usage: %s [-iterations ] [-parent] ", name); + qWarning("Usage: %s [-iterations ] [-parent] \n", name); + + qWarning("qmltime is a tool for benchmarking the runtime cost of instantiating\n" + "a QML component. It is typically run as follows:\n" + "\n" + "%s path/to/benchmark.qml\n" + "\n" + "If the -parent option is specified, the component being measured will also\n" + "be parented to an item already in the scene.\n" + "\n" + "If the -iterations option is specified, the benchmark will run the specified\n" + "number of iterations. If -iterations is not specified, 1024 iterations\n" + "are performed.\n" + "\n" + "qmltime expects the file to be benchmarked to contain a certain structure.\n" + "Specifically, it requires the presence of a QmlTime.Timer element. For example,\n" + "say we wanted to benchmark the following list delegate:\n" + "\n" + "Rectangle {\n" + " color: \"green\"\n" + " width: 400; height: 100\n" + " Text {\n" + " anchors.centerIn: parent\n" + " text: name\n" + " }\n" + "}\n" + "\n" + "we would create a benchmark file that looks like this:\n" + "\n" + "import QtQuick 1.0\n" + "import QmlTime 1.0 as QmlTime\n" + "\n" + "Item {\n" + "\n" + " property string name: \"Bob Smith\"\n" + "\n" + " QmlTime.Timer {\n" + " component: Rectangle {\n" + " color: \"green\"\n" + " width: 400; height: 100\n" + " Text {\n" + " anchors.centerIn: parent\n" + " text: name\n" + " }\n" + " }\n" + " }\n" + "}\n" + "\n" + "The outer Item functions as a dummy data provider for any additional\n" + "data required by the bindings in the component being benchmarked (in the\n" + "example above we provide a \"name\" property).\n" + "\n" + "When started, the component is instantiated once before running\n" + "the benchmark, which means that the reported time does not include\n" + "compile time (as the results of compilation are cached internally).\n" + "In this sense the times reported by qmltime best correspond to the\n" + "costs associated with delegate creation in the view classes, where the\n" + "same delegate is instantiated over and over. Conversely, it is not a\n" + "good approximation for e.g. Loader, which typically only instantiates\n" + "an element once (and so for Loader the compile time is very relevant\n" + "to the overall cost).", name); + exit(-1); } @@ -178,6 +239,8 @@ int main(int argc, char ** argv) } } else if (arg == "-parent") { willParent = true; + } else if (arg == "-help") { + usage(argv[0]); } else { filename = QLatin1String(argv[ii]); } -- cgit v0.12 From 0c06e59577df1ec715e67d6d5842800bcec24945 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Mon, 18 Oct 2010 13:24:28 +1000 Subject: Properties should have precedence over methods. Fixes regression introduced by recent changes to the property cache. Task-Number: QTBUG-14500 Reviewed-by: Aaron Kennedy --- src/declarative/qml/qdeclarativepropertycache.cpp | 58 +++++++++++------------ 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp index 91aaaa4..0adcdbd 100644 --- a/src/declarative/qml/qdeclarativepropertycache.cpp +++ b/src/declarative/qml/qdeclarativepropertycache.cpp @@ -236,35 +236,6 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb { QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine); - int propCount = metaObject->propertyCount(); - int propOffset = metaObject->propertyOffset(); - - indexCache.resize(propCount); - for (int ii = propOffset; ii < propCount; ++ii) { - QMetaProperty p = metaObject->property(ii); - if (!p.isScriptable()) - continue; - - QString propName = QString::fromUtf8(p.name()); - - RData *data = new RData; - data->identifier = enginePriv->objectClass->createPersistentIdentifier(propName); - indexCache[ii] = data; - - data->load(p, engine); - data->flags |= propertyFlags; - - if (stringCache.contains(propName)) { - stringCache[propName]->release(); - identifierCache[data->identifier.identifier]->release(); - } - - stringCache.insert(propName, data); - identifierCache.insert(data->identifier.identifier, data); - data->addref(); - data->addref(); - } - int methodCount = metaObject->methodCount(); // 3 to block the destroyed signal and the deleteLater() slot int methodOffset = qMax(3, metaObject->methodOffset()); @@ -304,6 +275,35 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb data->addref(); data->addref(); } + + int propCount = metaObject->propertyCount(); + int propOffset = metaObject->propertyOffset(); + + indexCache.resize(propCount); + for (int ii = propOffset; ii < propCount; ++ii) { + QMetaProperty p = metaObject->property(ii); + if (!p.isScriptable()) + continue; + + QString propName = QString::fromUtf8(p.name()); + + RData *data = new RData; + data->identifier = enginePriv->objectClass->createPersistentIdentifier(propName); + indexCache[ii] = data; + + data->load(p, engine); + data->flags |= propertyFlags; + + if (stringCache.contains(propName)) { + stringCache[propName]->release(); + identifierCache[data->identifier.identifier]->release(); + } + + stringCache.insert(propName, data); + identifierCache.insert(data->identifier.identifier, data); + data->addref(); + data->addref(); + } } void QDeclarativePropertyCache::updateRecur(QDeclarativeEngine *engine, const QMetaObject *metaObject) -- cgit v0.12 From d87e12f6d5c120b70d7182e20524fcee72db7cba Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Mon, 18 Oct 2010 13:51:08 +1000 Subject: ListView.visibleArea.heightRatio should not emit a signal when it does not change. Task-number: QTBUG-14492 Reviewed-by: Michael Brasser --- .../graphicsitems/qdeclarativeflickable.cpp | 25 ++++++++++++++++------ .../graphicsitems/qdeclarativeflickable_p.h | 1 - .../graphicsitems/qdeclarativeflickable_p_p.h | 13 ++++++----- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index 001abca..2e5a43d 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -85,7 +85,11 @@ qreal QDeclarativeFlickableVisibleArea::yPosition() const void QDeclarativeFlickableVisibleArea::updateVisible() { QDeclarativeFlickablePrivate *p = static_cast(QGraphicsItemPrivate::get(flickable)); - bool pageChange = false; + + bool changeX = false; + bool changeY = false; + bool changeWidth = false; + bool changeHeight = false; // Vertical const qreal viewheight = flickable->height(); @@ -95,11 +99,11 @@ void QDeclarativeFlickableVisibleArea::updateVisible() if (pageSize != m_heightRatio) { m_heightRatio = pageSize; - pageChange = true; + changeHeight = true; } if (pagePos != m_yPosition) { m_yPosition = pagePos; - pageChange = true; + changeY = true; } // Horizontal @@ -110,14 +114,21 @@ void QDeclarativeFlickableVisibleArea::updateVisible() if (pageSize != m_widthRatio) { m_widthRatio = pageSize; - pageChange = true; + changeWidth = true; } if (pagePos != m_xPosition) { m_xPosition = pagePos; - pageChange = true; + changeX = true; } - if (pageChange) - emit pageChanged(); + + if (changeX) + emit xPositionChanged(m_xPosition); + if (changeY) + emit yPositionChanged(m_yPosition); + if (changeWidth) + emit widthRatioChanged(m_widthRatio); + if (changeHeight) + emit heightRatioChanged(m_heightRatio); } diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p.h index 44f2bcf..4fb9c25 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable_p.h +++ b/src/declarative/graphicsitems/qdeclarativeflickable_p.h @@ -163,7 +163,6 @@ Q_SIGNALS: void horizontalVelocityChanged(); void verticalVelocityChanged(); void isAtBoundaryChanged(); - void pageChanged(); void flickableDirectionChanged(); void interactiveChanged(); void boundsBehaviorChanged(); diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h index beee741..afefde2 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h @@ -182,10 +182,10 @@ class QDeclarativeFlickableVisibleArea : public QObject { Q_OBJECT - Q_PROPERTY(qreal xPosition READ xPosition NOTIFY pageChanged) - Q_PROPERTY(qreal yPosition READ yPosition NOTIFY pageChanged) - Q_PROPERTY(qreal widthRatio READ widthRatio NOTIFY pageChanged) - Q_PROPERTY(qreal heightRatio READ heightRatio NOTIFY pageChanged) + Q_PROPERTY(qreal xPosition READ xPosition NOTIFY xPositionChanged) + Q_PROPERTY(qreal yPosition READ yPosition NOTIFY yPositionChanged) + Q_PROPERTY(qreal widthRatio READ widthRatio NOTIFY widthRatioChanged) + Q_PROPERTY(qreal heightRatio READ heightRatio NOTIFY heightRatioChanged) public: QDeclarativeFlickableVisibleArea(QDeclarativeFlickable *parent=0); @@ -198,7 +198,10 @@ public: void updateVisible(); signals: - void pageChanged(); + void xPositionChanged(qreal xPosition); + void yPositionChanged(qreal yPosition); + void widthRatioChanged(qreal widthRatio); + void heightRatioChanged(qreal heightRatio); private: QDeclarativeFlickable *flickable; -- cgit v0.12 From 658f7a0c04e42adc7c9e16c5338390fe580c9ede Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Mon, 18 Oct 2010 15:58:08 +1000 Subject: Fix visual tests. --- .../bindinganimation/bindinganimation.qml | 6 +- .../bindinganimation/data/bindinganimation.0.png | Bin 817 -> 830 bytes .../bindinganimation/data/bindinganimation.1.png | Bin 815 -> 831 bytes .../bindinganimation/data/bindinganimation.2.png | Bin 817 -> 829 bytes .../bindinganimation/data/bindinganimation.3.png | Bin 815 -> 832 bytes .../bindinganimation/data/bindinganimation.4.png | Bin 813 -> 830 bytes .../bindinganimation/data/bindinganimation.5.png | Bin 815 -> 832 bytes .../bindinganimation/data/bindinganimation.6.png | Bin 817 -> 0 bytes .../bindinganimation/data/bindinganimation.qml | 1170 +++++--------------- .../animation/qtbug10586/data/qtbug10586.1.png | Bin 1173 -> 1177 bytes .../animation/qtbug10586/data/qtbug10586.2.png | Bin 1173 -> 1173 bytes .../animation/qtbug10586/data/qtbug10586.qml | 232 ++-- .../qmlvisual/fillmode/data/fillmode.0.png | Bin 28886 -> 28900 bytes .../data/mousearea-flickable.0.png | Bin 1701 -> 1701 bytes .../data/mousearea-flickable.1.png | Bin 1701 -> 1701 bytes .../data/mousearea-flickable.10.png | Bin 1721 -> 1721 bytes .../data/mousearea-flickable.11.png | Bin 1705 -> 1705 bytes .../data/mousearea-flickable.12.png | Bin 1705 -> 1705 bytes .../data/mousearea-flickable.13.png | Bin 1701 -> 1701 bytes .../data/mousearea-flickable.2.png | Bin 1704 -> 1704 bytes .../data/mousearea-flickable.3.png | Bin 1704 -> 1704 bytes .../data/mousearea-flickable.4.png | Bin 1705 -> 1705 bytes .../data/mousearea-flickable.5.png | Bin 1705 -> 1705 bytes .../data/mousearea-flickable.6.png | Bin 1701 -> 1701 bytes .../data/mousearea-flickable.7.png | Bin 1701 -> 1701 bytes .../data/mousearea-flickable.8.png | Bin 1705 -> 1705 bytes .../data/mousearea-flickable.9.png | Bin 1701 -> 1701 bytes .../data/mousearea-flickable.qml | 402 +++---- .../qdeclarativepositioners/data/usingRepeater.qml | 164 +-- 29 files changed, 685 insertions(+), 1289 deletions(-) delete mode 100644 tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.6.png diff --git a/tests/auto/declarative/qmlvisual/animation/bindinganimation/bindinganimation.qml b/tests/auto/declarative/qmlvisual/animation/bindinganimation/bindinganimation.qml index 611eaf5..9019812 100644 --- a/tests/auto/declarative/qmlvisual/animation/bindinganimation/bindinganimation.qml +++ b/tests/auto/declarative/qmlvisual/animation/bindinganimation/bindinganimation.qml @@ -14,15 +14,12 @@ Rectangle { } states: [ State { + when: myMouseArea.pressed name: "hello" PropertyChanges { target: myRectangle x: 50 + 50 } - PropertyChanges { - target: myMouseArea - onClicked: page.state = '' - } } ] transitions: [ @@ -35,6 +32,5 @@ Rectangle { MouseArea { id: myMouseArea anchors.fill: parent - onClicked: { page.state= 'hello' } } } diff --git a/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.0.png b/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.0.png index 1b08c81..cba9bce 100644 Binary files a/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.0.png and b/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.0.png differ diff --git a/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.1.png b/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.1.png index f3074fc..4080c80 100644 Binary files a/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.1.png and b/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.1.png differ diff --git a/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.2.png b/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.2.png index 1b08c81..61fec3d 100644 Binary files a/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.2.png and b/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.2.png differ diff --git a/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.3.png b/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.3.png index e2560e0..900156f 100644 Binary files a/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.3.png and b/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.3.png differ diff --git a/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.4.png b/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.4.png index 2ddde86..c8367ec 100644 Binary files a/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.4.png and b/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.4.png differ diff --git a/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.5.png b/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.5.png index f3074fc..900156f 100644 Binary files a/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.5.png and b/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.5.png differ diff --git a/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.6.png b/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.6.png deleted file mode 100644 index 1b08c81..0000000 Binary files a/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.6.png and /dev/null differ diff --git a/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.qml b/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.qml index dbe0276..b4c7542 100644 --- a/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.qml +++ b/tests/auto/declarative/qmlvisual/animation/bindinganimation/data/bindinganimation.qml @@ -132,113 +132,121 @@ VisualTest { msec: 512 hash: "7cb5fc371040e587de9f06ce14a4b29a" } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 87; y: 129 + modifiers: 0 + sendToViewport: true + } Frame { msec: 528 hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 544 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "a78c9394bf3b81f192f42710cd7218b1" } Frame { msec: 560 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "7f08e8170feb1d02373c9ab42b6e882d" } Frame { msec: 576 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "967fbad8ac664400a3efbe66617d62aa" } Frame { msec: 592 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "abc2ec0bc7a93e75b5823310e6284db1" } Frame { msec: 608 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "afbd5b24e2f86646f5ec2aa22f3a4b5b" } Frame { msec: 624 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "9413dffb7ee853ba0125ac22ab22abbd" } Frame { msec: 640 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "fcae0317f81a3ddd713f4db1349a9da0" } Frame { msec: 656 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "37739777a5979f3ebf85e47e63341660" } Frame { msec: 672 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "72731478d80f024076ea639b55152360" } Frame { msec: 688 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "69058485ced6bc992a1a7c5ee34add4c" } Frame { msec: 704 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "391ad7ff2362e059f6170dfe306f94a7" } Frame { msec: 720 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "f9f74a2e38b52c9266f33e428b6acd9d" } Frame { msec: 736 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "25152412c4ea2aec6caf89486c073484" } Frame { msec: 752 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "ba403842ba3128b1cdf6a9cb28c90751" } Frame { msec: 768 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "e90cd68490cf3ce6ef9fe4e8f92feaa9" } Frame { msec: 784 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Frame { msec: 800 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Frame { msec: 816 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Frame { msec: 832 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Frame { msec: 848 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Frame { msec: 864 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Frame { msec: 880 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Frame { msec: 896 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Frame { msec: 912 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Frame { msec: 928 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Frame { msec: 944 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Frame { msec: 960 @@ -246,255 +254,255 @@ VisualTest { } Frame { msec: 976 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Frame { msec: 992 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Frame { msec: 1008 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Frame { msec: 1024 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Frame { msec: 1040 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Frame { msec: 1056 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Frame { msec: 1072 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Frame { msec: 1088 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Frame { msec: 1104 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Frame { msec: 1120 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Frame { msec: 1136 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Frame { msec: 1152 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Mouse { - type: 2 + type: 3 button: 1 - buttons: 1 - x: 136; y: 174 + buttons: 0 + x: 87; y: 129 modifiers: 0 sendToViewport: true } Frame { msec: 1168 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "383ba6b9efcc58fca512982a207631f6" } Frame { msec: 1184 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "adc501a3a2b8aaf72f58ba985b57424e" } Frame { msec: 1200 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "bfa51b7c19753ef7b16d78afffc7b9dd" } Frame { msec: 1216 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "ffa8471f57765b49fcdb9155393251e5" } Frame { msec: 1232 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "ddb65481469c38f2331546ee03a44206" } Frame { msec: 1248 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "6f48d1a9977b77cafd38a5903017605b" } Frame { msec: 1264 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "4279c814163af3bd069ce21b3cd1c729" } Frame { msec: 1280 - hash: "7cb5fc371040e587de9f06ce14a4b29a" - } - Mouse { - type: 3 - button: 1 - buttons: 0 - x: 136; y: 174 - modifiers: 0 - sendToViewport: true + hash: "17c46242c17983478f34cb49cb91ca6e" } Frame { msec: 1296 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "42f65c58b1f5f4b5ba70855f4aaa7d2f" } Frame { msec: 1312 - hash: "a78c9394bf3b81f192f42710cd7218b1" + hash: "6a74d6dc91a8b370200d3765c55c1136" } Frame { msec: 1328 - hash: "7f08e8170feb1d02373c9ab42b6e882d" + hash: "ecda10356cca33901c2acd0a702fee46" } Frame { msec: 1344 - hash: "967fbad8ac664400a3efbe66617d62aa" + hash: "4f58226bdbda7339d972eca065f75766" } Frame { msec: 1360 - hash: "abc2ec0bc7a93e75b5823310e6284db1" + hash: "a39c80859a7643c9879da9c77b644703" } Frame { msec: 1376 - hash: "afbd5b24e2f86646f5ec2aa22f3a4b5b" + hash: "16fe17b15900ff0464ab20ea921e5b1f" } Frame { msec: 1392 - hash: "9413dffb7ee853ba0125ac22ab22abbd" + hash: "bc5c83b2014b7260900587ae3637598f" } Frame { msec: 1408 - hash: "fcae0317f81a3ddd713f4db1349a9da0" + hash: "96c077e3a572edff04fa9b2f7020ffd0" } Frame { msec: 1424 - hash: "37739777a5979f3ebf85e47e63341660" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1440 - hash: "72731478d80f024076ea639b55152360" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1456 - hash: "69058485ced6bc992a1a7c5ee34add4c" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1472 - hash: "391ad7ff2362e059f6170dfe306f94a7" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1488 - hash: "f9f74a2e38b52c9266f33e428b6acd9d" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1504 - hash: "25152412c4ea2aec6caf89486c073484" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1520 - hash: "ba403842ba3128b1cdf6a9cb28c90751" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1536 - hash: "e90cd68490cf3ce6ef9fe4e8f92feaa9" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1552 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1568 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1584 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1600 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1616 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1632 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1648 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1664 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1680 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1696 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1712 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1728 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1744 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1760 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1776 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1792 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1808 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1824 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1840 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 81; y: 130 + modifiers: 0 + sendToViewport: true } Frame { msec: 1856 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 1872 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "a78c9394bf3b81f192f42710cd7218b1" } Frame { msec: 1888 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7f08e8170feb1d02373c9ab42b6e882d" } Frame { msec: 1904 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "967fbad8ac664400a3efbe66617d62aa" } Frame { msec: 1920 @@ -502,159 +510,183 @@ VisualTest { } Frame { msec: 1936 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "afbd5b24e2f86646f5ec2aa22f3a4b5b" } Frame { msec: 1952 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "9413dffb7ee853ba0125ac22ab22abbd" + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 81; y: 130 + modifiers: 0 + sendToViewport: true } Frame { msec: 1968 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "9413dffb7ee853ba0125ac22ab22abbd" } Frame { msec: 1984 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "ecda10356cca33901c2acd0a702fee46" } Frame { msec: 2000 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "5fae0bdc65c609cb766ce585b8c649db" } Frame { msec: 2016 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "575d30ac088448b01f49082519bbb3a1" } Frame { msec: 2032 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "ffeb3db6d3f177acf6f92049359a9025" } Frame { msec: 2048 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "abc2ec0bc7a93e75b5823310e6284db1" } Frame { msec: 2064 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "fcb17070ef24575c61046928a8bbe440" } Frame { msec: 2080 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "4ab21e266919fb8d340f87091d8e1f62" } Frame { msec: 2096 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "f141c7c4402c6bacff31d4e77785f5f1" } Frame { msec: 2112 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "29e5f1388c6aaf23abe9f514d7e902d1" + } + Mouse { + type: 4 + button: 1 + buttons: 1 + x: 81; y: 130 + modifiers: 0 + sendToViewport: true } Frame { msec: 2128 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "29e5f1388c6aaf23abe9f514d7e902d1" } Frame { msec: 2144 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "4ab21e266919fb8d340f87091d8e1f62" } Frame { msec: 2160 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "2d21b4af3780ef2bbccfcec957ce49c8" } Frame { msec: 2176 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "527b1f9e7a222483134675a73f9cf5b7" } Frame { msec: 2192 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "5edaad77f334e6a01982ee89a733b1f8" } Frame { msec: 2208 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "6a74d6dc91a8b370200d3765c55c1136" } Frame { msec: 2224 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "42f65c58b1f5f4b5ba70855f4aaa7d2f" } Frame { msec: 2240 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "3223ed179c828fadb3eca9c6373176c1" } Mouse { - type: 2 + type: 3 button: 1 - buttons: 1 - x: 122; y: 175 + buttons: 0 + x: 81; y: 130 modifiers: 0 sendToViewport: true } Frame { msec: 2256 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "3223ed179c828fadb3eca9c6373176c1" } Frame { msec: 2272 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "516c44b44c23f213f5db01f9eb164b0b" } Frame { msec: 2288 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "4f41101378a104e72228eeb4ba395ca8" } Frame { msec: 2304 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "f9deee3a204c939562b896a6179743d2" } Frame { msec: 2320 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "772396bb23c713f34ea5c23bfbcb115e" } Frame { msec: 2336 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "ecda10356cca33901c2acd0a702fee46" } Frame { msec: 2352 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "527b1f9e7a222483134675a73f9cf5b7" + } + Frame { + msec: 2368 + hash: "4f58226bdbda7339d972eca065f75766" } Mouse { - type: 3 + type: 2 button: 1 - buttons: 0 - x: 122; y: 175 + buttons: 1 + x: 81; y: 130 modifiers: 0 sendToViewport: true } Frame { - msec: 2368 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { msec: 2384 - hash: "adc501a3a2b8aaf72f58ba985b57424e" + hash: "4f58226bdbda7339d972eca065f75766" } Frame { msec: 2400 - hash: "bfa51b7c19753ef7b16d78afffc7b9dd" + hash: "5fae0bdc65c609cb766ce585b8c649db" } Frame { msec: 2416 - hash: "ffa8471f57765b49fcdb9155393251e5" + hash: "9413dffb7ee853ba0125ac22ab22abbd" } Frame { msec: 2432 - hash: "ddb65481469c38f2331546ee03a44206" + hash: "6a74d6dc91a8b370200d3765c55c1136" } Frame { msec: 2448 - hash: "6f48d1a9977b77cafd38a5903017605b" + hash: "4f41101378a104e72228eeb4ba395ca8" } Frame { msec: 2464 - hash: "4279c814163af3bd069ce21b3cd1c729" + hash: "37739777a5979f3ebf85e47e63341660" + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 81; y: 130 + modifiers: 0 + sendToViewport: true } Frame { msec: 2480 - hash: "17c46242c17983478f34cb49cb91ca6e" + hash: "37739777a5979f3ebf85e47e63341660" } Frame { msec: 2496 @@ -662,95 +694,119 @@ VisualTest { } Frame { msec: 2512 - hash: "6a74d6dc91a8b370200d3765c55c1136" + hash: "fcae0317f81a3ddd713f4db1349a9da0" } Frame { msec: 2528 - hash: "ecda10356cca33901c2acd0a702fee46" + hash: "082e0e7650d187a54ef0948ccca98e5a" } Frame { msec: 2544 - hash: "4f58226bdbda7339d972eca065f75766" + hash: "9413dffb7ee853ba0125ac22ab22abbd" } Frame { msec: 2560 - hash: "a39c80859a7643c9879da9c77b644703" + hash: "d9af30557f99b086bb1a185a946b580d" } Frame { msec: 2576 - hash: "16fe17b15900ff0464ab20ea921e5b1f" + hash: "afbd5b24e2f86646f5ec2aa22f3a4b5b" } Frame { msec: 2592 - hash: "bc5c83b2014b7260900587ae3637598f" + hash: "ffeb3db6d3f177acf6f92049359a9025" + } + Mouse { + type: 4 + button: 1 + buttons: 1 + x: 81; y: 130 + modifiers: 0 + sendToViewport: true } Frame { msec: 2608 - hash: "96c077e3a572edff04fa9b2f7020ffd0" + hash: "ffeb3db6d3f177acf6f92049359a9025" } Frame { msec: 2624 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "5fae0bdc65c609cb766ce585b8c649db" } Frame { msec: 2640 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "9413dffb7ee853ba0125ac22ab22abbd" } Frame { msec: 2656 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "6a74d6dc91a8b370200d3765c55c1136" } Frame { msec: 2672 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "4f41101378a104e72228eeb4ba395ca8" } Frame { msec: 2688 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "37739777a5979f3ebf85e47e63341660" } Frame { msec: 2704 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "f4fe2cc93d65e086ba8ded1438269eb2" + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 81; y: 130 + modifiers: 0 + sendToViewport: true } Frame { msec: 2720 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "f4fe2cc93d65e086ba8ded1438269eb2" } Frame { msec: 2736 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "56c72b5da44bd5efdc47c3b9c3eac409" } Frame { msec: 2752 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "b08811b237ce7a460c80d285f04d53d8" } Frame { msec: 2768 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "fcae0317f81a3ddd713f4db1349a9da0" } Frame { msec: 2784 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "082e0e7650d187a54ef0948ccca98e5a" } Frame { msec: 2800 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "9413dffb7ee853ba0125ac22ab22abbd" } Frame { msec: 2816 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "d9af30557f99b086bb1a185a946b580d" } Frame { msec: 2832 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "575d30ac088448b01f49082519bbb3a1" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 81; y: 130 + modifiers: 0 + sendToViewport: true } Frame { msec: 2848 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "575d30ac088448b01f49082519bbb3a1" } Frame { msec: 2864 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "d9af30557f99b086bb1a185a946b580d" } Frame { msec: 2880 @@ -758,898 +814,242 @@ VisualTest { } Frame { msec: 2896 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "f9deee3a204c939562b896a6179743d2" } Frame { msec: 2912 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "42f65c58b1f5f4b5ba70855f4aaa7d2f" } Frame { msec: 2928 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "56c72b5da44bd5efdc47c3b9c3eac409" } Frame { msec: 2944 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "72731478d80f024076ea639b55152360" } Frame { msec: 2960 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "4279c814163af3bd069ce21b3cd1c729" } Frame { msec: 2976 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "72a0c017a2fa90a4aeadfa6e552ff573" } Frame { msec: 2992 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "391ad7ff2362e059f6170dfe306f94a7" } Frame { msec: 3008 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "0b0c6419e1e5b016d9c22bd98fd452b1" } Frame { msec: 3024 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "365c824c330398d267ea52ae9468b9ee" } Frame { msec: 3040 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "65ad7e0189c096792331bd1bb0daf0db" + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 81; y: 130 + modifiers: 0 + sendToViewport: true } Frame { msec: 3056 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "65ad7e0189c096792331bd1bb0daf0db" } Frame { msec: 3072 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "a21aa1984f068650cce2a124a82c12be" } Frame { msec: 3088 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "8006ceaa02d22b5fdfeab400d39a0caf" } Frame { msec: 3104 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "6f48d1a9977b77cafd38a5903017605b" } Frame { msec: 3120 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "07f751ea4cf877ba72fbb36f9da268d7" } Frame { msec: 3136 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "72731478d80f024076ea639b55152360" } Frame { msec: 3152 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "37739777a5979f3ebf85e47e63341660" } Frame { msec: 3168 - hash: "7cb5fc371040e587de9f06ce14a4b29a" - } - Mouse { - type: 2 - button: 1 - buttons: 1 - x: 122; y: 175 - modifiers: 0 - sendToViewport: true + hash: "ed47684a0b21836cd27549e0989e96dd" } Frame { msec: 3184 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "772396bb23c713f34ea5c23bfbcb115e" } Frame { msec: 3200 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "ecda10356cca33901c2acd0a702fee46" } Frame { msec: 3216 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "575d30ac088448b01f49082519bbb3a1" } Frame { msec: 3232 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "2e3f134664df8204a291af2c9f81239a" } Frame { msec: 3248 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "967fbad8ac664400a3efbe66617d62aa" } Frame { msec: 3264 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "2b93a05b0e78e52d8d8bc2c71d898d3e" } Frame { msec: 3280 - hash: "7cb5fc371040e587de9f06ce14a4b29a" - } - Mouse { - type: 3 - button: 1 - buttons: 0 - x: 122; y: 175 - modifiers: 0 - sendToViewport: true + hash: "c7a9850ed078eb0cfdb5a7ef11840d64" } Frame { msec: 3296 - hash: "7cb5fc371040e587de9f06ce14a4b29a" + hash: "96c077e3a572edff04fa9b2f7020ffd0" } Frame { msec: 3312 - hash: "a78c9394bf3b81f192f42710cd7218b1" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3328 - hash: "7f08e8170feb1d02373c9ab42b6e882d" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3344 - hash: "967fbad8ac664400a3efbe66617d62aa" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3360 - hash: "abc2ec0bc7a93e75b5823310e6284db1" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3376 - hash: "afbd5b24e2f86646f5ec2aa22f3a4b5b" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3392 - hash: "9413dffb7ee853ba0125ac22ab22abbd" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3408 - hash: "fcae0317f81a3ddd713f4db1349a9da0" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3424 - hash: "37739777a5979f3ebf85e47e63341660" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3440 - hash: "72731478d80f024076ea639b55152360" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3456 - hash: "69058485ced6bc992a1a7c5ee34add4c" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3472 - hash: "391ad7ff2362e059f6170dfe306f94a7" - } - Mouse { - type: 4 - button: 1 - buttons: 1 - x: 122; y: 175 - modifiers: 0 - sendToViewport: true + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3488 - hash: "f9f74a2e38b52c9266f33e428b6acd9d" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3504 - hash: "25152412c4ea2aec6caf89486c073484" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3520 - hash: "ba403842ba3128b1cdf6a9cb28c90751" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3536 - hash: "e90cd68490cf3ce6ef9fe4e8f92feaa9" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3552 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3568 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3584 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3600 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Mouse { - type: 3 - button: 1 - buttons: 0 - x: 122; y: 175 - modifiers: 0 - sendToViewport: true + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3616 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3632 - hash: "adc501a3a2b8aaf72f58ba985b57424e" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3648 - hash: "bfa51b7c19753ef7b16d78afffc7b9dd" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3664 - hash: "ffa8471f57765b49fcdb9155393251e5" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3680 - hash: "ddb65481469c38f2331546ee03a44206" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3696 - hash: "6f48d1a9977b77cafd38a5903017605b" - } - Mouse { - type: 2 - button: 1 - buttons: 1 - x: 122; y: 175 - modifiers: 0 - sendToViewport: true + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3712 - hash: "4279c814163af3bd069ce21b3cd1c729" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3728 - hash: "17c46242c17983478f34cb49cb91ca6e" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3744 - hash: "42f65c58b1f5f4b5ba70855f4aaa7d2f" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3760 - hash: "6a74d6dc91a8b370200d3765c55c1136" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3776 - hash: "ecda10356cca33901c2acd0a702fee46" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3792 - hash: "4f58226bdbda7339d972eca065f75766" - } - Mouse { - type: 3 - button: 1 - buttons: 0 - x: 122; y: 175 - modifiers: 0 - sendToViewport: true + hash: "7cb5fc371040e587de9f06ce14a4b29a" } Frame { msec: 3808 - hash: "4f58226bdbda7339d972eca065f75766" - } - Frame { - msec: 3824 - hash: "5fae0bdc65c609cb766ce585b8c649db" - } - Frame { - msec: 3840 - image: "bindinganimation.3.png" - } - Frame { - msec: 3856 - hash: "6a74d6dc91a8b370200d3765c55c1136" - } - Frame { - msec: 3872 - hash: "4f41101378a104e72228eeb4ba395ca8" - } - Frame { - msec: 3888 - hash: "37739777a5979f3ebf85e47e63341660" - } - Frame { - msec: 3904 - hash: "f4fe2cc93d65e086ba8ded1438269eb2" - } - Mouse { - type: 4 - button: 1 - buttons: 1 - x: 122; y: 175 - modifiers: 0 - sendToViewport: true - } - Frame { - msec: 3920 - hash: "4279c814163af3bd069ce21b3cd1c729" - } - Frame { - msec: 3936 - hash: "72a0c017a2fa90a4aeadfa6e552ff573" - } - Frame { - msec: 3952 - hash: "391ad7ff2362e059f6170dfe306f94a7" - } - Frame { - msec: 3968 - hash: "0b0c6419e1e5b016d9c22bd98fd452b1" - } - Frame { - msec: 3984 - hash: "365c824c330398d267ea52ae9468b9ee" - } - Frame { - msec: 4000 - hash: "65ad7e0189c096792331bd1bb0daf0db" - } - Mouse { - type: 3 - button: 1 - buttons: 0 - x: 122; y: 175 - modifiers: 0 - sendToViewport: true - } - Frame { - msec: 4016 - hash: "65ad7e0189c096792331bd1bb0daf0db" - } - Frame { - msec: 4032 - hash: "a21aa1984f068650cce2a124a82c12be" - } - Frame { - msec: 4048 - hash: "8006ceaa02d22b5fdfeab400d39a0caf" - } - Frame { - msec: 4064 - hash: "a2cebc35e5c2c709a2cd83e1df6eaeab" - } - Frame { - msec: 4080 - hash: "07f751ea4cf877ba72fbb36f9da268d7" - } - Frame { - msec: 4096 - hash: "72731478d80f024076ea639b55152360" - } - Mouse { - type: 2 - button: 1 - buttons: 1 - x: 122; y: 175 - modifiers: 0 - sendToViewport: true - } - Frame { - msec: 4112 - hash: "37739777a5979f3ebf85e47e63341660" - } - Frame { - msec: 4128 - hash: "ed47684a0b21836cd27549e0989e96dd" - } - Frame { - msec: 4144 - hash: "772396bb23c713f34ea5c23bfbcb115e" - } - Frame { - msec: 4160 - hash: "d9af30557f99b086bb1a185a946b580d" - } - Frame { - msec: 4176 - hash: "575d30ac088448b01f49082519bbb3a1" - } - Frame { - msec: 4192 - hash: "2e3f134664df8204a291af2c9f81239a" - } - Mouse { - type: 3 - button: 1 - buttons: 0 - x: 122; y: 175 - modifiers: 0 - sendToViewport: true - } - Frame { - msec: 4208 - hash: "2e3f134664df8204a291af2c9f81239a" - } - Frame { - msec: 4224 - hash: "4f58226bdbda7339d972eca065f75766" - } - Frame { - msec: 4240 - hash: "5fae0bdc65c609cb766ce585b8c649db" - } - Frame { - msec: 4256 - hash: "82363265ed2b611a54f8d48b2af22f11" - } - Frame { - msec: 4272 - hash: "f9deee3a204c939562b896a6179743d2" - } - Frame { - msec: 4288 - hash: "42f65c58b1f5f4b5ba70855f4aaa7d2f" - } - Mouse { - type: 4 - button: 1 - buttons: 1 - x: 122; y: 175 - modifiers: 0 - sendToViewport: true - } - Frame { - msec: 4304 - hash: "3223ed179c828fadb3eca9c6373176c1" - } - Frame { - msec: 4320 - hash: "56125a260a79bc38bb0ef44fd65ba49b" - } - Frame { - msec: 4336 - hash: "07f751ea4cf877ba72fbb36f9da268d7" - } - Frame { - msec: 4352 - hash: "6f48d1a9977b77cafd38a5903017605b" - } - Frame { - msec: 4368 - hash: "8006ceaa02d22b5fdfeab400d39a0caf" - } - Mouse { - type: 3 - button: 1 - buttons: 0 - x: 122; y: 175 - modifiers: 0 - sendToViewport: true - } - Frame { - msec: 4384 - hash: "8006ceaa02d22b5fdfeab400d39a0caf" - } - Frame { - msec: 4400 - hash: "6f48d1a9977b77cafd38a5903017605b" - } - Frame { - msec: 4416 - hash: "69058485ced6bc992a1a7c5ee34add4c" - } - Frame { - msec: 4432 - hash: "dafcce427161a70c3513841ac22aea00" - } - Frame { - msec: 4448 - hash: "3223ed179c828fadb3eca9c6373176c1" - } - Mouse { - type: 2 - button: 1 - buttons: 1 - x: 122; y: 175 - modifiers: 0 - sendToViewport: true - } - Frame { - msec: 4464 - hash: "b08811b237ce7a460c80d285f04d53d8" - } - Frame { - msec: 4480 - hash: "fcae0317f81a3ddd713f4db1349a9da0" - } - Frame { - msec: 4496 - hash: "772396bb23c713f34ea5c23bfbcb115e" - } - Frame { - msec: 4512 - hash: "ecda10356cca33901c2acd0a702fee46" - } - Frame { - msec: 4528 - hash: "575d30ac088448b01f49082519bbb3a1" - } - Frame { - msec: 4544 - hash: "abc2ec0bc7a93e75b5823310e6284db1" - } - Mouse { - type: 3 - button: 1 - buttons: 0 - x: 122; y: 175 - modifiers: 0 - sendToViewport: true - } - Frame { - msec: 4560 - hash: "abc2ec0bc7a93e75b5823310e6284db1" - } - Frame { - msec: 4576 - hash: "575d30ac088448b01f49082519bbb3a1" - } - Frame { - msec: 4592 - hash: "ecda10356cca33901c2acd0a702fee46" - } - Frame { - msec: 4608 - hash: "772396bb23c713f34ea5c23bfbcb115e" - } - Frame { - msec: 4624 - hash: "fcae0317f81a3ddd713f4db1349a9da0" - } - Frame { - msec: 4640 - hash: "b08811b237ce7a460c80d285f04d53d8" - } - Mouse { - type: 4 - button: 1 - buttons: 1 - x: 122; y: 175 - modifiers: 0 - sendToViewport: true - } - Frame { - msec: 4656 - hash: "17c46242c17983478f34cb49cb91ca6e" - } - Frame { - msec: 4672 - hash: "dafcce427161a70c3513841ac22aea00" - } - Frame { - msec: 4688 - hash: "69058485ced6bc992a1a7c5ee34add4c" - } - Frame { - msec: 4704 - hash: "6f48d1a9977b77cafd38a5903017605b" - } - Frame { - msec: 4720 - hash: "ddb65481469c38f2331546ee03a44206" - } - Frame { - msec: 4736 - hash: "a21aa1984f068650cce2a124a82c12be" - } - Mouse { - type: 3 - button: 1 - buttons: 0 - x: 122; y: 175 - modifiers: 0 - sendToViewport: true - } - Frame { - msec: 4752 - hash: "a21aa1984f068650cce2a124a82c12be" - } - Frame { - msec: 4768 - hash: "8006ceaa02d22b5fdfeab400d39a0caf" - } - Frame { - msec: 4784 - hash: "6f48d1a9977b77cafd38a5903017605b" - } - Frame { - msec: 4800 - image: "bindinganimation.4.png" - } - Frame { - msec: 4816 - hash: "56125a260a79bc38bb0ef44fd65ba49b" - } - Mouse { - type: 2 - button: 1 - buttons: 1 - x: 122; y: 175 - modifiers: 0 - sendToViewport: true - } - Frame { - msec: 4832 - hash: "56c72b5da44bd5efdc47c3b9c3eac409" - } - Frame { - msec: 4848 - hash: "42f65c58b1f5f4b5ba70855f4aaa7d2f" - } - Frame { - msec: 4864 - hash: "6a74d6dc91a8b370200d3765c55c1136" - } - Frame { - msec: 4880 - hash: "9413dffb7ee853ba0125ac22ab22abbd" - } - Frame { - msec: 4896 - hash: "527b1f9e7a222483134675a73f9cf5b7" - } - Frame { - msec: 4912 - hash: "ffeb3db6d3f177acf6f92049359a9025" - } - Frame { - msec: 4928 - hash: "a39c80859a7643c9879da9c77b644703" - } - Mouse { - type: 3 - button: 1 - buttons: 0 - x: 122; y: 175 - modifiers: 0 - sendToViewport: true - } - Frame { - msec: 4944 - hash: "a39c80859a7643c9879da9c77b644703" - } - Frame { - msec: 4960 - hash: "ffeb3db6d3f177acf6f92049359a9025" - } - Frame { - msec: 4976 - hash: "527b1f9e7a222483134675a73f9cf5b7" - } - Frame { - msec: 4992 - hash: "9413dffb7ee853ba0125ac22ab22abbd" - } - Frame { - msec: 5008 - hash: "6a74d6dc91a8b370200d3765c55c1136" - } - Frame { - msec: 5024 - hash: "4f41101378a104e72228eeb4ba395ca8" - } - Frame { - msec: 5040 - hash: "56c72b5da44bd5efdc47c3b9c3eac409" - } - Frame { - msec: 5056 - hash: "72731478d80f024076ea639b55152360" - } - Frame { - msec: 5072 - hash: "07f751ea4cf877ba72fbb36f9da268d7" - } - Frame { - msec: 5088 - hash: "a2cebc35e5c2c709a2cd83e1df6eaeab" - } - Frame { - msec: 5104 - hash: "8006ceaa02d22b5fdfeab400d39a0caf" - } - Frame { - msec: 5120 - hash: "f9f74a2e38b52c9266f33e428b6acd9d" - } - Frame { - msec: 5136 - hash: "a93f930ec8528f954cd4a770c9a8171b" - } - Frame { - msec: 5152 - hash: "bfa51b7c19753ef7b16d78afffc7b9dd" - } - Frame { - msec: 5168 - hash: "df62027b6b53c69a071cb3dc09c3a7ed" - } - Frame { - msec: 5184 - hash: "0d59ac57f8790fe741a31d12c3438abf" - } - Frame { - msec: 5200 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5216 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5232 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5248 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5264 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5280 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5296 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5312 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5328 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5344 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5360 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5376 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5392 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5408 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5424 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5440 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5456 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5472 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5488 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5504 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5520 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5536 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5552 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5568 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5584 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5600 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5616 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5632 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5648 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5664 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5680 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5696 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5712 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Key { - type: 6 - key: 16777249 - modifiers: 0 - text: "" - autorep: false - count: 1 - } - Frame { - msec: 5728 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5744 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5760 - image: "bindinganimation.5.png" - } - Frame { - msec: 5776 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5792 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5808 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5824 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5840 - hash: "383ba6b9efcc58fca512982a207631f6" - } - Frame { - msec: 5856 - hash: "383ba6b9efcc58fca512982a207631f6" + hash: "7cb5fc371040e587de9f06ce14a4b29a" } } diff --git a/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.1.png b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.1.png index 249e0dd..e5494aa 100644 Binary files a/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.1.png and b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.1.png differ diff --git a/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.2.png b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.2.png index 044f823..fbb03de 100644 Binary files a/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.2.png and b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.2.png differ diff --git a/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.qml b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.qml index dc8e2e2..13ba289 100644 --- a/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.qml +++ b/tests/auto/declarative/qmlvisual/animation/qtbug10586/data/qtbug10586.qml @@ -406,119 +406,119 @@ VisualTest { } Frame { msec: 1456 - hash: "8b7dd0f0a3881f10d76b47cbec4754c3" + hash: "cba9afe3f351e6cd6dc72d7f263401b0" } Frame { msec: 1472 - hash: "b6fc4990acb245e015c35261a3c6fd75" + hash: "09d6255a3fc628c52a386a878bdecb4e" } Frame { msec: 1488 - hash: "849fa4174134804dadc000323141b341" + hash: "6d5e292fecfc2ec45a5695fa9e5173f3" } Frame { msec: 1504 - hash: "35f2d6405ed7d992bb62eb6e24478492" + hash: "848051f677a2172d8cbe75a451026459" } Frame { msec: 1520 - hash: "673ebb4499522c3f27b775dff1dbbe44" + hash: "95b1a914c1d33866cd728ad1ad612884" } Frame { msec: 1536 - hash: "96945f5489ffd0dc8ab995c96eb5da43" + hash: "780a03cd9aec2f0f7f61a51629261385" } Frame { msec: 1552 - hash: "2e4543754429ac3db831a2432098c063" + hash: "c7ea3a54cfb618bb02d93f6e17e2a74d" } Frame { msec: 1568 - hash: "02253fe8a9fd5009a07265c2c6ffc8e4" + hash: "85ea65c275c6217c44038c1bc87f2356" } Frame { msec: 1584 - hash: "200a89949df1e9ef58d005a139857d2c" + hash: "af77f08c99d41295ef6c99089c322f61" } Frame { msec: 1600 - hash: "ceb28be34c7ea8eff5fa00fdea087439" + hash: "1427c98bee08b57e94cea220b7c017e4" } Frame { msec: 1616 - hash: "a9ece475c51f126094c5eff4e20f4a19" + hash: "fa1062676e7f2e429e3f5f3babbccc5f" } Frame { msec: 1632 - hash: "aa0776f84aef87d6971affdfa2d8dd82" + hash: "016c51ef6ad6729db5328b199c18c830" } Frame { msec: 1648 - hash: "4c74661e1c73fefc9c5154b257239352" + hash: "94a3647a5c98770d60a2b5f17281e87e" } Frame { msec: 1664 - hash: "c10d23df3a75966aad5016bd8ba8e9d8" + hash: "fc075081b0b7d8bc2556250962e52327" } Frame { msec: 1680 - hash: "41692977d654a55d3b1d037aea9f2c03" + hash: "0ef1d28912378939e0f82387164ace07" } Frame { msec: 1696 - hash: "2f1835a1de94f962eb5dc781c85b4c32" + hash: "d55312d705b8ed5d188caf4f41820e0f" } Frame { msec: 1712 - hash: "7cb78e2e5f6d35d456c95f2bd8652eb5" + hash: "41c9c187b208ec1cef4e9ffe976c38ce" } Frame { msec: 1728 - hash: "4388aee9b1c8b4fde43634ad08f03557" + hash: "6166be5f86adfc6b4c9438358529e5ce" } Frame { msec: 1744 - hash: "1cdc71100fd11cb6e60c9ab7e65e95bf" + hash: "aaa81e964b5c5ef2ebf2c200e7a47c26" } Frame { msec: 1760 - hash: "feddbf269adfc8bb1b1a3656b5b5736d" + hash: "65dbdd2495e12b7dd7bbc31e1b2fa5b1" } Frame { msec: 1776 - hash: "76b39ce0ee9b9b4af8aa0141577b8460" + hash: "b2d10e7cbccb0fdf3286fef81999d37e" } Frame { msec: 1792 - hash: "bac963d3df2841ab7a3770a371f3a94d" + hash: "e239d20ee23a6ff680ded67182066430" } Frame { msec: 1808 - hash: "403007bb6c0782fece1cedbd40994550" + hash: "d4f2df7f9c7a7a9e98975e44393a2e37" } Frame { msec: 1824 - hash: "72076c743fdd33fab2ac789c7c22973a" + hash: "9c1ce93161e16704feb7d37cd01acbe9" } Frame { msec: 1840 - hash: "662be553c32b0145b3f4fee9bb0d659d" + hash: "94e148b49b53cab2491a974eb85ab489" } Frame { msec: 1856 - hash: "e6b9049949a0ee4ff8a0fcaf5464f479" + hash: "9a1dfb6b09218c83c89f9a2d32f92ef6" } Frame { msec: 1872 - hash: "eb1939458851780b7bb51ee50f0a3bd7" + hash: "7cb78e2e5f6d35d456c95f2bd8652eb5" } Frame { msec: 1888 - hash: "41c8d2686ddb882981a7d3a5c8c69005" + hash: "e3a3be52fda460050db6d2d9947d3cf8" } Frame { msec: 1904 - hash: "7d3b1fc34082a160cbea4409af85fc9c" + hash: "6651ca6a31f281676a5ba312c306ee91" } Frame { msec: 1920 @@ -526,207 +526,207 @@ VisualTest { } Frame { msec: 1936 - hash: "17be4a9c3d4d19e93bf1fc3a13a374a2" + hash: "feddbf269adfc8bb1b1a3656b5b5736d" } Frame { msec: 1952 - hash: "d449593024a59487eb92195ee6b77a64" + hash: "4710e2abb2d907686a5ef58c3d22b391" } Frame { msec: 1968 - hash: "c6ccbc2acec8e32f043f2cfb7b7848a9" + hash: "2a479b302b425df282502e71b4ad7fbf" } Frame { msec: 1984 - hash: "cef9f8e8cdd5e2d33b86a9a6fb64ecb4" + hash: "a912a2993c3a2a280e83caee932ff707" } Frame { msec: 2000 - hash: "2a8956de5ce417431bdb156144985370" + hash: "022504443e57ee5593e5054961265a15" } Frame { msec: 2016 - hash: "73721425a9c658bd9d40eac3fcbe8e25" + hash: "a47ccf22b66f7d62c017aa1da19904d2" } Frame { msec: 2032 - hash: "9a9cf8eee0bf2f09944a4fb3b1c139d5" + hash: "133c29b49f3a98fb5eca71fff217252d" } Frame { msec: 2048 - hash: "3673cdee04343ce679ec2cebadc9f512" + hash: "058c2a759a415d548fec309bfb255a70" } Frame { msec: 2064 - hash: "eedd62019867e3189f9cf6e2b4149c6d" + hash: "662be553c32b0145b3f4fee9bb0d659d" } Frame { msec: 2080 - hash: "7a66bc37f5cf917e8b121003af0530b0" + hash: "7c7460ff21e7c27af2326b399b5b9791" } Frame { msec: 2096 - hash: "401667ed0f38858553de27164e9cadb5" + hash: "e6b9049949a0ee4ff8a0fcaf5464f479" } Frame { msec: 2112 - hash: "b391699437c4092de3ad1684a35bfd30" + hash: "39db5e52253948ca5059d9c102bedea0" } Frame { msec: 2128 - hash: "109c91215f075292910095a25eaded49" + hash: "eb1939458851780b7bb51ee50f0a3bd7" } Frame { msec: 2144 - hash: "c44d3f6ce1fa1ab324dd9ef394f37f87" + hash: "feaaa4fab78c73321dd9ab820ec2b746" } Frame { msec: 2160 - hash: "299d43cb3dcf7b95af8803df3eb17a46" + hash: "221c8afbedcfb8ca7e87e279e5406103" } Frame { msec: 2176 - hash: "7ddd97266383d954a008fbe7b95a3169" + hash: "41c8d2686ddb882981a7d3a5c8c69005" } Frame { msec: 2192 - hash: "941f2837ff5145a26df9a0d9f6d20bd9" + hash: "abb2d6a76af5114b191a4373f95cdb6f" } Frame { msec: 2208 - hash: "d99d76cba43f3ae953605d7732d6ce21" + hash: "7d3b1fc34082a160cbea4409af85fc9c" } Frame { msec: 2224 - hash: "929f49416f7ca80d7f5f2be3b13b849e" + hash: "55e07e33b231e3c7925c7b3cfada4839" } Frame { msec: 2240 - hash: "929f49416f7ca80d7f5f2be3b13b849e" + hash: "55e07e33b231e3c7925c7b3cfada4839" } Frame { msec: 2256 - hash: "fff9bbf16d1c3f7510ddfc44af616a5e" + hash: "3a616453adf2b16e23654f515d797e99" } Frame { msec: 2272 - hash: "70b6cdb95ad6723d18c623e1dc79a8db" + hash: "b3461a3c55b9603905ad208c7396e1a9" } Frame { msec: 2288 - hash: "70b6cdb95ad6723d18c623e1dc79a8db" + hash: "b3461a3c55b9603905ad208c7396e1a9" } Frame { msec: 2304 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2320 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2336 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2352 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2368 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2384 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2400 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2416 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2432 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2448 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2464 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2480 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2496 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2512 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2528 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2544 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2560 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2576 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2592 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2608 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2624 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2640 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2656 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2672 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2688 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2704 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2720 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2736 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Mouse { type: 2 @@ -738,23 +738,23 @@ VisualTest { } Frame { msec: 2752 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2768 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2784 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2800 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Frame { msec: 2816 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Mouse { type: 5 @@ -766,7 +766,7 @@ VisualTest { } Frame { msec: 2832 - hash: "cdb3c12b1b0b6ab269ba7fcf75320f69" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Mouse { type: 5 @@ -778,7 +778,7 @@ VisualTest { } Frame { msec: 2848 - hash: "2732b282b8ac482033694cd04c6f5b7e" + hash: "fbd9a45fc6b5a96b4e521dc5c68dbf7e" } Mouse { type: 5 @@ -790,7 +790,7 @@ VisualTest { } Frame { msec: 2864 - hash: "7d253797885f8b304d8fb3ba727a3c5d" + hash: "6f1a516cde59f142f5ac8b4e824a2bab" } Mouse { type: 5 @@ -814,39 +814,39 @@ VisualTest { } Frame { msec: 2896 - hash: "d85a416e4ddf59dfd0723b0be0e2b418" + hash: "3f6d74079d8ec38eb1f12ddde18f864a" } Frame { msec: 2912 - hash: "f1934f6ca6a3c5ac5df3451596b8d8ba" + hash: "b58ac3c0ab5e556be249bfdc3fb85c56" } Frame { msec: 2928 - hash: "28fc74a76f9eaeeccbd3063dc55a1000" + hash: "291dd50b6dd4ee71265631ce338f16d2" } Frame { msec: 2944 - hash: "eb8ad8dae734b624664fcf584cda6ba0" + hash: "6af30d160a3c1126718c62fcd5e85a89" } Frame { msec: 2960 - hash: "a6d0f4aba3e5ae1e003520f45b75d6dd" + hash: "3f09b75f49f53e83d53fdc8cb2a1a2a7" } Frame { msec: 2976 - hash: "4e5a4d04dfa5f06292774e6bf4f86508" + hash: "7c9e03c8bc2691253eb5be656bbcfaa5" } Frame { msec: 2992 - hash: "fc9e16fd8c7379d774a09fe50d4259dc" + hash: "95c1ca6b2550f5575c2297acad5bfd0f" } Frame { msec: 3008 - hash: "721ea322d9a5e9d48117336476f568cb" + hash: "be05537c0b9246b0c4d48ae344275bb9" } Frame { msec: 3024 - hash: "5930448341bce1c50de7acaba1f64ca1" + hash: "59de97652e25f49b1bf016a9b124d324" } Frame { msec: 3040 @@ -854,71 +854,71 @@ VisualTest { } Frame { msec: 3056 - hash: "fcf11cf70b8ac210d4bb2bc716942053" + hash: "09fe50cbbcc7432d6fa6bbe875eae5e3" } Frame { msec: 3072 - hash: "767d707db4dbb02b6f97153b3822a1d1" + hash: "a95c1f6ca5a638c4d9229321a84e51a4" } Frame { msec: 3088 - hash: "f8eb75b97f5233aa82b887aab34a38e3" + hash: "c439b31b64510ce025ad326364e8f690" } Frame { msec: 3104 - hash: "1d3beb06b39fa1d5cabd31ec4297f59f" + hash: "c28c637ff5f0ae6d4532fba13cfb8ea4" } Frame { msec: 3120 - hash: "cadc775e0764afa7b50c5bab782035dd" + hash: "2e095e9433e1f504163aebc8450be923" } Frame { msec: 3136 - hash: "385f5a6e80da0d3ddf24539a64f26eb9" + hash: "5fb49164c1bad4bb96a13cfbb336312b" } Frame { msec: 3152 - hash: "34204871a684ea251c9d07fb125436da" + hash: "34b7976b3dbf0c5462ddf77153d9d2c9" } Frame { msec: 3168 - hash: "bc3e496535e66ff0d1e800092b7c78ca" + hash: "d4007272d676a896c99adb66afa0c10b" } Frame { msec: 3184 - hash: "d6c4ff5bf223361be42c78d6d81248c3" + hash: "07638f1f5eb5786a12cbc74414fe29b5" } Frame { msec: 3200 - hash: "cb09d41612df66a8d099153026adcbf3" + hash: "1fe90791c573865f425ef0e43faf7a1c" } Frame { msec: 3216 - hash: "f82180b8c0389ddc3623107a049c3366" + hash: "b149986c7b395106a808b1fcd1d8bcb2" } Frame { msec: 3232 - hash: "1b0f65e4599c65b8a603abd8da718d48" + hash: "ecb2b6d44eafb8a0b5493520b64e5e5b" } Frame { msec: 3248 - hash: "897391a8206178356858139b3d1a4ce8" + hash: "fc66b2e38d477c16584eee4f541df511" } Frame { msec: 3264 - hash: "b66d268dc7a42a7b1172b1ff566f4eb8" + hash: "023152c61ad6cd0b8726e6c8fa6043a4" } Frame { msec: 3280 - hash: "0fe5d38a253dbd1ebcc67cca7ea86dc7" + hash: "b788f8a7e1e42f768fd1fe1198ca0344" } Frame { msec: 3296 - hash: "b788f8a7e1e42f768fd1fe1198ca0344" + hash: "4f7f8b7f5bb78bb9327b6fa8142ce3a2" } Frame { msec: 3312 - hash: "4f7f8b7f5bb78bb9327b6fa8142ce3a2" + hash: "30f041278c08174671568a0dfb7cbdf7" } Frame { msec: 3328 @@ -950,7 +950,7 @@ VisualTest { } Frame { msec: 3440 - hash: "6d79d9d0ba8da0b5654b39768b25591f" + hash: "cba9afe3f351e6cd6dc72d7f263401b0" } Frame { msec: 3456 @@ -1111,7 +1111,7 @@ VisualTest { Key { type: 6 key: 16777249 - modifiers: 67108864 + modifiers: 0 text: "" autorep: false count: 1 diff --git a/tests/auto/declarative/qmlvisual/fillmode/data/fillmode.0.png b/tests/auto/declarative/qmlvisual/fillmode/data/fillmode.0.png index 02fa5c9..ee07a68 100644 Binary files a/tests/auto/declarative/qmlvisual/fillmode/data/fillmode.0.png and b/tests/auto/declarative/qmlvisual/fillmode/data/fillmode.0.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.0.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.0.png index 993610f..c9536dc 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.0.png and b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.0.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.1.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.1.png index 993610f..c9536dc 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.1.png and b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.1.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.10.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.10.png index 12c6cf5..1d9a39c 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.10.png and b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.10.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.11.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.11.png index ccb9fdd..8fd0a97 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.11.png and b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.11.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.12.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.12.png index ace0752..2cc486c 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.12.png and b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.12.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.13.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.13.png index 993610f..c9536dc 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.13.png and b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.13.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.2.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.2.png index e58c68b..903312b 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.2.png and b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.2.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.3.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.3.png index e58c68b..903312b 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.3.png and b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.3.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.4.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.4.png index cb6d2f8..64d760a 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.4.png and b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.4.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.5.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.5.png index db6bea2..a45da4f 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.5.png and b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.5.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.6.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.6.png index c18bb34..6cb4d6f 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.6.png and b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.6.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.7.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.7.png index c18bb34..6cb4d6f 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.7.png and b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.7.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.8.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.8.png index 3b56301..97cb175 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.8.png and b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.8.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.9.png b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.9.png index 993610f..c9536dc 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.9.png and b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.9.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.qml b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.qml index 307fef6..50ef6e8 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativemousearea/data/mousearea-flickable.qml @@ -1202,7 +1202,7 @@ VisualTest { } Frame { msec: 4576 - hash: "86b32befe0dada5bdce82a7dd14777ce" + hash: "d75a43305e2884759ca41d7b1cbadf52" } Mouse { type: 5 @@ -1222,7 +1222,7 @@ VisualTest { } Frame { msec: 4592 - hash: "7a5f69a1eecb5de0fc2295cd287eb449" + hash: "9f9f85d5f879b0e52ebc751d6668cfb8" } Mouse { type: 5 @@ -1242,7 +1242,7 @@ VisualTest { } Frame { msec: 4608 - hash: "144eeb7c2a32cedb6ebba063501c9176" + hash: "a569789b082296415321ba11c859abe5" } Mouse { type: 5 @@ -1262,7 +1262,7 @@ VisualTest { } Frame { msec: 4624 - hash: "11120d6de575ffa639b6abb3af4afef7" + hash: "7a5f69a1eecb5de0fc2295cd287eb449" } Mouse { type: 5 @@ -1282,7 +1282,7 @@ VisualTest { } Frame { msec: 4640 - hash: "ab4c936a81299adf080f3b14f7e6be49" + hash: "70e522f64236dfa4e1613ffc29b4b23e" } Mouse { type: 5 @@ -1302,7 +1302,7 @@ VisualTest { } Frame { msec: 4656 - hash: "6602009ffe3c0f3072640ebc8749b76f" + hash: "11120d6de575ffa639b6abb3af4afef7" } Mouse { type: 5 @@ -1322,7 +1322,7 @@ VisualTest { } Frame { msec: 4672 - hash: "8517007d5102af238935e93a3b38087f" + hash: "ab4c936a81299adf080f3b14f7e6be49" } Mouse { type: 5 @@ -1342,7 +1342,7 @@ VisualTest { } Frame { msec: 4688 - hash: "4e129ebba85d1f3717d09f71eb5a1a7d" + hash: "c29ab366ba3f11de6452949c11310b4a" } Mouse { type: 5 @@ -1362,7 +1362,7 @@ VisualTest { } Frame { msec: 4704 - hash: "82f54d7e254edcf499ea12a63118e8a7" + hash: "34ef0279e3731447f1df97784b47648a" } Mouse { type: 5 @@ -1382,7 +1382,7 @@ VisualTest { } Frame { msec: 4720 - hash: "572cb62d69ccb973ea18d3b0eaff571b" + hash: "84df34cd981e0465aaaae47881de6c3b" } Mouse { type: 5 @@ -1402,7 +1402,7 @@ VisualTest { } Frame { msec: 4736 - hash: "79650397b868019909b931a32a115823" + hash: "837deeb2a92648d830acf29e829ebb53" } Mouse { type: 5 @@ -1422,7 +1422,7 @@ VisualTest { } Frame { msec: 4752 - hash: "43e50f4d4d37373e26af0a5d3cb64c4c" + hash: "572cb62d69ccb973ea18d3b0eaff571b" } Mouse { type: 5 @@ -1442,7 +1442,7 @@ VisualTest { } Frame { msec: 4768 - hash: "a0f8eb8a796f67c368b0a479e8d14681" + hash: "3d75735eefbf95f37e2a8605b9167ba1" } Mouse { type: 5 @@ -1462,7 +1462,7 @@ VisualTest { } Frame { msec: 4784 - hash: "01bf03313a0229e810a24e2adbbe9775" + hash: "c37507a29e3a6d80446ad68f2d92f266" } Mouse { type: 5 @@ -1486,7 +1486,7 @@ VisualTest { } Frame { msec: 4816 - hash: "aafb12a520eb443ee1348282f2c54e4a" + hash: "7fb0ed99b7d751d1f335afd7c0de2f2c" } Mouse { type: 5 @@ -1506,7 +1506,7 @@ VisualTest { } Frame { msec: 4832 - hash: "806d22bc3533c729cd10dc889c36902d" + hash: "363eca81f97f20f14e8d480f83d2bc7d" } Mouse { type: 5 @@ -1518,7 +1518,7 @@ VisualTest { } Frame { msec: 4848 - hash: "05b3013c9e42ed9ced7009d2e2999357" + hash: "72e75cfa62993593303b25cbff4af0e6" } Mouse { type: 5 @@ -1538,7 +1538,7 @@ VisualTest { } Frame { msec: 4864 - hash: "cb49adcd2c8afe27fd5926bd622added" + hash: "cc6619c7cd6e4e274df4729aad6cca46" } Mouse { type: 5 @@ -1558,7 +1558,7 @@ VisualTest { } Frame { msec: 4880 - hash: "d0b4215b43403c97d83250add6d2b6db" + hash: "0b16e524cd5253d07aa9b5855967fa71" } Mouse { type: 5 @@ -1578,7 +1578,7 @@ VisualTest { } Frame { msec: 4896 - hash: "ee0523fe6a33b59871ad3b311ca0cbeb" + hash: "091d1ad7aba4b662cba98214c98a4707" } Mouse { type: 5 @@ -1598,7 +1598,7 @@ VisualTest { } Frame { msec: 4912 - hash: "29ca97cc573d3a1fde65320b61678c60" + hash: "f334bfcc3af89bf1405762a215c54ea6" } Mouse { type: 5 @@ -1610,7 +1610,7 @@ VisualTest { } Frame { msec: 4928 - hash: "021bda841eaefa76ce5e1c97150af6f6" + hash: "7b41d651ad46341859d0188db341ae10" } Mouse { type: 5 @@ -1630,7 +1630,7 @@ VisualTest { } Frame { msec: 4944 - hash: "80edf52cc9e64a29f677bc2203220ba9" + hash: "95b57cd3dac3bce56674f2c4143f42d4" } Mouse { type: 5 @@ -1642,7 +1642,7 @@ VisualTest { } Frame { msec: 4960 - hash: "c09f4002ed9d41f62bb1aaff95723cce" + hash: "1709dda08ce7494ff6d082cc5d93f0d2" } Mouse { type: 5 @@ -1662,7 +1662,7 @@ VisualTest { } Frame { msec: 4976 - hash: "7bb17b13db811b02c86a24a0051336d9" + hash: "390105f21526e1f8fda15666631578a1" } Mouse { type: 5 @@ -1682,7 +1682,7 @@ VisualTest { } Frame { msec: 4992 - hash: "da5c33ee9e9e1d9aaa7d5efa83b8bf69" + hash: "ee40862a59f14667c89fa62f380c10fb" } Mouse { type: 5 @@ -1694,7 +1694,7 @@ VisualTest { } Frame { msec: 5008 - hash: "3ca9742356b6ff833fd287a95520174a" + hash: "6d6cec95a6a2445d88b015ff76af032e" } Mouse { type: 5 @@ -1714,7 +1714,7 @@ VisualTest { } Frame { msec: 5024 - hash: "d1372239a681d1fccc25257b4a02fb39" + hash: "e87bf82b6a7a928a27bffd9cb2dd7604" } Mouse { type: 5 @@ -1734,7 +1734,7 @@ VisualTest { } Frame { msec: 5040 - hash: "1f37473ab2fb0643e11e4a41a2ee4561" + hash: "9a9d1e0b1d7b9291480b3ec641f354ce" } Mouse { type: 5 @@ -1754,7 +1754,7 @@ VisualTest { } Frame { msec: 5056 - hash: "1533c6ff17e79a47a5d3510aa85bcf8a" + hash: "d1372239a681d1fccc25257b4a02fb39" } Mouse { type: 5 @@ -1774,7 +1774,7 @@ VisualTest { } Frame { msec: 5072 - hash: "4cad3c6caf8d3009f63923df897c4723" + hash: "1f37473ab2fb0643e11e4a41a2ee4561" } Mouse { type: 5 @@ -1794,7 +1794,7 @@ VisualTest { } Frame { msec: 5088 - hash: "b81183233961b34c2a3f21a249b0fbfb" + hash: "1533c6ff17e79a47a5d3510aa85bcf8a" } Mouse { type: 5 @@ -1814,7 +1814,7 @@ VisualTest { } Frame { msec: 5104 - hash: "9f876eb93a16c24843dd6a5acd303ab3" + hash: "c5980322acf00a04efbd5e1b92aa0e98" } Mouse { type: 5 @@ -1834,7 +1834,7 @@ VisualTest { } Frame { msec: 5120 - hash: "237dd62011f4253970b946b335e3fb71" + hash: "b81183233961b34c2a3f21a249b0fbfb" } Mouse { type: 5 @@ -1846,7 +1846,7 @@ VisualTest { } Frame { msec: 5136 - hash: "6206ad3e633b6b1b068304caa4efe48a" + hash: "2dc2def0c748ac94d33d90d4a3610136" } Mouse { type: 5 @@ -1858,7 +1858,7 @@ VisualTest { } Frame { msec: 5152 - hash: "1eb5f0e1aa014a38e6ca66ddfc2a076b" + hash: "9f876eb93a16c24843dd6a5acd303ab3" } Mouse { type: 5 @@ -1870,7 +1870,7 @@ VisualTest { } Frame { msec: 5168 - hash: "d9e953d132330f8a58a190d61aec6ec3" + hash: "9f876eb93a16c24843dd6a5acd303ab3" } Mouse { type: 5 @@ -1890,7 +1890,7 @@ VisualTest { } Frame { msec: 5184 - hash: "c1570ad4cb688ea51818e0a09e349daa" + hash: "237dd62011f4253970b946b335e3fb71" } Mouse { type: 5 @@ -1902,11 +1902,11 @@ VisualTest { } Frame { msec: 5200 - hash: "11853dcbad9d1d9a8b7d8a4e6fcca140" + hash: "6206ad3e633b6b1b068304caa4efe48a" } Frame { msec: 5216 - hash: "11853dcbad9d1d9a8b7d8a4e6fcca140" + hash: "6206ad3e633b6b1b068304caa4efe48a" } Mouse { type: 5 @@ -1918,7 +1918,7 @@ VisualTest { } Frame { msec: 5232 - hash: "11853dcbad9d1d9a8b7d8a4e6fcca140" + hash: "1eb5f0e1aa014a38e6ca66ddfc2a076b" } Mouse { type: 5 @@ -1930,7 +1930,7 @@ VisualTest { } Frame { msec: 5248 - hash: "c6a81be579382f25ac583734897c2570" + hash: "1eb5f0e1aa014a38e6ca66ddfc2a076b" } Mouse { type: 5 @@ -1942,11 +1942,11 @@ VisualTest { } Frame { msec: 5264 - hash: "c6a81be579382f25ac583734897c2570" + hash: "d9e953d132330f8a58a190d61aec6ec3" } Frame { msec: 5280 - hash: "c6a81be579382f25ac583734897c2570" + hash: "d9e953d132330f8a58a190d61aec6ec3" } Mouse { type: 5 @@ -1958,7 +1958,7 @@ VisualTest { } Frame { msec: 5296 - hash: "8cbeb925f039bde9846d37a5ec6cd3f9" + hash: "d9e953d132330f8a58a190d61aec6ec3" } Mouse { type: 5 @@ -1970,19 +1970,19 @@ VisualTest { } Frame { msec: 5312 - hash: "8cbeb925f039bde9846d37a5ec6cd3f9" + hash: "c1570ad4cb688ea51818e0a09e349daa" } Frame { msec: 5328 - hash: "8cbeb925f039bde9846d37a5ec6cd3f9" + hash: "c1570ad4cb688ea51818e0a09e349daa" } Frame { msec: 5344 - hash: "8cbeb925f039bde9846d37a5ec6cd3f9" + hash: "c1570ad4cb688ea51818e0a09e349daa" } Frame { msec: 5360 - hash: "8cbeb925f039bde9846d37a5ec6cd3f9" + hash: "c1570ad4cb688ea51818e0a09e349daa" } Mouse { type: 3 @@ -1994,51 +1994,51 @@ VisualTest { } Frame { msec: 5376 - hash: "8cbeb925f039bde9846d37a5ec6cd3f9" + hash: "c1570ad4cb688ea51818e0a09e349daa" } Frame { msec: 5392 - hash: "c6a81be579382f25ac583734897c2570" + hash: "d9e953d132330f8a58a190d61aec6ec3" } Frame { msec: 5408 - hash: "11853dcbad9d1d9a8b7d8a4e6fcca140" + hash: "1eb5f0e1aa014a38e6ca66ddfc2a076b" } Frame { msec: 5424 - hash: "1eb5f0e1aa014a38e6ca66ddfc2a076b" + hash: "9f876eb93a16c24843dd6a5acd303ab3" } Frame { msec: 5440 - hash: "9f876eb93a16c24843dd6a5acd303ab3" + hash: "4cad3c6caf8d3009f63923df897c4723" } Frame { msec: 5456 - hash: "1533c6ff17e79a47a5d3510aa85bcf8a" + hash: "79538d2f507fd6eea7ea1f990e90388a" } Frame { msec: 5472 - hash: "9a9d1e0b1d7b9291480b3ec641f354ce" + hash: "e87bf82b6a7a928a27bffd9cb2dd7604" } Frame { msec: 5488 - hash: "ee40862a59f14667c89fa62f380c10fb" + hash: "390105f21526e1f8fda15666631578a1" } Frame { msec: 5504 - hash: "95b57cd3dac3bce56674f2c4143f42d4" + hash: "7b41d651ad46341859d0188db341ae10" } Frame { msec: 5520 - hash: "52d45e8dde81fef5ee93bbd5a40d4851" + hash: "091d1ad7aba4b662cba98214c98a4707" } Frame { msec: 5536 - hash: "05b3013c9e42ed9ced7009d2e2999357" + hash: "1978cda418856b542d7c5a155b74f09c" } Frame { msec: 5552 - hash: "7d03030f5a672d87aeabefdf4f3a39a4" + hash: "01bf03313a0229e810a24e2adbbe9775" } Frame { msec: 5568 @@ -2046,15 +2046,15 @@ VisualTest { } Frame { msec: 5584 - hash: "82f54d7e254edcf499ea12a63118e8a7" + hash: "84df34cd981e0465aaaae47881de6c3b" } Frame { msec: 5600 - hash: "8517007d5102af238935e93a3b38087f" + hash: "c29ab366ba3f11de6452949c11310b4a" } Frame { msec: 5616 - hash: "dc272fc8fc98d822a154da1d495d4f7e" + hash: "ab4c936a81299adf080f3b14f7e6be49" } Frame { msec: 5632 @@ -2066,7 +2066,7 @@ VisualTest { } Frame { msec: 5664 - hash: "7a5f69a1eecb5de0fc2295cd287eb449" + hash: "86b32befe0dada5bdce82a7dd14777ce" } Frame { msec: 5680 @@ -2750,7 +2750,7 @@ VisualTest { } Frame { msec: 8240 - hash: "9f9f85d5f879b0e52ebc751d6668cfb8" + hash: "cc1fd2f4c3be318052254a9b6be7a57b" } Mouse { type: 5 @@ -2762,7 +2762,7 @@ VisualTest { } Frame { msec: 8256 - hash: "70e522f64236dfa4e1613ffc29b4b23e" + hash: "a569789b082296415321ba11c859abe5" } Mouse { type: 5 @@ -2782,7 +2782,7 @@ VisualTest { } Frame { msec: 8272 - hash: "11120d6de575ffa639b6abb3af4afef7" + hash: "7a5f69a1eecb5de0fc2295cd287eb449" } Mouse { type: 5 @@ -2802,7 +2802,7 @@ VisualTest { } Frame { msec: 8288 - hash: "dc272fc8fc98d822a154da1d495d4f7e" + hash: "11120d6de575ffa639b6abb3af4afef7" } Mouse { type: 5 @@ -2822,7 +2822,7 @@ VisualTest { } Frame { msec: 8304 - hash: "4e129ebba85d1f3717d09f71eb5a1a7d" + hash: "c29ab366ba3f11de6452949c11310b4a" } Mouse { type: 5 @@ -2834,7 +2834,7 @@ VisualTest { } Frame { msec: 8320 - hash: "837deeb2a92648d830acf29e829ebb53" + hash: "4e129ebba85d1f3717d09f71eb5a1a7d" } Mouse { type: 5 @@ -2846,7 +2846,7 @@ VisualTest { } Frame { msec: 8336 - hash: "7d2606d432858288dac019e0002ff85a" + hash: "837deeb2a92648d830acf29e829ebb53" } Mouse { type: 5 @@ -2866,7 +2866,7 @@ VisualTest { } Frame { msec: 8352 - hash: "c37507a29e3a6d80446ad68f2d92f266" + hash: "79650397b868019909b931a32a115823" } Mouse { type: 5 @@ -2878,7 +2878,7 @@ VisualTest { } Frame { msec: 8368 - hash: "01bf03313a0229e810a24e2adbbe9775" + hash: "c37507a29e3a6d80446ad68f2d92f266" } Mouse { type: 5 @@ -2890,7 +2890,7 @@ VisualTest { } Frame { msec: 8384 - hash: "8ffbbed46737837e55383833b96d2624" + hash: "01bf03313a0229e810a24e2adbbe9775" } Mouse { type: 5 @@ -2910,7 +2910,7 @@ VisualTest { } Frame { msec: 8400 - hash: "6d49fc41fb6d74643c7613df7e417833" + hash: "8ffbbed46737837e55383833b96d2624" } Mouse { type: 5 @@ -2922,7 +2922,7 @@ VisualTest { } Frame { msec: 8416 - hash: "1978cda418856b542d7c5a155b74f09c" + hash: "6d49fc41fb6d74643c7613df7e417833" } Mouse { type: 5 @@ -2942,7 +2942,7 @@ VisualTest { } Frame { msec: 8432 - hash: "cc6619c7cd6e4e274df4729aad6cca46" + hash: "806d22bc3533c729cd10dc889c36902d" } Mouse { type: 5 @@ -2962,7 +2962,7 @@ VisualTest { } Frame { msec: 8448 - hash: "0b16e524cd5253d07aa9b5855967fa71" + hash: "cc6619c7cd6e4e274df4729aad6cca46" } Mouse { type: 5 @@ -2982,7 +2982,7 @@ VisualTest { } Frame { msec: 8464 - hash: "0121c18897c37481fddbac57db636a60" + hash: "929bf28dcb97e8c93dae5dbe23beecc8" } Mouse { type: 5 @@ -3002,7 +3002,7 @@ VisualTest { } Frame { msec: 8480 - hash: "091d1ad7aba4b662cba98214c98a4707" + hash: "0121c18897c37481fddbac57db636a60" } Mouse { type: 5 @@ -3014,7 +3014,7 @@ VisualTest { } Frame { msec: 8496 - hash: "f334bfcc3af89bf1405762a215c54ea6" + hash: "091d1ad7aba4b662cba98214c98a4707" } Mouse { type: 5 @@ -3034,7 +3034,7 @@ VisualTest { } Frame { msec: 8512 - hash: "66f71641c7a607152f140428ab9621d6" + hash: "ce673b66f695f5b002515a5416bbf913" } Mouse { type: 5 @@ -3054,7 +3054,7 @@ VisualTest { } Frame { msec: 8528 - hash: "7b41d651ad46341859d0188db341ae10" + hash: "66f71641c7a607152f140428ab9621d6" } Mouse { type: 5 @@ -3066,7 +3066,7 @@ VisualTest { } Frame { msec: 8544 - hash: "95b57cd3dac3bce56674f2c4143f42d4" + hash: "29ca97cc573d3a1fde65320b61678c60" } Mouse { type: 5 @@ -3086,7 +3086,7 @@ VisualTest { } Frame { msec: 8560 - hash: "80edf52cc9e64a29f677bc2203220ba9" + hash: "021bda841eaefa76ce5e1c97150af6f6" } Mouse { type: 5 @@ -3106,7 +3106,7 @@ VisualTest { } Frame { msec: 8576 - hash: "68c8c95edb8cce11320715266bd62628" + hash: "b1ea82b880a2fc35bf1ed117d8ab21b0" } Mouse { type: 5 @@ -3126,7 +3126,7 @@ VisualTest { } Frame { msec: 8592 - hash: "c09f4002ed9d41f62bb1aaff95723cce" + hash: "80edf52cc9e64a29f677bc2203220ba9" } Mouse { type: 5 @@ -3138,7 +3138,7 @@ VisualTest { } Frame { msec: 8608 - hash: "7bb17b13db811b02c86a24a0051336d9" + hash: "390105f21526e1f8fda15666631578a1" } Mouse { type: 5 @@ -3158,7 +3158,7 @@ VisualTest { } Frame { msec: 8624 - hash: "6d6cec95a6a2445d88b015ff76af032e" + hash: "ee40862a59f14667c89fa62f380c10fb" } Mouse { type: 5 @@ -3190,7 +3190,7 @@ VisualTest { } Frame { msec: 8656 - hash: "9a9d1e0b1d7b9291480b3ec641f354ce" + hash: "da5c33ee9e9e1d9aaa7d5efa83b8bf69" } Mouse { type: 5 @@ -3210,7 +3210,7 @@ VisualTest { } Frame { msec: 8672 - hash: "d1372239a681d1fccc25257b4a02fb39" + hash: "3ca9742356b6ff833fd287a95520174a" } Mouse { type: 5 @@ -3230,7 +3230,7 @@ VisualTest { } Frame { msec: 8688 - hash: "2010f6f0c34e59f505bbe1aab262b646" + hash: "d1372239a681d1fccc25257b4a02fb39" } Mouse { type: 5 @@ -3250,7 +3250,7 @@ VisualTest { } Frame { msec: 8704 - hash: "2dc2def0c748ac94d33d90d4a3610136" + hash: "c5980322acf00a04efbd5e1b92aa0e98" } Mouse { type: 5 @@ -3270,7 +3270,7 @@ VisualTest { } Frame { msec: 8720 - hash: "1eb5f0e1aa014a38e6ca66ddfc2a076b" + hash: "9f876eb93a16c24843dd6a5acd303ab3" } Mouse { type: 5 @@ -3290,7 +3290,7 @@ VisualTest { } Frame { msec: 8736 - hash: "c1570ad4cb688ea51818e0a09e349daa" + hash: "6206ad3e633b6b1b068304caa4efe48a" } Mouse { type: 5 @@ -3302,7 +3302,7 @@ VisualTest { } Frame { msec: 8752 - hash: "c6a81be579382f25ac583734897c2570" + hash: "d9e953d132330f8a58a190d61aec6ec3" } Mouse { type: 5 @@ -3314,7 +3314,7 @@ VisualTest { } Frame { msec: 8768 - hash: "8cbeb925f039bde9846d37a5ec6cd3f9" + hash: "c1570ad4cb688ea51818e0a09e349daa" } Mouse { type: 5 @@ -3326,7 +3326,7 @@ VisualTest { } Frame { msec: 8784 - hash: "b34a796f25ad62f952101b296f9c2bac" + hash: "11853dcbad9d1d9a8b7d8a4e6fcca140" } Mouse { type: 5 @@ -3338,51 +3338,51 @@ VisualTest { } Frame { msec: 8800 - hash: "a0814b5ba881e5da8a1ecae8d714b4ce" + hash: "c6a81be579382f25ac583734897c2570" } Frame { msec: 8816 - hash: "a0814b5ba881e5da8a1ecae8d714b4ce" + hash: "c6a81be579382f25ac583734897c2570" } Frame { msec: 8832 - hash: "a0814b5ba881e5da8a1ecae8d714b4ce" + hash: "c6a81be579382f25ac583734897c2570" } Frame { msec: 8848 - hash: "a0814b5ba881e5da8a1ecae8d714b4ce" + hash: "c6a81be579382f25ac583734897c2570" } Frame { msec: 8864 - hash: "a0814b5ba881e5da8a1ecae8d714b4ce" + hash: "c6a81be579382f25ac583734897c2570" } Frame { msec: 8880 - hash: "a0814b5ba881e5da8a1ecae8d714b4ce" + hash: "c6a81be579382f25ac583734897c2570" } Frame { msec: 8896 - hash: "a0814b5ba881e5da8a1ecae8d714b4ce" + hash: "c6a81be579382f25ac583734897c2570" } Frame { msec: 8912 - hash: "a0814b5ba881e5da8a1ecae8d714b4ce" + hash: "c6a81be579382f25ac583734897c2570" } Frame { msec: 8928 - hash: "a0814b5ba881e5da8a1ecae8d714b4ce" + hash: "c6a81be579382f25ac583734897c2570" } Frame { msec: 8944 - hash: "a0814b5ba881e5da8a1ecae8d714b4ce" + hash: "c6a81be579382f25ac583734897c2570" } Frame { msec: 8960 - hash: "a0814b5ba881e5da8a1ecae8d714b4ce" + hash: "c6a81be579382f25ac583734897c2570" } Frame { msec: 8976 - hash: "a0814b5ba881e5da8a1ecae8d714b4ce" + hash: "c6a81be579382f25ac583734897c2570" } Mouse { type: 3 @@ -3394,55 +3394,55 @@ VisualTest { } Frame { msec: 8992 - hash: "a0814b5ba881e5da8a1ecae8d714b4ce" + hash: "c6a81be579382f25ac583734897c2570" } Frame { msec: 9008 - hash: "b34a796f25ad62f952101b296f9c2bac" + hash: "11853dcbad9d1d9a8b7d8a4e6fcca140" } Frame { msec: 9024 - hash: "8cbeb925f039bde9846d37a5ec6cd3f9" + hash: "c1570ad4cb688ea51818e0a09e349daa" } Frame { msec: 9040 - hash: "c1570ad4cb688ea51818e0a09e349daa" + hash: "6206ad3e633b6b1b068304caa4efe48a" } Frame { msec: 9056 - hash: "237dd62011f4253970b946b335e3fb71" + hash: "2dc2def0c748ac94d33d90d4a3610136" } Frame { msec: 9072 - hash: "c5980322acf00a04efbd5e1b92aa0e98" + hash: "2010f6f0c34e59f505bbe1aab262b646" } Frame { msec: 9088 - hash: "d1372239a681d1fccc25257b4a02fb39" + hash: "3ca9742356b6ff833fd287a95520174a" } Frame { msec: 9104 - hash: "524db6ce45674c777d72f9206415be2f" + hash: "c09f4002ed9d41f62bb1aaff95723cce" } Frame { msec: 9120 - hash: "021bda841eaefa76ce5e1c97150af6f6" + hash: "95b57cd3dac3bce56674f2c4143f42d4" } Frame { msec: 9136 - hash: "ce673b66f695f5b002515a5416bbf913" + hash: "52d45e8dde81fef5ee93bbd5a40d4851" } Frame { msec: 9152 - hash: "cc6619c7cd6e4e274df4729aad6cca46" + hash: "1978cda418856b542d7c5a155b74f09c" } Frame { msec: 9168 - hash: "7fb0ed99b7d751d1f335afd7c0de2f2c" + hash: "7d03030f5a672d87aeabefdf4f3a39a4" } Frame { msec: 9184 - hash: "3d75735eefbf95f37e2a8605b9167ba1" + hash: "79650397b868019909b931a32a115823" } Frame { msec: 9200 @@ -3454,7 +3454,7 @@ VisualTest { } Frame { msec: 9232 - hash: "dc272fc8fc98d822a154da1d495d4f7e" + hash: "ab4c936a81299adf080f3b14f7e6be49" } Frame { msec: 9248 @@ -3466,7 +3466,7 @@ VisualTest { } Frame { msec: 9280 - hash: "7a5f69a1eecb5de0fc2295cd287eb449" + hash: "86b32befe0dada5bdce82a7dd14777ce" } Frame { msec: 9296 @@ -4022,7 +4022,7 @@ VisualTest { } Frame { msec: 11248 - hash: "a569789b082296415321ba11c859abe5" + hash: "d75a43305e2884759ca41d7b1cbadf52" } Mouse { type: 5 @@ -4042,7 +4042,7 @@ VisualTest { } Frame { msec: 11264 - hash: "86b32befe0dada5bdce82a7dd14777ce" + hash: "43fc85bb3b1501f5e12f1fedaaa14c64" } Mouse { type: 5 @@ -4062,7 +4062,7 @@ VisualTest { } Frame { msec: 11280 - hash: "70e522f64236dfa4e1613ffc29b4b23e" + hash: "a569789b082296415321ba11c859abe5" } Mouse { type: 5 @@ -4074,7 +4074,7 @@ VisualTest { } Frame { msec: 11296 - hash: "11120d6de575ffa639b6abb3af4afef7" + hash: "7a5f69a1eecb5de0fc2295cd287eb449" } Mouse { type: 5 @@ -4094,7 +4094,7 @@ VisualTest { } Frame { msec: 11312 - hash: "8e05207e0d0d9d15a61a0d21d985a83a" + hash: "70e522f64236dfa4e1613ffc29b4b23e" } Mouse { type: 5 @@ -4114,7 +4114,7 @@ VisualTest { } Frame { msec: 11328 - hash: "6602009ffe3c0f3072640ebc8749b76f" + hash: "8e05207e0d0d9d15a61a0d21d985a83a" } Mouse { type: 5 @@ -4134,7 +4134,7 @@ VisualTest { } Frame { msec: 11344 - hash: "8517007d5102af238935e93a3b38087f" + hash: "dc272fc8fc98d822a154da1d495d4f7e" } Mouse { type: 5 @@ -4154,7 +4154,7 @@ VisualTest { } Frame { msec: 11360 - hash: "82f54d7e254edcf499ea12a63118e8a7" + hash: "34ef0279e3731447f1df97784b47648a" } Mouse { type: 5 @@ -4174,7 +4174,7 @@ VisualTest { } Frame { msec: 11376 - hash: "572cb62d69ccb973ea18d3b0eaff571b" + hash: "82f54d7e254edcf499ea12a63118e8a7" } Mouse { type: 5 @@ -4194,7 +4194,7 @@ VisualTest { } Frame { msec: 11392 - hash: "79650397b868019909b931a32a115823" + hash: "6ef4abc294d928381346e8ff9b012475" } Mouse { type: 5 @@ -4214,7 +4214,7 @@ VisualTest { } Frame { msec: 11408 - hash: "43e50f4d4d37373e26af0a5d3cb64c4c" + hash: "7d2606d432858288dac019e0002ff85a" } Mouse { type: 5 @@ -4234,7 +4234,7 @@ VisualTest { } Frame { msec: 11424 - hash: "a0f8eb8a796f67c368b0a479e8d14681" + hash: "3d75735eefbf95f37e2a8605b9167ba1" } Mouse { type: 5 @@ -4254,7 +4254,7 @@ VisualTest { } Frame { msec: 11440 - hash: "01bf03313a0229e810a24e2adbbe9775" + hash: "c37507a29e3a6d80446ad68f2d92f266" } Mouse { type: 5 @@ -4274,7 +4274,7 @@ VisualTest { } Frame { msec: 11456 - hash: "7fb0ed99b7d751d1f335afd7c0de2f2c" + hash: "b66571ae47bf129be88dc66785a81a7d" } Mouse { type: 5 @@ -4294,7 +4294,7 @@ VisualTest { } Frame { msec: 11472 - hash: "363eca81f97f20f14e8d480f83d2bc7d" + hash: "7d03030f5a672d87aeabefdf4f3a39a4" } Mouse { type: 5 @@ -4306,7 +4306,7 @@ VisualTest { } Frame { msec: 11488 - hash: "6d49fc41fb6d74643c7613df7e417833" + hash: "8ffbbed46737837e55383833b96d2624" } Mouse { type: 5 @@ -4326,7 +4326,7 @@ VisualTest { } Frame { msec: 11504 - hash: "806d22bc3533c729cd10dc889c36902d" + hash: "aafb12a520eb443ee1348282f2c54e4a" } Mouse { type: 5 @@ -4366,7 +4366,7 @@ VisualTest { } Frame { msec: 11536 - hash: "929bf28dcb97e8c93dae5dbe23beecc8" + hash: "05b3013c9e42ed9ced7009d2e2999357" } Mouse { type: 5 @@ -4386,7 +4386,7 @@ VisualTest { } Frame { msec: 11552 - hash: "cb49adcd2c8afe27fd5926bd622added" + hash: "1451addb43319318c794333cd1cec3fd" } Mouse { type: 5 @@ -4406,7 +4406,7 @@ VisualTest { } Frame { msec: 11568 - hash: "0121c18897c37481fddbac57db636a60" + hash: "929bf28dcb97e8c93dae5dbe23beecc8" } Mouse { type: 5 @@ -4418,7 +4418,7 @@ VisualTest { } Frame { msec: 11584 - hash: "c0a569ee064d844835dddab11eadcd33" + hash: "cb49adcd2c8afe27fd5926bd622added" } Mouse { type: 5 @@ -4438,7 +4438,7 @@ VisualTest { } Frame { msec: 11600 - hash: "52d45e8dde81fef5ee93bbd5a40d4851" + hash: "d0b4215b43403c97d83250add6d2b6db" } Mouse { type: 5 @@ -4458,7 +4458,7 @@ VisualTest { } Frame { msec: 11616 - hash: "ce673b66f695f5b002515a5416bbf913" + hash: "c0a569ee064d844835dddab11eadcd33" } Mouse { type: 5 @@ -4470,7 +4470,7 @@ VisualTest { } Frame { msec: 11632 - hash: "f334bfcc3af89bf1405762a215c54ea6" + hash: "091d1ad7aba4b662cba98214c98a4707" } Mouse { type: 5 @@ -4490,7 +4490,7 @@ VisualTest { } Frame { msec: 11648 - hash: "ee0523fe6a33b59871ad3b311ca0cbeb" + hash: "52d45e8dde81fef5ee93bbd5a40d4851" } Mouse { type: 5 @@ -4502,11 +4502,11 @@ VisualTest { } Frame { msec: 11664 - hash: "66f71641c7a607152f140428ab9621d6" + hash: "ce673b66f695f5b002515a5416bbf913" } Frame { msec: 11680 - hash: "66f71641c7a607152f140428ab9621d6" + hash: "ce673b66f695f5b002515a5416bbf913" } Mouse { type: 5 @@ -4518,7 +4518,7 @@ VisualTest { } Frame { msec: 11696 - hash: "66f71641c7a607152f140428ab9621d6" + hash: "ce673b66f695f5b002515a5416bbf913" } Mouse { type: 5 @@ -4530,7 +4530,7 @@ VisualTest { } Frame { msec: 11712 - hash: "ddd3d8cb82e238358cdb16c1df7d27b7" + hash: "f334bfcc3af89bf1405762a215c54ea6" } Mouse { type: 5 @@ -4542,7 +4542,7 @@ VisualTest { } Frame { msec: 11728 - hash: "ddd3d8cb82e238358cdb16c1df7d27b7" + hash: "f334bfcc3af89bf1405762a215c54ea6" } Mouse { type: 5 @@ -4554,7 +4554,7 @@ VisualTest { } Frame { msec: 11744 - hash: "29ca97cc573d3a1fde65320b61678c60" + hash: "ee0523fe6a33b59871ad3b311ca0cbeb" } Mouse { type: 5 @@ -4566,7 +4566,7 @@ VisualTest { } Frame { msec: 11760 - hash: "29ca97cc573d3a1fde65320b61678c60" + hash: "ee0523fe6a33b59871ad3b311ca0cbeb" } Mouse { type: 5 @@ -4578,7 +4578,7 @@ VisualTest { } Frame { msec: 11776 - hash: "7b41d651ad46341859d0188db341ae10" + hash: "66f71641c7a607152f140428ab9621d6" } Mouse { type: 5 @@ -4590,11 +4590,11 @@ VisualTest { } Frame { msec: 11792 - hash: "6b236864b7d95bf9f76b8afd6ba78613" + hash: "ddd3d8cb82e238358cdb16c1df7d27b7" } Frame { msec: 11808 - hash: "6b236864b7d95bf9f76b8afd6ba78613" + hash: "ddd3d8cb82e238358cdb16c1df7d27b7" } Mouse { type: 5 @@ -4606,7 +4606,7 @@ VisualTest { } Frame { msec: 11824 - hash: "95b57cd3dac3bce56674f2c4143f42d4" + hash: "29ca97cc573d3a1fde65320b61678c60" } Mouse { type: 5 @@ -4618,7 +4618,7 @@ VisualTest { } Frame { msec: 11840 - hash: "95b57cd3dac3bce56674f2c4143f42d4" + hash: "29ca97cc573d3a1fde65320b61678c60" } Mouse { type: 5 @@ -4630,7 +4630,7 @@ VisualTest { } Frame { msec: 11856 - hash: "021bda841eaefa76ce5e1c97150af6f6" + hash: "7b41d651ad46341859d0188db341ae10" } Mouse { type: 5 @@ -4642,11 +4642,11 @@ VisualTest { } Frame { msec: 11872 - hash: "b1ea82b880a2fc35bf1ed117d8ab21b0" + hash: "6b236864b7d95bf9f76b8afd6ba78613" } Frame { msec: 11888 - hash: "b1ea82b880a2fc35bf1ed117d8ab21b0" + hash: "6b236864b7d95bf9f76b8afd6ba78613" } Mouse { type: 5 @@ -4658,11 +4658,11 @@ VisualTest { } Frame { msec: 11904 - hash: "b1ea82b880a2fc35bf1ed117d8ab21b0" + hash: "6b236864b7d95bf9f76b8afd6ba78613" } Frame { msec: 11920 - hash: "b1ea82b880a2fc35bf1ed117d8ab21b0" + hash: "6b236864b7d95bf9f76b8afd6ba78613" } Mouse { type: 5 @@ -4674,11 +4674,11 @@ VisualTest { } Frame { msec: 11936 - hash: "1709dda08ce7494ff6d082cc5d93f0d2" + hash: "95b57cd3dac3bce56674f2c4143f42d4" } Frame { msec: 11952 - hash: "1709dda08ce7494ff6d082cc5d93f0d2" + hash: "95b57cd3dac3bce56674f2c4143f42d4" } Mouse { type: 5 @@ -4690,11 +4690,11 @@ VisualTest { } Frame { msec: 11968 - hash: "1709dda08ce7494ff6d082cc5d93f0d2" + hash: "95b57cd3dac3bce56674f2c4143f42d4" } Frame { msec: 11984 - hash: "1709dda08ce7494ff6d082cc5d93f0d2" + hash: "95b57cd3dac3bce56674f2c4143f42d4" } Mouse { type: 5 @@ -4706,7 +4706,7 @@ VisualTest { } Frame { msec: 12000 - hash: "80edf52cc9e64a29f677bc2203220ba9" + hash: "021bda841eaefa76ce5e1c97150af6f6" } Mouse { type: 5 @@ -4718,11 +4718,11 @@ VisualTest { } Frame { msec: 12016 - hash: "80edf52cc9e64a29f677bc2203220ba9" + hash: "021bda841eaefa76ce5e1c97150af6f6" } Frame { msec: 12032 - hash: "80edf52cc9e64a29f677bc2203220ba9" + hash: "021bda841eaefa76ce5e1c97150af6f6" } Mouse { type: 5 @@ -4734,23 +4734,23 @@ VisualTest { } Frame { msec: 12048 - hash: "68c8c95edb8cce11320715266bd62628" + hash: "b1ea82b880a2fc35bf1ed117d8ab21b0" } Frame { msec: 12064 - hash: "68c8c95edb8cce11320715266bd62628" + hash: "b1ea82b880a2fc35bf1ed117d8ab21b0" } Frame { msec: 12080 - hash: "68c8c95edb8cce11320715266bd62628" + hash: "b1ea82b880a2fc35bf1ed117d8ab21b0" } Frame { msec: 12096 - hash: "68c8c95edb8cce11320715266bd62628" + hash: "b1ea82b880a2fc35bf1ed117d8ab21b0" } Frame { msec: 12112 - hash: "68c8c95edb8cce11320715266bd62628" + hash: "b1ea82b880a2fc35bf1ed117d8ab21b0" } Mouse { type: 5 @@ -4762,23 +4762,23 @@ VisualTest { } Frame { msec: 12128 - hash: "68c8c95edb8cce11320715266bd62628" + hash: "b1ea82b880a2fc35bf1ed117d8ab21b0" } Frame { msec: 12144 - hash: "68c8c95edb8cce11320715266bd62628" + hash: "b1ea82b880a2fc35bf1ed117d8ab21b0" } Frame { msec: 12160 - hash: "68c8c95edb8cce11320715266bd62628" + hash: "b1ea82b880a2fc35bf1ed117d8ab21b0" } Frame { msec: 12176 - hash: "68c8c95edb8cce11320715266bd62628" + hash: "b1ea82b880a2fc35bf1ed117d8ab21b0" } Frame { msec: 12192 - hash: "68c8c95edb8cce11320715266bd62628" + hash: "b1ea82b880a2fc35bf1ed117d8ab21b0" } Mouse { type: 3 @@ -4790,59 +4790,59 @@ VisualTest { } Frame { msec: 12208 - hash: "68c8c95edb8cce11320715266bd62628" + hash: "b1ea82b880a2fc35bf1ed117d8ab21b0" } Frame { msec: 12224 - hash: "68c8c95edb8cce11320715266bd62628" + hash: "b1ea82b880a2fc35bf1ed117d8ab21b0" } Frame { msec: 12240 - hash: "80edf52cc9e64a29f677bc2203220ba9" + hash: "021bda841eaefa76ce5e1c97150af6f6" } Frame { msec: 12256 - hash: "b1ea82b880a2fc35bf1ed117d8ab21b0" + hash: "6b236864b7d95bf9f76b8afd6ba78613" } Frame { msec: 12272 - hash: "6b236864b7d95bf9f76b8afd6ba78613" + hash: "ddd3d8cb82e238358cdb16c1df7d27b7" } Frame { msec: 12288 - hash: "ddd3d8cb82e238358cdb16c1df7d27b7" + hash: "f334bfcc3af89bf1405762a215c54ea6" } Frame { msec: 12304 - hash: "ce673b66f695f5b002515a5416bbf913" + hash: "091d1ad7aba4b662cba98214c98a4707" } Frame { msec: 12320 - hash: "0121c18897c37481fddbac57db636a60" + hash: "0b16e524cd5253d07aa9b5855967fa71" } Frame { msec: 12336 - hash: "cc6619c7cd6e4e274df4729aad6cca46" + hash: "1978cda418856b542d7c5a155b74f09c" } Frame { msec: 12352 - hash: "aafb12a520eb443ee1348282f2c54e4a" + hash: "8ffbbed46737837e55383833b96d2624" } Frame { msec: 12368 - hash: "c37507a29e3a6d80446ad68f2d92f266" + hash: "43e50f4d4d37373e26af0a5d3cb64c4c" } Frame { msec: 12384 - hash: "6ef4abc294d928381346e8ff9b012475" + hash: "837deeb2a92648d830acf29e829ebb53" } Frame { msec: 12400 - hash: "4e129ebba85d1f3717d09f71eb5a1a7d" + hash: "34ef0279e3731447f1df97784b47648a" } Frame { msec: 12416 - hash: "6602009ffe3c0f3072640ebc8749b76f" + hash: "dc272fc8fc98d822a154da1d495d4f7e" } Frame { msec: 12432 @@ -4894,7 +4894,7 @@ VisualTest { } Frame { msec: 12624 - hash: "d75a43305e2884759ca41d7b1cbadf52" + hash: "cc1fd2f4c3be318052254a9b6be7a57b" } Frame { msec: 12640 @@ -5083,7 +5083,7 @@ VisualTest { Key { type: 6 key: 16777251 - modifiers: 134217728 + modifiers: 0 text: "" autorep: false count: 1 diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/usingRepeater.qml b/tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/usingRepeater.qml index b293d70..bdf8fee 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/usingRepeater.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/usingRepeater.qml @@ -6,239 +6,239 @@ VisualTest { } Frame { msec: 16 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 32 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 48 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 64 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 80 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 96 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 112 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 128 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 144 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 160 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 176 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 192 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 208 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 224 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 240 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 256 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 272 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 288 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 304 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 320 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 336 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 352 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 368 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 384 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 400 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 416 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 432 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 448 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 464 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 480 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 496 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 512 - hash: "b72bfb206ae52e0e4fb8927b82d64b64" + hash: "e9c524091a0351926c3d658b9935f176" } Frame { msec: 528 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 544 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 560 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 576 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 592 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 608 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 624 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 640 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 656 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 672 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 688 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 704 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 720 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 736 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 752 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 768 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 784 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 800 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 816 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 832 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 848 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 864 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 880 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 896 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 912 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 928 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 944 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 960 @@ -246,94 +246,94 @@ VisualTest { } Frame { msec: 976 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 992 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 1008 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 1024 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 1040 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 1056 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 1072 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 1088 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 1104 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 1120 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 1136 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 1152 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 1168 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 1184 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 1200 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 1216 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 1232 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 1248 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 1264 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 1280 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 1296 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 1312 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } Frame { msec: 1328 - hash: "f2de1f70c5f242604beb4ee0251c8032" + hash: "2b1fb0ebb6f728fe685d95b5947cce90" } } -- cgit v0.12 From 994d54f479e7c00832011cefc93b9d03d8ba1375 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Mon, 18 Oct 2010 18:05:57 +1000 Subject: Fix QDeclarativeTextLayout under non-affine transformation Task-number: QT-4158 --- src/declarative/graphicsitems/qdeclarativetextlayout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/graphicsitems/qdeclarativetextlayout.cpp b/src/declarative/graphicsitems/qdeclarativetextlayout.cpp index e8b5fb2..89a2158 100644 --- a/src/declarative/graphicsitems/qdeclarativetextlayout.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextlayout.cpp @@ -321,7 +321,7 @@ void QDeclarativeTextLayout::draw(QPainter *painter, const QPointF &p) priv->extended->type() == QPaintEngine::OpenVG || priv->extended->type() == QPaintEngine::OpenGL); - if (!paintEngineSupportsTransformations) { + if (!paintEngineSupportsTransformations || !priv->state->matrix.isAffine()) { QTextLayout::draw(painter, p); return; } -- cgit v0.12 From 95e8ba42b11db6036add3c2aa9aabcd1d2f5b4a3 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Mon, 18 Oct 2010 10:02:45 +0200 Subject: Corrected spelling mistake and whitespace fixes. Task-number: QTBUG-14501 --- doc/src/getting-started/examples.qdoc | 2 +- src/declarative/graphicsitems/qdeclarativerectangle.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc index 398eee8..c4892a8 100644 --- a/doc/src/getting-started/examples.qdoc +++ b/doc/src/getting-started/examples.qdoc @@ -36,7 +36,7 @@ You can run the examples from the \l{Examples and Demos Launcher} application (except see \l{QML Examples and Demos} {QML Examples} - for special instructions for running thos examples). + for special instructions for running those examples). The examples are listed below by functional area. Each example listed in a particular functional area is meant to illustrate how diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp index 9831d5f..1ffd3bd 100644 --- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp +++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp @@ -261,9 +261,9 @@ void QDeclarativeRectangle::doUpdate() A width of 1 creates a thin line. For no line, use a width of 0 or a transparent color. If \c border.width is an odd number, the rectangle is painted at a half-pixel offset to retain - border smoothness. Also, the border is rendered evenly on either side of the + border smoothness. Also, the border is rendered evenly on either side of the rectangle's boundaries, and the spare pixel is rendered to the right and below the - rectangle (as documented for QRect rendering). This can cause unintended effects if + rectangle (as documented for QRect rendering). This can cause unintended effects if \c border.width is 1 and the rectangle is \l{Item::clip}{clipped} by a parent item: \beginfloatright -- cgit v0.12 From 3fcb43ac278ba50278f3141f1b7924b514723bf7 Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Mon, 18 Oct 2010 10:44:28 +0200 Subject: qmake/symbian: Don't give the -u flag to cp on Mac OS X, it isn't a standard flag Also include -R in the linux version of the command, so that it is able to copy files recursively, which xcopy on windows is able to, if that is relied on somewhere. Merge-request: 861 Reviewed-by: Oswald Buddenhagen --- qmake/generators/symbian/symmake_abld.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp index 127d5c0..4f645af 100644 --- a/qmake/generators/symbian/symmake_abld.cpp +++ b/qmake/generators/symbian/symmake_abld.cpp @@ -205,8 +205,11 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool #ifdef Q_OS_WIN32 t << "XCOPY = xcopy /d /f /h /r /y /i" << endl; t << "ABLD = ABLD.BAT" << endl; +#elif defined(Q_OS_MAC) + t << "XCOPY = cp -R -v" << endl; + t << "ABLD = abld" << endl; #else - t << "XCOPY = cp -u -v" << endl; + t << "XCOPY = cp -R -u -v" << endl; t << "ABLD = abld" << endl; #endif t << "DEBUG_PLATFORMS = " << debugPlatforms.join(" ") << endl; -- cgit v0.12 From b9de3553ad6f26e96c5432df8b1b6be02fa5f9ca Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Mon, 18 Oct 2010 10:44:29 +0200 Subject: qmake/symbian: Make sure the destination directory exists before copying cp on unix doesn't create the destination directory if it doesn't exist, as xcopy on windows does. This also requires QMAKE_MKDIR to use mkdir -p to be able to create directories recursively. Merge-request: 861 Reviewed-by: Oswald Buddenhagen --- mkspecs/common/symbian/symbian.conf | 2 +- qmake/generators/symbian/symmake_abld.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index d8c38f4..decec14 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -104,7 +104,7 @@ contains(QMAKE_HOST.os,Windows) { QMAKE_COPY_DIR = cp -r QMAKE_MOVE = mv QMAKE_DEL_FILE = rm -f - QMAKE_MKDIR = mkdir + QMAKE_MKDIR = mkdir -p QMAKE_DEL_DIR = rmdir QMAKE_DEL_TREE = rm -rf QMAKE_CHK_DIR_EXISTS = test -d diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp index 4f645af..f895109 100644 --- a/qmake/generators/symbian/symmake_abld.cpp +++ b/qmake/generators/symbian/symmake_abld.cpp @@ -450,6 +450,11 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t, bool i t << "\t-$(XCOPY) \"" << depList.at(i).from << "\" \"" << depList.at(i).to.left(depList.at(i).to.lastIndexOf("\\") + 1) << "\"" << endl; #else + QString dirExists = var("QMAKE_CHK_DIR_EXISTS"); + QString mkdir = var("QMAKE_MKDIR"); + QString dir = QFileInfo(depList.at(i).to).dir().path(); + t << "\t-@ " << dirExists << " \"" << dir << "\" || " + << mkdir << " \"" << dir << "\"" << endl; t << "\t-$(XCOPY) \"" << QDir::toNativeSeparators(depList.at(i).from) << "\" \"" << QDir::toNativeSeparators(depList.at(i).to) << "\"" << endl; #endif -- cgit v0.12 From 0d3c17fc672a762085f74d0e436ef842370729ec Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Mon, 18 Oct 2010 11:04:04 +0200 Subject: Fixed QGraphicsItem to send ItemScenePositionHasChanged when appropriate Task-number: QTBUG-13473 Merge-request: 812 Reviewed-by: Alexis Menard --- src/gui/graphicsview/qgraphicsitem.cpp | 6 +++++- tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 27 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index e63acac..2b6aaf5 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/