forked from qt-creator/qt-creator
Prefer Qt version to show examples from
Reviewed-by: Niels Weber
This commit is contained in:
@@ -240,6 +240,17 @@ void QtVersionManager::updateExamples()
|
|||||||
candidates.append(version);
|
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
|
// prefer versions with declarative examples
|
||||||
foreach (version, candidates) {
|
foreach (version, candidates) {
|
||||||
if (QDir(version->examplesPath()+"/declarative").exists()) {
|
if (QDir(version->examplesPath()+"/declarative").exists()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user