Changeset View
Changeset View
Standalone View
Standalone View
src/qt/rpcconsole.cpp
Show First 20 Lines • Show All 700 Lines • ▼ Show 20 Lines | if (model && clientModel->getPeerTableModel() && | ||||
ui->networkName->setText( | ui->networkName->setText( | ||||
QString::fromStdString(Params().NetworkIDString())); | QString::fromStdString(Params().NetworkIDString())); | ||||
// Setup autocomplete and attach it | // Setup autocomplete and attach it | ||||
QStringList wordList; | QStringList wordList; | ||||
std::vector<std::string> commandList = tableRPC.listCommands(); | std::vector<std::string> commandList = tableRPC.listCommands(); | ||||
for (size_t i = 0; i < commandList.size(); ++i) { | for (size_t i = 0; i < commandList.size(); ++i) { | ||||
wordList << commandList[i].c_str(); | wordList << commandList[i].c_str(); | ||||
wordList << ("help " + commandList[i]).c_str(); | |||||
} | } | ||||
wordList.sort(); | |||||
autoCompleter = new QCompleter(wordList, this); | autoCompleter = new QCompleter(wordList, this); | ||||
autoCompleter->setModelSorting(QCompleter::CaseSensitivelySortedModel); | |||||
ui->lineEdit->setCompleter(autoCompleter); | ui->lineEdit->setCompleter(autoCompleter); | ||||
autoCompleter->popup()->installEventFilter(this); | autoCompleter->popup()->installEventFilter(this); | ||||
// Start thread to execute RPC commands. | // Start thread to execute RPC commands. | ||||
startExecutor(); | startExecutor(); | ||||
} | } | ||||
if (!model) { | if (!model) { | ||||
// Client model is being set to 0, this means shutdown() is about to be | // Client model is being set to 0, this means shutdown() is about to be | ||||
// called. Make sure we clean up the executor thread | // called. Make sure we clean up the executor thread | ||||
▲ Show 20 Lines • Show All 568 Lines • Show Last 20 Lines |