Commit Graph

86 Commits

Author SHA1 Message Date
hjk
430a33dcd9 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-06 06:07:13 +00:00
Eike Ziller
e5bb7d1ffe Remove unnecessary removeContextObject calls
They are removed on deletion now.

Change-Id: I08461ea4938e24ab450df013a0f8f820032381da
Reviewed-by: hjk <hjk@qt.io>
2020-05-27 08:42:00 +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
hjk
7e19d1af7c Use even less nullptr for default flags
Change-Id: I5ec30de3e41dfc1c7bf6d5f5e36991eadcbbfb72
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-01-20 10:09:23 +00:00
Eike Ziller
cc60efdbf6 Help: Add tool button to change target for context help
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>
2019-11-25 14:49:25 +00:00
Eike Ziller
aad6ad8c10 Help: Replace annoying URL syncing by explicit Open in Edit Mode
Qt Creator was syncing the current page in Help mode to the page shown
in the side-by-side view in edit mode.
This doesn't really make sense because context is completely lost.
Instead provide the explicit option to open a help page in edit mode,
also from the external help window.

Fixes: QTCREATORBUG-19198
Change-Id: I00698bb431d5c116dd1e0e1cbdc5fbd7421ac267
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-09-30 11:19:54 +00:00
Eike Ziller
d34aee4d53 Help: Fix missing page switching keyboard shortcuts for external window
Which are relevant now that external windows support multiple pages.

Change-Id: Ibc748e9e0582c8d54264af535c32aa2702f91631
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-30 11:19:21 +00:00
Eike Ziller
d635c3d630 Help: Support multiple pages in external window
Task-number: QTCREATORBUG-20558
Change-Id: I811a749edad7a900c5990d80089409e4076bb9f1
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-09-26 12:56:56 +00:00
Eike Ziller
3b2209b870 Help: Get rid of special CentralWidget class for help mode viewer
Change-Id: Id733eb0449cdaed5901e4144089c8adaaf07d7a9
Reviewed-by: hjk <hjk@qt.io>
2019-09-24 12:57:56 +00:00
Eike Ziller
4f19046d75 Help: Remove OpenPagesManager::instance()
It's owned by the HelpWidget now, and should be accessed through that.

Task-number: QTCREATORBUG-20558
Change-Id: I99118bb966922e6b4d356cf892d7604365357785
Reviewed-by: hjk <hjk@qt.io>
2019-09-24 12:57:29 +00:00
Eike Ziller
bef986f3fd Help: Move OpenPagesManager::createPage to HelpWidget
Removes some unneeded indirection.

Task-number: QTCREATORBUG-20558
Change-Id: I65d8d31e10300da3015f388ac490b8be6e090f29
Reviewed-by: hjk <hjk@qt.io>
2019-09-24 09:21:08 +00:00
Eike Ziller
1bbdb1440f Help: Add option for help viewer backend
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>
2019-09-12 11:14:11 +00:00
Eike Ziller
25935d2da9 Help: Remove indirection when synchronizing current page
Task-number: QTCREATORBUG-20558
Change-Id: Ia76b6a11ed39f6b65d1c949fe57f8c3c4064c3ed
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-09-11 08:16:50 +00:00
Eike Ziller
e0e5621b80 Help: De-duplicate management of help viewer pages
For the help mode, the help viewer pages were managed both by the
OpenPagesModel and the HelpWidget, and needed manual keeping in sync.

Instead make the model just an aspect of the HelpWidget, manage
creation/deletion of pages via the HelpWidget, and use the model only
for the pure MVC API purposes.

Task-number: QTCREATORBUG-20558
Change-Id: Ib7d6f2561239b0d5f3328dfd30c84718f81af0a1
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-09-09 11:32:24 +00:00
Sona Kurazyan
8e31932c29 Remove usages of deprecated APIs of QLayout
Replaced:
  QLayout::setMargin() -> QLayout::setContentsMargins()
  QLayout::margin() -> QLayout::getContentsMargins()

Task-number: QTBUG-76491
Change-Id: If28ef6910b3afe5d04e4746b74f9362a3e3b3c8e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-02 13:01:07 +00:00
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
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
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
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
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
Eike Ziller
da18fc1f50 Help: Use nullptr and fix a few warnings
Change-Id: I7f7307a765d8755bf96b0cad1210e61df0a0199f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-04-19 12:07:59 +00:00
David Schulz
0eb7bab20c Core: make useMacShortcut constexpr
Change-Id: I293b96428784b6efecac6dae4f2f9690af0027da
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-02 13:15:55 +00:00
Alexandru Croitor
b23dab3ba2 Avoid double deletion of HelpWidget when quitting application via Dock
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>
2018-01-17 16:24:43 +00:00
Eike Ziller
1932912e7c Add icons to file system view directory selector
Change-Id: I0b6451d7f68fae93e0b140aaea030c88ec1a8801
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-10-11 07:06:41 +00:00
Eike Ziller
9297ee92c6 Help: Fix destination of index locator filter
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>
2017-07-27 12:15:11 +00:00
Eike Ziller
6afc0c3eb6 Help: Add method for showing URL in specific viewer
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>
2017-07-13 10:49:16 +00:00
Eike Ziller
c363c1d4ee Add locator input widget to help windows
And move the "Show Sidebar" button into the status bar that we
need now anyhow.

