add warning when users switch off api subsystem

This commit is contained in:
DuckSoft 2020-05-12 20:12:49 +08:00
parent b76e5822c3
commit 7d2bbd9e7b
No known key found for this signature in database
GPG Key ID: 7A3A9FA6E4FD4A8D

View File

@ -1157,7 +1157,15 @@ void PreferencesWindow::on_enableAPI_stateChanged(int arg1)
{
LOADINGCHECK
NEEDRESTART
CurrentConfig.apiConfig.enableAPI = arg1 == Qt::Checked;
if (arg1 == Qt::Unchecked)
{
const auto msgAPIDisableTitle = tr("Disabling API Subsystem");
const auto msgAPIDisableMsg = tr("Disabling API subsystem will also disable the statistics function of Qv2ray.") + NEWLINE + //
tr("Speed chart and traffic statistics will be disabled.");
QvMessageBoxWarn(this, msgAPIDisableTitle, msgAPIDisableMsg);
}
}
void PreferencesWindow::on_updateChannelCombo_currentIndexChanged(int index)