Supposedly that is the version that will have a sensible amount of
examples sorted into categories to not look weird.
It is still possible to force showing the categories with
QTC_USE_EXAMPLE_CATEGORIES.
Fixes: QTCREATORBUG-28546
Change-Id: Ia1e6afa97d9b1b86763c29209fcf6f674d0844f5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Limit the items shown for categories to a single row (two rows for first,
"featured" category), and add a "Show All" link/button in the heading,
that shows all items in that category only (with a "Back" button).
The "Search in Examples" input ignores categories.
Change-Id: I7c8561a306ad86c3b537587621d3fd030cd08af8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Optionally parses example categories from the examples manifests, when
setting the environment variable QTC_USE_EXAMPLE_CATEGORIES (can be done
in Qt Creator's Environment > System > Environment settings).
It doesn't make sense to unconditionally enable that yet, because only
few examples actually have categories so far, so we will need to wait
until some Qt version is suited for enabling this.
If an example set does not provide categories, the "highlighted"
property is used to provide a "Featured" category, as before.
If an example set does provide categories, these are shown instead,
sorted alphabetically, and examples with the "highlighted" property
are put at the front of the category, overriding the otherwise
alphabetical listing inside the categories. Examples without a
category are put into a separate "Other" category at the end.
Task-number: QTCREATORBUG-28546
Change-Id: I7ca312686eae13e16961def1b4b36ffd7050a447
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
(cherry picked from commit a2de016f64)
and file. To make it auto-testable.
Change-Id: I19d263bf080a0089eb9a4ec0f379c52446771c0a
Reviewed-by: David Schulz <david.schulz@qt.io>
(cherry picked from commit 7e75097447)
Reviewed-by: hjk <hjk@qt.io>
Optionally parses example categories from the examples manifests, when
setting the environment variable QTC_USE_EXAMPLE_CATEGORIES (can be done
in Qt Creator's Environment > System > Environment settings).
It doesn't make sense to unconditionally enable that yet, because only
few examples actually have categories so far, so we will need to wait
until some Qt version is suited for enabling this.
If an example set does not provide categories, the "highlighted"
property is used to provide a "Featured" category, as before.
If an example set does provide categories, these are shown instead,
sorted alphabetically, and examples with the "highlighted" property
are put at the front of the category, overriding the otherwise
alphabetical listing inside the categories. Examples without a
category are put into a separate "Other" category at the end.
Task-number: QTCREATORBUG-28546
Change-Id: I7ca312686eae13e16961def1b4b36ffd7050a447
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
By using aggregation for the pixmap fetching.
Change-Id: I6647cc6fa7995581c692050af32e41ba9aa86491
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
It seems to have been a workaround for taking tags into account for the
filtering, but that is done completely different nowadays, and not with
the DisplayRole.
Change-Id: Iff73c1a33de4a40c4919794a8644fdc4af710ba1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...
While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only
Change was done by running
find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;
Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
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>
And instead of qgetenv.
Takes Qt Creator's setting at "Environment > System > Environment" into
account, which makes it easier on some platforms to set them (e.g.
macOS), can be configured differently in different settings paths, and
potentially can be changed at runtime (depending on usage).
Change-Id: I2217f13336ec816d28bd447ccd14a405bff2a3a7
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reduce maintenance by removing a feature that broke in 7.0, caused
assertions. The absence of the cropper won't most likely be noticed,
because the examples thumbnail size was increased quite a bit in the
last Welcome Screen redesign.
Instead of cropping, we now always scale the thumbnail to
ListModel::defaultImageSize. As a benefit of this simplification, the
thumbnail is now also High-DPI enabled.
Fixes: QTCREATORBUG-27141
Change-Id: I57cafb000c3095dd387cd96814b6e946980b2aed
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Both the "normal" Qt node adds an example set, and the Android/
Automotive node adds another one with the same paths, leading to e.g.
two items "Qt6 6.2.4" in the dropdown for the examples.
De-duplicate example sets with the same paths, which we already do if an
example set and a Qt version itself refer to the same path.
Fixes: QTCREATORBUG-27294
Change-Id: Ia469045b2f2812612fcd8328bdfd223479b8d449
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
In the case of the bug report, there is no previously selected index,
and no valid Qt version, so setting the index to the highest Qt version
doesn't result in anything. Make sure to select something in the
dropdown, if we have any item there at all, even if our heuristics don't
come up with an optimal selection.
Fixes: QTCREATORBUG-26791
Change-Id: I2327594f0fd36e312aa71d1990e8ccab4a488367
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... as wrapper around FileUtils::normalizePathName, and use it
in some places.
Change-Id: I42792e1f175b8119c8db930eae80a9f822ac70fa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The examples and marketplace pages show images that are decoded from
data buffers. This happened without specifying the encoding format,
which triggers image auto-detection.
The negligible overhead of the auto-detection is usually not a problem,
but the probing of image QImageIOHandlers that goes along with auto-
detection can emit warnings. A concrete example is a warning in the TGA
plugin which was added in Qt 5.15.1.
Task-number: QTCREATORBUG-24853
Change-Id: I596604bde7621acf92e825f45e0c23ac4e90b78d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The coreplugin/id.h header is kept for downstream for now.
Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
In the welcome page Examples tab, Qt for Android kits shows all
available examples which might not be properly tested or intended for
Android. Thus, such a kit should only lists examples tagged for android.
Task-number: QTBUG-80716
Change-Id: I22dafb5d5829cb2f6b3c55ff6f2d251c0ee08557
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
...and move it to Core.
Preparation for easier re-usage to avoid re-implementing
the same more often.
Change-Id: I4c902e74e63dd5416f2a52b4b08900e28e2a052a
Reviewed-by: hjk <hjk@qt.io>
As long as we are able to find examples or demos for them.
Android Qt versions can be "invalid" until the device settings are
fixed, but that doesn't prevent us from showing examples.
Task-number: QTCREATORBUG-23058
Change-Id: I8d3351a3f31727b062b37f5bd462709a9d6ef9dd
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
Use docsPath() over documentationPath() since that fits better into
the naming scheme of the rest and already returns a FilePath.
Change hasDocumentation() to hasDocs() accordingly.
Change-Id: I619d7c68e612c4e25a830e4dce128d9a1e84c2e2
Reviewed-by: hjk <hjk@qt.io>
The name "KitInformation" does not properly convey the fact that it
represents a certain *aspect* of a kit. The same goes for
"KitConfigWidget", which in addition was inconsistent with
"KitInformation".
We now use "KitAspect" and "KitAspectWidget".
Change-Id: I9804ee4cedc4d61fad533ea1dd4e4720e67fde97
Reviewed-by: hjk <hjk@qt.io>
We don't want various plugins to depend on the Help plugin,
but we also do not want Core to depend on QtHelp.
For example when turning the Help plugin off, documentation should
actually no longer be registered through QtHelp. So we need
parts of the interface in Core, which must then be delegated
to the actual implementation in Help.
As positive side-effects the interface in Core will be slimmer,
and the code in the Help plugin can later be simplified, too,
because then we don't have the "Core" and the "Gui" help engines
separated in different plugins anymore, which should remove the
need for some setup indirections.
Task-number: QTCREATORBUG-20381
Change-Id: I634c5811c45d6a3dfd6ddc682cae270e38384cbf
Reviewed-by: hjk <hjk@qt.io>