File indexing completed on 2024-05-05 04:38:03
0001 /* 0002 SPDX-FileCopyrightText: 2007 Andreas Pakulat <apaku@gmx.de> 0003 SPDX-FileCopyrightText: 2012 Morten Danielsen Volden <mvolden2@gmail.com> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #ifndef KDEVPLATFORM_FILTEREDITEM_H 0009 #define KDEVPLATFORM_FILTEREDITEM_H 0010 0011 #include <QMetaType> 0012 #include <QString> 0013 #include <QUrl> 0014 0015 #include <outputview/outputviewexport.h> 0016 0017 namespace KDevelop 0018 { 0019 0020 /** 0021 * Holds all metadata of a given compiler/script/whatever output line. E.g. if it is an error or 0022 * a warning, if it is clickable or not, line number, column number, etc. 0023 * Note that line and column number are stored as starting with 0 (Your compiler/whatever tool 0024 * may count from 1 ). 0025 **/ 0026 struct KDEVPLATFORMOUTPUTVIEW_EXPORT FilteredItem 0027 { 0028 enum FilteredOutputItemType 0029 { 0030 InvalidItem = 0, 0031 ErrorItem = 1, 0032 WarningItem = 2, 0033 ActionItem = 3, 0034 CustomItem = 4, 0035 StandardItem = 5, 0036 InformationItem = 6 0037 }; 0038 0039 explicit FilteredItem( const QString& line = QString() ); 0040 0041 FilteredItem( const QString& line, FilteredOutputItemType type ); 0042 0043 QString originalLine; 0044 FilteredOutputItemType type = InvalidItem; 0045 bool isActivatable = false; 0046 QUrl url; 0047 /// lineNo starts with 0 0048 int lineNo = -1; 0049 /// columnNo starts with 0 0050 int columnNo = -1; 0051 }; 0052 0053 0054 } // namespace KDevelop 0055 0056 Q_DECLARE_METATYPE( KDevelop::FilteredItem ) 0057 Q_DECLARE_METATYPE( KDevelop::FilteredItem::FilteredOutputItemType ) 0058 Q_DECLARE_TYPEINFO( KDevelop::FilteredItem, Q_MOVABLE_TYPE ); 0059 0060 #endif // KDEVPLATFORM_FILTEREDITEM_H