summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-05 20:20:35 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-05 20:20:35 (GMT)
commit89e22c539702fbac311b3626e9407e2693579e72 (patch)
tree00a8ccd6b7fecfbee400f76995f009b501677580 /src/gui
parentb20ef0ade0aec89b969bd0ae7f754c680e390c67 (diff)
parentd801a997abbea01eade4155f5e7a0d51437ba1d9 (diff)
downloadQt-89e22c539702fbac311b3626e9407e2693579e72.zip
Qt-89e22c539702fbac311b3626e9407e2693579e72.tar.gz
Qt-89e22c539702fbac311b3626e9407e2693579e72.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: (25 commits) optimize dynamic call-by-name away Add support for QtScript connect/disconnect syntax in QML Minor perf improvement when running QML script blocks Fix qdeclarative{audio,video} tests. Don't assume documents are in UTF-8. Add basic support for explicit newParent in ParentAnimation. Delete uninspiring example. Fix compiler warning on RVCT Use new enum syntax for value types. Expect fail in currentIndex test for now. Allow unquoted enum syntax for value types More declarative examples cleanup. Improve declarative tabs example. Fix test leaks Use _data() for some tests Add missing NOTIFYs to timer, xmllistmodel, xmlrole Document new ParentChange properties. declarative examples cleanup Fix test Update QmlChanges.txt ...
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp20
-rw-r--r--src/gui/graphicsview/qgraphicsscene_p.h4
2 files changed, 15 insertions, 9 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 6bc02cc..f3de71e 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -228,6 +228,7 @@
#include <QtCore/qstack.h>
#include <QtCore/qtimer.h>
#include <QtCore/qvarlengtharray.h>
+#include <QtCore/QMetaMethod>
#include <QtGui/qapplication.h>
#include <QtGui/qdesktopwidget.h>
#include <QtGui/qevent.h>
@@ -277,8 +278,6 @@ static void _q_hoverFromMouseEvent(QGraphicsSceneHoverEvent *hover, const QGraph
hover->setAccepted(mouseEvent->isAccepted());
}
-int QGraphicsScenePrivate::changedSignalIndex;
-
/*!
\internal
*/
@@ -329,9 +328,10 @@ void QGraphicsScenePrivate::init()
index = new QGraphicsSceneBspTreeIndex(q);
// Keep this index so we can check for connected slots later on.
- if (!changedSignalIndex) {
- changedSignalIndex = signalIndex("changed(QList<QRectF>)");
- }
+ changedSignalIndex = signalIndex("changed(QList<QRectF>)");
+ processDirtyItemsIndex = q->metaObject()->indexOfSlot("_q_processDirtyItems()");
+ polishItemsIndex = q->metaObject()->indexOfSlot("_q_polishItems()");
+
qApp->d_func()->scene_list.append(q);
q->update();
}
@@ -2537,8 +2537,10 @@ void QGraphicsScene::addItem(QGraphicsItem *item)
return;
}
- if (d->unpolishedItems.isEmpty())
- QMetaObject::invokeMethod(this, "_q_polishItems", Qt::QueuedConnection);
+ if (d->unpolishedItems.isEmpty()) {
+ QMetaMethod method = metaObject()->method(d->polishItemsIndex);
+ method.invoke(this, Qt::QueuedConnection);
+ }
d->unpolishedItems.append(item);
item->d_ptr->pendingPolish = true;
@@ -4892,7 +4894,9 @@ void QGraphicsScenePrivate::markDirty(QGraphicsItem *item, const QRectF &rect, b
return;
if (!processDirtyItemsEmitted) {
- QMetaObject::invokeMethod(q_ptr, "_q_processDirtyItems", Qt::QueuedConnection);
+ QMetaMethod method = q_ptr->metaObject()->method(processDirtyItemsIndex);
+ method.invoke(q_ptr, Qt::QueuedConnection);
+// QMetaObject::invokeMethod(q_ptr, "_q_processDirtyItems", Qt::QueuedConnection);
processDirtyItemsEmitted = true;
}
diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h
index ca8b829..11e250e 100644
--- a/src/gui/graphicsview/qgraphicsscene_p.h
+++ b/src/gui/graphicsview/qgraphicsscene_p.h
@@ -87,7 +87,9 @@ public:
static QGraphicsScenePrivate *get(QGraphicsScene *q);
- static int changedSignalIndex;
+ int changedSignalIndex;
+ int processDirtyItemsIndex;
+ int polishItemsIndex;
QGraphicsScene::ItemIndexMethod indexMethod;
QGraphicsSceneIndex *index;