forked from qt-creator/qt-creator
BaseQtVersion: Have examplesPath() return a FilePath
Change-Id: I6b37345022d7cdba4aef0af0ca2a825c8606062c Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -1275,9 +1275,9 @@ bool BaseQtVersion::hasExamples() const
|
||||
return d->m_hasExamples;
|
||||
}
|
||||
|
||||
QString BaseQtVersion::examplesPath() const
|
||||
FilePath BaseQtVersion::examplesPath() const
|
||||
{
|
||||
return QFileInfo(qmakeProperty("QT_INSTALL_EXAMPLES")).canonicalFilePath();
|
||||
return FilePath::fromString(QFileInfo(qmakeProperty("QT_INSTALL_EXAMPLES")).canonicalFilePath());
|
||||
}
|
||||
|
||||
QStringList BaseQtVersion::qtSoPaths() const
|
||||
@@ -1842,7 +1842,7 @@ bool BaseQtVersion::isSubProject(const FilePath &filePath) const
|
||||
return true;
|
||||
}
|
||||
|
||||
const QString &examples = examplesPath();
|
||||
const QString examples = examplesPath().toString();
|
||||
if (!examples.isEmpty() && filePath.isChildOf(QDir(examples)))
|
||||
return true;
|
||||
|
||||
|
@@ -143,11 +143,9 @@ public:
|
||||
QString qtVersionString() const;
|
||||
QtVersionNumber qtVersion() const;
|
||||
|
||||
bool hasExamples() const;
|
||||
QString examplesPath() const;
|
||||
|
||||
QStringList qtSoPaths() const;
|
||||
|
||||
bool hasExamples() const;
|
||||
bool hasDocumentation() const;
|
||||
QString documentationPath() const;
|
||||
|
||||
@@ -206,6 +204,7 @@ public:
|
||||
|
||||
Utils::FilePath headerPath() const;
|
||||
Utils::FilePath docsPath() const;
|
||||
Utils::FilePath examplesPath() const;
|
||||
Utils::FilePath libraryPath() const;
|
||||
Utils::FilePath pluginPath() const;
|
||||
Utils::FilePath qmlPath() const;
|
||||
|
@@ -578,7 +578,7 @@ QStringList ExampleSetModel::exampleSources(QString *examplesInstallPath, QStrin
|
||||
foreach (BaseQtVersion *version, QtVersionManager::versions()) {
|
||||
if (version->uniqueId() == qtId) {
|
||||
manifestScanPath = version->documentationPath();
|
||||
examplesPath = version->examplesPath();
|
||||
examplesPath = version->examplesPath().toString();
|
||||
demosPath = version->demosPath();
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user