When working with make wrapper scripts, sometimes they forward
everything to stdout. When this happens failures are not parsed,
and the are not "clickable" in QtC.
This patch adds an option to enable parsing of standard output.
Change-Id: I44b283dbdf6286f90c546898d496bff41de0d5ed
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Same layout, effectively the same purpose
Change-Id: I742d85ed06c07009ebb9696734f00894275859a3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This is usually used in a wrong or at least misleading way.
Replace most of the usages by newly introduced GeneralMessageFormat
as most of the replaced usages just print to General Messages and
using any of the existing formats would change the layout of the
text. Except for some special debug output inside the valgrind plugin
that can use one of the existing formats which also makes it easier
to spot them and the runners which print QC internal output.
Task-number: QTCREATORBUG-24560
Change-Id: I824dc4250b2f3e4656bab8676b45c98e3407d59c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
On Windows applications may print to the Windows internal
debug console. This output is retrieved and passed around as
DebugFormat as it is impossible to guess whether stdout or
stderr had been used when printing.
But output in DebugFormat had been ignored so far - fix this
and handle this as inside the Qt test parser.
Fixes: QTCREATORBUG-24560
Change-Id: Ic5e3723c3e3e47556264e4c5cf719706ee7eaf1c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Fix the following clazy warning:
lambda return type deduced to be QStringBuilder instead of QString.
Possible crash. [clazy-auto-unexpected-qstringbuilder]
We fix it by defining explicitly the return type of lambda.
Change-Id: I50e4a52c7039d736c8db9274e21a0c4eb63df5bd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Empty lines can be relevant semantically, e.g. to mark the end of a
block of messages.
Amends 5cb74af166.
Change-Id: I31cb32dcbf6a69f03324e0d2c00f95547c994d85
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... for the edge case of a lone carriage return occurring in the output.
Amends b0cad9e9c7.
Also adds missing adaptations to the unit test.
Change-Id: I219b24b8fb41bb0fcea9f677cd79286d03b130c2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
When inserting a line into an output window, we have to delay appending
the line feed character. Otherwise strange visual effects appear under
certain circumstances.
I have no idea why.
Fixes: QTCREATORBUG-24411
Change-Id: If8842ae4d9db36d514996b1f34dcca0432fafbfc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
If we encounter a relative file path that can map to more than one
absolute file path, we do not linkify it, as that would be misleading.
However, we forgot to check whether the "different" candidates are
really different. For example, consider the following situation:
- We have a header file /usr/include/header.h.
- This file shows up in the compile output as "../header.h".
- At that time, we have two search dirs /usr/include/libA and
/usr/include/libB.
- This resulted in two candidate file paths
/usr/include/libA/../header.h and /usr/include/libB/../header.h
- The relative path was rejected as ambiguous.
Fix this by checking for duplicates when gathering candidates.
Change-Id: I139b848d938113f1b5a959d8043411f7f3e809be
Reviewed-by: hjk <hjk@qt.io>
Using a dedicated OutputLineParser ensures that we only ever see
complete lines and thus prevents "partially red" lines in the compile
output pane.
Fixes: QTCREATORBUG-24209
Change-Id: I12b3de70b81789afe727b66e366facdcc81f8ab8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Current implementation requires each VCS to connect to the referenceClicked
signal. Only Git does it, but this is conceptually wrong. If other VCSs
would connect to the same signal, all of them will act upon clicking a
link, which can result in multiple editors, most of them are likely to be
invalid anyway.
By default executes vcsDescribe. Can be extended or modified by subclasses.
Change-Id: Ib953009efd77446a4b2963f0aa8a2f3f3d26509f
Reviewed-by: Artur Shepilko <artur.shepilko@nomadbyte.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Change-Id: I1d4fc0f25f1882a34058c66c51376982cc70238e
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Consider the following compiler warning:
In file included from qgroundcontrol/libs/mavlink/include/mavlink/v2.0/
ardupilotmega/ardupilotmega.h:946,
from qgroundcontrol/libs/mavlink/include/mavlink/v2.0/
ardupilotmega/mavlink.h:32,
from qgroundcontrol/src/comm/QGCMAVLink.h:24,
from qgroundcontrol/src/comm/LinkInterface.h:21,
from qgroundcontrol/src/comm/LinkManager.h:21,
from qgroundcontrol/src/QGCApplication.h:27,
from qgroundcontrol/src/QtLocationPlugin/
QGCMapUrlEngine.cpp:19:
qgroundcontrol/libs/mavlink/include/mavlink/v2.0/ardupilotmega/./
mavlink_msg_vision_position_delta.h: In function ‘uint16_t
mavlink_msg_vision_position_delta_encode(uint8_t, uint8_t,
mavlink_message_t*, const mavlink_vision_position_delta_t*)’:
qgroundcontrol/libs/mavlink/include/mavlink/v2.0/ardupilotmega/./
mavlink_msg_vision_position_delta.h:138:178: warning: taking address of
packed member of ‘__mavlink_vision_position_delta_t’ may result in an
unaligned pointer value [-Waddress-of-packed-member]
138 | return mavlink_msg_vision_position_delta_pack(system_id,
component_id, msg, vision_position_delta->time_usec,
vision_position_delta->time_delta_usec, vision_position_delta-
>angle_delta, vision_position_delta->position_delta,
vision_position_delta->confidence);
|
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
Before this patch, this output resulted in nine entries in the issues
pane, which defeats the purpose: The user is supposed to get a quick
overview of the build problems, but instead we basically just copied
over the contents of the compile window, which is of little help and
also slows things down by overloading the task model.
We now try harder to identify output lines that belong to the same issue
and create just one task for them. File paths are now linkified in the
detailed issue view, so that users can still navigate quickly to all
involved files.
Task-number: QTCREATORBUG-22914
Change-Id: I1aed2ffac7d363c02073ef318cb863754379cf6d
Reviewed-by: hjk <hjk@qt.io>
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>
An OutputFormatter takes some string and prints it into a text edit.
In addition, it can ask any number of registered OutputLineParsers
whether they think any special formatting should be applied to the
current line.
This mechanism is now properly modeled by our class design, rather than
being hidden in a monolithic class where everything had the same type,
no matter what its purpose was.
Prospective contributors can now simply be pointed to the
OutputLineParser class and will see at one glance what they have to do.
Change-Id: I9844499f062c94fb038ce73fd6f26576910148c2
Reviewed-by: hjk <hjk@qt.io>
Inheritance is not the right design here (anymore), so we merge the
derived class into the base for now. We will later re-split in a more
sensible manner.
Change-Id: I326e9f02287b3070f47147c771f3fa908d51b7fb
Reviewed-by: hjk <hjk@qt.io>
Instead of working directly on the text edit, the specialized
OutputFormatter classes now simply ask the base class to do it for them.
In practice, the request currently always is "turn this part of the text
into a link", but the interface can be extended to other types of
formatting, should that ever be required.
This is a win/win situation: Derived classes no longer have to fiddle
with QTextCursor & friends (nor do they have to call any base class
functions), while the base class can make strong assumptions about what
the derived class does to the text edit (i.e.: nothing).
Change-Id: Icc4bc52d4001b0359247563e39a206fa274833d7
Reviewed-by: hjk <hjk@qt.io>
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>
All output formatters are line-based, and they all did their own line
splitting and, if they didn't entirely ignore it, handling of partial
lines.
Instead, we now do all the book-keeping in the base class, and the
subclasses always work with complete lines.
Change-Id: I0b0df7951d0e4f6601f4d912230071784c87b3d3
Reviewed-by: hjk <hjk@qt.io>
There does not seem to be a reason to remove trailing newlines and re-
insert them on the next call. Presumably, this is related to historical
auto-newline magic.
Change-Id: If4dc8acf022d3895b41b887af25d63cca36bf8a4
Reviewed-by: hjk <hjk@qt.io>
Presumably, they were intended for output that shouldn't get an
automatic newline, but if there ever was such a thing as automatic
newlines, it must have evaporated over time. All users of
OutputFormatter provide a newline if they want one.
Change-Id: Ibd219b7305fd503ce075d6f77930d2b538d5e2e8
Reviewed-by: hjk <hjk@qt.io>
That's where it belongs: The logic there is applicable to all output
formatters, not just those used via an output window.
Change-Id: Idf4ca8d22631ca96feb97553f28724c0275e0bf8
Reviewed-by: hjk <hjk@qt.io>
There does not seem to be a reason for the duplication.
Change-Id: I7c9b016c76a9aa93ccd93af0aea931fa5b148300
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
Merge QtOutputFormatter::linkFormat and
PythonOutputFormatter::linkFormat to OutputFormatter::linkFormat because
these two functions were identical.
Fixes: QTCREATORBUG-23562
Change-Id: I1337b2fd66fc7d7b6742eb5e9c1a2caf1dc6b5bd
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
For some reason, Q_UNUSED includes already a semicolon, adding one
on the user side creates an additional empty statement.
Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
For example, git rebase for outdated Git versions has:
stdout: Rebasing (1/2)\r
stdout: Rebasing (2/2)\r
stderr: Successfully rebased and updated refs/heads/master.\n
The stderr is supposed to overwrite the Rebasing line. Without
redirections, this is what you get on the terminal.
Conform to that by deleting a line that ends with \r even if the next
output has different format.
The only exception is when the following *starts with* \n. On this case, it
will behave as \r\n, meaning it will *not* overwrite the previous line, and
will continue on the next line.
This amends commit 79cfb784be.
Fixes: QTCREATORBUG-22179
Change-Id: I4208008095f3e186aa9b4cee99fa5cd807ffdbcb
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
\r\n means newline. It shouldn't erase the previous line.
Change-Id: I22d9919c9c0277e4c0932eba535dbfb84a1d5e71
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Instead of storing a state for \r, select the text right away, so the next
insertText will overwrite it.
Change-Id: I40d39220106a6c08c12ee0b92b5b3d745277abb6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This reverts commit 3080d0d9e7.
Having the output pane editable is considered a feature by some as
it allows easy modification of the contents before passing into
other, less accessible interfaces, like Gerrit comment fields.
Task-number: QTCREATORBUG-18418
Change-Id: Ice0c6c5e5787d242c714a7b0f61559a70d25d243
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Retrieve output from Journald more reliably.
Change-Id: Ic733698e7ed3717841a5a902c4f1e9e94d952885
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
There is no point to change the application output content most
probably it was enable to allow text selection using the keyboard.
This change is needed to enable output filters, which can't use the
existing content from the output windows because they might be already
filtered.
Change-Id: Ia272143a3a0b085544ee9cd550a4ad4800e3f4dd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
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>