Commit Graph

135 Commits

Author SHA1 Message Date
Mathias Hasselmann
da2e60fa3e Core: Show context of filter matches
When inspecting logs often enough the relevant information is next to
the line with the unique expression that's easy to match. The `grep`
tool solves this problem by providing various `--*context` options
which configure how much context to show for each match.

This change tries to replicate this feature.

Task-number: QTCREATORBUG-30167
Change-Id: I6432870c0b958df8c5dc616009aea4ca54973245
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-07-09 09:00:17 +00:00
Eike Ziller
7a055a2f0a OutputWindow: Add "Save Contents" to context menu
And give individual output windows the option to set a default file name.

Change-Id: If3090063055c1b37f4f2d63b971fe0476f11806e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@signal-slot.co.jp>
2024-02-12 07:44:19 +00:00
hjk
bc15dcd8fe TextEditor: Move access to smaller settings chunks
Change-Id: Id827edbd19dde54b66cb4349d9c832bc23110adc
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-02-01 13:50:53 +00:00
Eike Ziller
b0043ed1ac OutputPane: Use setter for priority and fix default visibility
Do not show the buttons of output views with priority < 0 (instead of
only == -1). Reduce the number of buttons that are shown by default to
the essential ones.

Change-Id: I5b44f18537b3033ce9d616f044a8b54b76988783
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-18 10:14:51 +00:00
Eike Ziller
053c6253b8 OutputPane: Add an id() for the settings
It was using the displayName for the key in the settings (visibility and
shortcut), which is annoying when changing the language.

Change-Id: Iffa784347c59389599c90f468dcba15834599c39
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-18 10:14:42 +00:00
Eike Ziller
409a4c972a OutputPane: Use setter for display name
Change-Id: I2e89fbd052330c9e7124272c2f2fa81a0db94de9
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-18 10:14:35 +00:00
hjk
1a88508654 ProjectExplorer: Use latest settings style for compile output window
Change-Id: I6b4c8bf3ed7b9589a4b7e7ee77cd0fc5011954c3
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-07-21 15:43:55 +00:00
hjk
9574122da1 ProjectExplorer: Aspectify Compile output settings page
Change-Id: Icc7b1917a57a96e482db7b4f0ba5c0a203f4958c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-06-01 09:05:42 +00:00
Eike Ziller
c3c99174e4 Use common tool tip for "Configure..." kind of buttons
We have a function that centralizes the text for that.

Change-Id: I9d9fbed6e111038e7512030e199b8d8d03fbbafa
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-02-16 09:07:12 +00:00
Jarek Kobus
288b43424a Remove unneeded includes of task.h and taskhub.h
And some other includes spotted by the way.

Change-Id: Icd5eadf16617506fe48fae52ff0639d247002d75
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-02-14 10:35:08 +00:00
hjk
c5f7f5ab0a ProjectExplorer: Tr::tr
Change-Id: I8f1b463c5cc7a53627f7a9ad261998b92f13e56a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-16 12:10:24 +00:00
Jarek Kobus
9438575beb ProjectExplorer: Move settings structures out of Internal namespace
There is a public exported API that returns these structures,
and different plugins use it, so there is not point in keeping
them inside Internal namespace.

Remove some unused includes.

Change-Id: Ia9d3fc83738c38ae37f04ae0f518ec5d972c9d85
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-01-13 15:06:19 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Leena Miettinen
34ecdc3008 UI text: Replace "pane" with "view" for "Output panes"
Some occurrences of [Output] pane were still found in
translatable strings.

Change-Id: I70c0b6562790b7eb835b2f6a1522fa34fb9c2b51
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-09 15:31:05 +00:00
Thomas Hartmann
af24e428f2 Rename 'output pane' to simply 'output'
Change-Id: If45e053a32855bca68dc71cb5da22f981146e45b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-01 19:25:27 +00:00
Leena Miettinen
4f3d3d445c Project Explorer: Fix UI text
Task-number: QTCREATORBUG-27055
Change-Id: I9b0e4f02ea7d1ebb14a9581f21c76b8908589334
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-17 12:08:37 +00:00
Christian Kandeler
400ada2daa ProjectExplorer: Dis-ambiguate issues pane's "show output" action
Amends 08a86169db.

Fixes: QTCREATORBUG-27031
Change-Id: Ie6d214673f6c1c52aab1a035c84a7381f9965588
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-02-10 12:17:13 +00:00
Christian Kandeler
08a86169db ProjectExplorer: Generalize issues -> output pane linking
This feature was specific to the compile output pane, but we want
to have it in other panes too.

Change-Id: I110b27af7d0aa23acbc5623d1c0405816250df19
Reviewed-by: hjk <hjk@qt.io>
2021-11-25 15:19:42 +00:00
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