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>
We have to make sure that the help engine is properly set up before
trying to read the bookmark data.
Change-Id: Id57cce5f538472eeac17b39a3640bf2ed77fa56a
Task-number: QTCREATORBUG-14106
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
And do not save the default page anywhere at all.
This simplifies the logic, and makes the setting independent of help
engine initialization.
Change-Id: I264903229e274a0bf25c18b33734d36432aa525f
Task-number: QTCREATORBUG-13198
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This removes a lot of duplication of actions and interaction.
It's also a preparation step into making the external help
window behave more like the full-fledged help mode.
Change-Id: I318d831f229b0a75bb8702a5f163c96cce6a668c
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Technically it is a valid URL with scheme "Foo" and path ":bar". With
this patch we only try to open URLs with very specific schemes like
"qthelp", "file", "http(s)", "about".
Task-number: QTCREATORBUG-7547
Change-Id: I6908ff554c12ca0f4cfc5bd0fb30dd659d780a23
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Run Qt Creator with environment variable QTC_HELPVIEWER_BACKEND to
* 'native' to get the WebView based one on Mac
* 'textbrowser' to get the QTextBrowser based one
Defaults to use QWebView if QtWebKit is available, or QTextBrowser if
not, like before.
Change-Id: If0660782b18ff3d89301fa7bcaf4e2e2fb69627d
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
In several places, it says '#include "..."' for headers
from different libraries/plugins.
Change-Id: I96cd74fef9b30163adefe3e1720e0847bed9553a
Reviewed-by: hjk <hjk121@nokiamail.com>