mirror of
https://github.com/tnodir/fort
synced 2024-11-15 06:35:23 +00:00
UI: Add some debug helpers
This commit is contained in:
parent
c89d82846a
commit
57f2490cfe
@ -172,6 +172,8 @@ bool ControlManager::processRequest(Control::Command command, const QVariantList
|
||||
if (Q_UNLIKELY(!w))
|
||||
return false;
|
||||
|
||||
// DBG: qCDebug(LC) << "Client requested: id:" << w->id() << command << args.size();
|
||||
|
||||
OsUtil::setThreadIsBusy(true);
|
||||
|
||||
QString errorMessage;
|
||||
|
@ -239,6 +239,8 @@ bool ControlWorker::sendCommandData(const QByteArray &commandData)
|
||||
|
||||
bool ControlWorker::sendCommand(Control::Command command, const QVariantList &args)
|
||||
{
|
||||
// DBG: qCDebug(LC) << "Send Command: id:" << id() << command << args.size();
|
||||
|
||||
const QByteArray buffer = buildCommandData(command, args);
|
||||
if (buffer.isEmpty()) {
|
||||
qCWarning(LC) << "Bad RPC command to send:" << command << args;
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include <QFont>
|
||||
#include <QIcon>
|
||||
#include <QLoggingCategory>
|
||||
|
||||
#include <sqlite/sqlitedb.h>
|
||||
#include <sqlite/sqlitestmt.h>
|
||||
@ -15,6 +16,12 @@
|
||||
#include <util/ioc/ioccontainer.h>
|
||||
#include <util/net/netutil.h>
|
||||
|
||||
namespace {
|
||||
|
||||
const QLoggingCategory LC("connBlockListModel");
|
||||
|
||||
}
|
||||
|
||||
ConnBlockListModel::ConnBlockListModel(QObject *parent) :
|
||||
TableSqlModel(parent), m_resolveAddress(false)
|
||||
{
|
||||
|
@ -673,6 +673,8 @@ bool RpcManager::waitResult()
|
||||
|
||||
void RpcManager::sendResult(ControlWorker *w, bool ok, const QVariantList &args)
|
||||
{
|
||||
// DBG: qCDebug(LC) << "Send Result to Client: id:" << w->id() << ok << args.size();
|
||||
|
||||
w->sendCommand(ok ? Control::Rpc_Result_Ok : Control::Rpc_Result_Error, args);
|
||||
}
|
||||
|
||||
@ -720,6 +722,8 @@ void RpcManager::invokeOnClients(Control::Command cmd, const QVariantList &args)
|
||||
return;
|
||||
}
|
||||
|
||||
// DBG: qCDebug(LC) << "Invoke On Clients:" << cmd << args.size() << clients.size();
|
||||
|
||||
if (!sendCommandDataToClients(buffer, clients)) {
|
||||
qCWarning(LC) << "Invoke on clients error:" << cmd << args;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user