Changeset View
Changeset View
Standalone View
Standalone View
src/qt/rpcconsole.cpp
Show All 14 Lines | |||||
#include <qt/bantablemodel.h> | #include <qt/bantablemodel.h> | ||||
#include <qt/clientmodel.h> | #include <qt/clientmodel.h> | ||||
#include <qt/forms/ui_debugwindow.h> | #include <qt/forms/ui_debugwindow.h> | ||||
#include <qt/guiutil.h> | #include <qt/guiutil.h> | ||||
#include <qt/platformstyle.h> | #include <qt/platformstyle.h> | ||||
#include <qt/walletmodel.h> | #include <qt/walletmodel.h> | ||||
#include <rpc/client.h> | #include <rpc/client.h> | ||||
#include <rpc/server.h> | #include <rpc/server.h> | ||||
#include <util/strencodings.h> | |||||
#include <util/system.h> | #include <util/system.h> | ||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
#include <wallet/wallet.h> | #include <wallet/wallet.h> | ||||
#include <db_cxx.h> | #include <db_cxx.h> | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 193 Lines • ▼ Show 20 Lines | for (chpos = 0; chpos < strCommandTerminated.size(); ++chpos) { | ||||
break; | break; | ||||
} | } | ||||
if (curarg.size() && fExecute) { | if (curarg.size() && fExecute) { | ||||
// if we have a value query, query arrays with | // if we have a value query, query arrays with | ||||
// index and objects with a string key | // index and objects with a string key | ||||
UniValue subelement; | UniValue subelement; | ||||
if (lastResult.isArray()) { | if (lastResult.isArray()) { | ||||
for (char argch : curarg) { | for (char argch : curarg) { | ||||
if (!std::isdigit(argch)) { | if (!IsDigit(argch)) { | ||||
throw std::runtime_error( | throw std::runtime_error( | ||||
"Invalid result query"); | "Invalid result query"); | ||||
} | } | ||||
} | } | ||||
subelement = | subelement = | ||||
lastResult[atoi(curarg.c_str())]; | lastResult[atoi(curarg.c_str())]; | ||||
} else if (lastResult.isObject()) { | } else if (lastResult.isObject()) { | ||||
subelement = find_value(lastResult, curarg); | subelement = find_value(lastResult, curarg); | ||||
▲ Show 20 Lines • Show All 1,227 Lines • Show Last 20 Lines |