diff options
author | Alessandro Portale <alessandro.portale@qt.io> | 2019-01-17 01:38:54 +0100 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@qt.io> | 2019-01-17 13:00:37 +0000 |
commit | 710e57a628c90259297150ab3a0ac28e315ca1af (patch) | |
tree | c9c2f66436d6b16ec37035775a334366987d17d9 /src/plugins/git/gitgrep.cpp | |
parent | 8acd583d1085f5b09cf2bef61c95166083885425 (diff) | |
download | qt-creator-710e57a628c90259297150ab3a0ac28e315ca1af.tar.gz |
Fix warning: "Use midRef() instead of mid()"
[-Wclazy-qstring-ref]
Change-Id: If8a0844b39377feb3772542559655854a92b93cd
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/git/gitgrep.cpp')
-rw-r--r-- | src/plugins/git/gitgrep.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/git/gitgrep.cpp b/src/plugins/git/gitgrep.cpp index 9d21655237..e02adf12cc 100644 --- a/src/plugins/git/gitgrep.cpp +++ b/src/plugins/git/gitgrep.cpp @@ -106,7 +106,7 @@ public: filePath.remove(0, m_ref.length()); single.fileName = m_directory + '/' + filePath; const int textSeparator = line.indexOf(QChar::Null, lineSeparator + 1); - single.lineNumber = line.mid(lineSeparator + 1, textSeparator - lineSeparator - 1).toInt(); + single.lineNumber = line.midRef(lineSeparator + 1, textSeparator - lineSeparator - 1).toInt(); QString text = line.mid(textSeparator + 1); QRegularExpression regexp; QVector<Match> matches; |