QmlJS: Update to latest QmlJS parser from Qt 5.

Using qtdeclarative revision c9b7582a2e7ad9fcd03dd999c3b7a16b72803238

Change-Id: I9c942fa04c3fab5ef57b38e13471d0a4e2e8a2bf
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
Christian Kamm
2012-07-31 10:12:26 +02:00
parent 26bd1860d1
commit a14ed0793c
20 changed files with 422 additions and 360 deletions

View File

@@ -44,9 +44,9 @@
#include "qmljsglobal_p.h"
#include <qglobal.h>
#include <qshareddata.h>
#include <qdebug.h>
#include <QtCore/qglobal.h>
#include <QtCore/qshareddata.h>
#include <QtCore/qdebug.h>
#include <cstring>
@@ -73,10 +73,10 @@ public:
if (_blocks) {
for (int i = 0; i < _allocatedBlocks; ++i) {
if (char *b = _blocks[i])
qFree(b);
free(b);
}
qFree(_blocks);
free(_blocks);
}
}
@@ -108,7 +108,7 @@ private:
else
_allocatedBlocks *= 2;
_blocks = (char **) qRealloc(_blocks, sizeof(char *) * _allocatedBlocks);
_blocks = (char **) realloc(_blocks, sizeof(char *) * _allocatedBlocks);
for (int index = _blockCount; index < _allocatedBlocks; ++index)
_blocks[index] = 0;
@@ -117,7 +117,7 @@ private:
char *&block = _blocks[_blockCount];
if (! block)
block = (char *) qMalloc(BLOCK_SIZE);
block = (char *) malloc(BLOCK_SIZE);
_ptr = block;
_end = _ptr + BLOCK_SIZE;