Warning, file /kdevelop/kdevelop/kdevplatform/outputview/outputformats.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 SPDX-FileCopyrightText: 1999-2001 Bernd Gehrmann <bernd@kdevelop.org> 0003 SPDX-FileCopyrightText: 2007 Dukju Ahn <dukjuahn@gmail.com> 0004 SPDX-FileCopyrightText: 2012 Morten Danielsen Volden <mvolden2@gmail.com> 0005 0006 SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #include "outputformats.h" 0010 0011 #include <KLocalizedString> 0012 0013 namespace KDevelop 0014 { 0015 0016 ErrorFormat::ErrorFormat( const QString& regExp, int file, int line, int text, int column ) 0017 : expression( regExp ) 0018 , fileGroup( file ) 0019 , lineGroup( line ) 0020 , columnGroup( column ) 0021 , textGroup( text ) 0022 {} 0023 0024 ErrorFormat::ErrorFormat( const QString& regExp, int file, int line, int text, const QString& comp, int column ) 0025 : expression( regExp ) 0026 , fileGroup( file ) 0027 , lineGroup( line ) 0028 , columnGroup( column ) 0029 , textGroup( text ) 0030 , compiler( comp ) 0031 {} 0032 0033 ActionFormat::ActionFormat(const QString& _tool, const QString& regExp, int file ) 0034 : expression( regExp ) 0035 , tool( _tool ) 0036 , fileGroup( file ) 0037 { 0038 } 0039 0040 ActionFormat::ActionFormat(int file, const QString& regExp) 0041 : expression( regExp ) 0042 , fileGroup( file ) 0043 { 0044 } 0045 0046 int ErrorFormat::columnNumber(const QRegularExpressionMatch& match) const 0047 { 0048 return columnGroup < 0 ? 0 : std::max(match.capturedRef(columnGroup).toInt() - 1, 0); 0049 } 0050 0051 } 0052