mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 02:42:55 +00:00
replace QVarLengthArray<T> with QStdVector<T> in QTextEngine
will happen everywhere eventually Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
cb095129da
commit
f6029fe81f
2 changed files with 8 additions and 8 deletions
|
@ -1133,7 +1133,7 @@ void QTextEngine::resolveAdditionalFormats() const
|
|||
QTextFormatCollection *collection = this->formats();
|
||||
|
||||
specialData->resolvedFormatIndices.clear();
|
||||
QVarLengthArray<int> indices(layoutData->items.count());
|
||||
QStdVector<int> indices(layoutData->items.count());
|
||||
for (int i = 0; i < layoutData->items.count(); ++i) {
|
||||
QTextCharFormat f = format(&layoutData->items.at(i));
|
||||
indices[i] = collection->indexForFormat(f);
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qvarlengtharray.h"
|
||||
#include "qstdcontainers_p.h"
|
||||
#include "qfont_p.h"
|
||||
#include "qpaintengine.h"
|
||||
#include "qtextdocument_p.h"
|
||||
|
@ -176,10 +176,10 @@ struct QGlyphLayout
|
|||
void grow(char *address, int totalGlyphs);
|
||||
};
|
||||
|
||||
class QVarLengthGlyphLayoutArray : private QVarLengthArray<void *>, public QGlyphLayout
|
||||
class QVarLengthGlyphLayoutArray : private QStdVector<void *>, public QGlyphLayout
|
||||
{
|
||||
private:
|
||||
typedef QVarLengthArray<void *> Array;
|
||||
typedef QStdVector<void *> Array;
|
||||
public:
|
||||
QVarLengthGlyphLayoutArray(int totalGlyphs)
|
||||
: Array(QSPACEFORGLYPHS(totalGlyphs) / QT_POINTER_SIZE + 1)
|
||||
|
@ -258,7 +258,7 @@ struct Q_AUTOTEST_EXPORT QScriptItem
|
|||
QFixed height() const { return ascent + descent + 1; }
|
||||
};
|
||||
|
||||
typedef QVarLengthArray<QScriptItem> QScriptItemArray;
|
||||
typedef QVector<QScriptItem> QScriptItemArray;
|
||||
|
||||
struct Q_AUTOTEST_EXPORT QScriptLine
|
||||
{
|
||||
|
@ -299,7 +299,7 @@ inline void QScriptLine::operator+=(const QScriptLine &other)
|
|||
length += other.length;
|
||||
}
|
||||
|
||||
typedef QVarLengthArray<QScriptLine> QScriptLineArray;
|
||||
typedef QStdVector<QScriptLine> QScriptLineArray;
|
||||
|
||||
class QFontPrivate;
|
||||
class QTextFormatCollection;
|
||||
|
@ -441,8 +441,8 @@ public:
|
|||
|
||||
struct SpecialData {
|
||||
QList<QTextLayout::FormatRange> addFormats;
|
||||
QVarLengthArray<int> addFormatIndices;
|
||||
QVarLengthArray<int> resolvedFormatIndices;
|
||||
QStdVector<int> addFormatIndices;
|
||||
QStdVector<int> resolvedFormatIndices;
|
||||
};
|
||||
SpecialData *specialData;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue