Use QList instead of QVector in util
Task-number: QTBUG-84469 Change-Id: I077fb5c32456d438a457c1f73852313ea2ea9ae5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
c7c28b3406
commit
a7f9d5a7fa
@ -129,7 +129,7 @@ int main(int argc, char **argv)
|
||||
outFile.write(";\n");
|
||||
|
||||
file.reset();
|
||||
QVector<QString> strings(lineCount);
|
||||
QStringList strings(lineCount);
|
||||
while (!file.atEnd()) {
|
||||
QString st = QString::fromUtf8(file.readLine()).trimmed();
|
||||
int num = qt_hash(st) % lineCount;
|
||||
|
@ -32,12 +32,12 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QVector>
|
||||
#include <QDebug>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QDebug>
|
||||
#include <QList>
|
||||
|
||||
#include <QColor>
|
||||
|
||||
@ -174,7 +174,7 @@ static void printGradientStops(Printer &p, const QJsonArray &presets)
|
||||
const QJsonArray stops = preset[QLatin1String("stops")].toArray();
|
||||
Q_ASSERT(!stops.isEmpty());
|
||||
|
||||
QVector<GradientStop> gradientStops;
|
||||
QList<GradientStop> gradientStops;
|
||||
gradientStops.reserve(stops.size());
|
||||
std::transform(stops.cbegin(),
|
||||
stops.cend(),
|
||||
|
@ -28,10 +28,10 @@
|
||||
#ifndef CONFIGFILE_H
|
||||
#define CONFIGFILE_H
|
||||
|
||||
#include <QStringList>
|
||||
#include <QMap>
|
||||
#include <QVector>
|
||||
#include <QIODevice>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QStringList>
|
||||
|
||||
struct ConfigFile
|
||||
{
|
||||
@ -42,7 +42,7 @@ struct ConfigFile
|
||||
QString key;
|
||||
QString value;
|
||||
};
|
||||
struct Section : public QVector<Entry>
|
||||
struct Section : public QList<Entry>
|
||||
{
|
||||
inline bool contains(const QString &key) const
|
||||
{
|
||||
|
@ -223,9 +223,9 @@ static inline bool adjacentKeys(int left, int right) { return left + 1 == right;
|
||||
//static inline bool adjacentKeys(const InputType &left, const InputType &right)
|
||||
//{ return left.val + 1 == right.val; }
|
||||
|
||||
static QVector<Generator::TransitionSequence> convertToSequences(const TransitionMap &transitions)
|
||||
static QList<Generator::TransitionSequence> convertToSequences(const TransitionMap &transitions)
|
||||
{
|
||||
QVector<Generator::TransitionSequence> sequences;
|
||||
QList<Generator::TransitionSequence> sequences;
|
||||
if (transitions.isEmpty())
|
||||
return sequences;
|
||||
|
||||
@ -272,7 +272,7 @@ void Generator::generateTransitions(CodeBlock &body, const TransitionMap &transi
|
||||
if (transitions.isEmpty())
|
||||
return;
|
||||
|
||||
QVector<TransitionSequence> sequences = convertToSequences(transitions);
|
||||
QList<TransitionSequence> sequences = convertToSequences(transitions);
|
||||
|
||||
bool needsCharFunction = false;
|
||||
if (!charFunctionRanges.isEmpty()) {
|
||||
|
@ -161,9 +161,9 @@ private:
|
||||
QString cname;
|
||||
struct Section
|
||||
{
|
||||
QVector<Function> functions;
|
||||
QList<Function> functions;
|
||||
QStringList variables;
|
||||
QVector<Function> constructors;
|
||||
QList<Function> constructors;
|
||||
|
||||
inline bool isEmpty() const
|
||||
{ return functions.isEmpty() && variables.isEmpty() && constructors.isEmpty(); }
|
||||
@ -202,7 +202,7 @@ public:
|
||||
QString testFunction;
|
||||
};
|
||||
private:
|
||||
QVector<TransitionSequence> charFunctionRanges;
|
||||
QList<TransitionSequence> charFunctionRanges;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -203,7 +203,7 @@ static DFA generateMachine(const Config &cfg)
|
||||
return DFA();
|
||||
}
|
||||
|
||||
QVector<NFA> tokens;
|
||||
QList<NFA> tokens;
|
||||
|
||||
foreach (ConfigFile::Entry e, cfg.configSections.value("Tokens")) {
|
||||
int errCol = 0;
|
||||
|
@ -430,7 +430,7 @@ void DFA::debug() const
|
||||
|
||||
DFA DFA::minimize() const
|
||||
{
|
||||
QVector<bool> inequivalentStates(count() * count());
|
||||
QList<bool> inequivalentStates(count() * count());
|
||||
inequivalentStates.fill(false);
|
||||
|
||||
for (int i = 0; i < count(); ++i)
|
||||
|
@ -29,13 +29,13 @@
|
||||
#ifndef NFA_H
|
||||
#define NFA_H
|
||||
|
||||
#include <QMap>
|
||||
#include <QHash>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
#include <QDebug>
|
||||
#include <QStack>
|
||||
#include <QByteArray>
|
||||
#include <QDebug>
|
||||
#include <QHash>
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QStack>
|
||||
#include <QString>
|
||||
|
||||
#include "global.h"
|
||||
|
||||
@ -57,7 +57,7 @@ inline QDataStream &operator>>(QDataStream &stream, State &state)
|
||||
return stream >> state.symbol >> state.transitions;
|
||||
}
|
||||
|
||||
struct DFA : public QVector<State>
|
||||
struct DFA : public QList<State>
|
||||
{
|
||||
void debug() const;
|
||||
DFA minimize() const;
|
||||
@ -107,7 +107,7 @@ public:
|
||||
int initialState;
|
||||
int finalState;
|
||||
|
||||
QVector<State> states;
|
||||
QList<State> states;
|
||||
};
|
||||
|
||||
#endif // NFA_H
|
||||
|
@ -92,7 +92,7 @@ private:
|
||||
void tokenize(const QString &input);
|
||||
|
||||
QMap<QString, NFA> macros;
|
||||
QVector<Symbol> symbols;
|
||||
QList<Symbol> symbols;
|
||||
int index;
|
||||
int errorColumn;
|
||||
const QSet<InputType> maxInputSet;
|
||||
|
@ -26,14 +26,13 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <qlist.h>
|
||||
#include <qhash.h>
|
||||
#include <qfile.h>
|
||||
#include <qbytearray.h>
|
||||
#include <qstring.h>
|
||||
#include <qchar.h>
|
||||
#include <qvector.h>
|
||||
#include <qdebug.h>
|
||||
#include <qfile.h>
|
||||
#include <qhash.h>
|
||||
#include <qlist.h>
|
||||
#include <qstring.h>
|
||||
#if 0
|
||||
#include <private/qunicodetables_p.h>
|
||||
#endif
|
||||
@ -2310,7 +2309,7 @@ struct UniqueBlock {
|
||||
{ return values == other.values; }
|
||||
|
||||
int index;
|
||||
QVector<int> values;
|
||||
QList<int> values;
|
||||
};
|
||||
|
||||
static QByteArray createPropertyInfo()
|
||||
@ -2332,7 +2331,7 @@ static QByteArray createPropertyInfo()
|
||||
const int SMP_SHIFT = 8;
|
||||
|
||||
QList<UniqueBlock> uniqueBlocks;
|
||||
QVector<int> blockMap;
|
||||
QList<int> blockMap;
|
||||
int used = 0;
|
||||
|
||||
for (int block = 0; block < BMP_END/BMP_BLOCKSIZE; ++block) {
|
||||
@ -2617,11 +2616,11 @@ static QByteArray createCompositionInfo()
|
||||
if (SMP_END <= highestComposedCharacter)
|
||||
qFatal("end of table smaller than highest composed character 0x%x", highestComposedCharacter);
|
||||
|
||||
QVector<unsigned short> decompositions;
|
||||
QList<unsigned short> decompositions;
|
||||
int tableIndex = 0;
|
||||
|
||||
QList<UniqueBlock> uniqueBlocks;
|
||||
QVector<int> blockMap;
|
||||
QList<int> blockMap;
|
||||
int used = 0;
|
||||
|
||||
for (int block = 0; block < BMP_END/BMP_BLOCKSIZE; ++block) {
|
||||
@ -2832,7 +2831,7 @@ static QByteArray createLigatureInfo()
|
||||
int tableIndex = 0;
|
||||
|
||||
QList<UniqueBlock> uniqueBlocks;
|
||||
QVector<int> blockMap;
|
||||
QList<int> blockMap;
|
||||
int used = 0;
|
||||
|
||||
for (int block = 0; block < BMP_END/BMP_BLOCKSIZE; ++block) {
|
||||
|
Loading…
Reference in New Issue
Block a user