Commit Graph

116 Commits

Author SHA1 Message Date
Eike Ziller
29df497d25 Add text search functionality to output window centrally
All output windows should be searchable with Edit > Find/Replace
(Ctrl+F), no reason for every single instance setting that up
individually.

Add a find placeholder for the build system output in Projects mode, so
the search functionality is available there as well.

Change-Id: Idad6824bfb21e6ae9ab923191a7e83b43256e68b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-20 13:58:45 +00:00
Andre Hartmann
60a275ce62 CompileOutputWindow: Fix creation of task positions
When jumping from the issues pane to the compile output,
the selected text was always starting and ending one line
earlier than expected.

Probably broken by 1c6e4fbd3.

Fixes: QTCREATORBUG-25497
Change-Id: Ia5b796f27faa91e45b10b945dbf6261f1dbce036
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-03-25 19:38:00 +00:00
Eike Ziller
c898047880 ProjectExplorer: Don't save defaults to settings
Writes less settings and makes it possible to change defaults in the
future.

Task-number: QTCREATORBUG-24762
Change-Id: I73873b3684827b4fe27cfa5ea2f62a76003f9750
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-12-16 08:40:24 +00:00
Jarek Kobus
d2e1feceac Don't clash signal names with other methods
In case when signal name clashes with other method name -
rename accordingly.
Remove some repeated signal declarations - they are already
declared in superclass.

Change-Id: Ie1430b85d6436d26996494fa44c7554fb354b6ce
Reviewed-by: hjk <hjk@qt.io>
2020-11-18 12:20:43 +00:00
Orgad Shaneh
4b6a6acc4e Core: De-pure IOutputPane::visibilityChanged()
Most implementations are empty.

Change-Id: I811cacfc2918c8b2803798c4f5d3dabc7d60ccd1
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: hjk <hjk@qt.io>
2020-10-09 05:23:17 +00:00
Christian Kandeler
37ce45c21e Core::OutputWindow: Prevent UI thread overload
... by splitting up huge amounts of output and feeding it to the
formatter in more digestable chunks, with event processing in between.
This prevents a UI freeze in the case that a single file emits a large
amount of diagnostics and the build tool buffers the output (as ninja
and qbs do), which therefore comes in all at once.
Apart from keeping the UI responsive, this also speeds up execution of
the build step itself, as the remaining output can now be displayed
after it has finished. If another build step is started and there is too
much output pending to flush all at once, we discard the pending output,
in order to prevent the delay to accumulate.

Fixes: QTCREATORBUG-23944
Task-number: QTCREATORBUG-22914
Change-Id: I7cfef939a85bbd13730f607b0f83c36473b0e550
Reviewed-by: hjk <hjk@qt.io>
2020-05-05 07:40:08 +00:00
Christian Kandeler
1c6e4fbd32 Merge output formatters and output parsers
Now only one piece of code needs to be written to both linkify output in
an output pane and create tasks for it in the issues pane.
The calling sites are also simplified. For instance, until now, build
steps had to feed their output parsers manually and then push the
created tasks up the signal stack in parallel with the actual output,
which the build manager relied upon for cross-linking the output pane
content. Afterwards, the output would get forwarded to the formatter
(and parsed for ANSI escape codes a second time). In contrast, a build
step now just forwards the process output, and task parsing as well as
output formatting is done centrally further up the stack.
Concrete user-visible improvements so far:
    - File paths in compiler/linker messages are clickable links now.
    - QtTest applications now create clickable links also when run
      as part of a build step, not just in the app output pane.

Task-number: QTCREATORBUG-22665
Change-Id: Ic9fb95b2d97f2520ab3ec653315e9219466ec08d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-04-23 08:47:08 +00:00
Christian Kandeler
6a07e2c341 Output panes: Do not allocate extra standard formatters
The OutputWindow base class has a functioning default formatter these
days.

