From d9dd1f8d527b47fba0cc683f9ea34055e2a7283d Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 11 May 2020 15:31:00 +0200 Subject: GCC parser: Create fewer and better issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/libs/utils/outputformatter.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/libs/utils/outputformatter.h') diff --git a/src/libs/utils/outputformatter.h b/src/libs/utils/outputformatter.h index dcc5b5f76c..d91f96fa13 100644 --- a/src/libs/utils/outputformatter.h +++ b/src/libs/utils/outputformatter.h @@ -159,6 +159,9 @@ public: bool hasFatalErrors() const; + static const QList linkifiedText(const QList &text, + const OutputLineParser::LinkSpecs &linkSpecs); + #ifdef WITH_TESTS void overrideTextCharFormat(const QTextCharFormat &fmt); QList lineParsers() const; @@ -185,8 +188,6 @@ private: void dumpIncompleteLine(const QString &line, OutputFormat format); void clearLastLine(); QList parseAnsi(const QString &text, const QTextCharFormat &format); - const QList linkifiedText(const QList &text, - const OutputLineParser::LinkSpecs &linkSpecs); OutputFormat outputTypeForParser(const OutputLineParser *parser, OutputFormat type) const; void setupLineParser(OutputLineParser *parser); -- cgit v1.2.3