Commit 1ac3850c authored by Eike Ziller's avatar Eike Ziller
Browse files

Also allow Qt5 to provide example manifests.



Change-Id: I71630c7ea8d413949f57797b90672cc3d9b8778f
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent f9089c66
......@@ -336,10 +336,6 @@ QStringList ExamplesListModel::exampleSources(QString *examplesFallback, QString
QtVersionManager *versionManager = QtVersionManager::instance();
foreach (BaseQtVersion *version, versionManager->validVersions()) {
// There is no good solution for Qt 5 yet
if (version->qtVersion().majorVersion != 4)
continue;
QFileInfoList fis;
if (version->hasExamples())
fis << QDir(version->examplesPath()).entryInfoList(pattern);
......@@ -350,8 +346,9 @@ QStringList ExamplesListModel::exampleSources(QString *examplesFallback, QString
sources.append(fi.filePath());
return sources;
}
// check if this Qt version would be the preferred fallback
if (version->hasExamples() && version->hasDemos()) { // cached, so no performance hit
// check if this Qt version would be the preferred fallback, Qt 4 only
if (version->qtVersion().majorVersion == 4 && version->hasExamples() && version->hasDemos()) { // cached, so no performance hit
bool hasDeclarative = QDir(version->examplesPath() + QLatin1String("/declarative")).exists();
if (potentialExamplesFallback.isEmpty()
|| (!potentialFallbackHasDeclarative && hasDeclarative)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment