diff options
author | hjk <hjk@qt.io> | 2019-05-28 13:49:26 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-05-28 12:23:26 +0000 |
commit | 473a741c9fcf09febba312464fab8385e2351181 (patch) | |
tree | 2d328a090993cb5c5fd34b43e9468bcbf7e4d4d0 /src/plugins/qmlprofiler | |
parent | 4704f49fbb1201ebf10ab9dbaed0275ff25faba8 (diff) |
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>
Diffstat (limited to 'src/plugins/qmlprofiler')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilertextmark.cpp | 4 | ||||
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilertextmark.h | 2 | ||||
-rw-r--r-- | src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp | 14 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertextmark.cpp b/src/plugins/qmlprofiler/qmlprofilertextmark.cpp index 6d7b69eb45..3630d6a2d2 100644 --- a/src/plugins/qmlprofiler/qmlprofilertextmark.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertextmark.cpp @@ -39,7 +39,7 @@ namespace QmlProfiler { namespace Internal { QmlProfilerTextMark::QmlProfilerTextMark(QmlProfilerViewManager *viewManager, int typeId, - const FileName &fileName, int lineNumber) : + const FilePath &fileName, int lineNumber) : TextMark(fileName, lineNumber, Constants::TEXT_MARK_CATEGORY, 3.5), m_viewManager(viewManager), m_typeIds(1, typeId) { @@ -116,7 +116,7 @@ void QmlProfilerTextMarkModel::createMarks(QmlProfilerViewManager *viewManager, lineNumber = id.lineNumber; m_marks << new QmlProfilerTextMark(viewManager, id.typeId, - FileName::fromString(fileName), + FilePath::fromString(fileName), id.lineNumber); } } diff --git a/src/plugins/qmlprofiler/qmlprofilertextmark.h b/src/plugins/qmlprofiler/qmlprofilertextmark.h index 8ed4576ea1..5b529cd3c1 100644 --- a/src/plugins/qmlprofiler/qmlprofilertextmark.h +++ b/src/plugins/qmlprofiler/qmlprofilertextmark.h @@ -36,7 +36,7 @@ class QmlProfilerTextMark : public TextEditor::TextMark { public: QmlProfilerTextMark(QmlProfilerViewManager *viewManager, int typeId, - const Utils::FileName &fileName, int lineNumber); + const Utils::FilePath &fileName, int lineNumber); void addTypeId(int typeId); void paintIcon(QPainter *painter, const QRect &rect) const override; diff --git a/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp b/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp index 0f07737f5c..baef1083e8 100644 --- a/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp +++ b/src/plugins/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp @@ -45,7 +45,7 @@ class DummyProject : public ProjectExplorer::Project { Q_OBJECT public: - DummyProject(const Utils::FileName &file) : + DummyProject(const Utils::FilePath &file) : ProjectExplorer::Project(QString(), file, {}) { auto fileNode @@ -53,7 +53,7 @@ public: auto root = std::make_unique<ProjectExplorer::ProjectNode>(file); root->addNode(std::move(fileNode)); fileNode = std::make_unique<ProjectExplorer::FileNode>( - Utils::FileName::fromLatin1( + Utils::FilePath::fromLatin1( ":/qmlprofiler/tests/qmlprofilerdetailsrewriter_test.cpp"), ProjectExplorer::FileType::Source); root->addNode(std::move(fileNode)); @@ -181,10 +181,10 @@ void QmlProfilerDetailsRewriterTest::testPopulateFileFinder() QCOMPARE(m_rewriter.getLocalFile("Test.qml"), QString()); // Test that the rewriter will populate from available projects if given nullptr as parameter. - DummyProject *project1 = new DummyProject(Utils::FileName::fromString(":/nix.nix")); + DummyProject *project1 = new DummyProject(Utils::FilePath::fromString(":/nix.nix")); ProjectExplorer::SessionManager::addProject(project1); DummyProject *project2 = new DummyProject( - Utils::FileName::fromString(":/qmlprofiler/tests/Test.qml")); + Utils::FilePath::fromString(":/qmlprofiler/tests/Test.qml")); ProjectExplorer::SessionManager::addProject(project2); m_rewriter.populateFileFinder(nullptr); QCOMPARE(m_rewriter.getLocalFile("Test.qml"), @@ -203,7 +203,7 @@ void QmlProfilerDetailsRewriterTest::seedRewriter() QFutureInterface<void> result; QmlJS::PathsAndLanguages lPaths; lPaths.maybeInsert( - Utils::FileName::fromString(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath)), + Utils::FilePath::fromString(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath)), QmlJS::Dialect::Qml); QmlJS::ModelManagerInterface::importScan(result, QmlJS::ModelManagerInterface::workingCopy(), lPaths, m_modelManager, false); @@ -220,9 +220,9 @@ void QmlProfilerDetailsRewriterTest::seedRewriter() auto kit = std::make_unique<ProjectExplorer::Kit>(); ProjectExplorer::SysRootKitAspect::setSysRoot( - kit.get(), Utils::FileName::fromLatin1("/nowhere")); + kit.get(), Utils::FilePath::fromLatin1("/nowhere")); - DummyProject *project = new DummyProject(Utils::FileName::fromString(filename)); + DummyProject *project = new DummyProject(Utils::FilePath::fromString(filename)); ProjectExplorer::SessionManager::addProject(project); { |