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/projectexplorer/jsonwizard | |
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/projectexplorer/jsonwizard')
6 files changed, 13 insertions, 13 deletions
diff --git a/src/plugins/projectexplorer/jsonwizard/jsonkitspage.cpp b/src/plugins/projectexplorer/jsonwizard/jsonkitspage.cpp index 5faa5c3642..7501521be7 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonkitspage.cpp +++ b/src/plugins/projectexplorer/jsonwizard/jsonkitspage.cpp @@ -107,7 +107,7 @@ void JsonKitsPage::setupProjectFiles(const JsonWizard::GeneratorFiles &files) const QFileInfo fi(f.file.path()); const QString path = fi.absoluteFilePath(); Project *project = ProjectManager::openProject(Utils::mimeTypeForFile(fi), - Utils::FileName::fromString(path)); + Utils::FilePath::fromString(path)); if (project) { if (setupProject(project)) project->saveSettings(); diff --git a/src/plugins/projectexplorer/jsonwizard/jsonprojectpage.cpp b/src/plugins/projectexplorer/jsonwizard/jsonprojectpage.cpp index 45f332a2de..fcddd7ffd8 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonprojectpage.cpp +++ b/src/plugins/projectexplorer/jsonwizard/jsonprojectpage.cpp @@ -52,7 +52,7 @@ bool JsonProjectPage::validatePage() { if (isComplete() && useAsDefaultPath()) { // Store the path as default path for new projects if desired. - Core::DocumentManager::setProjectsDirectory(Utils::FileName::fromString(path())); + Core::DocumentManager::setProjectsDirectory(Utils::FilePath::fromString(path())); Core::DocumentManager::setUseProjectsDirectory(true); } diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp index 6939d0863e..a1d9c7d6f0 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp +++ b/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp @@ -503,7 +503,7 @@ void JsonWizard::openProjectForNode(Node *node) QTC_ASSERT(projNode, return); - Utils::optional<FileName> projFilePath = projNode->visibleAfterAddFileAction(); + Utils::optional<FilePath> projFilePath = projNode->visibleAfterAddFileAction(); if (projFilePath && !Core::EditorManager::openEditor(projFilePath.value().toString())) { auto errorMessage = QCoreApplication::translate("ProjectExplorer::JsonWizard", diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp index 6acc26a10e..530ace9ca7 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp +++ b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.cpp @@ -211,7 +211,7 @@ QList<Core::IWizardFactory *> JsonWizardFactory::createWizardFactories() const QString wizardFileName = QLatin1String(WIZARD_FILE); QList <Core::IWizardFactory *> result; - foreach (const Utils::FileName &path, searchPaths()) { + foreach (const Utils::FilePath &path, searchPaths()) { if (path.isEmpty()) continue; @@ -334,20 +334,20 @@ static QStringList environmentTemplatesPaths() return paths; } -Utils::FileNameList &JsonWizardFactory::searchPaths() +Utils::FilePathList &JsonWizardFactory::searchPaths() { - static Utils::FileNameList m_searchPaths = Utils::FileNameList() - << Utils::FileName::fromString(Core::ICore::userResourcePath() + QLatin1Char('/') + + static Utils::FilePathList m_searchPaths = Utils::FilePathList() + << Utils::FilePath::fromString(Core::ICore::userResourcePath() + QLatin1Char('/') + QLatin1String(WIZARD_PATH)) - << Utils::FileName::fromString(Core::ICore::resourcePath() + QLatin1Char('/') + + << Utils::FilePath::fromString(Core::ICore::resourcePath() + QLatin1Char('/') + QLatin1String(WIZARD_PATH)); for (const QString &environmentTemplateDirName : environmentTemplatesPaths()) - m_searchPaths << Utils::FileName::fromString(environmentTemplateDirName); + m_searchPaths << Utils::FilePath::fromString(environmentTemplateDirName); return m_searchPaths; } -void JsonWizardFactory::addWizardPath(const Utils::FileName &path) +void JsonWizardFactory::addWizardPath(const Utils::FilePath &path) { searchPaths().append(path); } diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.h b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.h index 06af1ebae8..5573bb2979 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.h +++ b/src/plugins/projectexplorer/jsonwizard/jsonwizardfactory.h @@ -55,7 +55,7 @@ class PROJECTEXPLORER_EXPORT JsonWizardFactory : public Core::IWizardFactory public: // Add search paths for wizard.json files. All subdirs are going to be checked. - static void addWizardPath(const Utils::FileName &path); + static void addWizardPath(const Utils::FilePath &path); // actual interface of the wizard factory: class Generator { @@ -96,7 +96,7 @@ private: static QList<IWizardFactory *> createWizardFactories(); static JsonWizardFactory *createWizardFactory(const QVariantMap &data, const QDir &baseDir, QString *errorMessage); - static Utils::FileNameList &searchPaths(); + static Utils::FilePathList &searchPaths(); static void setVerbose(int level); static int verbose(); diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizardgeneratorfactory.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizardgeneratorfactory.cpp index e0a06c824e..cf84f8b5e4 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonwizardgeneratorfactory.cpp +++ b/src/plugins/projectexplorer/jsonwizard/jsonwizardgeneratorfactory.cpp @@ -98,7 +98,7 @@ bool JsonWizardGenerator::formatFile(const JsonWizard *wizard, GeneratedFile *fi Indenter *indenter = nullptr; if (factory) { indenter = factory->createIndenter(&doc); - indenter->setFileName(Utils::FileName::fromString(file->path())); + indenter->setFileName(Utils::FilePath::fromString(file->path())); } if (!indenter) indenter = new NormalIndenter(&doc); |