diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-10-02 18:08:49 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-04 01:19:38 +0200 |
commit | f191fe7cab5a049d484b15fa65b3ffd7ee18c27b (patch) | |
tree | 663210a1376388338d7d3933ba463bc03a11d571 /tests | |
parent | 1c1771effc8b4ebdb5532bdfef063d292407f8c0 (diff) |
Fix potential crash: adding int to string
qtbase/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp:652:36: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
f.write(QByteArray("i am " + i));
~~~~~~~~^~~
qtbase/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp:652:36: note: use array indexing to silence this warning
f.write(QByteArray("i am " + i));
^
& [ ]
Change-Id: Icc966559be3c2cde3416193b8a1ddab7e0323ade
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp index 20ef7b5a76..fda6519d82 100644 --- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp +++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp @@ -649,7 +649,7 @@ void tst_QFileSystemWatcher::signalsEmittedAfterFileMoved() for (int i = 0; i < 10; i++) { QFile f(testDir.filePath(QString("test%1.txt").arg(i))); QVERIFY(f.open(QIODevice::WriteOnly)); - f.write(QByteArray("i am " + i)); + f.write(QByteArray("i am ") + QByteArray::number(i)); f.close(); } |