summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/text/qsyntaxhighlighter
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2020-06-23 10:04:16 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2020-06-25 10:13:12 +0200
commitd1612610e650ffd7f2fbdef535c431647f57f0ac (patch)
tree6545a46b6aa7e5f89d7b2abcb959a78fa4c114ed /tests/auto/gui/text/qsyntaxhighlighter
parent8cd3ec4ee43365425be584a48ff2871bd0090ef8 (diff)
Use QList instead of QVector in gui tests
Task-number: QTBUG-84469 Change-Id: Ia86f39597de418dde6cd9ae3170ef919bd27416a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/gui/text/qsyntaxhighlighter')
-rw-r--r--tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp b/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp
index 55fff34a8e..1301ccc9cf 100644
--- a/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp
+++ b/tests/auto/gui/text/qsyntaxhighlighter/tst_qsyntaxhighlighter.cpp
@@ -113,8 +113,10 @@ void tst_QSyntaxHighlighter::cleanup()
class TestHighlighter : public QSyntaxHighlighter
{
public:
- inline TestHighlighter(const QVector<QTextLayout::FormatRange> &fmts, QTextDocument *parent)
- : QSyntaxHighlighter(parent), formats(fmts), highlighted(false), callCount(0) {}
+ inline TestHighlighter(const QList<QTextLayout::FormatRange> &fmts, QTextDocument *parent)
+ : QSyntaxHighlighter(parent), formats(fmts), highlighted(false), callCount(0)
+ {
+ }
inline TestHighlighter(QObject *parent)
: QSyntaxHighlighter(parent) {}
inline TestHighlighter(QTextDocument *parent)
@@ -131,7 +133,7 @@ public:
++callCount;
}
- QVector<QTextLayout::FormatRange> formats;
+ QList<QTextLayout::FormatRange> formats;
bool highlighted;
int callCount;
QString highlightedText;
@@ -139,7 +141,7 @@ public:
void tst_QSyntaxHighlighter::basic()
{
- QVector<QTextLayout::FormatRange> formats;
+ QList<QTextLayout::FormatRange> formats;
QTextLayout::FormatRange range;
range.start = 0;
range.length = 2;
@@ -206,7 +208,7 @@ void tst_QSyntaxHighlighter::basicTwo()
void tst_QSyntaxHighlighter::removeFormatsOnDelete()
{
- QVector<QTextLayout::FormatRange> formats;
+ QList<QTextLayout::FormatRange> formats;
QTextLayout::FormatRange range;
range.start = 0;
range.length = 9;
@@ -403,7 +405,7 @@ void tst_QSyntaxHighlighter::highlightToEndOfDocument2()
void tst_QSyntaxHighlighter::preservePreeditArea()
{
- QVector<QTextLayout::FormatRange> formats;
+ QList<QTextLayout::FormatRange> formats;
QTextLayout::FormatRange range;
range.start = 0;
range.length = 8;
@@ -500,7 +502,7 @@ void tst_QSyntaxHighlighter::avoidUnnecessaryDelayedRehighlight()
void tst_QSyntaxHighlighter::noContentsChangedDuringHighlight()
{
- QVector<QTextLayout::FormatRange> formats;
+ QList<QTextLayout::FormatRange> formats;
QTextLayout::FormatRange range;
range.start = 0;
range.length = 10;