From 46d703274ddf0f667ea2bd9da11d278e28c1ce1d Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 11 Aug 2020 11:21:54 +0200 Subject: Doc: Describe using custom output parsers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I423091cfa1d64f640ef6be62c86cf38cb82fe4d7 Reviewed-by: André Hartmann Reviewed-by: Christian Kandeler --- .../images/qtcreator-custom-parser-options.png | Bin 0 -> 11240 bytes doc/qtcreator/images/qtcreator-custom-parser.png | Bin 11909 -> 3597 bytes .../creator-only/creator-custom-output-parser.qdoc | 87 +++++++++++++++++++++ .../creator-only/creator-projects-compilers.qdoc | 34 +------- .../creator-projects-settings-environment.qdoc | 2 +- .../creator-projects-settings-overview.qdoc | 2 + .../creator-projects-settings-sharing.qdoc | 2 +- doc/qtcreator/src/qtcreator-toc.qdoc | 1 + 8 files changed, 94 insertions(+), 34 deletions(-) create mode 100644 doc/qtcreator/images/qtcreator-custom-parser-options.png create mode 100644 doc/qtcreator/src/projects/creator-only/creator-custom-output-parser.qdoc (limited to 'doc') diff --git a/doc/qtcreator/images/qtcreator-custom-parser-options.png b/doc/qtcreator/images/qtcreator-custom-parser-options.png new file mode 100644 index 0000000000..25fbf3b5ac Binary files /dev/null and b/doc/qtcreator/images/qtcreator-custom-parser-options.png differ diff --git a/doc/qtcreator/images/qtcreator-custom-parser.png b/doc/qtcreator/images/qtcreator-custom-parser.png index ea300583aa..fbc344518c 100644 Binary files a/doc/qtcreator/images/qtcreator-custom-parser.png and b/doc/qtcreator/images/qtcreator-custom-parser.png differ diff --git a/doc/qtcreator/src/projects/creator-only/creator-custom-output-parser.qdoc b/doc/qtcreator/src/projects/creator-only/creator-custom-output-parser.qdoc new file mode 100644 index 0000000000..a4ed650454 --- /dev/null +++ b/doc/qtcreator/src/projects/creator-only/creator-custom-output-parser.qdoc @@ -0,0 +1,87 @@ +/**************************************************************************** +** +** Copyright (C) 2020 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Qt Creator documentation. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. +** +****************************************************************************/ + +/*! + \previouspage creator-project-settings-environment.html + \page creator-custom-output-parsers.html + \nextpage creator-sharing-project-settings.html + + \title Using Custom Output Parsers + + Custom output parsers scan command line output for error + and warning patterns that you specify and create entries + for found patterns in the \uicontrol Issues output pane. + + You can activate custom output parsers in the + \uicontrol {Custom Output Parsers} section of + the \uicontrol Build and \uicontrol Run settings, + as well as in the \l{Adding Custom Compilers} + {custom compiler settings}. + + \section1 Specifying Settings for Custom Output Parsers + + \image qtcreator-custom-parser-options.png + + A custom output parser enables you to capture errors and + warnings separately, according to the settings you specify + in the \uicontrol Error and \uicontrol Warning tab. + + To create a custom output parser: + + \list 1 + \li Select \uicontrol Tools > \uicontrol Options > + \uicontrol {Build & Run} > \uicontrol {Custom Output Parsers} + > \uicontrol Add. + \li In the \uicontrol {Error message capture pattern} field, specify + a regular expression to define what is an error. The custom + parser matches the compile output line by line against the + regular expression and displays errors in the \uicontrol Issues + output pane. Create regular expression groups that contain + the file name, line number and error message. + \li In the \uicontrol {Capture Positions} field, map the regular + expression groups to \uicontrol {File name}, \uicontrol {Line number}, + and \uicontrol Message. + \li In the \uicontrol {Capture Output Channels} field, specify whether + messages from standard output, standard error, or both channels + should be captured. + \li In the \uicontrol {Test} group, you can test how the message that + you enter in the \uicontrol {Error message} field is matched when + using the current settings. + \endlist + + \section1 Activating Custom Output Parsers + + \image qtcreator-custom-parser.png + + To activate a custom output parser in the \uicontrol Build or + \uicontrol Run setting of a project: + + \list 1 + \li In the \uicontrol {Custom Output Parsers} section, select + \uicontrol Details. + \li Select custom parsers to activate them for buildin or running + the project. + \endlist +*/ diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-compilers.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-compilers.qdoc index 7d35025906..554d344112 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-compilers.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-compilers.qdoc @@ -211,38 +211,8 @@ to the Qt mkspecs directory. \li In the \uicontrol {Error parser} field, select the error parser to use. - Select \uicontrol Custom, and then select \uicontrol {Customer Parser Settings} - to specify settings for a custom parser: - - \image qtcreator-custom-parser.png - - The custom error parser enables you to capture errors and warnings separately. - You can configure the error parser in the \uicontrol Error tab and the warning - parser in the \uicontrol Warning tab: - - \list 1 - - \li In the \uicontrol {Error message capture pattern} field, specify - a regular expression to define what is an error. The custom - parser matches the compile output line by line against the - regular expression and displays errors in the \uicontrol Issues - output pane. Create regular expression groups that contain - the file name, line number and error message. - - \li In the \uicontrol {Capture Positions} field, map the regular - expression groups to \uicontrol {File name}, \uicontrol {Line number}, - and \uicontrol Message. - - \li In the \uicontrol {Capture Output Channels} field, specify whether - messages from standard output, standard error, or both channels - should be captured. - - \li In the \uicontrol {Test} group, you can test how the message that - you enter in the \uicontrol {Error message} field is matched when - using the current settings. - - \endlist - + You can add custom output parsers to the list. For more information, + see \l{Using Custom Output Parsers}. \endlist \section1 Troubleshooting MinGW Compilation Errors diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-environment.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-environment.qdoc index 89eb026500..5dbdb44b17 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-environment.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-environment.qdoc @@ -26,7 +26,7 @@ /*! \previouspage creator-build-dependencies.html \page creator-project-settings-environment.html - \nextpage creator-sharing-project-settings.html + \nextpage creator-custom-output-parsers.html \title Specifying Environment Settings diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-overview.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-overview.qdoc index eb0532f64e..f70f1d6db3 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-overview.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-overview.qdoc @@ -102,6 +102,8 @@ \li \l{Specifying Environment Settings}{Environment} + \li \l{Using Custom Output Parsers}{Custom Output Parsers} + \li \l{Parsing C++ Files with the Clang Code Model} {Clang Code Model} diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-sharing.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-sharing.qdoc index 32f27d2bc2..7622bf1fa4 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-sharing.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-sharing.qdoc @@ -30,7 +30,7 @@ // ********************************************************************** /*! - \previouspage creator-project-settings-environment.html + \previouspage creator-custom-output-parsers.html \page creator-sharing-project-settings.html \nextpage creator-project-managing-sessions.html diff --git a/doc/qtcreator/src/qtcreator-toc.qdoc b/doc/qtcreator/src/qtcreator-toc.qdoc index 1c7e542e5e..0ac3e3c194 100644 --- a/doc/qtcreator/src/qtcreator-toc.qdoc +++ b/doc/qtcreator/src/qtcreator-toc.qdoc @@ -80,6 +80,7 @@ \li \l{Specifying Code Style Settings} \li \l{Specifying Dependencies} \li \l{Specifying Environment Settings} + \li \l{Using Custom Output Parsers} \li \l{Sharing Project Settings} \endlist \li \l{Managing Sessions} -- cgit v1.2.3