Commit Graph

10 Commits

Author SHA1 Message Date
Eike Ziller
2865f6eae0 Examples: Read and handle "documentation dependencies"
Some examples are defined in a Qt module (and therefore examples-
manifest), but have dependencies on other modules.

The example-manifests contain a `module` attribute for their
`instructionals` tag, and examples can contain "docdependencies" items
in their meta data, which are comma-separated lists of these module
names. Read the `module` attributes (the meta data is already
generically read) and check if the current set of examples-manifest
contains all required ones for an example. Hide it, if not.

Task-number: QTBUG-120759
Change-Id: Ib8ff80cf8a13965e57b5c4317e5d121c4127278b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-01-19 09:44:53 +00:00
Eike Ziller
08bbe885b4 Examples: Support manifest-defined category order
Reads a separate sorted list of categories from the manifest files.
The first of these lists that is found in the manifest files is used.
For example the Qt documentation defines the list in the manifest file
for qtdoc.

Change-Id: I57c2779862a5ebfc27707b53d43d4ed9e7e8c5f9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-24 11:02:18 +00:00
Eike Ziller
c43a2ee1c4 Use categories for Tutorials page
Instead of adding the category into the title with "Help: ..." etc, use
the actual categorized view that we already use for examples and
marketplace. Set the corresponding meta data in the manifest file and
read it also for tutorials.

Change-Id: Id9081518c1c0afee8d080af3ca8a5dca5cdde775
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-07-14 09:33:03 +00:00
Eike Ziller
90a6faed4e Merge remote-tracking branch 'origin/10.0' into 11.0
Conflicts:
	src/plugins/qtsupport/exampleslistmodel.cpp

Change-Id: Idbe0117ce810b4ab180a7c4f9b7b35c9c4b988e5
2023-05-25 15:49:57 +02:00
Eike Ziller
dd1a69e05f Fix crash when examples are in multiple categories
When items are added into multiple categories, we got into a double
delete when cleaning up, e.g. when changing the shown examples to a
different Qt version.

Sort copies into categories and delete the originals as a quickfix.
Cleaner would be if we didn't allocate them on the heap in the first
place.

Fixes: QTCREATORBUG-29197
Change-Id: I6490111aba87335b0f7189c4957ed1da8681806f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-25 10:38:45 +00:00
Eike Ziller
b542d47907 Examples: Read meta data, which includes categories
Task-number: QTCREATORBUG-28546
Change-Id: I11505d4f8b8eaef3f525185cd45757b6f41012ec
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
(cherry picked from commit e060f82fa5)
2023-04-13 07:14:18 +00:00
Eike Ziller
9144ab75f4 Add test for examples parsing
Change-Id: Id2ec8afcdbdff97e12b32b836c955552589081c4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
(cherry picked from commit 87b5176fd2)
2023-04-13 07:14:05 +00:00
Eike Ziller
9eb218aee7 Examples: Use "install" path as fallback
If neither relative nor install path of the example files exist.
This makes the error message that the file is not found more sensible.

Change-Id: I1a7d2acdb4017cdaac97af35d9d35b70c06323a6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-03-14 08:22:21 +00:00
Eike Ziller
e060f82fa5 Examples: Read meta data, which includes categories
Task-number: QTCREATORBUG-28546
Change-Id: I11505d4f8b8eaef3f525185cd45757b6f41012ec
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-03-13 07:21:44 +00:00
Eike Ziller
87b5176fd2 Add test for examples parsing
Change-Id: Id2ec8afcdbdff97e12b32b836c955552589081c4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-13 07:21:18 +00:00