mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-20 10:50:23 +08:00
[fix] fixed API empty tag error #121
This commit is contained in:
parent
48f57f3c4c
commit
a582cc7525
@ -1 +1 @@
|
|||||||
931
|
934
|
||||||
|
@ -217,10 +217,14 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto confObject = StructFromJsonString<Qv2rayConfig>(JsonToString(conf));
|
auto confObject = StructFromJsonString<Qv2rayConfig>(JsonToString(conf));
|
||||||
SetGlobalConfig(confObject);
|
|
||||||
qApp->removeTranslator(getTranslator(_lang));
|
qApp->removeTranslator(getTranslator(_lang));
|
||||||
LOG(MODULE_INIT, "Removing system translations")
|
LOG(MODULE_INIT, "Removing system translations")
|
||||||
|
|
||||||
|
if (confObject.uiConfig.language.empty()) {
|
||||||
|
LOG(MODULE_UI, "Setting default UI language to en-US")
|
||||||
|
confObject.uiConfig.language = "en-US";
|
||||||
|
}
|
||||||
|
|
||||||
if (qApp->installTranslator(getTranslator(QSTRING(confObject.uiConfig.language)))) {
|
if (qApp->installTranslator(getTranslator(QSTRING(confObject.uiConfig.language)))) {
|
||||||
LOG(MODULE_INIT, "Loaded Translator " + confObject.uiConfig.language)
|
LOG(MODULE_INIT, "Loaded Translator " + confObject.uiConfig.language)
|
||||||
} else {
|
} else {
|
||||||
@ -232,6 +236,7 @@ int main(int argc, char *argv[])
|
|||||||
"https://github.com/lhy0403/Qv2ray/issues/new");
|
"https://github.com/lhy0403/Qv2ray/issues/new");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SetGlobalConfig(confObject);
|
||||||
auto osslReqVersion = QSslSocket::sslLibraryBuildVersionString().toStdString();
|
auto osslReqVersion = QSslSocket::sslLibraryBuildVersionString().toStdString();
|
||||||
auto osslCurVersion = QSslSocket::sslLibraryVersionString().toStdString();
|
auto osslCurVersion = QSslSocket::sslLibraryVersionString().toStdString();
|
||||||
LOG(MODULE_NETWORK, "Current OpenSSL version: " + osslCurVersion)
|
LOG(MODULE_NETWORK, "Current OpenSSL version: " + osslCurVersion)
|
||||||
|
@ -823,6 +823,8 @@ void MainWindow::timerEvent(QTimerEvent *event)
|
|||||||
foreach (auto inbound, inbounds) {
|
foreach (auto inbound, inbounds) {
|
||||||
auto tag = inbound.toObject()["tag"].toString();
|
auto tag = inbound.toObject()["tag"].toString();
|
||||||
|
|
||||||
|
if (tag.isEmpty()) continue;
|
||||||
|
|
||||||
// TODO: A proper scheme...
|
// TODO: A proper scheme...
|
||||||
if (tag == QV2RAY_API_TAG_INBOUND) {
|
if (tag == QV2RAY_API_TAG_INBOUND) {
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user