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

Method handlerOfSetFormatCommand

plugins/lldb/controllers/variable.cpp:92–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92std::function<void(const ResultRecord&)> LldbVariable::handlerOfSetFormatCommand()
93{
94 return [guarded_this = QPointer{this}](const ResultRecord& r) {
95 auto* const variable = guarded_this.get();
96 if (variable && r.hasField(rawUpdateField())) {
97 const auto* const changes = variable->handleRawUpdate(r);
98 if (changes && !variable->inScope()) {
99 // MIVariable::handleUpdate() updates value() only if the variable is in scope. But
100 // LLDB-MI always sends the value in the current format. Thus update value() manually.
101 variable->setValueToOptionalValueFieldOf(*changes);
102 }
103 }
104 };
105}
106
107QString LldbVariable::formatValue(const QString& value) const
108{

Callers

nothing calls this directly

Calls 6

rawUpdateFieldFunction · 0.85
hasFieldMethod · 0.80
handleRawUpdateMethod · 0.80
inScopeMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected