format: code format

This commit is contained in:
Qv2ray-dev 2020-04-28 14:59:32 +08:00
parent 1f5e934f5a
commit c424301924
7 changed files with 17 additions and 12 deletions

View File

@ -1 +1 @@
5338 5339

View File

@ -222,4 +222,4 @@ namespace Qv2ray::components::tcping
rv = rv ? rv : -errno; rv = rv ? rv : -errno;
return rv; return rv;
} }
} // namespace Qv2ray::core::tcping } // namespace Qv2ray::components::tcping

View File

@ -67,7 +67,8 @@ namespace Qv2ray::components::plugins::Toolbar
{ {
bool result = server->waitForNewConnection(5000, &timeOut); bool result = server->waitForNewConnection(5000, &timeOut);
DEBUG(MODULE_PLUGINHOST, "Plugin thread listening failed: " + server->errorString()) DEBUG(MODULE_PLUGINHOST, "Plugin thread listening failed: " + server->errorString())
DEBUG(MODULE_PLUGINHOST, "waitForNewConnection: " + QString(result ? "true" : "false") + ", " + QString(timeOut ? "true" : "false")) DEBUG(MODULE_PLUGINHOST,
"waitForNewConnection: " + QString(result ? "true" : "false") + ", " + QString(timeOut ? "true" : "false"))
} }
server->close(); server->close();

View File

@ -539,7 +539,6 @@ namespace Qv2ray::core::connection
{ {
bypassBTFilter(root); bypassBTFilter(root);
} }
} }
// Let's process some api features. // Let's process some api features.
@ -643,7 +642,9 @@ namespace Qv2ray::core::connection
void bypassBTFilter(CONFIGROOT &root) void bypassBTFilter(CONFIGROOT &root)
{ {
QJsonObject bypassBTRuleObj{ { "protocol", QJsonArray::fromStringList(QStringList{ "bittorrent" }) },{ "outboundTag", OUTBOUND_TAG_DIRECT }, { "type", "field" } }; QJsonObject bypassBTRuleObj{ { "protocol", QJsonArray::fromStringList(QStringList{ "bittorrent" }) },
{ "outboundTag", OUTBOUND_TAG_DIRECT },
{ "type", "field" } };
ROUTING routing(root["routing"].toObject()); ROUTING routing(root["routing"].toObject());
QJsonArray _rules(routing["rules"].toArray()); QJsonArray _rules(routing["rules"].toArray());
_rules.insert(0, bypassBTRuleObj); _rules.insert(0, bypassBTRuleObj);

View File

@ -106,7 +106,8 @@ namespace Qv2ray::core::connection
} }
// Explicitly don't support v1 vmess links. // Explicitly don't support v1 vmess links.
if (!vmessConf.contains("v")) { if (!vmessConf.contains("v"))
{
*errMessage = QObject::tr("seems like a v1 vmess, we don't support it"); *errMessage = QObject::tr("seems like a v1 vmess, we don't support it");
return default; return default;
} }

View File

@ -643,7 +643,9 @@ void PreferencesWindow::on_bypassBTCb_stateChanged(int arg1)
NEEDRESTART NEEDRESTART
if (arg1 == Qt::Checked) if (arg1 == Qt::Checked)
{ {
QvMessageBoxInfo(this, tr("Note"), tr("To recognize the protocol of a connection, one must enable sniffing option in inbound proxy.") + NEWLINE+tr("tproxy inbound's sniffing is enabled by default.")); QvMessageBoxInfo(this, tr("Note"),
tr("To recognize the protocol of a connection, one must enable sniffing option in inbound proxy.") + NEWLINE +
tr("tproxy inbound's sniffing is enabled by default."));
} }
CurrentConfig.connectionConfig.bypassBT = arg1 == Qt::Checked; CurrentConfig.connectionConfig.bypassBT = arg1 == Qt::Checked;
} }