Change-Id: I24bfa0991cbdcdba4d1a8cd6cbacde28d459972d
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-07-10 09:58:02 +00:00
Jarek Kobus
cd2a70c867 Remove unneeded includes
Change-Id: I83a6dc6ba33f7f8e1f6b1babbf60c69554435a0a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-03-28 19:13:42 +00:00
Serhii Moroz
69da534f99 TextEditor: add right sidebar
Task-number: QTCREATORBUG-9436
Change-Id: Ic0406758a30d52c22c58433f5f35305b798cb462
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-03-09 08:19:54 +00:00
Eike Ziller
242f9fce58 Help: Disable Add Bookmark action when current page is blank
Task-number: QTCREATORBUG-14204
Change-Id: I5d4a7ada10f0d69363e96bb4efd158444a051b71
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-01 13:44:04 +00:00
Alessandro Portale
22d40f4dc6 Utils: Unify the different Bookmark icons
The variant in Bookmarks was left aligned, which is obsolete due to the
textmark overview tooltip. Bookmarks and Help now use the same icon which
is in Utils.

Change-Id: I0f7899de2f7a8803aa8493659d2991ac13739144
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-10-11 07:09:12 +00:00
Eike Ziller
1da05949e9 Help: Add button for opening help in external window
Task-number: QTCREATORBUG-16842
Change-Id: I2d647ea08c108459b56abacc765555d64e787951
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-09-23 11:54:00 +00:00
Eike Ziller
a416a5b6e3 Help: Option to open links in window
Task-number: QTCREATORBUG-16842
Change-Id: I420f48a00c56ebc89bade7e91ceb8ec391316e36
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2016-09-23 11:26:07 +00:00
Eike Ziller
9648a7e5b4 Context Help: Use correct "close" icon
Context help should have the icon that closes a "panel to the right".

Change-Id: I954171c4f2d604a23bf9c1e6f341de0f5cc87ace
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-09-16 14:18:05 +00:00
Eike Ziller
0768ef7382 HelpWidget: Use member initialization
Change-Id: I734fa9bb1bd5a0518a6051b9001f61f722c90691
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-09-16 09:53:45 +00:00
Ulf Hermann
15fbfaf2e9 Move icons to Utils
This way we can use them from libraries, not only from plugins.

Change-Id: Ic35cfd5f04d638d87606bf272b2c00ded1267c1b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-08-05 10:52:53 +00:00
Christian Stenger
a769d2f810 Help: Fix compile for Qt5.5
Change-Id: I8b8063043d5a6be2dc8f9ce1e2e9e36646959050
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2016-07-21 08:56:37 +00:00
Eike Ziller
8c94419a0b Help: Remove unnecessary QLatin1Strings
Change-Id: Ia5c83d5e2c392873f400f3db396b9c355cdd4192
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-07-21 06:12:22 +00:00
Orgad Shaneh
d01adc134d Help: Use Qt5-style connects
The heavy lifting was done by clazy.

Change-Id: Ied9c7fcc031e530c41b342de950e2f0ac730bbb1
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-30 12:12:00 +00:00
Alessandro Portale
a6683575c4 Icons: Move "next/prev", "[un]locked" and "zoom" from Core to Utils
They are needed in the timeline view.
The change in qtcreator-project.qdocconf makes sure
that qdoc still finds the referenced icons.

Change-Id: I812fba8e57d06d93efc00c295467c83c08cd1784
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-05-31 08:51:12 +00:00
Takumi ASAKI
cfd69678d2 Help: Fix translation context
Change-Id: I36f854eb56fed17b736af8390da08b01d72ee418
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-05-30 07:50:43 +00:00
Eike Ziller
4a826ada04 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	qtcreator.pri
	qtcreator.qbs

Change-Id: I0cbc9d335073e3234f472aa43f462eef9a9178aa
2016-04-22 15:13:58 +02:00
Alessandro Portale
5e32183c9b Theme: Separate run/stop/interrupt icons in menus
And for that, we also need separate theme color roles.

Change-Id: I27bf4499acb516f7f824f5e57632797653b150ec
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-21 15:57:56 +00:00
Eike Ziller
ee8bf341c6 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/projectexplorer/session.cpp
	src/plugins/qmlprofiler/qmlprofilerclientmanager.cpp

Change-Id: I6946139f5e5fa3a9cdbb322fd50be248e2c0133f
2016-04-20 14:58:48 +02:00
Eike Ziller
a6aafe3c45 Add QTC_GUARD
Similar to QTC_CHECK, but has the boolean result of the condition as
value. Use it in the form

if (QTC_GUARD(condition)) { ... }

Replace some occurrences of

QTC_CHECK(condition)
if (condition) { .... }

Change-Id: I8eea02f869eb7a183dfbf4810dace48097880519
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-18 11:34:03 +00:00
Alessandro Portale
2b05793083 Help: Improved bookmark icon for non-toolbar
This change makes the bookmark icons in the bookmark list and locator
look better.

Change-Id: I9d8fab31ca945ad7d93deb82942ac0f3f972e993
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-04-15 10:01:21 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Alessandro Portale
03c07b80fd Core: Unify the close icons
Use the same image file and recolor it as needed,

Change-Id: I914819a53ca05d83ca5b88adf44706b460b48ac0
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-12-04 10:47:32 +00:00
Alessandro Portale
033862f305 Themed Icons: Introduce Utils::Icon
Instead of describing icons via file name or in the themed icons case
via
a string that is a list of mask/color pairs, we have now a class for it.

Icons are now listed in per-plugin *icons.h headers.

RunControl::m_icon was The only place left where an icon property was in
fact a string. This patch changes that member to be a Utils::Icon.

Change-Id: Ibcfa8bb25e6d2e330c567ee7ccc0b97ead603177
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-11-25 12:30:52 +00:00