diff options
| author | Jarek Kobus <[email protected]> | 2022-09-05 19:06:37 +0200 |
|---|---|---|
| committer | Jarek Kobus <[email protected]> | 2022-09-06 07:02:15 +0000 |
| commit | a9eb732ce6763e22badd92fc8523cebe84b09a84 (patch) | |
| tree | a3af794b4ef6e1d41b356aed31cfa2fd69621d38 /src/plugins/git/gitgrep.cpp | |
| parent | b842620810ff2e604ce855167378ff19a7b66dfe (diff) | |
FileSearchResult: Use FilePath for fileName
This saves about 2 seconds out of 5 seconds spent in
displayResult() for converting from QString into
FilePath in main thread (use case: gitgrep with
2 million hits).
Change-Id: I6334e8559986501c34c90a5c7c6b4acc9a6953e0
Reviewed-by: <[email protected]>
Reviewed-by: hjk <[email protected]>
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 07345f8b2fa..5acabdfd597 100644 --- a/src/plugins/git/gitgrep.cpp +++ b/src/plugins/git/gitgrep.cpp @@ -85,7 +85,7 @@ public: QString filePath = line.left(lineSeparator); if (!m_ref.isEmpty() && filePath.startsWith(m_ref)) filePath.remove(0, m_ref.length()); - single.fileName = m_directory.pathAppended(filePath).toString(); + single.fileName = m_directory.pathAppended(filePath); const int textSeparator = line.indexOf(QChar::Null, lineSeparator + 1); single.lineNumber = line.mid(lineSeparator + 1, textSeparator - lineSeparator - 1).toInt(); QString text = line.mid(textSeparator + 1); |
