From 874eb8b44b3ca9cfab63372af10886d16dfc327d Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Thu, 12 May 2016 19:02:33 +0300 Subject: QtNetwork: use QStringRef to optimize memory allocation Replace substring functions that return QString with corresponding functions that return QStringRef where it's possible. Change-Id: Id7f70e5bd72c91ed210ec463aad1d84fe3b40c15 Reviewed-by: Timur Pocheptsov --- src/network/access/qftp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/network/access/qftp.cpp') diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp index 23ec390ae5..19b519243c 100644 --- a/src/network/access/qftp.cpp +++ b/src/network/access/qftp.cpp @@ -1218,7 +1218,7 @@ bool QFtpPI::startNextCmd() pendingCommands.pop_front(); #if defined(QFTPPI_DEBUG) - qDebug("QFtpPI send: %s", currentCmd.left(currentCmd.length()-2).toLatin1().constData()); + qDebug("QFtpPI send: %s", currentCmd.leftRef(currentCmd.length() - 2).toLatin1().constData()); #endif state = Waiting; commandSocket.write(currentCmd.toUtf8()); -- cgit v1.2.3