summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-03-08 10:47:51 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-11 18:49:25 (GMT)
commita5857ca37d0ad49b7b944b92d58d3e519b253c6c (patch)
treea44a3197b047e5fc1f9eee68f8e82157e8721493 /tests/auto
parentdf2cc57a592e11b464ec21ea530dad33f6fbee3e (diff)
downloadQt-a5857ca37d0ad49b7b944b92d58d3e519b253c6c.zip
Qt-a5857ca37d0ad49b7b944b92d58d3e519b253c6c.tar.gz
Qt-a5857ca37d0ad49b7b944b92d58d3e519b253c6c.tar.bz2
Fix warnings in tests (CLANG).
- Statement has no effect - Adding int to string - Unspecified behavior when comparing character literals. Change-Id: Ie9cb9a1036b5cf5c62890685c60dee4af1ce7148 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp2
-rw-r--r--tests/auto/qlocalsocket/example/server/main.cpp2
-rw-r--r--tests/auto/qstringlistmodel/tst_qstringlistmodel.cpp3
3 files changed, 3 insertions, 4 deletions
diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
index b8f4a01..6864775 100644
--- a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
+++ b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp
@@ -525,7 +525,7 @@ void tst_qdeclarativevisualdatamodel::qaimRowsMoved()
SingleRoleModel model;
model.list.clear();
for (int i=0; i<30; i++)
- model.list << ("item " + i);
+ model.list << (QLatin1String("item ") + QString::number(i));
engine.rootContext()->setContextProperty("myModel", &model);
QDeclarativeVisualDataModel *obj = qobject_cast<QDeclarativeVisualDataModel*>(c.create());
diff --git a/tests/auto/qlocalsocket/example/server/main.cpp b/tests/auto/qlocalsocket/example/server/main.cpp
index 54b8789..d20b627 100644
--- a/tests/auto/qlocalsocket/example/server/main.cpp
+++ b/tests/auto/qlocalsocket/example/server/main.cpp
@@ -72,7 +72,7 @@ public:
if (n == 0)
break;
qDebug() << "Read" << str;
- if ("exit" == str)
+ if (!qstrcmp("exit", str))
qApp->quit();
if (socket->write(str, 100) < 0) {
diff --git a/tests/auto/qstringlistmodel/tst_qstringlistmodel.cpp b/tests/auto/qstringlistmodel/tst_qstringlistmodel.cpp
index b9c260f..2ecf571 100644
--- a/tests/auto/qstringlistmodel/tst_qstringlistmodel.cpp
+++ b/tests/auto/qstringlistmodel/tst_qstringlistmodel.cpp
@@ -169,8 +169,7 @@ void tst_QStringListModel::rowsAboutToBeRemoved_rowsRemoved_data()
QStringList strings3; strings3 << "One" << "Two" << "Three" << "Four" << "Five";
QStringList aboutto3; aboutto3 << "One" << "Two" << "Three" << "Four" << "Five";
- QStringList res3; res3 ;
- QTest::newRow( "data3" ) << strings3 << 0 << 5 << aboutto3 << res3;
+ QTest::newRow( "data3" ) << strings3 << 0 << 5 << aboutto3 << QStringList();
/* Not sure if this is a valid test */
QStringList strings4; strings4 << "One" << "Two" << "Three" << "Four" << "Five";