Commit Graph

1086 Commits

Author SHA1 Message Date
Alessandro Portale
d4cf962996 Utils: Add an "online" icon
..and use it in the Help plugin to open online help.

Change-Id: Ic84c63257a08b3c2ac76bedc0db04f297f695291
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qbc.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-07-31 07:07:26 +00:00
Eike Ziller
7de82409fc Merge remote-tracking branch 'origin/4.10'
Change-Id: I7a7bc552e09de1fbee98402c97e3a35f0e2c952a
2019-07-31 08:27:20 +02:00
Eike Ziller
87a71794b2 CMake build: Fix compilation of QtWebEngine help backend
Change-Id: Ic0a719ad0fc6b6444a4c0a8b0677d5f66de6d74f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-07-29 15:25:56 +00:00
Tasuku Suzuki
395b5ec185 Add open online documentation button to help viewer
Change-Id: I21685005709332b1201aaf08804399ecbd82bf7c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-07-29 09:15:14 +00:00
hjk
6a58666f44 More Utils::toSet/toList
... and unrelated cosmetic changes.

Change-Id: I591b17fd5289831e701b683f8fb47816efd1fa67
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-04 12:28:38 +00:00
Eike Ziller
b02f4ae615 Merge remote-tracking branch 'origin/4.9' into 4.10
Change-Id: I6f1bc9381dc8c0ce8abc5a6c006087076d8fc1bc
2019-06-18 11:48:32 +02:00
Michl Voznesensky
5bcc70b34d Fix bug for with redirect to general landing page Qt bug tracker. Now the redirection goes to the page creating the bug
Fixes: QTCREATORBUG-18734
Change-Id: I49847edce7da6a993ded3a9538334279965b6eb4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-06-18 07:41:25 +00:00
Alessandro Portale
0933c20de8 connect() to ambiguous signals/slots: Replace static_cast with QOverload
Change-Id: I473d7a2a16509cee944a2a21b022a3f6f02cfd8d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 14:07:03 +00:00
hjk
19e1cf1520 Replace uses of qVariantFromValue with QVariant::fromValue
Deprecated in Qt 5.14, alternative has been around since Qt 4 at least.

Change-Id: I4e3a53c289088368609e0d0ce2405a832d311308
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-05-27 12:33:29 +00:00
Orgad Shaneh
1e138fbe10 Remove excess blank lines after namespace
Change-Id: I4e4f83017f2bfc2cf842c4c971ed4b05e0447e6a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 06:50:16 +00:00
Eike Ziller
52d48c75ae CMake build/macOS: Centrally detect system libraries
And realize that at most places (except native help viewer) the code
using them is not optional on macOS.

Change-Id: I308406a0e8f176dad4151d23a33cd3fc0fb8635c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-24 13:04:15 +00:00
Eike Ziller
6fb9bf453f CMake build: Add ability to disable building of individual plugins
Adds a cache entry "BUILD_PLUGIN_${NAME}", defaulting to ON which
can be set to OFF to disable building of a plugin.

Adds a extend_qtc_plugin function that should be used to add
properties to a plugin after add_qtc_plugin, instead of the
standard CMake functions target_... . The new function results
in a no-op if the plugin was disabled.

Change-Id: I57f6799620aea0aaa8b56acead4815ccced95911
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-05-23 11:13:21 +00:00
Cristian Adam
d855b84c5d Qt Creator CMake port
Based on Tobias Hunger's work from a few months ago.

The CMake configuration needs libclang and Qt paths specified as
CMAKE_PREFIX_PATH.

Auto tests are run with "ctest". At the moment the pass rate is 87%.

Change-Id: Iba98e39bf22077d52706dce6c85986be67a6eab0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-17 13:33:28 +00:00
Eike Ziller
4545c81e57 Merge remote-tracking branch 'origin/4.9'
Conflicts:
	doc/src/howto/creator-sidebar-views.qdoc
	doc/src/howto/creator-ui.qdoc
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/autotest/testresultmodel.cpp
	src/plugins/autotest/testresultmodel.h

Change-Id: I24cc585ca7782cb1d9cb0b8b73b46892b41937fd
2019-05-08 12:41:25 +02:00
Jarek Kobus
9f97878c6b Remove the zombie code regarding CreationDate check
The CreationDate field was set to hardcoded date of 2012 year
during generation of qch files (from inside qhelpgenerator).
There was no other place in any code which would modify
this field value. So having this field didn't make much sense.
In meantime setting of this field has been removed from
qhelpgenerator, so this field is not being set anymore.
The code which is being removed here, has never been doing anything
which would make much sense, since the compared dates should
always be the same.

