mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 22:54:57 +02:00
Fix: Console auto-completion should take into account parent classes' prototypes
fixes #9843
This commit is contained in:
parent
f8a26d810c
commit
2109944580
@ -128,14 +128,18 @@ static char *ConsoleCompleteHelper(const char *word, int state)
|
|||||||
AddSuggestion(matches, word, pword + "." + field.Name);
|
AddSuggestion(matches, word, pword + "." + field.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
Object::Ptr prototype = type->GetPrototype();
|
while (type) {
|
||||||
Dictionary::Ptr dict = dynamic_pointer_cast<Dictionary>(prototype);
|
Object::Ptr prototype = type->GetPrototype();
|
||||||
|
Dictionary::Ptr dict = dynamic_pointer_cast<Dictionary>(prototype);
|
||||||
|
|
||||||
if (dict) {
|
if (dict) {
|
||||||
ObjectLock olock(dict);
|
ObjectLock olock(dict);
|
||||||
BOOST_FOREACH(const Dictionary::Pair& kv, dict) {
|
BOOST_FOREACH(const Dictionary::Pair& kv, dict) {
|
||||||
AddSuggestion(matches, word, pword + "." + kv.first);
|
AddSuggestion(matches, word, pword + "." + kv.first);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type = type->GetBaseType();
|
||||||
}
|
}
|
||||||
} catch (...) { /* Ignore the exception */ }
|
} catch (...) { /* Ignore the exception */ }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user