Commit Graph

17 Commits

Author SHA1 Message Date
Lucie Gérard
a7956df3ca Use SPDX license identifiers
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>
2022-08-26 12:27:18 +00:00
Eike Ziller
38af447ee0 Fix context help for e.g. CMake
CMake documentation links do not have Qt's version style. So, if our try
to find "the highest version" fails, we still need to provide the link
to open.

Amends 128c7dfbef

Fixes: QTCREATORBUG-26455
Change-Id: I3e7588cac5d4ef8ee912b3f5511e63da0b8a0f52
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-10-29 15:07:48 +00:00
Jarek Kobus
128c7dfbef Implement heuristics for parsing version number
Similar solution exists in QtHelp module:
QString QHelpDBReader::qtVersionHeuristic() const

Fixes: QTCREATORBUG-26292
Change-Id: I9037785920e25428db0fa7f03f737c5ef66c4ac3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-09-21 11:17:33 +00:00
Jarek Kobus
9ca7326d90 Integrate new filter engine
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>
2020-04-02 11:22:03 +00:00
Eike Ziller
177f14b115 TextEditor: Do not change the text format for tool tips
We should not force the tool tip text to HTML when help content is
available or when adding the F1 icon.
Instead add help content and F1 icon into the tool tip layout.

Change-Id: Ibe2d4fa2fb81bcda4e5aeb0d7d86dbf63fcf3ce6
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-11-06 09:43:20 +00:00
hjk
e3b1106afa Compile fix with recent Qt dev
The reasoning in 1b4766e26c did not take into account that the scope
of QT_NO_JAVA_STYLE_ITERATORS may change over time, as done with
f70905448f6 in Qt base.

Change-Id: Ib1966ff26c4d36d5f62e149d6b45baa4aecf825d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-07-29 08:54:18 +00:00
Eike Ziller
1ac9a91811 HelpItem: Fix usage of isFuzzyMatch
We may not access that before links are resolved.

Change-Id: I5e80190e41c220c6b70e5d391caaf173cd5b28d8
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-02-13 12:45:50 +00:00
Eike Ziller
8309606a52 Help: Lookup in index if ID is not found
And if multiple topics are found in the index, show the topic chooser
dialog that we already have for the help index.

Fixes: QTCREATORBUG-12704
Task-number: QTCREATORBUG-15959
Change-Id: I7afa6f44bbecc12f602aaaa4a11209ec72399689
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-02-11 08:24:40 +00:00
Eike Ziller
f973b4e94a Help: Move finding the best documentation link to HelpItem
Change-Id: I5032d380295d942cd4f334e4bf47e349dd5b0aea
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-02-07 06:21:05 +00:00
Eike Ziller
92ddaea43e Help: Make a difference between "empty" and "valid"
Context help should take the HelpItem from the tool tip if it was set,
even if it isn't valid.
Similarly, if the help item was set on the text editor, it should not
ask the hover handlers (again), even if that is invalid

Change-Id: I481f8ad73c3cf8fdbb90f737ab36b4e380467026
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-02-04 09:20:55 +00:00
Eike Ziller
d07e5b2a46 HelpItem: Remove senseless constructor
If we are already passing a URL, we do not need to pass a map of URLs in
addition. We already know exactly which URL we want.

Change-Id: I955e03a611667733e9734e7996725d51857c71b1
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-02-04 09:20:47 +00:00
Eike Ziller
443931c1da Help: Move resolution of help from multiple candidate IDs to HelpItem
No need for code duplication.

Change-Id: I3d2c795d072b8de5818e1844b8126e526339c0da
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-02-01 11:28:02 +00:00
Eike Ziller
d386b3c241 Help: Avoid ambiguity of help ID being interpreted as URL
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>
2019-01-31 10:32:36 +00:00
Eike Ziller
d053535cea Help: Reduce number of HelpItem constructors
Change-Id: I4ae1b0804a630dc7e2da3e14953dc36d07136603
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-01-29 12:10:13 +00:00
Eike Ziller
121e721067 Help: Avoid looking up invalid help ID over and over again
Make the help link cache remember that it tried before.

Change-Id: Id9d07a7b86c4fa856b7fa3a5e17cd5d4115861ff
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-01-29 08:22:27 +00:00
Eike Ziller
418dcfbcbb Help: Avoid multiple lookups of help id for context help
Context help would first query the database with potential IDs, and
afterwards the help plugin would look up the links for the resulting ID
again.
Pass the HelpItem (which potentially contains the cached links) directly
to context help.

Change-Id: I73bddcd3cd4eacaea412b98d53c5e5354a31f3d5
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-01-29 07:57:19 +00:00
Eike Ziller
dabeb0aa1e Move Help item from text editor to core
The functionality is not text editor specific.

Change-Id: Iee531572f14673e75129f4bfbb64a1437899d31e
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-01-25 09:46:21 +00:00