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>
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>
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>
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>
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>
- In the main window, the locator input (actually the status bar)
visually feels like being part of the mode widget, so give
it its context.
- In extra editor windows, the whole editor window should have
"editor manager" context, so that is also active for the locator
input.
Task-number: QTCREATORBUG-20626
Task-number: QTCREATORBUG-20071
Change-Id: Ib68d6a8177446572ea59c3cc057eca0706173e11
Reviewed-by: Xing Xiong
Reviewed-by: David Schulz <david.schulz@qt.io>
Making it a QWindow meant that Alt-Tab will lead to the main window and
right back to "System Information" because this is modal. This
incovenience outweighs the convenience of having a "Maximize" button.
This reverts a part of 40d7399755
Task-number: QTCREATORBUG-20513
Change-Id: Idcea54ee2f60f9f7efde7d25ce0c305b87f445dd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
For this make the default context menu for the text editor extensible
and add the context help item from the help plugin, which now has an
optional dependency on the text editor to ensure correct loading order
if both are present.
Task-number: QTCREATORBUG-55
Change-Id: I378a491ba3700e65fc262bdb10c8ead5ad62cb33
Reviewed-by: David Schulz <david.schulz@qt.io>
Create a HelpPluginPrivate class, move all previously private
HelpPlugin data and code there.
Make it live from HelpPlugin::initialize() to HelpPlugin destruction,
so it can be used to handle life time of data members automatically,
making use of IPlugin::addAutoRemovedObject unneeded.
Change-Id: I9e381ca20b98f4d9c06687c11b81a64e69ceeb96
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
HelpWidgets that are created to be shown in an external window, had
two different places where they were deleted:
1) When the widget was closed (due to Qt::WA_DeleteOnClose)
2) In HelpPlugin::aboutToShutdown via manual delete call
In certain circumstances (when the WebEngine backend was used)
this caused a double delete. Specifically, after opening an external
help window, and closing the MainWindow, the application did not quit
due to QTBUG-62596.
Now if the help window were left open, and the application was quit
via the macOS Dock, this caused a crash.
When the application quits, it calls the HelpPlugin::aboutToShutdown,
which deletes the HelpWidget. This in turn destroys the WebEngine
view, which destroys the underlying QQuickWidget, which destroys
a QQuickRenderControl, which calls
QQuickRenderControlPrivate::windowDestroyed, which handles all
posted QEvent::DeferredDelete events, which in turn triggers the
deletion of the same HelpWidget due to the
Qt::WA_DeleteOnClose attribute.
The solution is to remove the Qt::WA_DeleteOnClose attribute, and only
delete the external HelpWidget on shutdown, and not on CloseEvent.
Task-number: QTBUG-63945
Task-number: QTCREATORBUG-19582
Change-Id: I5b73ff7fe52e7e1259a8aa98c97c9dbedd5e3c20
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
If we do not specify the correct documentation URL including the version
number, QtHelp will look for any documentation that has the given path.
Since we now register Qbs documentation, and that also has a file
"doc/index.html", the Get Started Now button could open the Qbs manual
instead of the Qt Creator one.
Specify the full documentation URL including version number to ensure
that QtHelp opens the right page.
Change-Id: Ia77103fe2763dd208d3b9a279a8301f7f5799c8b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
When using locator in the external help window, open help pages or show
the topic chooser in the external help window, not the main window.
Change-Id: I792223147f1eb00addafb2618017536c126c71dd
Reviewed-by: David Schulz <david.schulz@qt.io>
That centralizes all the focus setting, raising of windows, etc. This
was for example already done wrong when opening links in help mode and
external window.
Change-Id: I5036b5caa751d1f36dc442078624a31fb8f573ee
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
When using the "Web Search" locator filter ('r') or "Get Help Online"
from the context menu on build errors in the issues pane, we already
know that we want to show the URL in an external browser, not help mode.
Task-number: QTCREATORBUG-17795
Change-Id: Ie7faa527907124251a60e7618747d81a6003fa19
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Q*Application classes have unusually many static functions. In many
cases in our code, these functions are unnecessarily called as instance
functions, using the qApp helper.
This patch replaces many occurencies of qApp with the according
Q*Application classname.
Change-Id: I6099a419fa7bf969891269c37ed7a9e817ef5124
Reviewed-by: hjk <hjk@qt.io>
After we constructed the online URL for Qt/Qt Creator documentation that
is not installed locally, we can just open that via desktop services
instead of bothering built-in help viewers.
Change-Id: Ic8a37bc22d34af881b5daf87534d59db4d331e44
Task-number: QTCREATORBUG-16111
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
1) Make the font non-proportional, since qtDiag's output is formatted
with spaces
2) Make the dialog a window with maximize buttons
3) Fix the formatting for unloaded plugins
Change-Id: I911871b1ffc9dceebcbb04f544cc6d580b95c54e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
QtWebKit is gone, removing it is better than letting it rot.
Change-Id: Ie0a43f9aed028edb76b2e9f2dac0b4a9be8ce05d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
When trying to open pages that should be in the installed documentation,
but are not, we try to open the page from the online documentation in
the external browser (e.g. for the links from Welcome mode). Looks like
the online documentation moved.
Change-Id: I7a8eaf37783661dc4751a12b65efeac419d3a802
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Which outputs the information from qtdiag, installed plugins,
and general Qt Creator build information.
Task-number: QTCREATORBUG-16135
Change-Id: I618b9883369bae45006bb109f8757e89b091b882
Reviewed-by: David Schulz <david.schulz@qt.io>
For external windows we need to separate the contexts in which help
mode's "add bookmark" and editor's "toggle bookmark" are present.
Task-number: QTCREATORBUG-16286
Change-Id: I2a7a28c75dc53e1dd0b21c0a8833bd4594d5afad
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Makes it more uniform to use and allows placeholder widget
creation to be independent of mode creations.
Change-Id: I4021bc9db7f8c78f0374c0cc3b3331506959afe4
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
The different viewer backends have different issues with scrolling to
the right position if the URL contains an anchor. In all combinations of
"viewer was visible/invisible when help was requested" and "viewer last
showed the same/a different page then the requested URL".
Move the special logic from help plugin to the viewer backends.
Task-number: QTCREATORBUG-15548
Change-Id: I962c90695ceaee48800a3590676e1d28343cf790
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
The tool tip never has focus, so it cannot become the IContext that is
checked for context help. So, integrate the help id into Utils::ToolTip
and check the tool tip first when checking for context help.
As a side effect the [F1] button and help id for the tool tip is now also
available for use outside of the text editors.
Task-number: QTCREATORBUG-5345
Change-Id: Id975703caf161d1183c247e8ad8bb693b90fd306
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
There is no reason why some part of the help mode couldn't provide
help.
Change-Id: I9c28dc1dacf122e5f3828144a0e386a9f7e2b6c2
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Visual Studio before 2013 had bugs in bool conversion of std::function,
leading to "true" in some cases where it shouldn't.
Task-number: QTCREATORBUG-14399
Change-Id: I8a1ad2f952247049355e11337ddf99f380ebde98
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@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>
It's not clear why we need it there, it's generally not advisable to do
qApp->processEvents() and in this case it clearly creates problems.
Change-Id: I2707ef0ec98ee761078283ee3ce3f76f9da95f31
Task-number: QTCREATORBUG-14215
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
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 default to C_GLOBAL. A rather common case.
Similar for ActionContainer::addSeparator().
Change-Id: I7f9ba573af201c0a472132d5a494ad17cc4175b7
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>