From 1ac3850c6f7c3e466c9eda7f86f88ecba4f7c42c Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 22 Oct 2012 14:32:29 +0200 Subject: [PATCH] Also allow Qt5 to provide example manifests. Change-Id: I71630c7ea8d413949f57797b90672cc3d9b8778f Reviewed-by: Thomas Hartmann --- src/plugins/qtsupport/exampleslistmodel.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/plugins/qtsupport/exampleslistmodel.cpp b/src/plugins/qtsupport/exampleslistmodel.cpp index d732e90076a..31f47223adf 100644 --- a/src/plugins/qtsupport/exampleslistmodel.cpp +++ b/src/plugins/qtsupport/exampleslistmodel.cpp @@ -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)) {