summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-06-15 09:09:08 +0200
committerLars Knoll <lars.knoll@qt.io>2020-08-15 10:56:29 +0200
commit8929c0a3550ae27cb5c9ed276d4c5a85594ba682 (patch)
tree56998feaa3acec13cc575a7f95b12b28e4407c44 /tests/benchmarks
parentaf263b003be2f2e111ddc398bc8918cc006fcbb3 (diff)
Remove QVariant(int type, void *data, ...) constructor
It was marked internal anyway. Use the constructor taking a QMetaType instead. Change-Id: I15b9cd0911aac063a0f0fe0352fa2c84b7f7c691 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/benchmarks')
-rw-r--r--tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp6
-rw-r--r--tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp6
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp
index 0d4c3419c0..d3c779b3aa 100644
--- a/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp
+++ b/tests/benchmarks/corelib/kernel/qvariant/tst_qvariant.cpp
@@ -349,7 +349,7 @@ void tst_qvariant::createCoreType()
QFETCH(int, typeId);
QBENCHMARK {
for (int i = 0; i < ITERATION_COUNT; ++i)
- QVariant(typeId, (void *)0);
+ QVariant(QMetaType(typeId));
}
}
@@ -365,11 +365,11 @@ void tst_qvariant::createCoreTypeCopy_data()
void tst_qvariant::createCoreTypeCopy()
{
QFETCH(int, typeId);
- QVariant other(typeId, (void *)0);
+ QVariant other(typeId);
const void *copy = other.constData();
QBENCHMARK {
for (int i = 0; i < ITERATION_COUNT; ++i)
- QVariant(typeId, copy);
+ QVariant(QMetaType(typeId), copy);
}
}
diff --git a/tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp b/tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp
index 4cf245507c..64aa08371d 100644
--- a/tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp
+++ b/tests/benchmarks/gui/kernel/qguivariant/tst_qguivariant.cpp
@@ -70,7 +70,7 @@ void tst_QGuiVariant::createGuiType()
QFETCH(int, typeId);
QBENCHMARK {
for (int i = 0; i < ITERATION_COUNT; ++i)
- QVariant(typeId, (void *)0);
+ QVariant(QMetaType(typeId));
}
}
@@ -86,11 +86,11 @@ void tst_QGuiVariant::createGuiTypeCopy_data()
void tst_QGuiVariant::createGuiTypeCopy()
{
QFETCH(int, typeId);
- QVariant other(typeId, (void *)0);
+ QVariant other((QMetaType(typeId)));
const void *copy = other.constData();
QBENCHMARK {
for (int i = 0; i < ITERATION_COUNT; ++i)
- QVariant(typeId, copy);
+ QVariant(QMetaType(typeId), copy);
}
}