summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-04-02 14:22:04 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-02 16:56:48 +0200
commit8f2a088028cf074a08e5252509c60e0f1021c43f (patch)
treed8af228b3cf3f9c998f7a52dec50ddcce84a7af1 /tests/auto/gui
parentb08f74f08939be310a79b5efcb5721e35c5deb21 (diff)
Fix MSVC warnings in tests.
- Unused variables - conversion truncations - Overflow in expressions like '-1 + sizeof()' Change-Id: Ibbd18497951e9e7e9dccaf596cb4e864b69ec02c Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp4
-rw-r--r--tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp2
-rw-r--r--tests/auto/gui/qopengl/tst_qopengl.cpp1
3 files changed, 5 insertions, 2 deletions
diff --git a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
index 861ad3835d..c4db74b6ec 100644
--- a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
+++ b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp
@@ -422,7 +422,9 @@ void tst_QKeySequence::mnemonic()
QFETCH(QString, key);
QFETCH(bool, warning);
-#ifndef QT_NO_DEBUG
+#ifdef QT_NO_DEBUG
+ Q_UNUSED(warning)
+#else
if (warning) {
QString str = QString::fromLatin1("QKeySequence::mnemonic: \"%1\" contains multiple occurrences of '&'").arg(string);
QTest::ignoreMessage(QtWarningMsg, qPrintable(str));
diff --git a/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp b/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp
index f4cf586da1..26a68338a6 100644
--- a/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp
+++ b/tests/auto/gui/painting/qwmatrix/tst_qwmatrix.cpp
@@ -42,7 +42,7 @@
#include <QtTest/QtTest>
#include <qmatrix.h>
-#include <math.h>
+#include <qmath.h>
#include <qpolygon.h>
Q_DECLARE_METATYPE(QRect)
diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp
index e8374b0cae..38208d27c8 100644
--- a/tests/auto/gui/qopengl/tst_qopengl.cpp
+++ b/tests/auto/gui/qopengl/tst_qopengl.cpp
@@ -118,6 +118,7 @@ struct SharedResource : public QOpenGLSharedResource
void freeResource(QOpenGLContext *context)
{
Q_ASSERT(context == QOpenGLContext::currentContext());
+ Q_UNUSED(context)
resource = 0;
if (tracker)
tracker->freeResourceCalls++;