Qt Creator opens by default the offline documentation of CMake.
But the user can click on the "Globe" to go to the online version
of the documentation.
Change-Id: I0b3a6bceb13784b232b539f1c04bd09aa3a11034
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This deduplicates several mime type strings.
Change-Id: Ib1746387e233ca5b7134e65859b5ec1c7832b8e4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
For the backends that we can do it for (litehtml, QTextBrowser).
Fixes: QTCREATORBUG-12177
Change-Id: If64a279f74f878b6797bf43d8129058c6183919b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Most information is available via Q(Core|Gui)Application.
Add an AppInfo structure for the things that are not.
This avoids that the information ends up duplicated and
hardcoded in the plugins, which is not needed or desired.
Change-Id: I4d565e75c42a7b8facafa90c27096ea49359215d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
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>
Since we are now requiring macOS 10.14 we can remove our local
implementation of optional and use std::optional for macOS too.
Change-Id: I2bd018261b68da64f7f031a812045dd7784697e1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marco Bubke <marco.bubke@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: I724eecc040e33e249a88243f27e8a9e72e54f24b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
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>
Last segment of host part represents version string.
e.g. qthelp://org.qt-project.qtwidgets.630/...
If it starts with "6", let's open qt-6 documentation.
Otherwise, let's open qt-5 as it is.
Change-Id: I88b5f6bd2ebfd8494e48f043678dbc190310b90f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Qt Creator required Qt 5.14 or higher. Let's removed the #idef-ed code
for building against lower Qt versions.
Add a comment in porting.h where we still need such code for sdktool.
Change-Id: Ib330275208eec4a2f285b4b9f480530c171f538a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
If the scrollWheelZooming is enabled, this
setting will get updated when using scroll wheel.
It will also be used when zooming in/out
by using keyboard shortcuts.
Fixes: QTCREATORBUG-25109
Fixes: QTCREATORBUG-25230
Fixes: QTCREATORBUG-23731
Change-Id: I9d22632b4c034ce236fa39dba074df4a2746ff84
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
We should never actually write default values into the settings, because
- if the default value changes in a later Qt Creator version, the new
default should automatically take effect if the user didn't change the
value
- it senselessly grows the settings file
Add a QtcSettings class that extends QSettings by a
"setValueWithDefault" method, which does not write default values to the
settings, and actually removes the settingskey if the user switches back
to the default.
Use it at the places where we already do this manually.
Task-number: QTCREATORBUG-24762
Change-Id: Ia76414cb21e8521f3aeed1e37b43ae4fb3393ea3
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
If available prefer litehtml, even over QtWebEngine. But make the
default compile-time configurable with a CMake option
DEFAULT_HELPVIEWER_BACKEND.
Amends 5e73215a0a
Change-Id: I5bfadd3ec1dc21f3a94d04d0da51783223908e6d
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
The default value for readOnly property of QHelpEngineCore
changed to true in Qt 6. We need to set it to false by hand.
Task-number: QTBUG-87783
Change-Id: I6b0d4f043797463b3437a6aef673eba8e1b9c3ad
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Adapt the code to deprecated usage of map as a multi map,
hence all cases replaced by QMultiMap.
Change-Id: I2d480467cd6e91d3e880555e6a21058dec056b3f
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
it was not working for a QtDesignStudio build
Task-number: QDS-1473
Change-Id: Ic7ca52a99bb54cd312c307f0e0af136421d347c1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Adds a button in the tool bar for the help widget.
If the help widget is currently the target for context help, the button
is "checked", and pressing it opens a menu with all the options.
If the help widget is currently not the target for context help, the
button is "unchecked" and pressing it makes the help widget the target
for context help.
The menu can in all cases be opened with a long button press.
Fixes: QTCREATORBUG-17667
Change-Id: I748e18f36ebde03eaa779557dd09f7a2bc0bcb2d
Reviewed-by: David Schulz <david.schulz@qt.io>
Add "Reload" menu item, which re-creates the help viewer with the
current backend.
Change-Id: I979cb9cdf5ae5635f4d028dc41d71ab71ce80248
Reviewed-by: David Schulz <david.schulz@qt.io>
Users know if they have a URL or not, we should not guess (and then even
guess differently at different places)
Change-Id: Iaaf69a94baadbee0ff427a2bc9065b714dcf8478
Reviewed-by: David Schulz <david.schulz@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>
Setting the collection file leaves the help engine in an invalid state.
It is important to invoke setupData() in order to setup the help engine
again.
Change-Id: I252d7999c113db4f584bcaf94d42c609f507c1cb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
QHelpSearchIndexReaderDefault is run in a separate thread
in order to return the results of the search. It reads
the info about the current filter in order to filter out
the results. However, the main thread didn't
store the current filter in the qhc file, just in memory,
and the search thread reads the value of the current filter
from qhc file, so this goes out of sync.
This patch stores the current filter in the qhc file
whenever it is changed.
The current code resets the current filter
by the launch of creator anyway.
Task-number: QTCREATORBUG-17845
Change-Id: I7c8d2c93b319c94e1400a677ecee9e9b41b029c3
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Use "Sans Serif" as it is done inside Qt sources as well.
Otherwise we run into the soft assert when retrieving the
default fallback font style name on Linux systems.
(Tested with Ubuntu, OpenSuSE, Arch Linux, Gentoo)
Change-Id: Icf04a8ec4ace5014c5526a5a5e5ef45c48660afd
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
It could only handle combinations of "Regular", "Bold", "Oblique",
but fonts can have their own sets of fancy style names.
Actually set the selected style name on the font and save that
in the settings.
Task-number: QTCREATORBUG-16620
Change-Id: Ibf8cd6f2ac0d3ff1c0fd100e9db627937c0eb1ec
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
The default fallback font was arbitrary. So far this was not a big issue
because it was basically never used.
Set sensible fallback fonts on the different platforms.
Also make sure that we can see in the settings if the default fallback
font has been changed by the user, and also separate the setting for the
different font properties. Since we did not do this before, we now have
to reset the setting for all existing users, so they benefit from the
more sensible default.
Task-number: QTCREATORBUG-15887
Change-Id: I16419f54c300580d5c9a9b19722aacf790ef66fc
GPush-Base: 44820dae13
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Using the help database is not necessary, does not follow our style,
and is less reliable (with all the setupEngine mess).
Change-Id: Icb7f63a6b349458011e1b068bdf0954b78d3281f
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>