Change-Id: I0a75d0a081cdd2cfdd913388419483df836a53e9
Reviewed-by: hjk <hjk@qt.io>
2020-03-20 14:49:49 +00:00
Christian Kandeler
04a99c1de1 Remove the limitation that output formatters have to be exclusive
Introduce an aggregating output formatter that forwards its input to a
sub-formatter that feels responsible for it, or otherwise lets the base
class handle it.
Our output panes now use such an aggregating formatter.
In particular, this means that in the future, we won't have to stuff all
run control output formatting into the Qt output formatter anymore.

Change-Id: I5498f200a61db10ccff3ec8974c6825da7f7072d
Reviewed-by: hjk <hjk@qt.io>
2020-03-20 13:48:15 +00:00
hjk
c3f7ef5340 Several SettingsPages: Code cosmetics
De-Q_OBJECT-ify, remove unnecessary #includes, final-ize, etc.

Change-Id: I461d3e73400dacac90c22e7c84a40e3ea1718b6e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-01-30 15:04:58 +00:00
hjk
c75923756a Core: Provide empty implementation for IOptionPageWidget::finish()
Having it pure virtual only lead to a lot of unnecessary
re-implementation.

Change-Id: I37f71d1a160e21b93c7c73a6304b0eb6d5f0441d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-01-15 12:28:29 +00:00
hjk
67eebd09a3 ProjectExplorer: Update CompileOutputSettingsPage
Change-Id: Ib5bfe959025a57f9ae5b5563385fb1663c313ede
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-01-08 17:03:16 +00:00
Christian Kandeler
aacfd340ca Output panes: Allow to invert the meaning of the filter field
That is, show only the non-matching lines.

