summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2020-06-17 22:53:53 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2020-06-25 09:54:16 +0200
commitd7ccd8cb4565c8643b158891c9de3187c1586dc9 (patch)
tree5f3fbd8a91cf2c460891453497f8e4b8ac2f82ba /tests/auto/gui
parent2df4991cb1a893522caac838d6c4edf5ad8da464 (diff)
Remove QByteArray's methods taking QString and their uses
[ChangeLog][QtCore][QByteArray] Remove method overloads taking QString as argument, all of which were equivalent to passing the toUtf8() of the string instead. Change-Id: I9251733a9b3711153b2faddbbc907672a7cba190 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/image/qimage/tst_qimage.cpp2
-rw-r--r--tests/auto/gui/image/qimagereader/tst_qimagereader.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp
index 38b3d28901..f9e94d826c 100644
--- a/tests/auto/gui/image/qimage/tst_qimage.cpp
+++ b/tests/auto/gui/image/qimage/tst_qimage.cpp
@@ -452,7 +452,7 @@ void tst_QImage::formatHandlersInput()
bool formatSupported = false;
for (QList<QByteArray>::Iterator it = formats.begin(); it != formats.end(); ++it) {
- if (*it == testFormat.toLower()) {
+ if (*it == testFormat.toLower().toUtf8()) {
formatSupported = true;
break;
}
diff --git a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
index 6001829854..bea7d610b8 100644
--- a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
+++ b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp
@@ -1803,7 +1803,7 @@ static QByteArray msgIgnoreFormatAndExtensionFail(const QString &sourceFileName,
QByteArray result = "Failure for '";
result += sourceFileName.toLocal8Bit();
result += "' as '";
- result += targetFileName;
+ result += targetFileName.toLocal8Bit();
result += "', detected as: '";
result += detectedFormat.toLocal8Bit();
result += '\'';
@@ -1825,7 +1825,7 @@ void tst_QImageReader::testIgnoresFormatAndExtension()
tempPath += QLatin1Char('/');
foreach (const QByteArray &f, formats) {
- if (f == extension)
+ if (f == extension.toLocal8Bit())
continue;
QFile tmp(tempPath + name + QLatin1Char('_') + expected + QLatin1Char('.') + f);