Commit edbaea4f authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

C++: Use Utils::FileName for Usage::path

Change-Id: I1d22333ad60d229202db5d372d00019b5870e60f
Reviewed-by: Nikolai Kosjar's avatarNikolai Kosjar <nikolai.kosjar@qt.io>
parent 2f7384dd
......@@ -170,7 +170,7 @@ void FindUsages::reportResult(unsigned tokenIndex)
const int len = tk.utf16chars();
const Usage u(_doc->fileName(), lineText, line, col, len);
const Usage u(Utils::FileName::fromString(_doc->fileName()), lineText, line, col, len);
_usages.append(u);
_references.append(tokenIndex);
}
......
......@@ -30,6 +30,7 @@
#include "TypeOfExpression.h"
#include <cplusplus/ASTVisitor.h>
#include <utils/fileutils.h>
#include <QSet>
......@@ -39,11 +40,11 @@ class CPLUSPLUS_EXPORT Usage
{
public:
Usage() = default;
Usage(const QString &path, const QString &lineText, int line, int col, int len)
Usage(const Utils::FileName &path, const QString &lineText, int line, int col, int len)
: path(path), lineText(lineText), line(line), col(col), len(len) {}
public:
QString path;
Utils::FileName path;
QString lineText;
int line = 0;
int col = 0;
......
......@@ -469,7 +469,7 @@ static void displayResults(SearchResult *search, QFutureWatcher<Usage> *watcher,
{
for (int index = first; index != last; ++index) {
Usage result = watcher->future().resultAt(index);
search->addResult(result.path,
search->addResult(result.path.toString(),
result.line,
result.lineText,
result.col,
......@@ -536,7 +536,7 @@ restart_search:
if (macro.name() == useMacro.name()) {
unsigned column;
const QString &lineSource = matchingLine(use.bytesBegin(), source, &column);
usages.append(Usage(fileName.toString(), lineSource, use.beginLine(), column,
usages.append(Usage(fileName, lineSource, use.beginLine(), column,
useMacro.nameToQString().size()));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment