aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/gifs
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2020-07-09 14:27:32 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2020-07-09 14:45:43 +0200
commitab5fee7aa22c2630970734359062dfef03ca9b22 (patch)
treea00692cb7effd712c773c558ad935c5efa4c9be8 /tests/manual/gifs
parent2ff6d3a112d802f0d69e359a23e09e5d645eeca7 (diff)
Use QList instead of QVector
Task-number: QTBUG-84469 Change-Id: I4991ab7ce8ba8d2522005b1b0a78f7b474c54419 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/manual/gifs')
-rw-r--r--tests/manual/gifs/eventcapturer.cpp4
-rw-r--r--tests/manual/gifs/eventcapturer.h6
-rw-r--r--tests/manual/gifs/tst_gifs.cpp20
3 files changed, 15 insertions, 15 deletions
diff --git a/tests/manual/gifs/eventcapturer.cpp b/tests/manual/gifs/eventcapturer.cpp
index b3bbd7c8..ad88b1db 100644
--- a/tests/manual/gifs/eventcapturer.cpp
+++ b/tests/manual/gifs/eventcapturer.cpp
@@ -124,7 +124,7 @@ void EventCapturer::setCapturedEventTypes(QSet<QEvent::Type> types)
mCapturedEventTypes = types;
}
-QVector<CapturedEvent> EventCapturer::capturedEvents() const
+QList<CapturedEvent> EventCapturer::capturedEvents() const
{
if (mMoveEventTrimFlags == TrimNone || mEvents.isEmpty())
return mEvents;
@@ -167,7 +167,7 @@ QVector<CapturedEvent> EventCapturer::capturedEvents() const
// the indices are still valid - we could be removing from the middle of
// the commands next. Also, the function is const, so we can't remove from
// mEvents anyway. :)
- QVector<CapturedEvent> events = mEvents.mid(firstEventIndex, (lastEventIndex - firstEventIndex) + 1);
+ QList<CapturedEvent> events = mEvents.mid(firstEventIndex, (lastEventIndex - firstEventIndex) + 1);
if (mMoveEventTrimFlags.testFlag(TrimAfterReleases)) {
bool lastNonMoveEventWasRelease = false;
diff --git a/tests/manual/gifs/eventcapturer.h b/tests/manual/gifs/eventcapturer.h
index e2b8b3a4..ea01299f 100644
--- a/tests/manual/gifs/eventcapturer.h
+++ b/tests/manual/gifs/eventcapturer.h
@@ -40,9 +40,9 @@
#include <QObject>
#include <QElapsedTimer>
#include <QEvent>
+#include <QList>
#include <QPoint>
#include <QSet>
-#include <QVector>
#include "capturedevent.h"
@@ -72,7 +72,7 @@ public:
QSet<QEvent::Type> capturedEventTypes();
void setCapturedEventTypes(QSet<QEvent::Type> types);
- QVector<CapturedEvent> capturedEvents() const;
+ QList<CapturedEvent> capturedEvents() const;
protected:
bool eventFilter(QObject *object, QEvent *event) override;
@@ -87,7 +87,7 @@ private:
Qt::Key mStopCaptureKey;
MoveEventTrimFlags mMoveEventTrimFlags;
QElapsedTimer mDelayTimer;
- QVector<CapturedEvent> mEvents;
+ QList<CapturedEvent> mEvents;
int mDuration;
int mLastCaptureTime;
};
diff --git a/tests/manual/gifs/tst_gifs.cpp b/tests/manual/gifs/tst_gifs.cpp
index d7d8f98d..80c3fd9f 100644
--- a/tests/manual/gifs/tst_gifs.cpp
+++ b/tests/manual/gifs/tst_gifs.cpp
@@ -609,19 +609,19 @@ void tst_Gifs::swipeDelegateBehind()
void tst_Gifs::delegates_data()
{
QTest::addColumn<QString>("name");
- QTest::addColumn<QVector<int> >("pressIndices");
+ QTest::addColumn<QList<int> >("pressIndices");
QTest::addColumn<int>("duration");
- QTest::newRow("ItemDelegate") << "itemdelegate" << (QVector<int>() << 0 << 1 << 2) << 5;
- QTest::newRow("CheckDelegate") << "checkdelegate" << (QVector<int>() << 0 << 0) << 5;
- QTest::newRow("RadioDelegate") << "radiodelegate" << (QVector<int>() << 1 << 0) << 5;
- QTest::newRow("SwitchDelegate") << "switchdelegate" << (QVector<int>() << 0 << 0) << 5;
+ QTest::newRow("ItemDelegate") << "itemdelegate" << (QList<int> { 0, 1, 2 }) << 5;
+ QTest::newRow("CheckDelegate") << "checkdelegate" << (QList<int> { 0, 0 }) << 5;
+ QTest::newRow("RadioDelegate") << "radiodelegate" << (QList<int> { 1, 0 }) << 5;
+ QTest::newRow("SwitchDelegate") << "switchdelegate" << (QList<int> { 0, 0 }) << 5;
}
void tst_Gifs::delegates()
{
QFETCH(QString, name);
- QFETCH(QVector<int>, pressIndices);
+ QFETCH(QList<int>, pressIndices);
QFETCH(int, duration);
GifRecorder gifRecorder;
@@ -710,16 +710,16 @@ void tst_Gifs::dial()
void tst_Gifs::checkables_data()
{
QTest::addColumn<QString>("name");
- QTest::addColumn<QVector<int> >("pressIndices");
+ QTest::addColumn<QList<int> >("pressIndices");
- QTest::newRow("checkbox") << "checkbox" << (QVector<int>() << 1 << 2 << 2 << 1);
- QTest::newRow("radiobutton") << "radiobutton" << (QVector<int>() << 1 << 2 << 1 << 0);
+ QTest::newRow("checkbox") << "checkbox" << (QList<int> { 1, 2, 2, 1 });
+ QTest::newRow("radiobutton") << "radiobutton" << (QList<int> { 1, 2, 1, 0 });
}
void tst_Gifs::checkables()
{
QFETCH(QString, name);
- QFETCH(QVector<int>, pressIndices);
+ QFETCH(QList<int>, pressIndices);
GifRecorder gifRecorder;
gifRecorder.setDataDirPath(dataDirPath);