summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-08-30 22:23:12 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-08-30 22:23:12 (GMT)
commit8dc61ad98f4904ccab0ffc2a2b0e0e8f71053156 (patch)
treecaf9f845d3ff0f67960e50c56ca419bd233e86a7 /src
parent998569ea293741f16e0a7fb4a7a249e902966bf7 (diff)
parentff00f606eb76772c1197787713d400cce56bd6c9 (diff)
downloadQt-8dc61ad98f4904ccab0ffc2a2b0e0e8f71053156.zip
Qt-8dc61ad98f4904ccab0ffc2a2b0e0e8f71053156.tar.gz
Qt-8dc61ad98f4904ccab0ffc2a2b0e0e8f71053156.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: Remove debug. Snake: Don't use Behavior with states. QML Viewer should be put under QtDemos instead of QtExamples folder in Symbian app menu Fix application exiting in embedded qml examples QDeclarativeDebug: Destroy incoming connections if already connected Fix VisualDataModel model update handling when rootIndex is specified. Improve test reliability when running in parallel with other tests. Improve stability of test on loaded hw. Improve stability of test on loaded hw.
Diffstat (limited to 'src')
-rw-r--r--src/declarative/debugger/qdeclarativedebugservice.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp15
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp3
3 files changed, 14 insertions, 6 deletions
diff --git a/src/declarative/debugger/qdeclarativedebugservice.cpp b/src/declarative/debugger/qdeclarativedebugservice.cpp
index dca2695..1bbfcf4 100644
--- a/src/declarative/debugger/qdeclarativedebugservice.cpp
+++ b/src/declarative/debugger/qdeclarativedebugservice.cpp
@@ -128,6 +128,8 @@ void QDeclarativeDebugServer::newConnection()
if (d->connection) {
qWarning("QDeclarativeDebugServer error: another client is already connected");
+ QTcpSocket *faultyConnection = d->tcpServer->nextPendingConnection();
+ delete faultyConnection;
return;
}
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
index b4e8bda..a46ee73 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -1305,24 +1305,27 @@ void QDeclarativeVisualDataModel::_q_itemsMoved(int from, int to, int count)
void QDeclarativeVisualDataModel::_q_rowsInserted(const QModelIndex &parent, int begin, int end)
{
- if (!parent.isValid())
+ Q_D(QDeclarativeVisualDataModel);
+ if (parent == d->m_root)
_q_itemsInserted(begin, end - begin + 1);
}
void QDeclarativeVisualDataModel::_q_rowsRemoved(const QModelIndex &parent, int begin, int end)
{
- if (!parent.isValid())
+ Q_D(QDeclarativeVisualDataModel);
+ if (parent == d->m_root)
_q_itemsRemoved(begin, end - begin + 1);
}
void QDeclarativeVisualDataModel::_q_rowsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow)
{
+ Q_D(QDeclarativeVisualDataModel);
const int count = sourceEnd - sourceStart + 1;
- if (!destinationParent.isValid() && !sourceParent.isValid()) {
+ if (destinationParent == d->m_root && sourceParent == d->m_root) {
_q_itemsMoved(sourceStart, destinationRow, count);
- } else if (!sourceParent.isValid()) {
+ } else if (sourceParent == d->m_root) {
_q_itemsRemoved(sourceStart, count);
- } else if (!destinationParent.isValid()) {
+ } else if (destinationParent == d->m_root) {
_q_itemsInserted(destinationRow, count);
}
}
@@ -1330,7 +1333,7 @@ void QDeclarativeVisualDataModel::_q_rowsMoved(const QModelIndex &sourceParent,
void QDeclarativeVisualDataModel::_q_dataChanged(const QModelIndex &begin, const QModelIndex &end)
{
Q_D(QDeclarativeVisualDataModel);
- if (!begin.parent().isValid())
+ if (begin.parent() == d->m_root)
_q_itemsChanged(begin.row(), end.row() - begin.row() + 1, d->m_roles);
}
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index c5a5c18..0fe1ea3 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -1716,6 +1716,9 @@ void QDeclarativeEnginePrivate::sendQuit()
{
Q_Q(QDeclarativeEngine);
emit q->quit();
+ if (q->receivers(SIGNAL(quit())) == 0) {
+ qWarning("Signal QDeclarativeEngine::quit() emitted, but no receivers connected to handle it.");
+ }
}
static void dumpwarning(const QDeclarativeError &error)