Block based on IP.

This commit is contained in:
Roman Telezhynskyi 2023-10-04 17:02:18 +03:00
parent 1194c43e55
commit d1643a56d6
3 changed files with 30 additions and 0 deletions

View File

@ -426,6 +426,16 @@ void VPApplication::InitOptions()
CheckSystemLocale();
QTimer::singleShot(0, this,
[]()
{
QString country = VGAnalytics::CountryCode();
if (country == QLatin1String("ru") || country == QLatin1String("by"))
{
qFatal("contry not detected");
}
});
VTheme::InitApplicationStyle();
VTheme::SetIconTheme();
VTheme::InitThemeMode();

View File

@ -469,6 +469,16 @@ void MApplication::InitOptions()
CheckSystemLocale();
QTimer::singleShot(0, this,
[]()
{
QString country = VGAnalytics::CountryCode();
if (country == QLatin1String("ru") || country == QLatin1String("by"))
{
qFatal("contry not detected");
}
});
VTheme::InitApplicationStyle();
VTheme::SetIconTheme();
VTheme::InitThemeMode();

View File

@ -681,6 +681,16 @@ void VApplication::InitOptions()
CheckSystemLocale();
QTimer::singleShot(0, this,
[]()
{
QString country = VGAnalytics::CountryCode();
if (country == QLatin1String("ru") || country == QLatin1String("by"))
{
qFatal("contry not detected");
}
});
if (VApplication::IsGUIMode()) // By default console version uses system locale
{
LoadTranslation(ValentinaSettings()->GetLocale());