Commit Graph

844 Commits

Author SHA1 Message Date
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
Eike Ziller
2c17fbe8dd Make Core independent from QtHelp
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>
2018-09-04 11:21:18 +00:00
Eike Ziller
c81070aa7d Help: Remove reading of old settings
Change-Id: Icb479dd0c558f45e70cb1ff0665b1e51e131d0b6
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-09-03 09:38:50 +00:00
Eike Ziller
8fa449126c Fix context of Locator input
- 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>
2018-08-09 08:55:25 +00:00
Robert Loehning
2d7d0abd2d Help: Make "System Information" a QDialog again
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>
2018-06-08 10:46:06 +00:00
Eike Ziller
6e66b2a078 Remove some lambdas from Utils::transform calls
It is often possible to user (member) functions or members directly.
That improves readablility and potentially reduces the total number of
symbols.
Also use qobject_container_cast at places where it is appropriate.

Change-Id: Ia2591bca356591e001e2c53eeebcf753e5bc3c37
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-05-28 13:45:20 +00:00
Tobias Hunger
3f578757ff Help: Use override consistently
clang-tidy fixes from modernize-use-override check.

Change-Id: I3aec6d7ab1e8f088b745d2d9730e3d49ced42031
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-07 15:44:48 +00:00
Alessandro Portale
1dbdd259be Remove some obsolete code inside QT_VERSION_CHECK sections
With Qt 5.9 as minimal build version, we don't need to handle 5.7 or 5.8

Change-Id: Ie1eed95ab46364452b0633f78bebc565a4a63f4a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-04-27 07:43:49 +00:00
Alessandro Portale
4317e350f5 Update Options dialog icons
A new set of scalable and themable icons with unified look as provided
by Diana.

Task-number: QTCREATORBUG-20325
Change-Id: I68498b034e9e43fbb61511a38d9c7fc0003ab076
Reviewed-by: hjk <hjk@qt.io>
2018-04-24 14:43:35 +00:00
Eike Ziller
d1ec4c1204 Clean up options page category display name and icon set up
In cases where plugins extend an existing settings category of a plugin
that they depend on anyhow, they do not need to specify the translated
display name and icon for that category.
Some options pages were already not setting the icon, but still the
translated name, which makes even less sense.
Clean up this mess, only setting display name and icon if that is
necessary.

Change-Id: I8bc9d0c51b11d48f1d847337838704d663e70b45
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-04-23 11:12:26 +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
Eike Ziller
7099f21586 Merge remote-tracking branch 'origin/4.6'
Change-Id: I959428882b9da427c6bf522145646048141888c6
2018-04-19 09:25:04 +02:00
Eike Ziller
0f090890a9 Disable help search widget while indexing documentation
If you try to search while indexing, in the best case you'd get
incomplete results (though with a warning that that is the case), and in
the worst case it crashes because of QTBUG-66816. So just disable the
search widget with info and progress indicator in that case.

Task-number: QTCREATORBUG-20295
Change-Id: Ibec602b1bc0e98f6fef029c6f10c0cdc5197294c
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-04-18 11:11:50 +00:00
Alessandro Portale
08c90cecc8 Help: Remove several unused icons
Change-Id: I3a8cc0413b728606d79aa36fa0fd45553f204e5a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-04-09 13:33:28 +00:00
Orgad Shaneh
7d3a79c696 Utils: Purge asConst
Replace by qAsConst.

Change-Id: I3301366f73c066c86f08df7188d70dc3b613c55c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-04-09 09:04:00 +00:00
Eike Ziller
454e9ee5ca Add Context Help to text editor context menu
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>
2018-03-29 08:26:24 +00:00
Razi Alavizadeh
437199acd8 Plugins: Re-categorize plugins which are in "Qt Creator" category
Category of DiffEditor, ImageViewer, Macros and UpdateInfo
  was removed, i.e., they were moved to "Utilities" category.

Category of other plugins that were in "Qt Creator" category,
  changed to "Core".

By this patch, forks of QtCreator don't need to change *.json.in files locally.

Change-Id: I243c6b1831c0b880d32b2118db71f0b281590b7b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-20 15:31:49 +00:00
Eike Ziller
0b10ecc718 Merge remote-tracking branch 'origin/4.6'
Conflicts:
	src/plugins/cmakeprojectmanager/cmakeproject.h
	src/plugins/debugger/debuggerplugin.cpp
	src/plugins/ios/iosrunfactories.cpp
	src/plugins/nim/project/nimproject.h
	src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp
	src/plugins/qmakeandroidsupport/qmakeandroidrunfactories.cpp
	src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
	src/plugins/qmlprojectmanager/qmlproject.h
	src/plugins/qnx/qnxrunconfigurationfactory.cpp
	src/plugins/qtsupport/exampleslistmodel.cpp
	src/plugins/winrt/winrtrunfactories.cpp

Change-Id: Ib029fdbaa65270426332f5edd6e90264be5fb539
2018-03-13 11:25:38 +01:00
Robert Loehning
37aea43479 Don't translate default windowTitle again and again
Change-Id: I4b4ff16e02c517bcd5a7c5ae73f62dd2a5bcc7cc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-03-06 14:57:40 +00:00
Eike Ziller
5f68209541 Fix middle mouse button in help viewer
It didn't do anything on links though opening links in new pages was its
purpose.

