diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-10 02:16:04 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-10 02:16:04 (GMT) |
commit | fa9c32829025121ab203565dd86a1c55028f40aa (patch) | |
tree | 2ca7441d9ed32c4c2eb228e1d30e8b377fa4ae1f /src/imports | |
parent | 9fc91de560b1302ff6cf238b3d179fc778066fcf (diff) | |
parent | 28b14cbb2003671f6f76b15d069572ef42194e62 (diff) | |
download | Qt-fa9c32829025121ab203565dd86a1c55028f40aa.zip Qt-fa9c32829025121ab203565dd86a1c55028f40aa.tar.gz Qt-fa9c32829025121ab203565dd86a1c55028f40aa.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (39 commits)
Remove 'XXX Experimental' from VisualItemModel/VisualDataModel and
Document attached properties
Add 'on' prefix to documentation of signals
Stablize qmlviewer test
Improve test stability.
qmlviewer: ensure that only clicks on the current file list are handled.
Doc improvements: move some example code to snippets, add screenshots,
Move some example code into snippets/ and add other doc fixes
Fix crash when changing ListView model with highlightRangeMode: ListView.StrictlyEnforceRange
Fix GridView bounds behavior with snapping enabled.
Small optimization when checking if MouseArea's onPressAndHold is
Fix autotest.
Fixed `nmake clean' breaking declarative imports on Windows.
Fix drawing flicker on Qml Viewer startup
Fix snake demo
Add qmlmethod Item::childAt() to delarative item
Cursor positioning in QTextDocument after undo()
Fix slow network access in qmlviewer (Windows)
Don't layout multiple times when an ancestor becomes (in)visible.
Add an example of animated item add/remove in ListView
...
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/particles/qdeclarativeparticles.cpp | 26 | ||||
-rw-r--r-- | src/imports/qimportbase.pri | 2 | ||||
-rw-r--r-- | src/imports/webkit/qdeclarativewebview.cpp | 4 |
3 files changed, 10 insertions, 22 deletions
diff --git a/src/imports/particles/qdeclarativeparticles.cpp b/src/imports/particles/qdeclarativeparticles.cpp index ecc6604..630c068 100644 --- a/src/imports/particles/qdeclarativeparticles.cpp +++ b/src/imports/particles/qdeclarativeparticles.cpp @@ -241,11 +241,13 @@ void QDeclarativeParticleMotionGravity::setAcceleration(qreal accel) void QDeclarativeParticleMotionGravity::advance(QDeclarativeParticle &p, int interval) { - qreal xdiff = p.x - _xAttr; - qreal ydiff = p.y - _yAttr; + qreal xdiff = _xAttr - p.x; + qreal ydiff = _yAttr - p.y; + qreal absXdiff = qAbs(xdiff); + qreal absYdiff = qAbs(ydiff); - qreal xcomp = xdiff / (xdiff + ydiff); - qreal ycomp = ydiff / (xdiff + ydiff); + qreal xcomp = xdiff / (absXdiff + absYdiff); + qreal ycomp = ydiff / (absXdiff + absYdiff); p.x_velocity += xcomp * _accel * interval; p.y_velocity += ycomp * _accel * interval; @@ -1284,11 +1286,7 @@ void QDeclarativeParticlesPainter::paint(QPainter *p, const QStyleOptionGraphics const int myX = x() + parentItem()->x(); const int myY = y() + parentItem()->y(); -#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0)) QVarLengthArray<QPainter::PixmapFragment, 256> pixmapData; -#else - QVarLengthArray<QDrawPixmaps::Data, 256> pixmapData; -#endif pixmapData.resize(d->particles.count()); const QRectF sourceRect = d->image.rect(); @@ -1296,32 +1294,20 @@ void QDeclarativeParticlesPainter::paint(QPainter *p, const QStyleOptionGraphics qreal halfPHeight = sourceRect.height()/2.; for (int i = 0; i < d->particles.count(); ++i) { const QDeclarativeParticle &particle = d->particles.at(i); -#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0)) pixmapData[i].x = particle.x - myX + halfPWidth; pixmapData[i].y = particle.y - myY + halfPHeight; -#else - pixmapData[i].point = QPointF(particle.x - myX + halfPWidth, particle.y - myY + halfPHeight); -#endif pixmapData[i].opacity = particle.opacity; //these never change pixmapData[i].rotation = 0; pixmapData[i].scaleX = 1; pixmapData[i].scaleY = 1; -#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0)) pixmapData[i].sourceLeft = sourceRect.left(); pixmapData[i].sourceTop = sourceRect.top(); pixmapData[i].width = sourceRect.width(); pixmapData[i].height = sourceRect.height(); -#else - pixmapData[i].source = sourceRect; -#endif } -#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0)) p->drawPixmapFragments(pixmapData.data(), d->particles.count(), d->image); -#else - qDrawPixmaps(p, pixmapData.data(), d->particles.count(), d->image); -#endif } void QDeclarativeParticles::componentComplete() diff --git a/src/imports/qimportbase.pri b/src/imports/qimportbase.pri index 612ff20..0f70030 100644 --- a/src/imports/qimportbase.pri +++ b/src/imports/qimportbase.pri @@ -18,6 +18,8 @@ copy2build.output = $$QT_BUILD_TREE/imports/$$TARGETPATH/qmldir copy2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} copy2build.name = COPY ${QMAKE_FILE_IN} copy2build.CONFIG += no_link +# `clean' should leave the build in a runnable state, which means it shouldn't delete qmldir +copy2build.CONFIG += no_clean QMAKE_EXTRA_COMPILERS += copy2build TARGET = $$qtLibraryTarget($$TARGET) diff --git a/src/imports/webkit/qdeclarativewebview.cpp b/src/imports/webkit/qdeclarativewebview.cpp index 9e5647f..383f1ce 100644 --- a/src/imports/webkit/qdeclarativewebview.cpp +++ b/src/imports/webkit/qdeclarativewebview.cpp @@ -1163,9 +1163,9 @@ QString QDeclarativeWebPage::chooseFile(QWebFrame *originatingFrame, const QStri } /*! - \qmlsignal WebView::alert(message) + \qmlsignal WebView::onAlert(message) - This signal is emitted when the web engine sends a JavaScript alert. The \a message is the text + This handler is called when the web engine sends a JavaScript alert. The \a message is the text to be displayed in the alert to the user. */ |