summaryrefslogtreecommitdiffstats
path: root/src/network/access/qftp.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-04-07 10:47:20 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2016-04-07 10:47:20 +0200
commitee0951d69b38f766e67262487be95b88501aa4a5 (patch)
tree116c334060500be340d4d61c99026316b0df3ce9 /src/network/access/qftp.cpp
parent0bb645b1ccc5a9d57b21cf0b2c4306b8e48c611c (diff)
parentd37239aa419ee4adff4b0a8d5c1403cadff72319 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: src/network/access/qftp.cpp src/widgets/itemviews/qheaderview.cpp src/widgets/itemviews/qlistview.cpp tests/auto/network/access/qftp/tst_qftp.cpp Change-Id: I9f928f25d45d8944dd60bb583f649fc1615bc5d9
Diffstat (limited to 'src/network/access/qftp.cpp')
-rw-r--r--src/network/access/qftp.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp
index ac6a5f46b1..59f18015a5 100644
--- a/src/network/access/qftp.cpp
+++ b/src/network/access/qftp.cpp
@@ -617,7 +617,7 @@ bool QFtpDTP::parseDir(const QByteArray &buffer, const QString &userName, QUrlIn
if (buffer.isEmpty())
return false;
- QString bufferStr = QString::fromLatin1(buffer).trimmed();
+ QString bufferStr = QString::fromUtf8(buffer).trimmed();
// Unix style FTP servers
QRegExp unixPattern(QLatin1String("^([\\-dl])([a-zA-Z\\-]{9,9})\\s+\\d+\\s+(\\S*)\\s+"
@@ -682,7 +682,7 @@ void QFtpDTP::socketReadyRead()
// does not exist, but rather write a text to the data socket
// -- try to catch these cases
if (line.endsWith("No such file or directory\r\n"))
- err = QString::fromLatin1(line);
+ err = QString::fromUtf8(line);
}
}
} else {
@@ -938,7 +938,7 @@ void QFtpPI::readyRead()
while (commandSocket.canReadLine()) {
// read line with respect to line continuation
- QString line = QString::fromLatin1(commandSocket.readLine());
+ QString line = QString::fromUtf8(commandSocket.readLine());
if (replyText.isEmpty()) {
if (line.length() < 3) {
// protocol error
@@ -970,7 +970,7 @@ void QFtpPI::readyRead()
replyText += line;
if (!commandSocket.canReadLine())
return;
- line = QString::fromLatin1(commandSocket.readLine());
+ line = QString::fromUtf8(commandSocket.readLine());
lineLeft4 = line.leftRef(4);
}
replyText += line.midRef(4); // strip reply code 'xyz '
@@ -1221,7 +1221,7 @@ bool QFtpPI::startNextCmd()
qDebug("QFtpPI send: %s", currentCmd.left(currentCmd.length()-2).toLatin1().constData());
#endif
state = Waiting;
- commandSocket.write(currentCmd.toLatin1());
+ commandSocket.write(currentCmd.toUtf8());
return true;
}