Commit Graph

76 Commits

Author SHA1 Message Date
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
Alessandro Portale
b8bdc6f669 Icon refresh: First step towards the new Qt Creator themes
http://blog.qt.io/blog/author/didesous/ announced new designs/themes
for Qt Creator. This patch replaces many of the existing toolbar icons
with recolorizable masks for better theming support.

Change-Id: I557aa485205fe2624f33724226f698c303342b40
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-10-23 16:04:52 +00:00
Montel Laurent
54eabfb0c1 Port to new connect api
Change-Id: If9948ced45095546f37f9f397b65f922dc925b6a
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-09-22 05:54:01 +00:00
Eike Ziller
3858c33d74 Merge remote-tracking branch 'origin/3.4'
Change-Id: I35ba4cc7f7052699c3006545514c866be3cb5fdd
2015-05-26 15:12:42 +02:00
Sergey Belyashov
31eaf32ab4 Fix untranslated messages
Change-Id: I21ff7f3f70116944ba08ea18bdeeb258c0984f09
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-05-19 12:17:18 +00:00
Eike Ziller
5e0f0268ae Help: Do not save settings in help database
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>
2015-04-24 08:32:38 +00:00
Eike Ziller
6302a28c97 Fix translation of help navigation panes
Change-Id: Ia82609d55311698ca675943cdfe7b2b91d6f59c2
Task-number: QTCREATORBUG-14241
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-04-21 15:56:56 +00:00
Alessandro Portale
57d2d6eb53 Help: Change OSX shortcut for bookmarks to Alt+Meta+M
The default shortcut for Help bookmarks Meta+B overrode the shortcut for
"cursor back". This patch changes it to Alt+Meta+M, which not only
removes the conflict but also makes it the same shortcut as the one for
the editor sidebar bookmarks.

Task-number: QTCREATORBUG-13093
Change-Id: I6f4f6c4891c34a3a00c39632bb0dae119d73cb99
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-03-12 12:23:03 +00:00
Friedemann Kleint
54da18eaaa Clean exported headers of the Core plugin.
Change-Id: I26472d568844d5fee62323e01f5c5c12082d5450
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-03-05 07:18:14 +00:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Eike Ziller
cd5e00034d Help: Fix highlighting of search terms.
It was using the wrong search help engine to get the search terms.
Instead let the search widget itself figure out the search terms, and
pass it directly on to the help widget when activating links.

Change-Id: Ib72220eafca69e92894fe7584b1e4dfd9a42cc7e
Task-number: QTCREATORBUG-13239
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2014-11-04 07:57:08 +01:00