'help' rpc commands autocomplete

Adds autocompletion of the commands for when getting the help of a command by using `help <command>`
This commit is contained in:
Andrew Chow 2017-01-09 20:53:00 -05:00
parent 07fd147b9f
commit 6d8fe35b94

View file

@ -626,9 +626,12 @@ void RPCConsole::setClientModel(ClientModel *model)
for (size_t i = 0; i < commandList.size(); ++i)
{
wordList << commandList[i].c_str();
wordList << ("help " + commandList[i]).c_str();
}
wordList.sort();
autoCompleter = new QCompleter(wordList, this);
autoCompleter->setModelSorting(QCompleter::CaseSensitivelySortedModel);
ui->lineEdit->setCompleter(autoCompleter);
autoCompleter->popup()->installEventFilter(this);
// Start thread to execute RPC commands.