forked from qt-creator/qt-creator
Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be best-of-breed within Qt. Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -192,7 +192,7 @@ public:
|
||||
if (path == QFileInfo(currentFileName).path()) {
|
||||
// hack for the common case, next version should use the wizard
|
||||
ProjectExplorer::Node * oldFileNode =
|
||||
ProjectExplorer::ProjectTree::nodeForFile(Utils::FileName::fromString(currentFileName));
|
||||
ProjectExplorer::ProjectTree::nodeForFile(Utils::FilePath::fromString(currentFileName));
|
||||
if (oldFileNode) {
|
||||
ProjectExplorer::FolderNode *containingFolder = oldFileNode->parentFolderNode();
|
||||
if (containingFolder)
|
||||
|
||||
@@ -59,7 +59,7 @@ static Core::Id cartegoryForSeverity(QmlJS::Severity::Enum kind)
|
||||
return isWarning(kind) ? QMLJS_WARNING : QMLJS_ERROR;
|
||||
}
|
||||
|
||||
QmlJSTextMark::QmlJSTextMark(const FileName &fileName,
|
||||
QmlJSTextMark::QmlJSTextMark(const FilePath &fileName,
|
||||
const QmlJS::DiagnosticMessage &diagnostic,
|
||||
const QmlJSTextMark::RemovedFromEditorHandler &removedHandler)
|
||||
: TextEditor::TextMark(fileName, int(diagnostic.loc.startLine),
|
||||
@@ -70,7 +70,7 @@ QmlJSTextMark::QmlJSTextMark(const FileName &fileName,
|
||||
init(isWarning(diagnostic.kind), diagnostic.message);
|
||||
}
|
||||
|
||||
QmlJSTextMark::QmlJSTextMark(const FileName &fileName,
|
||||
QmlJSTextMark::QmlJSTextMark(const FilePath &fileName,
|
||||
const QmlJS::StaticAnalysis::Message &message,
|
||||
const QmlJSTextMark::RemovedFromEditorHandler &removedHandler)
|
||||
: TextEditor::TextMark(fileName, int(message.location.startLine),
|
||||
|
||||
@@ -38,10 +38,10 @@ class QmlJSTextMark : public TextEditor::TextMark
|
||||
public:
|
||||
using RemovedFromEditorHandler = std::function<void(QmlJSTextMark *)>;
|
||||
|
||||
QmlJSTextMark(const Utils::FileName &fileName,
|
||||
QmlJSTextMark(const Utils::FilePath &fileName,
|
||||
const QmlJS::DiagnosticMessage &diagnostic,
|
||||
const RemovedFromEditorHandler &removedHandler);
|
||||
QmlJSTextMark(const Utils::FileName &fileName,
|
||||
QmlJSTextMark(const Utils::FilePath &fileName,
|
||||
const QmlJS::StaticAnalysis::Message &message,
|
||||
const RemovedFromEditorHandler &removedHandler);
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ QmlTaskManager::QmlTaskManager()
|
||||
connect(&m_updateDelay, &QTimer::timeout, this, [this] { updateMessagesNow(); });
|
||||
}
|
||||
|
||||
static Tasks convertToTasks(const QList<DiagnosticMessage> &messages, const FileName &fileName, Core::Id category)
|
||||
static Tasks convertToTasks(const QList<DiagnosticMessage> &messages, const FilePath &fileName, Core::Id category)
|
||||
{
|
||||
Tasks result;
|
||||
foreach (const DiagnosticMessage &msg, messages) {
|
||||
@@ -71,7 +71,7 @@ static Tasks convertToTasks(const QList<DiagnosticMessage> &messages, const File
|
||||
return result;
|
||||
}
|
||||
|
||||
static Tasks convertToTasks(const QList<StaticAnalysis::Message> &messages, const FileName &fileName, Core::Id category)
|
||||
static Tasks convertToTasks(const QList<StaticAnalysis::Message> &messages, const FilePath &fileName, Core::Id category)
|
||||
{
|
||||
QList<DiagnosticMessage> diagnostics;
|
||||
foreach (const StaticAnalysis::Message &msg, messages)
|
||||
@@ -101,17 +101,17 @@ void QmlTaskManager::collectMessages(
|
||||
result.fileName = fileName;
|
||||
if (document->language().isFullySupportedLanguage()) {
|
||||
result.tasks = convertToTasks(document->diagnosticMessages(),
|
||||
FileName::fromString(fileName),
|
||||
FilePath::fromString(fileName),
|
||||
Constants::TASK_CATEGORY_QML);
|
||||
|
||||
if (updateSemantic) {
|
||||
result.tasks += convertToTasks(linkMessages.value(fileName),
|
||||
FileName::fromString(fileName),
|
||||
FilePath::fromString(fileName),
|
||||
Constants::TASK_CATEGORY_QML_ANALYSIS);
|
||||
|
||||
Check checker(document, context);
|
||||
result.tasks += convertToTasks(checker(),
|
||||
FileName::fromString(fileName),
|
||||
FilePath::fromString(fileName),
|
||||
Constants::TASK_CATEGORY_QML_ANALYSIS);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user