diff options
| author | 2018-06-10 00:16:59 +0100 | |
|---|---|---|
| committer | 2018-11-14 08:59:22 -0500 | |
| commit | e4a34cb9b7d59a08a162d642fbbca8c08804b3ff (patch) | |
| tree | b3c5524281b4714da91729ffd19c9abbc95f8c62 /src/modules/objects/qtftp/qftp.cpp | |
| parent | Use C++14 (diff) | |
| download | KVIrc-e4a34cb9b7d59a08a162d642fbbca8c08804b3ff.tar.gz KVIrc-e4a34cb9b7d59a08a162d642fbbca8c08804b3ff.tar.bz2 KVIrc-e4a34cb9b7d59a08a162d642fbbca8c08804b3ff.zip | |
Apply all modernize-* fixes from clang-tidy except for modernize-use-auto
Diffstat (limited to 'src/modules/objects/qtftp/qftp.cpp')
| -rw-r--r-- | src/modules/objects/qtftp/qftp.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/modules/objects/qtftp/qftp.cpp b/src/modules/objects/qtftp/qftp.cpp index 565172619..935bdb8b0 100644 --- a/src/modules/objects/qtftp/qftp.cpp +++ b/src/modules/objects/qtftp/qftp.cpp @@ -43,6 +43,8 @@ //#define QFTPDTP_DEBUG #include "qftp.h" + +#include <utility> #include "qabstractsocket.h" #ifndef QT_NO_FTP @@ -90,14 +92,18 @@ public: QBasicAtomicInt QFtpCommand::idCounter = Q_BASIC_ATOMIC_INITIALIZER(1); QFtpCommand::QFtpCommand(QFtp::Command cmd, QStringList raw, const QByteArray & ba) - : command(cmd), rawCmds(raw), is_ba(true) + : command(cmd) + , rawCmds(std::move(raw)) + , is_ba(true) { id = idCounter.fetchAndAddRelaxed(1); data.ba = new QByteArray(ba); } QFtpCommand::QFtpCommand(QFtp::Command cmd, QStringList raw, QIODevice * dev) - : command(cmd), rawCmds(raw), is_ba(false) + : command(cmd) + , rawCmds(std::move(raw)) + , is_ba(false) { id = idCounter.fetchAndAddRelaxed(1); data.dev = dev; @@ -958,7 +964,7 @@ bool QFtpPI::processReply() // both examples where the parenthesis are used, and where // they are missing. We need to scan for the address and host // info. - QRegExp addrPortPattern(QLatin1String("(\\d+),(\\d+),(\\d+),(\\d+),(\\d+),(\\d+)")); + QRegExp addrPortPattern(QLatin1String(R"((\d+),(\d+),(\d+),(\d+),(\d+),(\d+))")); if(addrPortPattern.indexIn(replyText) == -1) { #if defined(QFTPPI_DEBUG) |
