diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2017-01-17 14:48:08 +0300 |
---|---|---|
committer | Alexander Volkov <a.volkov@rusbitech.ru> | 2017-01-25 14:28:34 +0000 |
commit | 69e233d2ba4a3e8762726aa3a168777f1df460c4 (patch) | |
tree | 353cc2792a1ebdc5bc36b505491bf75d7f580074 /src/corelib/io/qfsfileengine_unix.cpp | |
parent | 0c415793b9622eef2148fdd21a2f3c2394a78d99 (diff) |
Avoid detaching temporary objects
Found with clazy [detaching-temporary]:
- don't call QList::first() on temporary
- don't call QString::operator[]() on temporary
- don't call QByteArray::data() on temporary
Change-Id: I390962ef6020e4fcb0b0e447a63eed1e314d18a4
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Diffstat (limited to 'src/corelib/io/qfsfileengine_unix.cpp')
-rw-r--r-- | src/corelib/io/qfsfileengine_unix.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index b2e3df79b8..ca5af924e9 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -629,7 +629,7 @@ QString QFSFileEngine::fileName(FileName file) const bool QFSFileEngine::isRelativePath() const { Q_D(const QFSFileEngine); - return d->fileEntry.filePath().length() ? d->fileEntry.filePath()[0] != QLatin1Char('/') : true; + return d->fileEntry.filePath().length() ? d->fileEntry.filePath().at(0) != QLatin1Char('/') : true; } uint QFSFileEngine::ownerId(FileOwner own) const |