summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-07-26 17:38:14 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-07-26 18:06:46 +0200
commitbd3088ceb322381ac33bda11554667f1c9a421f8 (patch)
treee6b8eed1b083d2ff62c79a0b7a1d77217f3fff95 /tests/auto/gui
parentf418a96f9b7f003738894d0c19e176b2abc457df (diff)
Fix warnings about unused variables and functions in tests
Change-Id: Ia758a91384083c13fb4d743f500fef7a6629dfd5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp5
-rw-r--r--tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp10
-rw-r--r--tests/auto/gui/rhi/qrhi/tst_qrhi.cpp2
3 files changed, 3 insertions, 14 deletions
diff --git a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
index c2639fa209..c1272dc4cf 100644
--- a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
+++ b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
@@ -77,11 +77,6 @@ static bool operator<(const MacSpecialKey &entry, int key)
return entry.key < key;
}
-static bool operator<(int key, const MacSpecialKey &entry)
-{
- return key < entry.key;
-}
-
static const MacSpecialKey * const MacSpecialKeyEntriesEnd = entries + NumEntries;
static QChar macSymbolForQtKey(int key)
diff --git a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp
index 161ff5d3b7..af687f8cf1 100644
--- a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp
+++ b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp
@@ -955,18 +955,12 @@ void tst_QPainterPath::operators()
QCOMPARE(test, expected);
}
-static inline bool pathFuzzyCompare(double p1, double p2)
+template <typename T>
+static inline bool pathFuzzyCompare(T p1, T p2)
{
return qAbs(p1 - p2) < 0.001;
}
-
-static inline bool pathFuzzyCompare(float p1, float p2)
-{
- return qAbs(p1 - p2) < 0.001;
-}
-
-
void tst_QPainterPath::testArcMoveTo()
{
QFETCH(QRectF, rect);
diff --git a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp
index ee14116e1c..f5e178de4b 100644
--- a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp
+++ b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp
@@ -475,13 +475,13 @@ void tst_QRhi::nativeHandles()
rt->setRenderPassDescriptor(rpDesc.data());
QVERIFY(rt->create());
- const QRhiNativeHandles *rpHandles = rpDesc->nativeHandles();
switch (impl) {
case QRhi::Null:
break;
#ifdef TST_VK
case QRhi::Vulkan:
{
+ const QRhiNativeHandles *rpHandles = rpDesc->nativeHandles();
const QRhiVulkanRenderPassNativeHandles *vkHandles = static_cast<const QRhiVulkanRenderPassNativeHandles *>(rpHandles);
QVERIFY(vkHandles);
QVERIFY(vkHandles->renderPass);