aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qtsupport/exampleslistmodel.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2024-01-05 15:27:45 +0100
committerEike Ziller <eike.ziller@qt.io>2024-01-10 11:27:10 +0000
commitc07b45348625454d9d0eb9e90d765290e0b7de09 (patch)
treef669d2dbf21e517ea9013283653dd42de7809216 /src/plugins/qtsupport/exampleslistmodel.cpp
parent7a46bbe66739015528696e0ff74359fc95a779f7 (diff)
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 08bbe885b49d6782178f0bc7b19c1bb162633666 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>
Diffstat (limited to 'src/plugins/qtsupport/exampleslistmodel.cpp')
-rw-r--r--src/plugins/qtsupport/exampleslistmodel.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/plugins/qtsupport/exampleslistmodel.cpp b/src/plugins/qtsupport/exampleslistmodel.cpp
index 3d67706b77..d8593cb1fd 100644
--- a/src/plugins/qtsupport/exampleslistmodel.cpp
+++ b/src/plugins/qtsupport/exampleslistmodel.cpp
@@ -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;
- // Qt Creator shipped tutorials
- sources << ":/qtsupport/qtcreator_tutorials.xml";
+ if (!isExamples) {
+ // Qt Creator shipped tutorials
+ sources << ":/qtsupport/qtcreator_tutorials.xml";
+ }
QString examplesPath;
QString demosPath;