aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/v4/qdeclarativev4instruction_p.h
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-08-31 08:55:16 +0200
committerGunnar Sletta <gunnar.sletta@nokia.com>2011-08-31 08:55:16 +0200
commit71478352376022faa9be6d79f2a760c289945ff5 (patch)
tree0f8ff4a88c1b033367337a93d23a329d145ee903 /src/declarative/qml/v4/qdeclarativev4instruction_p.h
parentc38efcb67cf93ba3e91e184c3b891efef4ef75a3 (diff)
parent05daa9bfe1a03ffe1cc580b6cfd88e093e2493c0 (diff)
Merge branch 'master' into refactor
Conflicts: src/3rdparty/v8 src/declarative/declarative.pro src/declarative/items/qsgcanvas.cpp src/declarative/items/qsgshadereffectsource_p.h src/declarative/items/qsgview.cpp src/declarative/particles/qsgcustomparticle.cpp src/imports/gestures/gestures.pro src/imports/particles/particles.pro src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro src/qtquick1/qtquick1.pro tests/auto/declarative/examples/examples.pro tests/auto/declarative/qsglistview/qsglistview.pro tests/auto/qtquick1/qdeclarativeviewer/qdeclarativeviewer.pro Change-Id: I423344f83e1835116cad531b877fde6e68a8849a
Diffstat (limited to 'src/declarative/qml/v4/qdeclarativev4instruction_p.h')
-rw-r--r--src/declarative/qml/v4/qdeclarativev4instruction_p.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/declarative/qml/v4/qdeclarativev4instruction_p.h b/src/declarative/qml/v4/qdeclarativev4instruction_p.h
index e3ac9027f7..6efe9332d1 100644
--- a/src/declarative/qml/v4/qdeclarativev4instruction_p.h
+++ b/src/declarative/qml/v4/qdeclarativev4instruction_p.h
@@ -56,6 +56,7 @@
#include <QtCore/qglobal.h>
#include <QtCore/qbytearray.h>
#include <QtCore/qvector.h>
+#include <QtCore/qvarlengtharray.h>
QT_BEGIN_HEADER
@@ -414,21 +415,27 @@ class Bytecode
public:
Bytecode();
- QByteArray code() const { return d; }
const char *constData() const { return d.constData(); }
int size() const { return d.size(); }
int count() const { return d.count(); }
void clear() { d.clear(); }
bool isEmpty() const { return d.isEmpty(); }
void append(const Instr &instr);
- void append(const QVector<Instr> &instrs);
+
+ template <typename _It>
+ void append(_It it, _It last)
+ {
+ for (; it != last; ++it)
+ append(*it);
+ }
+
int remove(int index);
const Instr &operator[](int offset) const;
Instr &operator[](int offset);
private:
- QByteArray d;
+ QVarLengthArray<char, 4 * 1024> d;
#ifdef QML_THREADED_INTERPRETER
void **decodeInstr;
#endif