forked from qt-creator/qt-creator
Qt Examples: Fix that supported device information was not updated
When the user selects a different example set / Qt version from the drop down, we must in all cases update the cached "supported device type", which is later used to e.g. filter out all non-Android examples when selecting an Android Qt version. We only did that in case the selected example set was backed internally by a QtVersion pointer, but there are example sets where that isn't the case. The issue is reproducible by e.g. installing Qt 5.15 for Android and Qt 6.3 for multiple platforms. For the latter we only show a single entry in the drop down, and do not have a single QtVersion pointer as a backing. When switching the drop down from Qt 5.15 Android to Qt 6.3, only examples with the "android" tag are shown, even though our Qt 6.3 installation supports more than that. If we don't have a QtVersion pointer we now assume that everything is supported. Fixes: QTCREATORBUG-27017 Change-Id: I7a7666c3cfec098d85cfcbb0062c63395af6d0c0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -682,6 +682,8 @@ void ExampleSetModel::selectExampleSet(int index)
|
||||
if (getType(m_selectedExampleSetIndex) == ExampleSetModel::QtExampleSet) {
|
||||
QtVersion *selectedQtVersion = QtVersionManager::version(getQtId(m_selectedExampleSetIndex));
|
||||
m_selectedQtTypes = selectedQtVersion->targetDeviceTypes();
|
||||
} else {
|
||||
m_selectedQtTypes.clear();
|
||||
}
|
||||
emit selectedExampleSetChanged(m_selectedExampleSetIndex);
|
||||
}
|
||||
|
Reference in New Issue
Block a user