Prefer Qt version to show examples from

Reviewed-by: Niels Weber
This commit is contained in:
Daniel Molkentin
2010-10-25 19:33:35 +02:00
parent 912ad8989e
commit ac18c37417

View File

@@ -240,6 +240,17 @@ void QtVersionManager::updateExamples()
candidates.append(version);
}
// in SDKs, we want to prefer the Qt version shipping with the SDK
QString preferred = Core::ICore::instance()->settings()->value("General/PreferredQMakePath").toString();
if (!preferred.isEmpty()) {
foreach (version, candidates) {
if (version->qmakeCommand() == preferred) {
emit updateExamples(version->examplesPath(), version->demosPath(), version->sourcePath());
return;
}
}
}
// prefer versions with declarative examples
foreach (version, candidates) {
if (QDir(version->examplesPath()+"/declarative").exists()) {