CppEditor: Proliferate FilePath use

This includes one functional change: It drops some cleaning
of the path used to create the CppDocument, which is now
assumed to be done on the caller side.

Change-Id: I5e2a182028e4d5b56282ad85f4a5c665f081754f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
hjk
2022-11-23 10:28:47 +01:00
parent 8d645a506d
commit 9d80e23256
23 changed files with 61 additions and 52 deletions

View File

@@ -27,6 +27,7 @@
#include <map>
using namespace CPlusPlus;
using namespace Utils;
static const bool debug = qEnvironmentVariableIsSet("QTC_LOOKUPCONTEXT_DEBUG");
@@ -666,7 +667,7 @@ class ExpressionDocumentHelper
public:
// Set up an expression document with an external Control
ExpressionDocumentHelper(const QByteArray &utf8code, Control *control)
: document(Document::create(QLatin1String("<completion>")))
: document(Document::create(FilePath::fromPathPart(u"<completion>")))
{
Control *oldControl = document->swapControl(control);
delete oldControl->diagnosticClient();