Change-Id: I5a628235018223f61f0cbe814e92e1dcd7d34614
Fixes: QTCREATORBUG-20253
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-04-18 14:43:56 +00:00
Eike Ziller
c53ccceff1 Merge remote-tracking branch 'origin/4.9'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/debugger/debuggerkitinformation.cpp
	src/plugins/languageclient/languageclientmanager.cpp
	src/plugins/plugins.pro
	src/plugins/projectexplorer/kit.cpp
	src/plugins/projectexplorer/kitmanager.cpp

Change-Id: I66fb941202991f35f7d7761430b21e42dfc678a8
2019-03-14 15:51:15 +01:00
Tor Arne Vestbø
14dc38eea0 Remove dependency on Qt Mac Extras
Change-Id: Id4d394974e87d7844c02c18f3c98957036503d7f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-03-12 11:10:56 +00:00
Eike Ziller
71c6ad7f9e Help: Improve handling of results from index lookup
If help is only found by looking up in the index, show a selection
dialog to the user even if there is only one result. Otherwise we create
the impression that we really think that the help we find is the correct
one.

Also do not add the help text to the tool tip in this case.

Test case: struct Foo { static void objectCreated() {} };

Change-Id: I9579302843ea2923e06f56f4b646dd101f183b3f
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-03-05 10:33:51 +00:00
hjk
6f37348b4c Replace static_casts by QOverload where possible
Mainly to get rid of the QProcess::finished deprecation warning.

Also adjust coding style in the surrounding connects when needed.

Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-26 15:18:14 +00:00
Eike Ziller
334c76fd31 Help viewer: Add option for scroll wheel zooming
Fixes: QTCREATORBUG-14154
Change-Id: Ia6c4aedb78954614477f0228ba82c4dc476a2525
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-02-21 13:26:06 +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
88b29792cb Merge remote-tracking branch 'origin/4.8' into 4.9
Conflicts:
	src/plugins/android/androidrunnerworker.cpp
	src/plugins/android/androidrunnerworker.h

Change-Id: I52b9117c8a57dc4a34cfc09d1ae9bc76e0752bfc
2019-02-04 15:21:55 +01: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
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
32429e11c9 Help: Avoid double lookup for help tooltips
Save the HelpItem directly in the tooltip instead of the help ID which
would need to be looked up again.

Change-Id: I107e82e89d9ea26cad9d6532ad4c687d1ac8f1ec
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-02-01 11:00:55 +00:00
Eike Ziller
0aa8a98afa Help: Disable middle-mouse click outside of help mode
Since only help mode supports it.

Fixes: QTCREATORBUG-20554
Change-Id: Ida8cee01c0ab0c8fc5ffacf3c4521feeadf65995
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-02-01 10:18:47 +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
Nikolai Kosjar
ab770f967b Help: Fix url handler
Change-Id: I59a83a8e6532cc91ad355cbb363faac75da6feed
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-01-30 12:04:44 +00:00
Eike Ziller
b59f9b9b2c Help: Do not actually try to lookup empty identifiers or keywords
Avoid the unneeded database lookup.

Change-Id: I077e3bdcc30543fd903c6fc62da814b4c84f0d25
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-01-29 08:22:36 +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
0345bcb7cc Help: Rename handleHelpRequest to showHelpUrl
Since that is what it does.

Change-Id: I13ffe21cdb625a0df1313f2ff09bf84196f08768
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-01-25 08:23:18 +00:00
Eike Ziller
bbe0cd68fa Help: Remove unused method and related code
Change-Id: I4c4641290eceb441339cc237ee74a52c1018e3ae
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-01-25 08:23:11 +00:00
Eike Ziller
379aef60f9 Help: Unify showing a specific help url
Makes code paths easier to follow.

Change-Id: I6056862c15dbbaa8c63f0633ba70a178cfa910f6
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-01-25 08:23:03 +00:00
Eike Ziller
809416c993 Help: Simplify and unify code
The help widget doesn't need to resolve the external help viewer
instance manually, we have an entrypoint for that already.

Change-Id: I6875c434428baac3f1883813207cf318d7d3dc09
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-01-24 14:03:38 +00:00
Tim Jenssen
a78e3e5dd5 use initializer lists
Change-Id: I82b04601f1db52197b3dc625b6b7e0f143c1c8b6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-01-21 15:10:54 +00:00
Alessandro Portale
d9c05d3d20 Fix warning: "Unused non-trivial variable"
[-Wclazy-unused-non-trivial-variable]

