forked from qt-creator/qt-creator
qmljs: (QString -> Utils::FilePath)++
convert more QString containing paths to Utils::FilePath Change-Id: I1219d7d147993e48cfa641dc9bea72ab38c90f51 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
committed by
Tim Jenssen
parent
0bb272d411
commit
fd89043de2
@@ -45,7 +45,7 @@ QmlJsTodoItemsScanner::QmlJsTodoItemsScanner(const KeywordList &keywordList, QOb
|
||||
setParams(keywordList);
|
||||
}
|
||||
|
||||
bool QmlJsTodoItemsScanner::shouldProcessFile(const QString &fileName)
|
||||
bool QmlJsTodoItemsScanner::shouldProcessFile(const Utils::FilePath &fileName)
|
||||
{
|
||||
QmlJS::ModelManagerInterface *modelManager = QmlJS::ModelManagerInterface::instance();
|
||||
foreach (const QmlJS::ModelManagerInterface::ProjectInfo &info, modelManager->projectInfos()) {
|
||||
@@ -63,8 +63,8 @@ void QmlJsTodoItemsScanner::scannerParamsChanged()
|
||||
|
||||
QmlJS::ModelManagerInterface *modelManager = QmlJS::ModelManagerInterface::instance();
|
||||
|
||||
QStringList filesToBeUpdated;
|
||||
foreach (const QmlJS::ModelManagerInterface::ProjectInfo &info, modelManager->projectInfos())
|
||||
Utils::FilePaths filesToBeUpdated;
|
||||
for (const QmlJS::ModelManagerInterface::ProjectInfo &info : modelManager->projectInfos())
|
||||
filesToBeUpdated << info.sourceFiles;
|
||||
|
||||
modelManager->updateSourceFiles(filesToBeUpdated, false);
|
||||
@@ -89,12 +89,12 @@ void QmlJsTodoItemsScanner::processDocument(QmlJS::Document::Ptr doc)
|
||||
quint32 startLine = sourceLocation.startLine;
|
||||
for (int j = 0; j < commentLines.count(); ++j) {
|
||||
const QString &commentLine = commentLines.at(j);
|
||||
processCommentLine(doc->fileName(), commentLine, startLine + j, itemList);
|
||||
processCommentLine(doc->fileName().toString(), commentLine, startLine + j, itemList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
emit itemsFetched(doc->fileName(), itemList);
|
||||
emit itemsFetched(doc->fileName().toString(), itemList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#include "todoitemsscanner.h"
|
||||
|
||||
#include <utils/filepath.h>
|
||||
#include <qmljs/qmljsmodelmanagerinterface.h>
|
||||
|
||||
namespace Todo {
|
||||
@@ -39,7 +40,7 @@ public:
|
||||
explicit QmlJsTodoItemsScanner(const KeywordList &keywordList, QObject *parent = nullptr);
|
||||
|
||||
protected:
|
||||
bool shouldProcessFile(const QString &fileName);
|
||||
bool shouldProcessFile(const Utils::FilePath &fileName);
|
||||
void scannerParamsChanged() override;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user