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

Class ChangeResult

kdevplatform/language/codegen/documentchangeset.h:61–91  ·  view source on GitHub ↗

Returns true on success

Source from the content-addressed store, hash-verified

59
60 //Returns true on success
61 class ChangeResult
62 {
63public:
64 explicit ChangeResult(const QString& failureReason,
65 const DocumentChangePointer& reasonChange = DocumentChangePointer())
66 : ChangeResult(failureReason, reasonChange, false) {}
67
68 static ChangeResult successfulResult()
69 {
70 return ChangeResult({}, {}, true);
71 }
72
73 operator bool() const
74 {
75 return m_success;
76 }
77
78 /// Reason why the change failed
79 QString m_failureReason;
80 /// Specific change that caused the problem (might be 0)
81 DocumentChangePointer m_reasonChange;
82
83 bool m_success;
84
85private:
86 explicit ChangeResult(const QString& failureReason, const DocumentChangePointer& reasonChange, bool success)
87 : m_failureReason(failureReason)
88 , m_reasonChange(reasonChange)
89 , m_success(success)
90 {}
91 };
92
93 /// Add an individual local change to this change-set.
94 ChangeResult addChange(const DocumentChange& change);

Callers 5

applyAllChangesMethod · 0.85
replaceOldTextMethod · 0.85
generateNewTextMethod · 0.85
removeDuplicatesMethod · 0.85
successfulResultMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected