summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2011-09-20 07:16:23 (GMT)
committerKai Koehne <kai.koehne@nokia.com>2011-09-20 07:16:23 (GMT)
commitc0fd2594d47195d2b4c9aa49142bf44645384e9a (patch)
treeac238ab1dbee470fa8df88bc9345dbc8d9c57dc6 /src/declarative
parent83d3085841b2caadb15c2534b1a2e329949f748d (diff)
parentffd632651f0adc2198822e0364d582219fbd08c1 (diff)
downloadQt-c0fd2594d47195d2b4c9aa49142bf44645384e9a.zip
Qt-c0fd2594d47195d2b4c9aa49142bf44645384e9a.tar.gz
Qt-c0fd2594d47195d2b4c9aa49142bf44645384e9a.tar.bz2
Merge remote-tracking branch 'qt-qml-review/master' into master-qml-staging
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/debugger/debugger.pri11
-rw-r--r--src/declarative/debugger/qdeclarativedebug.h67
-rw-r--r--src/declarative/debugger/qdeclarativeenginedebug.cpp (renamed from src/declarative/debugger/qdeclarativedebug.cpp)18
-rw-r--r--src/declarative/debugger/qdeclarativeenginedebug_p.h (renamed from src/declarative/debugger/qdeclarativedebug_p.h)6
-rw-r--r--src/declarative/debugger/qdeclarativeenginedebugservice.cpp (renamed from src/declarative/qml/qdeclarativeenginedebug.cpp)60
-rw-r--r--src/declarative/debugger/qdeclarativeenginedebugservice_p.h (renamed from src/declarative/qml/qdeclarativeenginedebug_p.h)20
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage_p.h6
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp15
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit_p_p.h2
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp7
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput_p_p.h2
-rw-r--r--src/declarative/qml/qdeclarative.h11
-rw-r--r--src/declarative/qml/qdeclarativebinding.cpp2
-rw-r--r--src/declarative/qml/qdeclarativecomponent.cpp4
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp8
-rw-r--r--src/declarative/qml/qdeclarativeengine.h1
-rw-r--r--src/declarative/qml/qdeclarativetypeloader.cpp5
-rw-r--r--src/declarative/qml/qml.pri2
-rw-r--r--src/declarative/util/qdeclarativestate.cpp12
-rw-r--r--src/declarative/util/qdeclarativeview.h1
22 files changed, 183 insertions, 85 deletions
diff --git a/src/declarative/debugger/debugger.pri b/src/declarative/debugger/debugger.pri
index 3134c79..c81968e 100644
--- a/src/declarative/debugger/debugger.pri
+++ b/src/declarative/debugger/debugger.pri
@@ -5,13 +5,14 @@ SOURCES += \
$$PWD/qpacketprotocol.cpp \
$$PWD/qdeclarativedebugservice.cpp \
$$PWD/qdeclarativedebugclient.cpp \
- $$PWD/qdeclarativedebug.cpp \
+ $$PWD/qdeclarativeenginedebug.cpp \
$$PWD/qdeclarativedebugtrace.cpp \
$$PWD/qdeclarativedebughelper.cpp \
$$PWD/qdeclarativedebugserver.cpp \
$$PWD/qdeclarativeinspectorservice.cpp \
$$PWD/qjsdebuggeragent.cpp \
- $$PWD/qjsdebugservice.cpp
+ $$PWD/qjsdebugservice.cpp \
+ $$PWD/qdeclarativeenginedebugservice.cpp
HEADERS += \
$$PWD/qdeclarativedebuggerstatus_p.h \
@@ -19,7 +20,7 @@ HEADERS += \
$$PWD/qdeclarativedebugservice_p.h \
$$PWD/qdeclarativedebugservice_p_p.h \
$$PWD/qdeclarativedebugclient_p.h \
- $$PWD/qdeclarativedebug_p.h \
+ $$PWD/qdeclarativeenginedebug_p.h \
$$PWD/qdeclarativedebugtrace_p.h \
$$PWD/qdeclarativedebughelper_p.h \
$$PWD/qdeclarativedebugserver_p.h \
@@ -27,4 +28,6 @@ HEADERS += \
$$PWD/qdeclarativeinspectorservice_p.h \
$$PWD/qdeclarativeinspectorinterface_p.h \
$$PWD/qjsdebuggeragent_p.h \
- $$PWD/qjsdebugservice_p.h
+ $$PWD/qjsdebugservice_p.h \
+ $$PWD/qdeclarativedebug.h \
+ $$PWD/qdeclarativeenginedebugservice_p.h
diff --git a/src/declarative/debugger/qdeclarativedebug.h b/src/declarative/debugger/qdeclarativedebug.h
new file mode 100644
index 0000000..b7930b2
--- /dev/null
+++ b/src/declarative/debugger/qdeclarativedebug.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 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$
+** GNU Lesser General Public License Usage
+** 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.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVEDEBUG_H
+#define QDECLARATIVEDEBUG_H
+
+#include <QtCore/qglobal.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Declarative)
+
+struct Q_DECLARATIVE_EXPORT QDeclarativeDebuggingEnabler
+{
+ QDeclarativeDebuggingEnabler();
+};
+
+// Execute code in constructor before first QDeclarativeEngine is instantiated
+#if defined(QT_DECLARATIVE_DEBUG)
+static QDeclarativeDebuggingEnabler qmlEnableDebuggingHelper;
+#endif
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEDEBUG_H
diff --git a/src/declarative/debugger/qdeclarativedebug.cpp b/src/declarative/debugger/qdeclarativeenginedebug.cpp
index 620ee1d..85ce710 100644
--- a/src/declarative/debugger/qdeclarativedebug.cpp
+++ b/src/declarative/debugger/qdeclarativeenginedebug.cpp
@@ -39,11 +39,11 @@
**
****************************************************************************/
-#include "private/qdeclarativedebug_p.h"
+#include "private/qdeclarativeenginedebug_p.h"
#include "private/qdeclarativedebugclient_p.h"
-#include <qdeclarativeenginedebug_p.h>
+#include <qdeclarativeenginedebugservice_p.h>
#include <private/qobject_p.h>
@@ -207,7 +207,7 @@ void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclara
void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugObjectReference &o,
bool simple)
{
- QDeclarativeEngineDebugServer::QDeclarativeObjectData data;
+ QDeclarativeEngineDebugService::QDeclarativeObjectData data;
ds >> data;
o.m_debugId = data.objectId;
o.m_class = data.objectType;
@@ -234,7 +234,7 @@ void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugOb
ds >> propCount;
for (int ii = 0; ii < propCount; ++ii) {
- QDeclarativeEngineDebugServer::QDeclarativeObjectProperty data;
+ QDeclarativeEngineDebugService::QDeclarativeObjectProperty data;
ds >> data;
QDeclarativeDebugPropertyReference prop;
prop.m_objectDebugId = o.m_debugId;
@@ -243,21 +243,21 @@ void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugOb
prop.m_hasNotifySignal = data.hasNotifySignal;
prop.m_valueTypeName = data.valueTypeName;
switch (data.type) {
- case QDeclarativeEngineDebugServer::QDeclarativeObjectProperty::Basic:
- case QDeclarativeEngineDebugServer::QDeclarativeObjectProperty::List:
- case QDeclarativeEngineDebugServer::QDeclarativeObjectProperty::SignalProperty:
+ case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Basic:
+ case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::List:
+ case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::SignalProperty:
{
prop.m_value = data.value;
break;
}
- case QDeclarativeEngineDebugServer::QDeclarativeObjectProperty::Object:
+ case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Object:
{
QDeclarativeDebugObjectReference obj;
obj.m_debugId = prop.m_value.toInt();
prop.m_value = QVariant::fromValue(obj);
break;
}
- case QDeclarativeEngineDebugServer::QDeclarativeObjectProperty::Unknown:
+ case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Unknown:
break;
}
o.m_properties << prop;
diff --git a/src/declarative/debugger/qdeclarativedebug_p.h b/src/declarative/debugger/qdeclarativeenginedebug_p.h
index f822637..9b70e1c 100644
--- a/src/declarative/debugger/qdeclarativedebug_p.h
+++ b/src/declarative/debugger/qdeclarativeenginedebug_p.h
@@ -38,8 +38,8 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#ifndef QDECLARATIVEDEBUG_H
-#define QDECLARATIVEDEBUG_H
+#ifndef QDECLARATIVEENGINEDEBUG_H
+#define QDECLARATIVEENGINEDEBUG_H
#include <QtCore/qobject.h>
#include <QtCore/qurl.h>
@@ -384,4 +384,4 @@ Q_DECLARE_METATYPE(QDeclarativeDebugPropertyReference)
QT_END_HEADER
-#endif // QDECLARATIVEDEBUG_H
+#endif // QDECLARATIVEENGINEDEBUG_H
diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/debugger/qdeclarativeenginedebugservice.cpp
index 8707a7f..7683733 100644
--- a/src/declarative/qml/qdeclarativeenginedebug.cpp
+++ b/src/declarative/debugger/qdeclarativeenginedebugservice.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include "private/qdeclarativeenginedebug_p.h"
+#include "private/qdeclarativeenginedebugservice_p.h"
#include "private/qdeclarativeboundsignal_p.h"
#include "qdeclarativeengine.h"
@@ -59,14 +59,14 @@
QT_BEGIN_NAMESPACE
-Q_GLOBAL_STATIC(QDeclarativeEngineDebugServer, qmlEngineDebugServer);
+Q_GLOBAL_STATIC(QDeclarativeEngineDebugService, qmlEngineDebugService);
-QDeclarativeEngineDebugServer *QDeclarativeEngineDebugServer::instance()
+QDeclarativeEngineDebugService *QDeclarativeEngineDebugService::instance()
{
- return qmlEngineDebugServer();
+ return qmlEngineDebugService();
}
-QDeclarativeEngineDebugServer::QDeclarativeEngineDebugServer(QObject *parent)
+QDeclarativeEngineDebugService::QDeclarativeEngineDebugService(QObject *parent)
: QDeclarativeDebugService(QLatin1String("QDeclarativeEngine"), parent),
m_watch(new QDeclarativeWatcher(this))
{
@@ -75,7 +75,7 @@ QDeclarativeEngineDebugServer::QDeclarativeEngineDebugServer(QObject *parent)
}
QDataStream &operator<<(QDataStream &ds,
- const QDeclarativeEngineDebugServer::QDeclarativeObjectData &data)
+ const QDeclarativeEngineDebugService::QDeclarativeObjectData &data)
{
ds << data.url << data.lineNumber << data.columnNumber << data.idString
<< data.objectName << data.objectType << data.objectId << data.contextId;
@@ -83,7 +83,7 @@ QDataStream &operator<<(QDataStream &ds,
}
QDataStream &operator>>(QDataStream &ds,
- QDeclarativeEngineDebugServer::QDeclarativeObjectData &data)
+ QDeclarativeEngineDebugService::QDeclarativeObjectData &data)
{
ds >> data.url >> data.lineNumber >> data.columnNumber >> data.idString
>> data.objectName >> data.objectType >> data.objectId >> data.contextId;
@@ -91,7 +91,7 @@ QDataStream &operator>>(QDataStream &ds,
}
QDataStream &operator<<(QDataStream &ds,
- const QDeclarativeEngineDebugServer::QDeclarativeObjectProperty &data)
+ const QDeclarativeEngineDebugService::QDeclarativeObjectProperty &data)
{
ds << (int)data.type << data.name << data.value << data.valueTypeName
<< data.binding << data.hasNotifySignal;
@@ -99,12 +99,12 @@ QDataStream &operator<<(QDataStream &ds,
}
QDataStream &operator>>(QDataStream &ds,
- QDeclarativeEngineDebugServer::QDeclarativeObjectProperty &data)
+ QDeclarativeEngineDebugService::QDeclarativeObjectProperty &data)
{
int type;
ds >> type >> data.name >> data.value >> data.valueTypeName
>> data.binding >> data.hasNotifySignal;
- data.type = (QDeclarativeEngineDebugServer::QDeclarativeObjectProperty::Type)type;
+ data.type = (QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Type)type;
return ds;
}
@@ -131,8 +131,8 @@ static bool hasValidSignal(QObject *object, const QString &propertyName)
return true;
}
-QDeclarativeEngineDebugServer::QDeclarativeObjectProperty
-QDeclarativeEngineDebugServer::propertyData(QObject *obj, int propIdx)
+QDeclarativeEngineDebugService::QDeclarativeObjectProperty
+QDeclarativeEngineDebugService::propertyData(QObject *obj, int propIdx)
{
QDeclarativeObjectProperty rv;
@@ -164,7 +164,7 @@ QDeclarativeEngineDebugServer::propertyData(QObject *obj, int propIdx)
return rv;
}
-QVariant QDeclarativeEngineDebugServer::valueContents(const QVariant &value) const
+QVariant QDeclarativeEngineDebugService::valueContents(const QVariant &value) const
{
int userType = value.userType();
@@ -193,7 +193,7 @@ QVariant QDeclarativeEngineDebugServer::valueContents(const QVariant &value) con
return QLatin1String("<unknown value>");
}
-void QDeclarativeEngineDebugServer::buildObjectDump(QDataStream &message,
+void QDeclarativeEngineDebugService::buildObjectDump(QDataStream &message,
QObject *object, bool recur, bool dumpProperties)
{
message << objectData(object);
@@ -264,7 +264,7 @@ void QDeclarativeEngineDebugServer::buildObjectDump(QDataStream &message,
message << fakeProperties[ii];
}
-void QDeclarativeEngineDebugServer::prepareDeferredObjects(QObject *obj)
+void QDeclarativeEngineDebugService::prepareDeferredObjects(QObject *obj)
{
qmlExecuteDeferred(obj);
@@ -276,7 +276,7 @@ void QDeclarativeEngineDebugServer::prepareDeferredObjects(QObject *obj)
}
-void QDeclarativeEngineDebugServer::buildObjectList(QDataStream &message, QDeclarativeContext *ctxt)
+void QDeclarativeEngineDebugService::buildObjectList(QDataStream &message, QDeclarativeContext *ctxt)
{
QDeclarativeContextData *p = QDeclarativeContextData::get(ctxt);
@@ -316,7 +316,7 @@ void QDeclarativeEngineDebugServer::buildObjectList(QDataStream &message, QDecla
}
}
-void QDeclarativeEngineDebugServer::buildStatesList(QDeclarativeContext *ctxt, bool cleanList=false)
+void QDeclarativeEngineDebugService::buildStatesList(QDeclarativeContext *ctxt, bool cleanList=false)
{
if (cleanList)
m_allStates.clear();
@@ -333,7 +333,7 @@ void QDeclarativeEngineDebugServer::buildStatesList(QDeclarativeContext *ctxt, b
}
}
-void QDeclarativeEngineDebugServer::buildStatesList(QObject *obj)
+void QDeclarativeEngineDebugService::buildStatesList(QObject *obj)
{
if (QDeclarativeState *state = qobject_cast<QDeclarativeState *>(obj)) {
m_allStates.append(state);
@@ -345,8 +345,8 @@ void QDeclarativeEngineDebugServer::buildStatesList(QObject *obj)
}
}
-QDeclarativeEngineDebugServer::QDeclarativeObjectData
-QDeclarativeEngineDebugServer::objectData(QObject *object)
+QDeclarativeEngineDebugService::QDeclarativeObjectData
+QDeclarativeEngineDebugService::objectData(QObject *object)
{
QDeclarativeData *ddata = QDeclarativeData::get(object);
QDeclarativeObjectData rv;
@@ -385,7 +385,7 @@ QDeclarativeEngineDebugServer::objectData(QObject *object)
return rv;
}
-void QDeclarativeEngineDebugServer::messageReceived(const QByteArray &message)
+void QDeclarativeEngineDebugService::messageReceived(const QByteArray &message)
{
QDataStream ds(message);
@@ -545,7 +545,7 @@ void QDeclarativeEngineDebugServer::messageReceived(const QByteArray &message)
}
}
-void QDeclarativeEngineDebugServer::setBinding(int objectId,
+void QDeclarativeEngineDebugService::setBinding(int objectId,
const QString &propertyName,
const QVariant &expression,
bool isLiteralValue,
@@ -600,7 +600,7 @@ void QDeclarativeEngineDebugServer::setBinding(int objectId,
oldBinding->destroy();
binding->update();
} else {
- qWarning() << "QDeclarativeEngineDebugServer::setBinding: unable to set property" << propertyName << "on object" << object;
+ qWarning() << "QDeclarativeEngineDebugService::setBinding: unable to set property" << propertyName << "on object" << object;
}
}
@@ -613,13 +613,13 @@ void QDeclarativeEngineDebugServer::setBinding(int objectId,
propertyChanges->changeExpression(propertyName, expression.toString());
}
} else {
- qWarning() << "QDeclarativeEngineDebugServer::setBinding: unable to set property" << propertyName << "on object" << object;
+ qWarning() << "QDeclarativeEngineDebugService::setBinding: unable to set property" << propertyName << "on object" << object;
}
}
}
}
-void QDeclarativeEngineDebugServer::resetBinding(int objectId, const QString &propertyName)
+void QDeclarativeEngineDebugService::resetBinding(int objectId, const QString &propertyName)
{
QObject *object = objectForId(objectId);
QDeclarativeContext *context = qmlContext(object);
@@ -664,7 +664,7 @@ void QDeclarativeEngineDebugServer::resetBinding(int objectId, const QString &pr
}
}
-void QDeclarativeEngineDebugServer::setMethodBody(int objectId, const QString &method, const QString &body)
+void QDeclarativeEngineDebugService::setMethodBody(int objectId, const QString &method, const QString &body)
{
QObject *object = objectForId(objectId);
QDeclarativeContext *context = qmlContext(object);
@@ -703,7 +703,7 @@ void QDeclarativeEngineDebugServer::setMethodBody(int objectId, const QString &m
vmeMetaObject->setVmeMethod(prop->coreIndex, QDeclarativeExpressionPrivate::evalInObjectScope(contextData, object, jsfunction, contextData->url.toString(), lineNumber, 0));
}
-void QDeclarativeEngineDebugServer::propertyChanged(int id, int objectId, const QMetaProperty &property, const QVariant &value)
+void QDeclarativeEngineDebugService::propertyChanged(int id, int objectId, const QMetaProperty &property, const QVariant &value)
{
QByteArray reply;
QDataStream rs(&reply, QIODevice::WriteOnly);
@@ -713,7 +713,7 @@ void QDeclarativeEngineDebugServer::propertyChanged(int id, int objectId, const
sendMessage(reply);
}
-void QDeclarativeEngineDebugServer::addEngine(QDeclarativeEngine *engine)
+void QDeclarativeEngineDebugService::addEngine(QDeclarativeEngine *engine)
{
Q_ASSERT(engine);
Q_ASSERT(!m_engines.contains(engine));
@@ -721,7 +721,7 @@ void QDeclarativeEngineDebugServer::addEngine(QDeclarativeEngine *engine)
m_engines.append(engine);
}
-void QDeclarativeEngineDebugServer::remEngine(QDeclarativeEngine *engine)
+void QDeclarativeEngineDebugService::remEngine(QDeclarativeEngine *engine)
{
Q_ASSERT(engine);
Q_ASSERT(m_engines.contains(engine));
@@ -729,7 +729,7 @@ void QDeclarativeEngineDebugServer::remEngine(QDeclarativeEngine *engine)
m_engines.removeAll(engine);
}
-void QDeclarativeEngineDebugServer::objectCreated(QDeclarativeEngine *engine, QObject *object)
+void QDeclarativeEngineDebugService::objectCreated(QDeclarativeEngine *engine, QObject *object)
{
Q_ASSERT(engine);
Q_ASSERT(m_engines.contains(engine));
diff --git a/src/declarative/qml/qdeclarativeenginedebug_p.h b/src/declarative/debugger/qdeclarativeenginedebugservice_p.h
index 804a043..3674b83 100644
--- a/src/declarative/qml/qdeclarativeenginedebug_p.h
+++ b/src/declarative/debugger/qdeclarativeenginedebugservice_p.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QDECLARATIVEENGINEDEBUG_P_H
-#define QDECLARATIVEENGINEDEBUG_P_H
+#ifndef QDECLARATIVEENGINEDEBUGSERVICE_P_H
+#define QDECLARATIVEENGINEDEBUGSERVICE_P_H
//
// W A R N I N G
@@ -67,11 +67,11 @@ class QDeclarativeWatcher;
class QDataStream;
class QDeclarativeState;
-class QDeclarativeEngineDebugServer : public QDeclarativeDebugService
+class QDeclarativeEngineDebugService : public QDeclarativeDebugService
{
Q_OBJECT
public:
- QDeclarativeEngineDebugServer(QObject * = 0);
+ QDeclarativeEngineDebugService(QObject * = 0);
struct QDeclarativeObjectData {
QUrl url;
@@ -98,7 +98,7 @@ public:
void remEngine(QDeclarativeEngine *);
void objectCreated(QDeclarativeEngine *, QObject *);
- static QDeclarativeEngineDebugServer *instance();
+ static QDeclarativeEngineDebugService *instance();
protected:
virtual void messageReceived(const QByteArray &);
@@ -123,12 +123,12 @@ private:
QDeclarativeWatcher *m_watch;
QList<QWeakPointer<QDeclarativeState> > m_allStates;
};
-Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugServer::QDeclarativeObjectData &);
-Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugServer::QDeclarativeObjectData &);
-Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugServer::QDeclarativeObjectProperty &);
-Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugServer::QDeclarativeObjectProperty &);
+Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugService::QDeclarativeObjectData &);
+Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugService::QDeclarativeObjectData &);
+Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugService::QDeclarativeObjectProperty &);
+Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugService::QDeclarativeObjectProperty &);
QT_END_NAMESPACE
-#endif // QDECLARATIVEENGINEDEBUG_P_H
+#endif // QDECLARATIVEENGINEDEBUGSERVICE_P_H
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
index 4b4efb6..d3bab7a 100644
--- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
@@ -289,6 +289,12 @@ void QDeclarativeBorderImage::setSource(const QUrl &url)
load();
}
+void QDeclarativeBorderImage::setSourceSize(const QSize& size)
+{
+ Q_UNUSED(size);
+ qmlInfo(this) << "Setting sourceSize for borderImage not supported";
+}
+
void QDeclarativeBorderImage::load()
{
Q_D(QDeclarativeBorderImage);
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage_p.h b/src/declarative/graphicsitems/qdeclarativeborderimage_p.h
index 6a50c3c..6b05608 100644
--- a/src/declarative/graphicsitems/qdeclarativeborderimage_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage_p.h
@@ -63,9 +63,6 @@ class Q_AUTOTEST_EXPORT QDeclarativeBorderImage : public QDeclarativeImageBase
Q_PROPERTY(TileMode horizontalTileMode READ horizontalTileMode WRITE setHorizontalTileMode NOTIFY horizontalTileModeChanged)
Q_PROPERTY(TileMode verticalTileMode READ verticalTileMode WRITE setVerticalTileMode NOTIFY verticalTileModeChanged)
- // read-only for BorderImage
- Q_PROPERTY(QSize sourceSize READ sourceSize NOTIFY sourceSizeChanged)
-
public:
QDeclarativeBorderImage(QDeclarativeItem *parent=0);
~QDeclarativeBorderImage();
@@ -83,10 +80,11 @@ public:
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
void setSource(const QUrl &url);
+ void setSourceSize(const QSize&);
+
Q_SIGNALS:
void horizontalTileModeChanged();
void verticalTileModeChanged();
- void sourceSizeChanged();
protected:
virtual void load();
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index fd2dc45..ca6c496 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -1532,7 +1532,7 @@ bool QDeclarativeFlickable::sendMouseEvent(QGraphicsSceneMouseEvent *event)
d->handleMouseMoveEvent(&mouseEvent);
break;
case QEvent::GraphicsSceneMousePress:
- if (d->pressed) // we are already pressed - this is a delayed replay
+ if (d->pressed && !event->spontaneous()) // we are already pressed - this is a delayed replay
return false;
d->handleMousePressEvent(&mouseEvent);
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
index ca7e948..1e30e78 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -546,7 +546,15 @@ bool QDeclarativeTextEditPrivate::determineHorizontalAlignment()
{
Q_Q(QDeclarativeTextEdit);
if (hAlignImplicit && q->isComponentComplete()) {
- bool alignToRight = text.isEmpty() ? QApplication::keyboardInputDirection() == Qt::RightToLeft : rightToLeftText;
+ bool alignToRight;
+ if (text.isEmpty()) {
+ const QString preeditText = control->textCursor().block().layout()->preeditAreaText();
+ alignToRight = preeditText.isEmpty()
+ ? QApplication::keyboardInputDirection() == Qt::RightToLeft
+ : preeditText.isRightToLeft();
+ } else {
+ alignToRight = rightToLeftText;
+ }
return setHAlign(alignToRight ? QDeclarativeTextEdit::AlignRight : QDeclarativeTextEdit::AlignLeft);
}
return false;
@@ -1581,6 +1589,7 @@ void QDeclarativeTextEdit::q_textChanged()
void QDeclarativeTextEdit::moveCursorDelegate()
{
Q_D(QDeclarativeTextEdit);
+ d->determineHorizontalAlignment();
updateMicroFocus();
emit cursorRectangleChanged();
if(!d->cursor)
@@ -1703,7 +1712,9 @@ void QDeclarativeTextEdit::updateSize()
setImplicitWidth(newWidth);
else if (d->requireImplicitWidth)
setImplicitWidth(naturalWidth);
- qreal newHeight = d->document->isEmpty() ? fm.height() : (int)d->document->size().height();
+ qreal newHeight = d->document->size().height();
+ if (newHeight == 0)
+ newHeight = fm.height();
setImplicitHeight(newHeight);
d->paintedSize = QSize(newWidth, newHeight);
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h
index 731d956..412d33c 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h
@@ -77,7 +77,7 @@ public:
yoff(0)
{
#ifdef Q_OS_SYMBIAN
- if (QSysInfo::symbianVersion() == QSysInfo::SV_SF_1 || QSysInfo::symbianVersion() == QSysInfo::SV_SF_3) {
+ if (QSysInfo::symbianVersion() >= QSysInfo::SV_SF_1) {
showInputPanelOnFocus = false;
}
#endif
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index 9bc7fb9..5928d31 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -407,7 +407,11 @@ bool QDeclarativeTextInputPrivate::determineHorizontalAlignment()
if (hAlignImplicit) {
// if no explicit alignment has been set, follow the natural layout direction of the text
QString text = control->text();
- bool isRightToLeft = text.isEmpty() ? QApplication::keyboardInputDirection() == Qt::RightToLeft : text.isRightToLeft();
+ if (text.isEmpty())
+ text = control->preeditAreaText();
+ bool isRightToLeft = text.isEmpty()
+ ? QApplication::keyboardInputDirection() == Qt::RightToLeft
+ : text.isRightToLeft();
return setHAlign(isRightToLeft ? QDeclarativeTextInput::AlignRight : QDeclarativeTextInput::AlignLeft);
}
return false;
@@ -1907,6 +1911,7 @@ void QDeclarativeTextInput::cursorPosChanged()
void QDeclarativeTextInput::updateCursorRectangle()
{
Q_D(QDeclarativeTextInput);
+ d->determineHorizontalAlignment();
d->updateHorizontalScroll();
updateRect();//TODO: Only update rect between pos's
updateMicroFocus();
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
index 4712c65..0325016 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
@@ -80,7 +80,7 @@ public:
selectPressed(false)
{
#ifdef Q_OS_SYMBIAN
- if (QSysInfo::symbianVersion() == QSysInfo::SV_SF_1 || QSysInfo::symbianVersion() == QSysInfo::SV_SF_3) {
+ if (QSysInfo::symbianVersion() >= QSysInfo::SV_SF_1) {
showInputPanelOnFocus = false;
}
#endif
diff --git a/src/declarative/qml/qdeclarative.h b/src/declarative/qml/qdeclarative.h
index 5e8d0f4..399c207 100644
--- a/src/declarative/qml/qdeclarative.h
+++ b/src/declarative/qml/qdeclarative.h
@@ -405,17 +405,6 @@ QObject *qmlAttachedPropertiesObject(const QObject *obj, bool create = true)
return qmlAttachedPropertiesObject(&idx, obj, &T::staticMetaObject, create);
}
-// Enable debugging before any QDeclarativeEngine is created
-struct Q_DECLARATIVE_EXPORT QDeclarativeDebuggingEnabler
-{
- QDeclarativeDebuggingEnabler();
-};
-
-// Execute code in constructor before first QDeclarativeEngine is instantiated
-#if defined(QT_DECLARATIVE_DEBUG)
-static QDeclarativeDebuggingEnabler qmlEnableDebuggingHelper;
-#endif
-
QT_END_NAMESPACE
QML_DECLARE_TYPE(QObject)
diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp
index 689cd00..9359196 100644
--- a/src/declarative/qml/qdeclarativebinding.cpp
+++ b/src/declarative/qml/qdeclarativebinding.cpp
@@ -254,6 +254,8 @@ QDeclarativeBinding::createBinding(Identifier id, QObject *obj, QDeclarativeCont
cdata = typeData->compiledData();
}
QDeclarativeBinding *rv = cdata ? new QDeclarativeBinding((void*)cdata->datas.at(id).constData(), cdata, obj, ctxtdata, url, lineNumber, parent) : 0;
+ if (cdata)
+ cdata->release();
if (typeData)
typeData->release();
return rv;
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
index d9f291b..f423f50 100644
--- a/src/declarative/qml/qdeclarativecomponent.cpp
+++ b/src/declarative/qml/qdeclarativecomponent.cpp
@@ -53,7 +53,7 @@
#include "private/qdeclarativeglobal_p.h"
#include "private/qdeclarativescriptparser_p.h"
#include "private/qdeclarativedebugtrace_p.h"
-#include "private/qdeclarativeenginedebug_p.h"
+#include "private/qdeclarativeenginedebugservice_p.h"
#include <QtScript/qscriptvalueiterator.h>
#include <QStack>
@@ -896,7 +896,7 @@ QObject * QDeclarativeComponentPrivate::begin(QDeclarativeContextData *parentCon
if (enginePriv->isDebugging && rv) {
if (!parentContext->isInternal)
parentContext->asQDeclarativeContextPrivate()->instances.append(rv);
- QDeclarativeEngineDebugServer::instance()->objectCreated(parentContext->engine, rv);
+ QDeclarativeEngineDebugService::instance()->objectCreated(parentContext->engine, rv);
}
return rv;
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index 34014f7..1417b78 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -51,7 +51,7 @@
#include "qdeclarativecomponent.h"
#include "private/qdeclarativebinding_p_p.h"
#include "private/qdeclarativevme_p.h"
-#include "private/qdeclarativeenginedebug_p.h"
+#include "private/qdeclarativeenginedebugservice_p.h"
#include "private/qdeclarativestringconverters_p.h"
#include "private/qdeclarativexmlhttprequest_p.h"
#include "private/qdeclarativesqldatabase_p.h"
@@ -581,9 +581,9 @@ void QDeclarativeEnginePrivate::init()
scriptEngine.globalObject().property(QLatin1String("Qt")).setProperty(QLatin1String("application"), applicationObject);
if (QCoreApplication::instance()->thread() == q->thread() &&
- QDeclarativeEngineDebugServer::isDebuggingEnabled()) {
+ QDeclarativeEngineDebugService::isDebuggingEnabled()) {
isDebugging = true;
- QDeclarativeEngineDebugServer::instance()->addEngine(q);
+ QDeclarativeEngineDebugService::instance()->addEngine(q);
QJSDebugService::instance()->addEngine(q);
}
}
@@ -648,7 +648,7 @@ QDeclarativeEngine::~QDeclarativeEngine()
{
Q_D(QDeclarativeEngine);
if (d->isDebugging) {
- QDeclarativeEngineDebugServer::instance()->remEngine(this);
+ QDeclarativeEngineDebugService::instance()->remEngine(this);
QJSDebugService::instance()->removeEngine(this);
}
}
diff --git a/src/declarative/qml/qdeclarativeengine.h b/src/declarative/qml/qdeclarativeengine.h
index 61ab2b2..4d6887f 100644
--- a/src/declarative/qml/qdeclarativeengine.h
+++ b/src/declarative/qml/qdeclarativeengine.h
@@ -47,6 +47,7 @@
#include <QtCore/qmap.h>
#include <QtScript/qscriptvalue.h>
#include <QtDeclarative/qdeclarativeerror.h>
+#include <QtDeclarative/qdeclarativedebug.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/qml/qdeclarativetypeloader.cpp b/src/declarative/qml/qdeclarativetypeloader.cpp
index 168c151..82197dc 100644
--- a/src/declarative/qml/qdeclarativetypeloader.cpp
+++ b/src/declarative/qml/qdeclarativetypeloader.cpp
@@ -65,6 +65,11 @@ The QDeclarativeDataLoader invokes callbacks on the QDeclarativeDataBlob as data
*/
/*!
+ \class QDeclarativeTypeLoader
+ \internal
+*/
+
+/*!
\enum QDeclarativeDataBlob::Status
This enum describes the status of the data blob.
diff --git a/src/declarative/qml/qml.pri b/src/declarative/qml/qml.pri
index bf9e54a..5d171bf 100644
--- a/src/declarative/qml/qml.pri
+++ b/src/declarative/qml/qml.pri
@@ -27,7 +27,6 @@ SOURCES += \
$$PWD/qdeclarativeinfo.cpp \
$$PWD/qdeclarativeerror.cpp \
$$PWD/qdeclarativescriptparser.cpp \
- $$PWD/qdeclarativeenginedebug.cpp \
$$PWD/qdeclarativerewrite.cpp \
$$PWD/qdeclarativevaluetype.cpp \
$$PWD/qdeclarativecompiledbindings.cpp \
@@ -99,7 +98,6 @@ HEADERS += \
$$PWD/qdeclarativedata_p.h \
$$PWD/qdeclarativeerror.h \
$$PWD/qdeclarativescriptparser_p.h \
- $$PWD/qdeclarativeenginedebug_p.h \
$$PWD/qdeclarativerewrite_p.h \
$$PWD/qpodvector_p.h \
$$PWD/qbitfield_p.h \
diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp
index 9f56ccb..ee3d06b 100644
--- a/src/declarative/util/qdeclarativestate.cpp
+++ b/src/declarative/util/qdeclarativestate.cpp
@@ -173,6 +173,18 @@ QDeclarativeState::~QDeclarativeState()
Q_D(QDeclarativeState);
if (d->group)
d->group->removeState(this);
+
+ /*
+ destroying an active state does not return us to the
+ base state, so we need to clean up our revert list to
+ prevent leaks. In the future we may want to redconsider
+ this overall architecture.
+ */
+ for (int i = 0; i < d->revertList.count(); ++i) {
+ if (d->revertList.at(i).binding()) {
+ d->revertList.at(i).binding()->destroy();
+ }
+ }
}
/*!
diff --git a/src/declarative/util/qdeclarativeview.h b/src/declarative/util/qdeclarativeview.h
index b3854fc..ef51934 100644
--- a/src/declarative/util/qdeclarativeview.h
+++ b/src/declarative/util/qdeclarativeview.h
@@ -47,6 +47,7 @@
#include <QtGui/qgraphicssceneevent.h>
#include <QtGui/qgraphicsview.h>
#include <QtGui/qwidget.h>
+#include <QtDeclarative/qdeclarativedebug.h>
QT_BEGIN_HEADER