fixed compilation

This commit is contained in:
csoler 2021-12-09 21:04:49 +01:00
parent e0812dce83
commit a757419d65
2 changed files with 4 additions and 8 deletions

View file

@ -36,8 +36,6 @@
# include <QString> // for QString::fromStdString(...) # include <QString> // for QString::fromStdString(...)
#endif #endif
#include <QCoreApplication>
#include "util/argstream.h" #include "util/argstream.h"
#include "util/rsdebug.h" #include "util/rsdebug.h"
#include "util/rsdir.h" #include "util/rsdir.h"
@ -1975,8 +1973,7 @@ bool RsInit::startAutoTor()
return false; return false;
} }
// process Qt event loop to deal with messages of online/offline info // process Qt event loop to deal with messages of online/offline info
// QCoreApplication::processEvents();
QCoreApplication::processEvents();
} }
return true; return true;
} }

View file

@ -32,7 +32,6 @@
#include "GetConfCommand.h" #include "GetConfCommand.h"
#include "StrUtil.h" #include "StrUtil.h"
#include <QDebug>
using namespace Tor; using namespace Tor;
@ -54,11 +53,11 @@ ByteArray GetConfCommand::build(const std::list<std::string> &keys)
} else if (type == GetInfo) { } else if (type == GetInfo) {
out = "GETINFO"; out = "GETINFO";
} else { } else {
Q_ASSERT(false); assert(false);
return out; return out;
} }
foreach (const ByteArray &key, keys) { for(const ByteArray &key: keys) {
out.append(' '); out.append(' ');
out.append(key); out.append(key);
} }
@ -86,7 +85,7 @@ void GetConfCommand::onReply(int statusCode, const ByteArray &data)
void GetConfCommand::onDataLine(const ByteArray &data) void GetConfCommand::onDataLine(const ByteArray &data)
{ {
if (m_lastKey.empty()) { if (m_lastKey.empty()) {
qWarning() << "torctrl: Unexpected data line in GetConf command"; RsWarn() << "torctrl: Unexpected data line in GetConf command";
return; return;
} }
m_results[m_lastKey].push_back(data.toString()); m_results[m_lastKey].push_back(data.toString());