Change-Id: Ia99c3de31fd92205f25624ab60e60370c1aa4538
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
2019-01-17 10:55:33 +00:00
Eike Ziller
3c5650e514 Add macOS touch bar support
Introduce a generic Utils::TouchBar that implements a touch bar for
macOS based on QAction. Touch bars can be nested, and one is set to be
the application's top level touch bar.

Also add an ActionContainer for the touch bar. That allows us to manage
the layout of the touch bar the same way we do with menus.

Since the touch bar is an input device with very limited space, a
command in the touch bar needs to be specifically styled for the touch
bar by setting either touchBarText or touchBarIcon (or both).

Touch bars can be nested by nesting the ActionContainers. A nested touch
bar ActionContainer needs to specify an icon and/or text to show in the
touch bar button that opens that sub-bar.

Commands are only shown in the touch bar if they are valid within the
current context.

Implementation-wise we cannot use the standard NSPopoverTouchBarItem for
nesting touch bar levels. We cannot hide items in the touch bar, because
hidden items still take up space in the touch bar. So we need to rebuild
the touch bar regularly. Since the items we show are very dynamic, every
time the items in the toplevel bar change because of a context change,
any opened sub-level touch bar closes. That is why we maintain a stack of
touch bar levels ourselves, replacing the main touch bar with the current
level, and managing opening and closing the levels manually.

This patch adds buttons for Help, Bookmarks, Header/Source, Follow
(Symbol), Decl/Def, and a sub-bar for the debugger actions.

Fixes: QTCREATORBUG-21263
Change-Id: Ib63e610f21a993f1d324fe23c83a7f2224f434ac
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2019-01-15 14:33:56 +00:00
Daniel Wingerd
2710a9b0e5 help plugin: specify bgcolor for html
Change-Id: I5ffd9851d6bc43510f4eb3ad903055544d83b8b0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-12-14 10:46:35 +00:00
Daniel Wingerd
b8a4050bab help plugin: strip html from a translatable string
Change-Id: I4c147c969ae04c50ca2d6fd40143919236f97679
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-12-14 10:44:18 +00:00
Eike Ziller
3d1d9aae2e Merge remote-tracking branch 'origin/4.8'
Conflicts:
	src/plugins/winrt/winrtdevicefactory.cpp

Change-Id: I33b8697e2ebf2bea051d7f1144449e0743ee16a5
2018-11-19 10:00:18 +01:00
David Schulz
fc5caf3e0f Help: fix calling QDesktopServices::openUrl when opening about:blank
Workaround QTBUG-71833

Fixes: QTCREATORBUG-21515
Change-Id: Iffa363ab94a8f71d958b04932c9829887bb00dd7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-11-16 08:24:39 +00:00
Alessandro Portale
901b2be036 HelpPlugin: Modernize
modernize-use-*

Change-Id: Ie0058675c1336377326089dbc093436130f1fe03
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-11-12 11:10:38 +00:00
Leena Miettinen
5562cc7cfb Help: Add ellipsis to a menu item label that leads to a web site
Change-Id: Id273a8508c8393580c6b9222f95aa4033e9eca9a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-10-19 12:28:58 +00:00
Jarek Kobus
e90fb40678 Reuse linksForKeyword() from QHelpEngineCore
Change-Id: I740d49222842ec2f16ffc8eec8c20e9b4a7337ec
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-10-01 12:44:46 +00:00
Christian Stenger
c6906304a2 Help: Fix 'Get Started Now' button
Change-Id: If9fed047f29ee069569f1317b8844bf4369f8cb7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-10-01 09:24:46 +00:00
Eike Ziller
6235ae0bc0 Help: Remove usage of deprecated API
This follows the same outline as
qttools 256bbc4f139036a780a63b80af8bb461a77d333a

Change-Id: Iffe1f7a8d11ef9d20ec567fd222ee5279b56c765
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-09-23 13:59:21 +00:00
Orgad Shaneh
539b10727e Merge remote-tracking branch 'origin/4.8'
Conflicts:
	src/plugins/debugger/debuggermainwindow.cpp

Change-Id: I07496916dd37b842d57ce5c49f99c079a9095a5f
2018-09-21 10:49:44 +03:00
Eike Ziller
b9db5ea86e Move documentationPath() from Core::ICore to Core::HelpManager
It is documentation related API, so it belongs there.

Change-Id: I5d1676f251e6deb92050ddedac19bf3c332aab54
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-09-20 07:19:49 +00:00
Jarek Kobus
4669563836 Remove qDebug()
Change-Id: Ie951201ae2cea355e0118cc36c69fdf2cff5c26b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-09-19 12:44:20 +00:00