summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-10-20 14:26:43 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-10-21 07:31:27 +0200
commit97c3266c6f8fa312d67fcbd24ceb3cbc41c98bdc (patch)
treeb35c729a8a1f72d32b4d7470fac4fddc0e5d1ef9 /tests
parent43738cfdaface73d3b487c9a1969c70b32a30747 (diff)
Auto tests: Fix some MSVC warnings about integer conversions
Change-Id: Ibab8028ccdb9a4b02cadc6d2e85e8a0472f0d96f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/tools/collections/tst_collections.cpp2
-rw-r--r--tests/auto/testlib/selftests/counting/tst_counting.cpp2
-rw-r--r--tests/auto/testlib/selftests/printdatatags/tst_printdatatags.cpp2
-rw-r--r--tests/auto/testlib/selftests/printdatatagswithglobaltags/tst_printdatatagswithglobaltags.cpp2
-rw-r--r--tests/auto/testlib/selftests/signaldumper/tst_signaldumper.cpp2
-rw-r--r--tests/auto/testlib/selftests/silent/tst_silent.cpp2
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp2
7 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/corelib/tools/collections/tst_collections.cpp b/tests/auto/corelib/tools/collections/tst_collections.cpp
index 1e01c5a484..f10ecca335 100644
--- a/tests/auto/corelib/tools/collections/tst_collections.cpp
+++ b/tests/auto/corelib/tools/collections/tst_collections.cpp
@@ -2962,7 +2962,7 @@ public:
inline bool operator==(const AlignedClass &other) const { return i == other.i; }
inline bool operator<(const AlignedClass &other) const { return i < other.i; }
- friend inline int qHash(const AlignedClass &a) { return qHash(a.i); }
+ friend inline size_t qHash(const AlignedClass &a) { return qHash(a.i); }
};
using Aligned4 = AlignedClass<4>;
diff --git a/tests/auto/testlib/selftests/counting/tst_counting.cpp b/tests/auto/testlib/selftests/counting/tst_counting.cpp
index 56933c78b7..f5fb8dc849 100644
--- a/tests/auto/testlib/selftests/counting/tst_counting.cpp
+++ b/tests/auto/testlib/selftests/counting/tst_counting.cpp
@@ -292,7 +292,7 @@ int main(int argc, char *argv[])
#ifdef TESTLIB_VERBOSITY_ARG
std::vector<const char*> args(argv, argv + argc);
args.push_back(QT_STRINGIFY(TESTLIB_VERBOSITY_ARG));
- argc = args.size();
+ argc = int(args.size());
argv = const_cast<char**>(&args[0]);
#endif
diff --git a/tests/auto/testlib/selftests/printdatatags/tst_printdatatags.cpp b/tests/auto/testlib/selftests/printdatatags/tst_printdatatags.cpp
index 60a295c0f7..0962bbc952 100644
--- a/tests/auto/testlib/selftests/printdatatags/tst_printdatatags.cpp
+++ b/tests/auto/testlib/selftests/printdatatags/tst_printdatatags.cpp
@@ -76,7 +76,7 @@ int main(int argc, char *argv[])
{
std::vector<const char*> args(argv, argv + argc);
args.push_back("-datatags");
- argc = args.size();
+ argc = int(args.size());
argv = const_cast<char**>(&args[0]);
QTEST_MAIN_IMPL(tst_PrintDataTags)
diff --git a/tests/auto/testlib/selftests/printdatatagswithglobaltags/tst_printdatatagswithglobaltags.cpp b/tests/auto/testlib/selftests/printdatatagswithglobaltags/tst_printdatatagswithglobaltags.cpp
index 6fea34467a..e9456cc110 100644
--- a/tests/auto/testlib/selftests/printdatatagswithglobaltags/tst_printdatatagswithglobaltags.cpp
+++ b/tests/auto/testlib/selftests/printdatatagswithglobaltags/tst_printdatatagswithglobaltags.cpp
@@ -92,7 +92,7 @@ int main(int argc, char *argv[])
{
std::vector<const char*> args(argv, argv + argc);
args.push_back("-datatags");
- argc = args.size();
+ argc = int(args.size());
argv = const_cast<char**>(&args[0]);
QTEST_MAIN_IMPL(tst_PrintDataTagsWithGlobalTags)
diff --git a/tests/auto/testlib/selftests/signaldumper/tst_signaldumper.cpp b/tests/auto/testlib/selftests/signaldumper/tst_signaldumper.cpp
index 8ed9858087..aa38c59d1f 100644
--- a/tests/auto/testlib/selftests/signaldumper/tst_signaldumper.cpp
+++ b/tests/auto/testlib/selftests/signaldumper/tst_signaldumper.cpp
@@ -428,7 +428,7 @@ int main(int argc, char *argv[])
{
std::vector<const char*> args(argv, argv + argc);
args.push_back("-vs");
- argc = args.size();
+ argc = int(args.size());
argv = const_cast<char**>(&args[0]);
QTEST_MAIN_IMPL(tst_Signaldumper)
diff --git a/tests/auto/testlib/selftests/silent/tst_silent.cpp b/tests/auto/testlib/selftests/silent/tst_silent.cpp
index 7d64efffa2..13a832d0b7 100644
--- a/tests/auto/testlib/selftests/silent/tst_silent.cpp
+++ b/tests/auto/testlib/selftests/silent/tst_silent.cpp
@@ -106,7 +106,7 @@ int main(int argc, char *argv[])
{
std::vector<const char*> args(argv, argv + argc);
args.push_back("-silent");
- argc = args.size();
+ argc = int(args.size());
argv = const_cast<char**>(&args[0]);
QTEST_MAIN_IMPL(tst_Silent)
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp
index def96e8a65..beda0f739e 100644
--- a/tests/auto/testlib/selftests/tst_selftests.cpp
+++ b/tests/auto/testlib/selftests/tst_selftests.cpp
@@ -1220,7 +1220,7 @@ int main(int argc, char **argv)
rebaseMode = RebaseAll;
args.erase(rebaseArgument);
- argc = args.size();
+ argc = int(args.size());
argv = const_cast<char**>(&args[0]);
}