Task-number: QTCREATORBUG-19596
Change-Id: Iac06a7c4531688dbf97c7d5c4d0cdb80979b5f95
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-12-02 13:14:30 +00:00
Christian Kandeler
41ade463da Output panes: Support keyboard shortcuts for zooming
Fixes: QTCREATORBUG-22567
Change-Id: I3c7419c7b464c329d8f8dae11db9a0b01e51f32c
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2019-06-24 14:14:07 +00:00
Christian Kandeler
2391ef6088 Output panes: Improve the way to signal that filtering is active
At the moment, background and foreground colors of an output pane are
changed (via the widget's palette) when filtering is active, in order to
make it clear to the user that the output is being tampered with. There
are several problems there:
    - The chosen background color is quite garish.
    - More importantly, the palette change has no effect in the
      compile and app output panes, because their output is explicitly
      formatted and thus not affected by the general text color change.
      As a result, the output may no longer be readable.

We fix this by choosing a less intrusive approach that simply darkens
(or lightens) the pane's background color a bit when filtering is
active. This is still clearly visible to the user.

Change-Id: I41e053b4b218be57fe7655e314d4ebf93f59f505
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-06-12 12:20:31 +00:00
Christian Kandeler
e34b41934d Output panes: Respect filter options
The UI elements for case sensitivity and regexp behavior had not been
doing anything until now.

Change-Id: Ie210103984fda64d4249c56f9a5b21200132108f
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2019-06-05 12:28:57 +00:00
Christian Kandeler
51afb04674 ProjectExplorer: Allow text filtering in compile output pane
Change-Id: Ibd5c20e5d5dbbb1867aefc8d701218469b3a427b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-29 12:57:14 +00:00
Christian Kandeler
9065902d2c Output pane settings: Make more more i18n-friendly
Change-Id: Iaccd369a8eea8df933cd036ed9f41f8730c9e973
Written-by: hjk <hjk@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2019-05-09 12:46:14 +00:00
Alessandro Portale
c453e896a0 Core: Fix enabling/disabling of zoomIn/Out buttons in output panes
Amends 48073b2990 to avoid the creation of extra toplevel windows (and
warnings on MS Windows on startup).

Also, ensure that that the initial tab-less application output pane
shows the buttons, albeit in disabled state. All other output panes do
not have to explicitly enable them.

Change-Id: I6c6ef374c09c77e2eb953743071917d9346ca85d
Reviewed-by: hjk <hjk@qt.io>
2019-04-23 16:39:24 +00:00
Andre Hartmann
48073b2990 IOutputPane: Refactor zoom function into base class
Try to make zoom and font handling in the panes more
similar and put common stuff into IOutputPane.

Change-Id: I59c38c5eecbf67b7ca6c9d84a6f61b1292a787df
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-04-16 14:20:22 +00:00
Christian Kandeler
14bffd2c88 ProjectExplorer: Add settings icon to app and compile output panes
This provides a natural shortcut to the respective options page.

Change-Id: I1e57c64d1541540cb1c0c44c6fb8eaad69fc2e32
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-04-04 10:44:31 +00:00
Christian Kandeler
0978901b73 ProjectExplorer: Introduce dedicated output settings pages
One page for application output, one for build output. The respective
settings are now easier to find, and the general Build & Run settings
page looks more tidy now. We will also be able to link directly to the
respective settings from some button in the output panes in the future.
As a side effect, this patch also introduces a dedicated "word-wrap
output" setting for the compile output pane. It used to share this
setting with the application output pane, which was not obvious and
might not be what the user wants.

Change-Id: I5629363863ffe38e0faa006d361ec21484b593f4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-03-12 08:50:45 +00:00
Orgad Shaneh
61aa2d3741 CompileOutput: Use output formatter
Change-Id: Ie7c3fd73de33fb5cfcc56f371ea72463f2ef72f4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-11-19 10:03:11 +00:00
Eike Ziller
70e5cab569 Core: Use restrictions on character count instead of line counts
Assume lines with an average of 100 characters for the transition
and use the character limit already in two cases.

Change-Id: I43316d51d7d5017aa413d6c910d3784a14237e9f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-09-26 13:08:37 +00:00
Alessandro Portale
8d19333075 ProjectExplorer: Modernize
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-default-member-init
modernize-use-equals-default
modernize-use-transparent-functors

Change-Id: Iebed22caa2e733d292f334e956e3d16b844e14e3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-07-16 10:01:53 +00:00
Eike Ziller
df796e2aa5 Merge remote-tracking branch 'origin/4.4'
Change-Id: Id525d68a899f2db14c2d52c200a3a2a8a4e81590
2017-08-24 13:23:04 +02:00
Orgad Shaneh
e59874f531 CompileOutput: Activate links only on left button click
Complements a7ffd67a91.

Change-Id: I3e70cf635774db3e126984dd70362aa0d3baa82a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-08-24 07:00:30 +00:00
Samuel Gaist
d6591625c3 Add support to change the number of lines of the compile output
This patch adds support to modify the number of line shown in the
compile output window. This will allow users with big projects to have
more room to look at when compiling.

Task-number: QTCREATORBUG-2200
Change-Id: I1023b2150a3eff4a33b8872fb711d150e5a8b00c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-08-02 15:29:04 +00:00
Orgad Shaneh
4290081831 ProjectExplorer: Move consts that are used in a single file out of header
+ inline where used only once.

Change-Id: I08c60551afde1d36a2c8d5005c1ea7e52ba0515b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-20 10:11:09 +00:00
Tim Jenssen
2631ffabd5 Remove spaces in initializer lists
Format initializer lists code style like.

Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013
Reviewed-by: hjk <hjk@qt.io>
2017-02-22 16:25:09 +00:00
Christian Kandeler
c05a3fdb3d Give the values of BuildStep::OutputFormat better names
The old ones did not convey their meaning very well. In particular,
NormalOutput and MessageOutput were easily confused.

Change-Id: Ia0a8c1b1c366ab3f5c59f751b37b8b1f68f6831d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-01-19 16:08:57 +00:00
Eike Ziller
39555d3b86 Projects mode: Make plus icon dark and get rid of branch indicators
The PLUS icon was actually PLUS_TOOLBAR, so name it that way and add an
actual PLUS icon.
Remove the drawing of the branch indicators from the kit tree view by
overriding the method that does it.

Change-Id: I395e5187c1738faaee3e122b4f3f359261b514d7
Reviewed-by: hjk <hjk@qt.io>
2016-09-21 10:02:22 +00:00
Alessandro Portale
f0b36b238a ProjectExplorer: Remove duplicated IOutputPane window titles
Change-Id: I9187feaccf137ca56f6db6c58367df84494e377f
Reviewed-by: Marc Reilly <marc.reilly@gmail.com>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-08-12 08:00:29 +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
hjk
08dc992aef Core: Use QList's initializer list contructor for output panes
More concise code.

Change-Id: I0c83a02de725648294e1b6b49669bdec0c47fafe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-07-11 07:39:13 +00:00
Alessandro Portale
338d0ceab1 ProjectExplorer: Use a better "Cancel build" icon in the menu
Change-Id: I442a76a7a4e98b358ac3714eef8e60d482a6e39b
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-05-11 14:05:46 +00:00
Tobias Hunger
95ac4edfd4 Projectexplorer: Modernize codebase
Change-Id: I4793b58aa77bcd46af99f8b843c0f7439cdc9269
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
2016-04-15 09:40:53 +00:00
Orgad Shaneh
15f8bb07ed ProjectExplorer: Use Qt5-style connects
The heavy lifting was done by clazy.

Change-Id: I619db09a79760186b72e7662490ed1205155c1a7
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-01 15:51:34 +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
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
Eike Ziller
6d4135d8f0 Merge remote-tracking branch 'origin/3.6'
Change-Id: Iddfa0d2f3c0fb8ba65c0e5d479ad8e2f2cb95685
2015-10-26 10:55:50 +01: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
Orgad Shaneh
5f0e4e4f76 ProjectExplorer: Remove unused local variable
Change-Id: Ic098ba98864cc1211358d975e4d14829d92d2ac0
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-10-19 08:44:13 +00:00
Daniel Teske
897718be05 CompileOutputWindow: Tweak clicking on "links"
Change the cursor to a HandCursor if hoovering over a link, and
make it single-click instead of double click.

Task-number: QTCREATORBUG-7542
Change-Id: I606510141eceece1f2b65f6ec1c6fffa838f2788
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-09-18 13:18:10 +00:00
Orgad Shaneh
15578266e4 ProjectExplorer: Add missing tooltips for zoom buttons
Change-Id: I3d4aa81f8b1e39b89954fa36e8352c06bbef4e9a
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-09-01 08:58:48 +00:00
Daniel Teske
8dfa9a5dab ZOOOOM for CompileOutputWindow and AppOutWindow
Implement zooming for the compile output and app output panes.
Those windows can be zoomed by toolbar buttons or ctrl+mousewheel.
The zoom factor is synced between app output panes, but not between
compile and app output. The scroll wheel zoom can be disabled
in the settings.

While at it, fix that the AppOutputPane did not update its font
on changes to the fontsettings.

Task-number: QTCREATORBUG-12476
Change-Id: I8a1639ab3d39c24a5fc21ed82f558f3d10efc02d
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-08-31 14:59:03 +00:00
Daniel Teske
4f383f77b4 Tasks: Make the linking of compile output to Tasks more robust
Clicking on error messages is supposed to jump to the editor.
And "Show Output" on the task is supposed to select the error
in the output.

The old code just registered the task for the last line of
output. This broke for every parser that allowed for
error messages that spanned multiple lines. And was obviously
also incorrect for tasks that weren't generated due to
compile output.

Fix both of those issues by giving the IOutputParsers more
control on which lines are linked to a task.

Task-number: QTCREATORBUG-14136
Change-Id: I095922c9875620dabfb7d406f6b152c8a9b25b62
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-04-21 13:42:03 +00:00
Orgad Shaneh
919e3c7261 Theming: Unify some duplicate color roles
Change-Id: Ic000abd9bd9381e20126d0ce56ce68a35a07efe2
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-03-30 07:51:57 +00:00
Thorben Kroeger
a4bb572a3b Theming: theme compile output pane
Change-Id: Ic364457884765ea755d0dc6e3e35296d5bd36359
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-03-23 09:12:49 +00:00
Eike Ziller
ddac471a8e Compile output: Do not do scroll wheel zooming
That was the behavior before the fix for QTBUG-30845 (which introduced
scroll wheel zooming for read-only QPlainTextEdit).

Change-Id: I216ed6c827d8dc966af3af67158e9c275c9fa949
Task-number: QTCREATORBUG-11017
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-03-17 11:27:46 +00:00