'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 committed 2017-01-09 21:23:16 -05:00
1 parent 07fd147b9f
commit 6d8fe35b94
1 file changed
+3
+3
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.