MCPcopy Create free account
hub / github.com/KDE/kdevelop / GrepOutputItem

Class GrepOutputItem

plugins/grepview/grepoutputmodel.h:26–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26class GrepOutputItem : public QStandardItem
27{
28public:
29 using List = QList<GrepOutputItem>;
30
31 GrepOutputItem(const KDevelop::DocumentChangePointer& change, const QString& text, bool checkable);
32 GrepOutputItem(const QString &filename, const QString &text, bool checkable);
33 ~GrepOutputItem() override;
34
35 QString filename() const ;
36 int lineNumber() const ;
37 KDevelop::DocumentChangePointer change() const ;
38 bool isText() const ;
39 /// Recursively apply check state to children
40 void propagateState() ;
41 /// Check children to determine current state
42 void refreshState() ;
43
44 QVariant data ( int role = Qt::UserRole + 1 ) const override;
45
46 /**
47 * @warning Do not use the default constructor. It is provided only to prevent a compilation error in
48 * operator>>(QDataStream&, QList<T>&) [with @c T = GrepOutputItem]. This specialization of
49 * @c operator>> is instantiated by the signal and the slot with a @c const GrepOutputItem::List&
50 * parameter, as well as by the declaration Q_DECLARE_METATYPE(GrepOutputItem::List).
51 */
52 [[deprecated(
53 "Do not use the default constructor. It is never called, not tested and asserts false.")]] GrepOutputItem();
54
55 /**
56 * @warning Do not read from or write to a stream. read() and write() are overridden only to detect
57 * when they are invoked and fail. The reason is: serializing @a m_change is not straightforward
58 * and not implemented until we know when and why a GrepOutputItem needs to be serialized.
59 */
60 [[deprecated("Do not read from a stream. This function is never called, not tested and asserts false.")]] void
61 read(QDataStream& in) override;
62 /**
63 * @copydoc read
64 */
65 [[deprecated("Do not write to a stream. This function is never called, not tested and asserts false.")]] void
66 write(QDataStream& out) const override;
67
68private:
69 KDevelop::DocumentChangePointer m_change;
70};
71
72Q_DECLARE_METATYPE(GrepOutputItem::List)
73

Callers 1

grepFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected