Commit 6dc975a8 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Tests: Fix MSVC errors and warnings



Change-Id: I7350b3fe751a76787a932e1346ad19377a6ea9bd
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@digia.com>
parent 1db74e38
......@@ -837,9 +837,9 @@ void tst_Dumpers::dumper_data()
"QByteArray buf3(str3);\n"
"unused(&buf1, &buf2, &buf3);\n")
% CoreProfile()
% Check("buf1", "\"" + QByteArray(1, 0xee) + "\"", "@QByteArray")
% Check("buf2", "\"" + QByteArray(1, 0xee) + "\"", "@QByteArray")
% Check("buf3", "\"\ee\"", "@QByteArray")
% Check("buf1", "\"" + QByteArray(1, (char)0xee) + "\"", "@QByteArray")
% Check("buf2", "\"" + QByteArray(1, (char)0xee) + "\"", "@QByteArray")
% Check("buf3", "\"\\ee\"", "@QByteArray")
% CheckType("str1", "char *");
QTest::newRow("QByteArray4")
......@@ -928,7 +928,7 @@ void tst_Dumpers::dumper_data()
"QFileInfo fi(\"C:\\Program Files\\tt\");\n"
"QString s = fi.absoluteFilePath();\n")
% Check("fi", "\"C:/Program Files/tt\"", "QFileInfo")
% Check("file", "\"C:\Program Files\t\"", "QFile")
% Check("file", "\"C:\\Program Files\\t\"", "QFile")
% Check("s", "\"C:/Program Files/tt\"", "QString");
#else
<< Data("#include <QFile>\n"
......@@ -2806,7 +2806,7 @@ void tst_Dumpers::dumper_data()
% Check("l.0", "[0]", "\" big, \"", "@QString")
% Check("l.1", "[1]", "\" World \"", "@QString");
QChar oUmlaut = QLatin1Char(0xf6);
QChar oUmlaut = QLatin1Char((char)0xf6);
QTest::newRow("String")
<< Data("#include <QString>",
"const wchar_t *w = L\"aöa\";\n"
......
......@@ -62,7 +62,7 @@ struct TestClass {
TestClass::TestClass() :
m_i(1),
m_f(M_E)
m_f((float)M_E)
{
}
......@@ -120,7 +120,7 @@ void MainWindow::complexBP(int *inc, QString inx)
qint64 i64 = 54354;
quint64 iu64 = 54354;
float r = M_PI;
float r = (float)M_PI;
double d = M_PI;
QString x = "Hallo ";
......
......@@ -3042,12 +3042,12 @@ namespace stdset {
{
typedef std::set<int> Set;
Set set;
set.insert(11.0);
set.insert(22.0);
set.insert(33.0);
set.insert(44.0);
set.insert(55.0);
set.insert(66.0);
set.insert(11);
set.insert(22);
set.insert(33);
set.insert(44);
set.insert(55);
set.insert(66);
Set::iterator it1 = set.begin();
Set::iterator it2 = it1; ++it2;
......
......@@ -46,5 +46,6 @@ exists($$QMAKE_INCDIR_QT/QtCore/private/qobject_p.h):DEFINES += USE_PRIVATE
exists(/usr/include/boost/optional.hpp): DEFINES += USE_BOOST
exists(/usr/include/eigen2/Eigen/Core): DEFINES += USE_EIGEN
win32-msvc*:DEFINES += _CRT_SECURE_NO_WARNINGS
# Use for semi-automated testing
#DEFINES += USE_AUTORUN=1
......@@ -150,9 +150,9 @@ int main(int argc, char *argv[])
}
}
int make_depend(QCoreApplication *app)
int make_depend(QCoreApplication *)
{
QStringList todo = app->arguments();
QStringList todo = QCoreApplication::arguments();
todo.removeFirst();
if (todo.isEmpty())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment