code cleanup: use ByteArray.size() instead of strlen

Removes a size_t vs int warning

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2018-09-14 16:49:18 +02:00 committed by Dirk Hohndel
parent 00ef514da3
commit 7ab35f7858

View file

@ -1761,7 +1761,7 @@ void MainWindow::importTxtFiles(const QStringList fileNames)
for (int i = 0; i < fileNames.size(); ++i) {
fileNamePtr = QFile::encodeName(fileNames.at(i));
csv = fileNamePtr.data();
csv.replace(strlen(csv.data()) - 3, 3, "csv");
csv.replace(csv.size() - 3, 3, "csv");
QFileInfo check_file(csv);
if (check_file.exists() && check_file.isFile()) {