Task-number: QTCREATORBUG-19344
Change-Id: I9560a59bd2ad4ec7179dce984cf3bc5160b84ff3
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-03-05 11:35:21 +00:00
Eike Ziller
c7fdb93865 Merge remote-tracking branch 'origin/4.6'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp

Change-Id: I2445882a270731b866b04f28ff87d161224c539a
2018-02-13 13:37:37 +01:00
Eike Ziller
2ce37a86ef Merge remote-tracking branch 'origin/4.5' into 4.6
Change-Id: I3ab4084095d90daf064475157b9a3cdce56dbdec
2018-02-07 12:03:43 +01:00
hjk
d3eb585db9 Help: Pimpl plugin and avoid use of global object pool
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>
2018-02-05 12:42:27 +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
Eike Ziller
e7316c9fe7 Help: Workaround overrideCursor issue with WebEngine based viewer
QWebEngineViewer never sends a loadFinished signal (but a loadStarted
signal) when only the URL fragment changes (QTBUG-65223). Work around by
logging the last URL and recognizing that condition.

Task-number: QTCREATORBUG-19649
Change-Id: I7b96fe60f5c76ebffb36c23e8d62c6cb1aa515aa
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-02-01 12:08:37 +00:00
David Schulz
b500bba6af Help: call setupData after setting the collection fileData
Setting the collection file leaves the help engine in an invalid state.
It is important to invoke setupData() in order to setup the help engine
again.

Change-Id: I252d7999c113db4f584bcaf94d42c609f507c1cb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-01-24 13:40:01 +00:00
Nikolai Kosjar
dd06a4188d Core: Return context help id by callback
...to support asynchronous providers.

Change-Id: I483489c74e7886d5bc2bf00b65540c3d2c7afee0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-01-18 13:54:02 +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
Alexandru Croitor
ee70917f29 Add qtwebengine backend to qbs help plugin build rules
Change-Id: I924637581741dc68d94270cc680df20499778b03
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-01-10 15:47:27 +00:00
Andre Hartmann
b2aa1b9845 Locator: Cleanup and modernize Locator and filters
* Omit QLatin1{Char|String}
* Use member initialization
* Use range-based-for
  (and fixed the cases with non-const Qt container)
* Sort includes to common style

Change-Id: Ibc33a732bb153862efd6d5febfac758229cb61d4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-12-30 18:58:25 +00:00
Eike Ziller
1c1dd45bfe Merge remote-tracking branch 'origin/4.5'
Change-Id: Iebd340258966aff910fb9ab0e45b5149e8f242f0
2017-10-12 09:49:14 +02: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
Tobias Hunger
c330cf0679 Replace manual signal blocking/unblocking with QSignalBlocker
Change-Id: Ibb59fab4e37d045e506c5a8172b6f5cbb955b028
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-04 09:35:06 +00:00
Laurent Montel
8883d496b3 Help: fix forward declaration
Change-Id: I88b5cca65d7e98e7f9d9e5d082cc137e822bc9b4
Reviewed-by: hjk <hjk@qt.io>
2017-09-28 07:53:26 +00:00
Alessandro Portale
5e89fae10f Unify the dimensions for all mode/action bar icons
Having icons of all different kinds of sizes makes it difficult to get
the painting right in all cases. It definitely fails when the szsytem is
running in multi-monitor mode with different scaling factors. Unifying
the dimensions makes it possible.

This change should not cause any visual difference in a purely scaled or
unscaled screen.

Task-number: QTCREATORBUG-18869
Change-Id: I3a864c9a86036b4f4f3b350a489077b247ca85b7
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-09-19 13:54:30 +00:00
Eike Ziller
8e3efd92c6 Fix Get Started Now (and other links)
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>
2017-09-12 07:32:34 +00:00
Eike Ziller
04da881268 Fix copyright year in plugin info, --version, and macOS info
By using the new QTCREATOR_COPYRIGHT_YEAR variable

Task-number: QTCREATORBUG-18612
Change-Id: I3bcf0319660d210436d3130c00f43325c460a66c
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2017-08-24 11:23:40 +00:00
Eike Ziller
119ff05ccc Help: Make restoring override cursor more robust
Some help backends are not too consistent in how they send started and
finished signals (QtWebEngine I'm looking at you), so make restoring the
override cursor more robust in the base. As long as the backend reports
that it is finished, guarantee that all previous override cursors are
restored.
Also ensure override cursors are restored in case the viewer is
destroyed.

Task-number: QTCREATORBUG-17758
Change-Id: Icb1cd1eabfb232135a391a550d8e6719a74189eb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2017-08-23 15:12:20 +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
71b78e1085 Help: Remove workaround for fixed Qt bug
QTBUG-26593 is fixed since Qt 5.3.2. The bug lead to e.g. the mouse
cursor not changing it's shape when hovering over links.

Change-Id: Ib8d2188cbbe87592217f4159286f38bc1c6f2b28
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-07-19 08:03:08 +00:00
Eike Ziller
4388b5b6cd Help: Remove unnecessary class
By using connect to a function directly.

Change-Id: Iab06810203720f26eba908293438a6d12631ea15
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2017-07-14 06:46:36 +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
be3dbd4c53 Help: Do not unnecessarily open help mode
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>
2017-07-13 10:06:07 +00:00