summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2010-04-21 07:32:52 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2010-04-21 07:32:52 (GMT)
commit85cd533284175c1c83d538d3bb2f0d02dc2bbf7a (patch)
tree244a6f6b49593b87df6a7837d39700bf5f46a8be /src
parent550f7a2aadbd46c7bd6f30e1faa0bb9a1241a3cf (diff)
downloadQt-85cd533284175c1c83d538d3bb2f0d02dc2bbf7a.zip
Qt-85cd533284175c1c83d538d3bb2f0d02dc2bbf7a.tar.gz
Qt-85cd533284175c1c83d538d3bb2f0d02dc2bbf7a.tar.bz2
Compile without Qt3 support.
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index 0dd9368..a41eaa9 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -152,10 +152,10 @@ void QDeclarativeEnginePrivate::defineModule()
}
QDeclarativeEnginePrivate::QDeclarativeEnginePrivate(QDeclarativeEngine *e)
-: captureProperties(false), rootContext(0), currentExpression(0), isDebugging(false),
- outputWarningsToStdErr(true), contextClass(0), sharedContext(0), sharedScope(0),
- objectClass(0), valueTypeClass(0), globalClass(0), cleanup(0), erroredBindings(0),
- inProgressCreations(0), scriptEngine(this), workerScriptEngine(0), componentAttached(0),
+: captureProperties(false), rootContext(0), currentExpression(0), isDebugging(false),
+ outputWarningsToStdErr(true), contextClass(0), sharedContext(0), sharedScope(0),
+ objectClass(0), valueTypeClass(0), globalClass(0), cleanup(0), erroredBindings(0),
+ inProgressCreations(0), scriptEngine(this), workerScriptEngine(0), componentAttached(0),
inBeginCreate(false), networkAccessManager(0), networkAccessManagerFactory(0),
typeManager(e), uniqueId(1)
{
@@ -353,7 +353,7 @@ void QDeclarativePrivate::qdeclarativeelement_destructor(QObject *o)
QObjectPrivate *p = QObjectPrivate::get(o);
Q_ASSERT(p->declarativeData);
QDeclarativeData *d = static_cast<QDeclarativeData*>(p->declarativeData);
- if (d->ownContext)
+ if (d->ownContext)
d->context->destroy();
}
@@ -394,7 +394,7 @@ void QDeclarativeEnginePrivate::init()
QDeclarativeWorkerScriptEngine *QDeclarativeEnginePrivate::getWorkerScriptEngine()
{
Q_Q(QDeclarativeEngine);
- if (!workerScriptEngine)
+ if (!workerScriptEngine)
workerScriptEngine = new QDeclarativeWorkerScriptEngine(q);
return workerScriptEngine;
}
@@ -419,7 +419,7 @@ QDeclarativeWorkerScriptEngine *QDeclarativeEnginePrivate::getWorkerScriptEngine
QDeclarativeComponent component(&engine);
component.setData("import Qt 4.7\nText { text: \"Hello world!\" }", QUrl());
QDeclarativeItem *item = qobject_cast<QDeclarativeItem *>(component.create());
-
+
//add item to view, etc
...
\endcode
@@ -648,7 +648,7 @@ void QDeclarativeEngine::setBaseUrl(const QUrl &url)
{
Q_D(QDeclarativeEngine);
d->baseUrl = url;
-}
+}
/*!
Returns true if warning messages will be output to stderr in addition
@@ -667,7 +667,7 @@ bool QDeclarativeEngine::outputWarningsToStandardError() const
If \a enabled is true, any warning messages generated by QML will be
output to stderr and emitted by the warnings() signal. If \a enabled
- is false, on the warnings() signal will be emitted. This allows
+ is false, on the warnings() signal will be emitted. This allows
applications to handle warning output themselves.
The default value is true.
@@ -781,7 +781,7 @@ void QDeclarativeEngine::setObjectOwnership(QObject *object, ObjectOwnership own
QDeclarativeEngine::ObjectOwnership QDeclarativeEngine::objectOwnership(QObject *object)
{
QDeclarativeData *ddata = QDeclarativeData::get(object, false);
- if (!ddata)
+ if (!ddata)
return CppOwnership;
else
return ddata->indestructible?CppOwnership:JavaScriptOwnership;
@@ -803,7 +803,7 @@ void qmlExecuteDeferred(QObject *object)
QDeclarativeComponentPrivate::complete(ep, &state);
- if (!state.errors.isEmpty())
+ if (!state.errors.isEmpty())
ep->warning(state.errors);
}
}
@@ -844,7 +844,7 @@ QObject *qmlAttachedPropertiesObjectById(int id, const QObject *object, bool cre
return rv;
}
-QObject *qmlAttachedPropertiesObject(int *idCache, const QObject *object,
+QObject *qmlAttachedPropertiesObject(int *idCache, const QObject *object,
const QMetaObject *attachedMetaObject, bool create)
{
if (*idCache == -1)
@@ -863,7 +863,7 @@ void QDeclarativeData::destroyed(QObject *object)
if (attachedProperties)
delete attachedProperties;
- if (nextContextObject)
+ if (nextContextObject)
nextContextObject->prevContextObject = prevContextObject;
if (prevContextObject)
*prevContextObject = nextContextObject;
@@ -910,7 +910,7 @@ void QDeclarativeData::parentChanged(QObject *, QObject *parent)
bool QDeclarativeData::hasBindingBit(int bit) const
{
- if (bindingBitsSize > bit)
+ if (bindingBitsSize > bit)
return bindingBits[bit / 32] & (1 << (bit % 32));
else
return false;
@@ -918,7 +918,7 @@ bool QDeclarativeData::hasBindingBit(int bit) const
void QDeclarativeData::clearBindingBit(int bit)
{
- if (bindingBitsSize > bit)
+ if (bindingBitsSize > bit)
bindingBits[bit / 32] &= ~(1 << (bit % 32));
}
@@ -931,10 +931,10 @@ void QDeclarativeData::setBindingBit(QObject *obj, int bit)
int arraySize = (props + 31) / 32;
int oldArraySize = bindingBitsSize / 32;
- bindingBits = (quint32 *)realloc(bindingBits,
+ bindingBits = (quint32 *)realloc(bindingBits,
arraySize * sizeof(quint32));
- memset(bindingBits + oldArraySize,
+ memset(bindingBits + oldArraySize,
0x00,
sizeof(quint32) * (arraySize - oldArraySize));
@@ -1035,7 +1035,7 @@ QScriptValue QDeclarativeEnginePrivate::createQmlObject(QScriptContext *ctxt, QS
QScriptValue qmlErrObject = ctxt->engine()->newObject();
qmlErrObject.setProperty("lineNumber", QScriptValue(error.line()));
qmlErrObject.setProperty("columnNumber", QScriptValue(error.column()));
- qmlErrObject.setProperty("fileName", QScriptValue(error.url()));
+ qmlErrObject.setProperty("fileName", QScriptValue(error.url().toString()));
qmlErrObject.setProperty("message", QScriptValue(error.description()));
arr.setProperty(i++, qmlErrObject);
}
@@ -1059,7 +1059,7 @@ QScriptValue QDeclarativeEnginePrivate::createQmlObject(QScriptContext *ctxt, QS
QScriptValue qmlErrObject = ctxt->engine()->newObject();
qmlErrObject.setProperty("lineNumber", QScriptValue(error.line()));
qmlErrObject.setProperty("columnNumber", QScriptValue(error.column()));
- qmlErrObject.setProperty("fileName", QScriptValue(error.url()));
+ qmlErrObject.setProperty("fileName", QScriptValue(error.url().toString()));
qmlErrObject.setProperty("message", QScriptValue(error.description()));
arr.setProperty(i++, qmlErrObject);
}
@@ -1365,7 +1365,7 @@ void QDeclarativeEnginePrivate::warning(const QList<QDeclarativeError> &errors)
{
Q_Q(QDeclarativeEngine);
q->warnings(errors);
- if (outputWarningsToStdErr)
+ if (outputWarningsToStdErr)
dumpwarning(errors);
}
@@ -1461,7 +1461,7 @@ QScriptValue QDeclarativeEnginePrivate::tint(QScriptContext *ctxt, QScriptEngine
QScriptValue QDeclarativeEnginePrivate::scriptValueFromVariant(const QVariant &val)
{
if (val.userType() == qMetaTypeId<QDeclarativeListReference>()) {
- QDeclarativeListReferencePrivate *p =
+ QDeclarativeListReferencePrivate *p =
QDeclarativeListReferencePrivate::get((QDeclarativeListReference*)val.constData());
if (p->object) {
return listClass->newList(p->property, p->propertyType);
@@ -1494,7 +1494,7 @@ QVariant QDeclarativeEnginePrivate::scriptValueToVariant(const QScriptValue &val
QScriptDeclarativeClass *dc = QScriptDeclarativeClass::scriptClass(val);
if (dc == objectClass)
return QVariant::fromValue(objectClass->toQObject(val));
- else if (dc == valueTypeClass)
+ else if (dc == valueTypeClass)
return valueTypeClass->toVariant(val);
else if (dc == contextClass)
return QVariant();
@@ -1705,7 +1705,7 @@ public:
if (importType == QDeclarativeScriptParser::Import::Library) {
url.replace(QLatin1Char('.'), QLatin1Char('/'));
bool found = false;
- QString dir;
+ QString dir;
foreach (const QString &p,
@@ -1883,8 +1883,8 @@ static QDeclarativeTypeNameCache *cacheForNamespace(QDeclarativeEngine *engine,
int minor = set.minversions.at(ii);
foreach (QDeclarativeType *type, types) {
- if (type->qmlTypeName().startsWith(base) &&
- type->qmlTypeName().lastIndexOf('/') == (base.length() - 1) &&
+ if (type->qmlTypeName().startsWith(base) &&
+ type->qmlTypeName().lastIndexOf('/') == (base.length() - 1) &&
type->availableInVersion(major,minor))
{
QString name = QString::fromUtf8(type->qmlTypeName().mid(base.length()));