Reduce dependencies
authorLars Knoll <lars.knoll@theqtcompany.com>
Fri, 13 Feb 2015 08:02:28 +0000 (09:02 +0100)
committerLars Knoll <lars.knoll@digia.com>
Fri, 20 Mar 2015 11:16:56 +0000 (11:16 +0000)
Change-Id: I4190c1a6d8a06a130e50cb727feafa7cf11f21cd
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
12 files changed:
src/imports/localstorage/plugin.cpp
src/qml/jsruntime/qv4booleanobject.cpp
src/qml/jsruntime/qv4context.cpp
src/qml/jsruntime/qv4engine_p.h
src/qml/jsruntime/qv4memberdata.cpp
src/qml/jsruntime/qv4object.cpp
src/qml/jsruntime/qv4object_p.h
src/qml/jsruntime/qv4objectiterator.cpp
src/qml/jsruntime/qv4persistent_p.h
src/qml/jsruntime/qv4property_p.h
src/qml/jsruntime/qv4sparsearray_p.h
src/qml/qml/qqmlvmemetaobject.cpp

index b0ba3f9..ef0add2 100644 (file)
@@ -304,7 +304,7 @@ static ReturnedValue qmlsqldatabase_executeSql(CallContext *ctx)
                     if (key->isString()) {
                         query.bindValue(key->stringValue()->toQString(), v);
                     } else {
-                        assert(key->isInteger());
+                        Q_ASSERT(key->isInteger());
                         query.bindValue(key->integerValue(), v);
                     }
                 }
index 9c293e7..988af0c 100644 (file)
@@ -32,6 +32,7 @@
 ****************************************************************************/
 
 #include "qv4booleanobject_p.h"
+#include "qv4string_p.h"
 
 using namespace QV4;
 
index 833e281..6d3ba2c 100644 (file)
@@ -40,6 +40,7 @@
 #include <qv4argumentsobject_p.h>
 #include "qv4function_p.h"
 #include "qv4errorobject_p.h"
+#include "qv4string_p.h"
 
 using namespace QV4;
 
index cf6efde..e59e96f 100644 (file)
@@ -37,6 +37,7 @@
 #include "private/qv4isel_p.h"
 #include "qv4managed_p.h"
 #include "qv4context_p.h"
+#include "qv4string_p.h"
 #include "qv4internalclass_p.h"
 #include <private/qintrusivelist_p.h>
 
index 66864e2..9d85545 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "qv4memberdata_p.h"
 #include <private/qv4mm_p.h>
+#include "qv4value_inl_p.h"
 
 using namespace QV4;
 
index 234c5e7..15dec83 100644 (file)
@@ -710,7 +710,7 @@ void Object::internalPut(String *name, const Value &value)
 
     // Clause 5
     if (pd && attrs.isAccessor()) {
-        assert(pd->setter() != 0);
+        Q_ASSERT(pd->setter() != 0);
 
         Scope scope(engine());
         ScopedFunctionObject setter(scope, pd->setter());
@@ -784,7 +784,7 @@ void Object::internalPutIndexed(uint index, const Value &value)
 
     // Clause 5
     if (pd && attrs.isAccessor()) {
-        assert(pd->setter() != 0);
+        Q_ASSERT(pd->setter() != 0);
 
         Scope scope(engine());
         ScopedFunctionObject setter(scope, pd->setter());
index 6d72535..3177a73 100644 (file)
@@ -36,6 +36,9 @@
 #include "qv4managed_p.h"
 #include "qv4memberdata_p.h"
 #include "qv4arraydata_p.h"
+#include "qv4engine_p.h"
+#include "qv4scopedvalue_p.h"
+#include "qv4value_inl_p.h"
 
 QT_BEGIN_NAMESPACE
 
index f36ee55..e335d0e 100644 (file)
@@ -147,7 +147,7 @@ ReturnedValue ObjectIterator::nextPropertyName(Value *value)
 
     if (!!name)
         return name->asReturnedValue();
-    assert(index < UINT_MAX);
+    Q_ASSERT(index < UINT_MAX);
     return Encode(index);
 }
 
@@ -169,7 +169,7 @@ ReturnedValue ObjectIterator::nextPropertyNameAsString(Value *value)
 
     if (!!name)
         return name->asReturnedValue();
-    assert(index < UINT_MAX);
+    Q_ASSERT(index < UINT_MAX);
     return Encode(engine->newString(QString::number(index)));
 }
 
index 7cac2ed..f8ddb93 100644 (file)
@@ -33,7 +33,7 @@
 #ifndef QV4PERSISTENT_H
 #define QV4PERSISTENT_H
 
-#include "qv4value_inl_p.h"
+#include "qv4value_p.h"
 
 QT_BEGIN_NAMESPACE
 
index 1b55abd..94167ca 100644 (file)
@@ -35,7 +35,6 @@
 
 #include "qv4global_p.h"
 #include "qv4value_p.h"
-#include "qv4internalclass_p.h"
 
 QT_BEGIN_NAMESPACE
 
index 861c7dd..8496fc3 100644 (file)
 #define QV4SPARSEARRAY_H
 
 #include "qv4global_p.h"
-#include <QtCore/qmap.h>
-#include "qv4value_inl_p.h"
-#include "qv4scopedvalue_p.h"
-#include "qv4property_p.h"
-#include <assert.h>
+#include <QtCore/qlist.h>
 
 //#define Q_MAP_DEBUG
 #ifdef Q_MAP_DEBUG
@@ -188,7 +184,7 @@ public:
     typedef qptrdiff difference_type;
     typedef int size_type;
 
-#ifndef QT_NO_DEBUG
+#ifdef Q_MAP_DEBUG
     void dump() const;
 #endif
 };
@@ -261,7 +257,7 @@ inline void SparseArray::push_back(uint index, uint len)
     n->value = index;
 }
 
-#ifndef QT_NO_DEBUG
+#ifdef Q_MAP_DEBUG
 inline void SparseArray::dump() const
 {
     const SparseArrayNode *it = begin();
@@ -344,4 +340,4 @@ inline SparseArrayNode *SparseArray::upperBound(uint akey)
 
 QT_END_NAMESPACE
 
-#endif // QMAP_H
+#endif
index 37ff696..b6f4777 100644 (file)
@@ -1250,7 +1250,7 @@ void QQmlVMEMetaObject::mark(QV4::ExecutionEngine *e)
 void QQmlVMEMetaObject::allocateVarPropertiesArray()
 {
     QQmlEngine *qml = qmlEngine(object);
-    assert(qml);
+    Q_ASSERT(qml);
     QV4::ExecutionEngine *v4 = QV8Engine::getV4(qml->handle());
     QV4::Scope scope(v4);
     varProperties.set(scope.engine, v4->newArrayObject(metaData->varPropertyCount));