summaryrefslogtreecommitdiffstats
path: root/src/network/access
diff options
context:
space:
mode:
authorAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-07-08 13:51:06 +0300
committerAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-07-15 08:23:04 +0000
commite46e112eb10850801218bd810ecaeb8fd29f4c34 (patch)
treeeff93300d653228d662f3fbcf82ec83b14933248 /src/network/access
parent120ba68882883c58415cb4ee285b0eba4192e76e (diff)
Optimize string usage
Use QStringBuilder more. Use QL1S directly, without QString construction. Change-Id: Iad844391367681fc1013b9725403d009e7c346e6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/network/access')
-rw-r--r--src/network/access/qnetworkaccessftpbackend.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/network/access/qnetworkaccessftpbackend.cpp b/src/network/access/qnetworkaccessftpbackend.cpp
index 153a33f782..d242bdba82 100644
--- a/src/network/access/qnetworkaccessftpbackend.cpp
+++ b/src/network/access/qnetworkaccessftpbackend.cpp
@@ -306,8 +306,6 @@ void QNetworkAccessFtpBackend::ftpDone()
state = CheckingFeatures;
if (operation() == QNetworkAccessManager::GetOperation) {
// send help command to find out if server supports "SIZE" and "MDTM"
- QString command = url().path();
- command.prepend(QLatin1String("%1 "));
helpId = ftp->rawCommand(QLatin1String("HELP")); // get supported commands
} else {
ftpDone();
@@ -316,14 +314,13 @@ void QNetworkAccessFtpBackend::ftpDone()
state = Statting;
if (operation() == QNetworkAccessManager::GetOperation) {
// logged in successfully, send the stat requests (if supported)
- QString command = url().path();
- command.prepend(QLatin1String("%1 "));
+ const QString path = url().path();
if (supportsSize) {
ftp->rawCommand(QLatin1String("TYPE I"));
- sizeId = ftp->rawCommand(command.arg(QLatin1String("SIZE"))); // get size
+ sizeId = ftp->rawCommand(QLatin1String("SIZE ") + path); // get size
}
if (supportsMdtm)
- mdtmId = ftp->rawCommand(command.arg(QLatin1String("MDTM"))); // get modified time
+ mdtmId = ftp->rawCommand(QLatin1String("MDTM ") + path); // get modified time
if (!supportsSize && !supportsMdtm)
ftpDone(); // no commands sent, move to the next state
} else {