summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
authorA-Team <ateam@pad.test.qt.nokia.com>2010-10-20 22:00:14 (GMT)
committerA-Team <ateam@pad.test.qt.nokia.com>2010-10-20 22:00:14 (GMT)
commitdd97db856bc19d648d7faa3aac4e27576dcb2512 (patch)
tree0bb9fde945a0d3883e6fa3291f807c8827bbb48c /src/declarative/qml
parente4b0fe70c6435bb860df526d615dfdf53dfb5abd (diff)
parent80f031dfca7c161de4461514dfd8d9d664ea2f03 (diff)
downloadQt-dd97db856bc19d648d7faa3aac4e27576dcb2512.zip
Qt-dd97db856bc19d648d7faa3aac4e27576dcb2512.tar.gz
Qt-dd97db856bc19d648d7faa3aac4e27576dcb2512.tar.bz2
Merge branch '4.7-upstream' into 4.7-doc
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/parser/qdeclarativejslexer.cpp15
-rw-r--r--src/declarative/qml/qdeclarativebinding_p.h4
-rw-r--r--src/declarative/qml/qdeclarativedom_p.h26
-rw-r--r--src/declarative/qml/qdeclarativeenginedebug_p.h8
-rw-r--r--src/declarative/qml/qdeclarativeglobal_p.h6
-rw-r--r--src/declarative/qml/qdeclarativemetatype_p.h5
-rw-r--r--src/declarative/qml/qdeclarativeparser_p.h3
-rw-r--r--src/declarative/qml/qdeclarativeproperty.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeproperty_p.h8
-rw-r--r--src/declarative/qml/qdeclarativepropertycache.cpp58
-rw-r--r--src/declarative/qml/qdeclarativestringconverters_p.h22
-rw-r--r--src/declarative/qml/qdeclarativevaluetype_p.h4
-rw-r--r--src/declarative/qml/qmetaobjectbuilder_p.h10
13 files changed, 94 insertions, 77 deletions
diff --git a/src/declarative/qml/parser/qdeclarativejslexer.cpp b/src/declarative/qml/parser/qdeclarativejslexer.cpp
index 1eb42e4..52f6210 100644
--- a/src/declarative/qml/parser/qdeclarativejslexer.cpp
+++ b/src/declarative/qml/parser/qdeclarativejslexer.cpp
@@ -510,15 +510,18 @@ int Lexer::lex()
setDone(Eof);
}
} else if (isLineTerminator()) {
- shiftWindowsLineBreak();
- yylineno++;
- yycolumn = 0;
- bol = true;
- terminator = true;
- syncProhibitAutomaticSemicolon();
if (restrKeyword) {
+ // automatic semicolon insertion
+ recordStartPos();
token = QDeclarativeJSGrammar::T_SEMICOLON;
setDone(Other);
+ } else {
+ shiftWindowsLineBreak();
+ yylineno++;
+ yycolumn = 0;
+ bol = true;
+ terminator = true;
+ syncProhibitAutomaticSemicolon();
}
} else if (current == '"' || current == '\'') {
recordStartPos();
diff --git a/src/declarative/qml/qdeclarativebinding_p.h b/src/declarative/qml/qdeclarativebinding_p.h
index 941a1b3..0b9bde6 100644
--- a/src/declarative/qml/qdeclarativebinding_p.h
+++ b/src/declarative/qml/qdeclarativebinding_p.h
@@ -64,7 +64,7 @@
QT_BEGIN_NAMESPACE
-class Q_DECLARATIVE_EXPORT QDeclarativeAbstractBinding
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeAbstractBinding
{
public:
typedef QWeakPointer<QDeclarativeAbstractBinding> Pointer;
@@ -138,7 +138,7 @@ private:
class QDeclarativeContext;
class QDeclarativeBindingPrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeBinding : public QDeclarativeExpression, public QDeclarativeAbstractBinding
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeBinding : public QDeclarativeExpression, public QDeclarativeAbstractBinding
{
Q_OBJECT
public:
diff --git a/src/declarative/qml/qdeclarativedom_p.h b/src/declarative/qml/qdeclarativedom_p.h
index 6043ead..ee3625c 100644
--- a/src/declarative/qml/qdeclarativedom_p.h
+++ b/src/declarative/qml/qdeclarativedom_p.h
@@ -58,6 +58,8 @@
#include <QtCore/qlist.h>
#include <QtCore/qshareddata.h>
+#include <private/qdeclarativeglobal_p.h>
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -76,7 +78,7 @@ class QIODevice;
class QDeclarativeDomDocumentPrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeDomDocument
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomDocument
{
public:
QDeclarativeDomDocument();
@@ -96,7 +98,7 @@ private:
};
class QDeclarativeDomPropertyPrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeDomProperty
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomProperty
{
public:
QDeclarativeDomProperty();
@@ -123,7 +125,7 @@ private:
};
class QDeclarativeDomDynamicPropertyPrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeDomDynamicProperty
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomDynamicProperty
{
public:
QDeclarativeDomDynamicProperty();
@@ -151,7 +153,7 @@ private:
};
class QDeclarativeDomObjectPrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeDomObject
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomObject
{
public:
QDeclarativeDomObject();
@@ -196,7 +198,7 @@ private:
class QDeclarativeDomValuePrivate;
class QDeclarativeDomBasicValuePrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeDomValueLiteral
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomValueLiteral
{
public:
QDeclarativeDomValueLiteral();
@@ -211,7 +213,7 @@ private:
QSharedDataPointer<QDeclarativeDomBasicValuePrivate> d;
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDomValueBinding
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomValueBinding
{
public:
QDeclarativeDomValueBinding();
@@ -226,7 +228,7 @@ private:
QSharedDataPointer<QDeclarativeDomBasicValuePrivate> d;
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDomValueValueSource
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomValueValueSource
{
public:
QDeclarativeDomValueValueSource();
@@ -241,7 +243,7 @@ private:
QSharedDataPointer<QDeclarativeDomBasicValuePrivate> d;
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDomValueValueInterceptor
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomValueValueInterceptor
{
public:
QDeclarativeDomValueValueInterceptor();
@@ -257,7 +259,7 @@ private:
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDomComponent : public QDeclarativeDomObject
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomComponent : public QDeclarativeDomObject
{
public:
QDeclarativeDomComponent();
@@ -268,7 +270,7 @@ public:
QDeclarativeDomObject componentRoot() const;
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDomValue
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomValue
{
public:
enum Type {
@@ -312,7 +314,7 @@ private:
QSharedDataPointer<QDeclarativeDomValuePrivate> d;
};
-class Q_DECLARATIVE_EXPORT QDeclarativeDomList
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomList
{
public:
QDeclarativeDomList();
@@ -333,7 +335,7 @@ private:
};
class QDeclarativeDomImportPrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeDomImport
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDomImport
{
public:
enum Type { Library, File };
diff --git a/src/declarative/qml/qdeclarativeenginedebug_p.h b/src/declarative/qml/qdeclarativeenginedebug_p.h
index 613f1fe..97b8121 100644
--- a/src/declarative/qml/qdeclarativeenginedebug_p.h
+++ b/src/declarative/qml/qdeclarativeenginedebug_p.h
@@ -117,10 +117,10 @@ private:
QList<QDeclarativeEngine *> m_engines;
QDeclarativeWatcher *m_watch;
};
-Q_DECLARATIVE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugServer::QDeclarativeObjectData &);
-Q_DECLARATIVE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugServer::QDeclarativeObjectData &);
-Q_DECLARATIVE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugServer::QDeclarativeObjectProperty &);
-Q_DECLARATIVE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugServer::QDeclarativeObjectProperty &);
+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 &);
QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativeglobal_p.h b/src/declarative/qml/qdeclarativeglobal_p.h
index 65d9b24..31fbb1e 100644
--- a/src/declarative/qml/qdeclarativeglobal_p.h
+++ b/src/declarative/qml/qdeclarativeglobal_p.h
@@ -64,6 +64,12 @@ QT_MODULE(Declarative)
return status == Yes; \
}
+#ifdef Q_OS_SYMBIAN
+#define Q_DECLARATIVE_PRIVATE_EXPORT
+#else
+#define Q_DECLARATIVE_PRIVATE_EXPORT Q_DECLARATIVE_EXPORT
+#endif
+
struct QDeclarativeGraphics_DerivedObject : public QObject
{
void setParent_noEvent(QObject *parent) {
diff --git a/src/declarative/qml/qdeclarativemetatype_p.h b/src/declarative/qml/qdeclarativemetatype_p.h
index 382abd2..9c486d3 100644
--- a/src/declarative/qml/qdeclarativemetatype_p.h
+++ b/src/declarative/qml/qdeclarativemetatype_p.h
@@ -58,6 +58,7 @@
#include <QtCore/qglobal.h>
#include <QtCore/qvariant.h>
#include <QtCore/qbitarray.h>
+#include <private/qdeclarativeglobal_p.h>
QT_BEGIN_NAMESPACE
@@ -65,7 +66,7 @@ class QDeclarativeType;
class QDeclarativeCustomParser;
class QDeclarativeTypePrivate;
-class Q_DECLARATIVE_EXPORT QDeclarativeMetaType
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeMetaType
{
public:
static bool copy(int type, void *data, const void *copy = 0);
@@ -105,7 +106,7 @@ public:
static QList<QDeclarativePrivate::AutoParentFunction> parentFunctions();
};
-class Q_DECLARATIVE_EXPORT QDeclarativeType
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeType
{
public:
QByteArray typeName() const;
diff --git a/src/declarative/qml/qdeclarativeparser_p.h b/src/declarative/qml/qdeclarativeparser_p.h
index c58aebc..b4753df 100644
--- a/src/declarative/qml/qdeclarativeparser_p.h
+++ b/src/declarative/qml/qdeclarativeparser_p.h
@@ -54,7 +54,6 @@
//
#include "qdeclarative.h"
-#include "private/qdeclarativerefcount_p.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qlist.h>
@@ -63,6 +62,8 @@
#include <QtCore/qstringlist.h>
#include <private/qobject_p.h>
+#include <private/qdeclarativerefcount_p.h>
+#include <private/qdeclarativeglobal_p.h>
QT_BEGIN_HEADER
diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/declarative/qml/qdeclarativeproperty.cpp
index b5fb619..1395e97 100644
--- a/src/declarative/qml/qdeclarativeproperty.cpp
+++ b/src/declarative/qml/qdeclarativeproperty.cpp
@@ -1408,8 +1408,8 @@ static inline void flush_vme_signal(const QObject *object, int index)
int methodOffset = metaObject->methodOffset();
while (methodOffset > index) {
- methodOffset -= QMetaObject_methods(metaObject);
metaObject = metaObject->d.superdata;
+ methodOffset -= QMetaObject_methods(metaObject);
}
QDeclarativeVMEMetaObject *vme =
diff --git a/src/declarative/qml/qdeclarativeproperty_p.h b/src/declarative/qml/qdeclarativeproperty_p.h
index a8438c8..a9d6979 100644
--- a/src/declarative/qml/qdeclarativeproperty_p.h
+++ b/src/declarative/qml/qdeclarativeproperty_p.h
@@ -55,17 +55,17 @@
#include "qdeclarativeproperty.h"
-#include "private/qdeclarativepropertycache_p.h"
-#include "private/qdeclarativeguard_p.h"
-
#include <private/qobject_p.h>
+#include <private/qdeclarativeglobal_p.h>
+#include <private/qdeclarativepropertycache_p.h>
+#include <private/qdeclarativeguard_p.h>
QT_BEGIN_NAMESPACE
class QDeclarativeContext;
class QDeclarativeEnginePrivate;
class QDeclarativeExpression;
-class Q_DECLARATIVE_EXPORT QDeclarativePropertyPrivate
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativePropertyPrivate
{
public:
enum WriteFlag { BypassInterceptor = 0x01, DontRemoveBinding = 0x02 };
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)
diff --git a/src/declarative/qml/qdeclarativestringconverters_p.h b/src/declarative/qml/qdeclarativestringconverters_p.h
index e6b0abe..b632222 100644
--- a/src/declarative/qml/qdeclarativestringconverters_p.h
+++ b/src/declarative/qml/qdeclarativestringconverters_p.h
@@ -56,6 +56,8 @@
#include <QtCore/qglobal.h>
#include <QtCore/qvariant.h>
+#include <private/qdeclarativeglobal_p.h>
+
QT_BEGIN_NAMESPACE
class QColor;
@@ -69,19 +71,19 @@ class QVector3D;
// XXX - Bauhaus currently uses these methods which is why they're exported
namespace QDeclarativeStringConverters
{
- QVariant Q_DECLARATIVE_EXPORT variantFromString(const QString &);
- QVariant Q_DECLARATIVE_EXPORT variantFromString(const QString &, int preferredType, bool *ok = 0);
+ QVariant Q_DECLARATIVE_PRIVATE_EXPORT variantFromString(const QString &);
+ QVariant Q_DECLARATIVE_PRIVATE_EXPORT variantFromString(const QString &, int preferredType, bool *ok = 0);
- QColor Q_DECLARATIVE_EXPORT colorFromString(const QString &, bool *ok = 0);
+ QColor Q_DECLARATIVE_PRIVATE_EXPORT colorFromString(const QString &, bool *ok = 0);
#ifndef QT_NO_DATESTRING
- QDate Q_DECLARATIVE_EXPORT dateFromString(const QString &, bool *ok = 0);
- QTime Q_DECLARATIVE_EXPORT timeFromString(const QString &, bool *ok = 0);
- QDateTime Q_DECLARATIVE_EXPORT dateTimeFromString(const QString &, bool *ok = 0);
+ QDate Q_DECLARATIVE_PRIVATE_EXPORT dateFromString(const QString &, bool *ok = 0);
+ QTime Q_DECLARATIVE_PRIVATE_EXPORT timeFromString(const QString &, bool *ok = 0);
+ QDateTime Q_DECLARATIVE_PRIVATE_EXPORT dateTimeFromString(const QString &, bool *ok = 0);
#endif
- QPointF Q_DECLARATIVE_EXPORT pointFFromString(const QString &, bool *ok = 0);
- QSizeF Q_DECLARATIVE_EXPORT sizeFFromString(const QString &, bool *ok = 0);
- QRectF Q_DECLARATIVE_EXPORT rectFFromString(const QString &, bool *ok = 0);
- QVector3D Q_DECLARATIVE_EXPORT vector3DFromString(const QString &, bool *ok = 0);
+ QPointF Q_DECLARATIVE_PRIVATE_EXPORT pointFFromString(const QString &, bool *ok = 0);
+ QSizeF Q_DECLARATIVE_PRIVATE_EXPORT sizeFFromString(const QString &, bool *ok = 0);
+ QRectF Q_DECLARATIVE_PRIVATE_EXPORT rectFFromString(const QString &, bool *ok = 0);
+ QVector3D Q_DECLARATIVE_PRIVATE_EXPORT vector3DFromString(const QString &, bool *ok = 0);
}
QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativevaluetype_p.h b/src/declarative/qml/qdeclarativevaluetype_p.h
index 4b1bbd6..06c8669 100644
--- a/src/declarative/qml/qdeclarativevaluetype_p.h
+++ b/src/declarative/qml/qdeclarativevaluetype_p.h
@@ -70,7 +70,7 @@
QT_BEGIN_NAMESPACE
-class Q_DECLARATIVE_EXPORT QDeclarativeValueType : public QObject
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeValueType : public QObject
{
Q_OBJECT
public:
@@ -81,7 +81,7 @@ public:
virtual void setValue(QVariant) = 0;
};
-class Q_DECLARATIVE_EXPORT QDeclarativeValueTypeFactory
+class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeValueTypeFactory
{
public:
QDeclarativeValueTypeFactory();
diff --git a/src/declarative/qml/qmetaobjectbuilder_p.h b/src/declarative/qml/qmetaobjectbuilder_p.h
index dbaf9e6..a90ba63 100644
--- a/src/declarative/qml/qmetaobjectbuilder_p.h
+++ b/src/declarative/qml/qmetaobjectbuilder_p.h
@@ -58,6 +58,8 @@
#include <QtCore/qdatastream.h>
#include <QtCore/qmap.h>
+#include <private/qdeclarativeglobal_p.h>
+
QT_BEGIN_NAMESPACE
class QMetaObjectBuilderPrivate;
@@ -68,7 +70,7 @@ class QMetaPropertyBuilderPrivate;
class QMetaEnumBuilder;
class QMetaEnumBuilderPrivate;
-class Q_DECLARATIVE_EXPORT QMetaObjectBuilder
+class Q_DECLARATIVE_PRIVATE_EXPORT QMetaObjectBuilder
{
public:
enum AddMember
@@ -193,7 +195,7 @@ private:
friend class QMetaEnumBuilder;
};
-class Q_DECLARATIVE_EXPORT QMetaMethodBuilder
+class Q_DECLARATIVE_PRIVATE_EXPORT QMetaMethodBuilder
{
public:
QMetaMethodBuilder() : _mobj(0), _index(0) {}
@@ -231,7 +233,7 @@ private:
QMetaMethodBuilderPrivate *d_func() const;
};
-class Q_DECLARATIVE_EXPORT QMetaPropertyBuilder
+class Q_DECLARATIVE_PRIVATE_EXPORT QMetaPropertyBuilder
{
public:
QMetaPropertyBuilder() : _mobj(0), _index(0) {}
@@ -282,7 +284,7 @@ private:
QMetaPropertyBuilderPrivate *d_func() const;
};
-class Q_DECLARATIVE_EXPORT QMetaEnumBuilder
+class Q_DECLARATIVE_PRIVATE_EXPORT QMetaEnumBuilder
{
public:
QMetaEnumBuilder() : _mobj(0), _index(0) {}