forked from qt-creator/qt-creator
Examples: Fix reading the category ordering from manifest
qtcreator_tutorials.xml contains ordering information for the tutorials,
and if we read that (first) we ignore any subsequent ordering that the
set of Qt examples defines (in qtdoc/examples-manifest.xml).
Only read the tutorials.xml if we are actually interested in tutorials.
Amends 08bbe885b4
Change-Id: I9148cc9f1060500f46be2bbc9c9ef6c2512c2f6c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
This commit is contained in:
@@ -363,7 +363,8 @@ void ExamplesViewController::updateExamples()
|
||||
|
||||
const QStringList sources = m_exampleSetModel->exampleSources(&examplesInstallPath,
|
||||
&demosInstallPath,
|
||||
&qtVersion);
|
||||
&qtVersion,
|
||||
m_isExamples);
|
||||
QStringList categoryOrder;
|
||||
QList<ExampleItem *> items;
|
||||
for (const QString &exampleSource : sources) {
|
||||
@@ -493,12 +494,15 @@ QtVersion *ExampleSetModel::findHighestQtVersion(const QtVersions &versions) con
|
||||
|
||||
QStringList ExampleSetModel::exampleSources(QString *examplesInstallPath,
|
||||
QString *demosInstallPath,
|
||||
QVersionNumber *qtVersion)
|
||||
QVersionNumber *qtVersion,
|
||||
bool isExamples)
|
||||
{
|
||||
QStringList sources;
|
||||
|
||||
if (!isExamples) {
|
||||
// Qt Creator shipped tutorials
|
||||
sources << ":/qtsupport/qtcreator_tutorials.xml";
|
||||
}
|
||||
|
||||
QString examplesPath;
|
||||
QString demosPath;
|
||||
|
@@ -41,7 +41,8 @@ public:
|
||||
bool selectExampleSet(int index);
|
||||
QStringList exampleSources(QString *examplesInstallPath,
|
||||
QString *demosInstallPath,
|
||||
QVersionNumber *qtVersion);
|
||||
QVersionNumber *qtVersion,
|
||||
bool isExamples);
|
||||
bool selectedQtSupports(const Utils::Id &target) const;
|
||||
|
||||
signals:
|
||||
|
Reference in New Issue
Block a user