BaseQtVersion: Use FilePath for demosPath()

Change-Id: I83bcbf64a37faf0f88c6b1f655ff3d5c5d7e623c
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Tobias Hunger
2019-09-30 15:48:31 +02:00
parent 3404a44ee1
commit 67934ccaaa
3 changed files with 7 additions and 7 deletions

View File

@@ -1257,9 +1257,9 @@ bool BaseQtVersion::hasDemos() const
return d->m_hasDemos;
}
QString BaseQtVersion::demosPath() const
FilePath BaseQtVersion::demosPath() const
{
return QFileInfo(qmakeProperty("QT_INSTALL_DEMOS")).canonicalFilePath();
return FilePath::fromString(QFileInfo(qmakeProperty("QT_INSTALL_DEMOS")).canonicalFilePath());
}
QString BaseQtVersion::frameworkInstallPath() const
@@ -1846,7 +1846,7 @@ bool BaseQtVersion::isSubProject(const FilePath &filePath) const
if (!examples.isEmpty() && filePath.isChildOf(QDir(examples)))
return true;
const QString &demos = demosPath();
const QString demos = demosPath().toString();
if (!demos.isEmpty() && filePath.isChildOf(QDir(demos)))
return true;

View File

@@ -147,10 +147,9 @@ public:
bool hasExamples() const;
bool hasDocumentation() const;
QString documentationPath() const;
bool hasDemos() const;
QString demosPath() const;
QString documentationPath() const;
QString frameworkInstallPath() const;
@@ -203,6 +202,7 @@ public:
virtual ProjectExplorer::Tasks validateKit(const ProjectExplorer::Kit *k);
Utils::FilePath headerPath() const;
Utils::FilePath demosPath() const;
Utils::FilePath docsPath() const;
Utils::FilePath examplesPath() const;
Utils::FilePath libraryPath() const;

View File

@@ -579,7 +579,7 @@ QStringList ExampleSetModel::exampleSources(QString *examplesInstallPath, QStrin
if (version->uniqueId() == qtId) {
manifestScanPath = version->documentationPath();
examplesPath = version->examplesPath().toString();
demosPath = version->demosPath();
demosPath = version->demosPath().toString();
break;
}
}