mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 22:55:11 +00:00
Moved countries from Data to Countries namespace.
This commit is contained in:
@@ -14,7 +14,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "data/data_photo.h"
|
||||
#include "data/data_photo_media.h"
|
||||
#include "data/data_file_origin.h"
|
||||
#include "data/data_countries.h"
|
||||
#include "countries/countries_instance.h"
|
||||
#include "history/history_item.h"
|
||||
#include "history/history_service.h" // HistoryServicePayment.
|
||||
#include "stripe/stripe_api_client.h"
|
||||
@@ -465,7 +465,7 @@ QString Form::defaultPhone() const {
|
||||
}
|
||||
|
||||
QString Form::defaultCountry() const {
|
||||
return Data::CountryISO2ByPhone(defaultPhone());
|
||||
return Countries::CountryISO2ByPhone(defaultPhone());
|
||||
}
|
||||
|
||||
void Form::fillPaymentMethodInformation() {
|
||||
|
@@ -12,7 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "ui/text/format_values.h"
|
||||
#include "ui/ui_utility.h"
|
||||
#include "ui/special_fields.h"
|
||||
#include "data/data_countries.h"
|
||||
#include "countries/countries_instance.h"
|
||||
#include "base/platform/base_platform_info.h"
|
||||
#include "base/event_filter.h"
|
||||
#include "styles/style_payments.h"
|
||||
@@ -189,7 +189,7 @@ struct SimpleFieldState {
|
||||
|
||||
[[nodiscard]] QString Parse(const FieldConfig &config) {
|
||||
if (config.type == FieldType::Country) {
|
||||
return Data::CountryNameByISO2(config.value);
|
||||
return Countries::CountryNameByISO2(config.value);
|
||||
} else if (config.type == FieldType::Money) {
|
||||
const auto amount = config.value.toLongLong();
|
||||
if (!amount) {
|
||||
@@ -490,7 +490,7 @@ void Field::setupCountry() {
|
||||
QObject::connect(_masked, &MaskedInputField::focused, [=] {
|
||||
setFocus();
|
||||
|
||||
const auto name = Data::CountryNameByISO2(_countryIso2);
|
||||
const auto name = Countries::CountryNameByISO2(_countryIso2);
|
||||
const auto country = !name.isEmpty()
|
||||
? _countryIso2
|
||||
: !_config.defaultCountry.isEmpty()
|
||||
@@ -503,7 +503,7 @@ void Field::setupCountry() {
|
||||
raw->countryChosen(
|
||||
) | rpl::start_with_next([=](QString iso2) {
|
||||
_countryIso2 = iso2;
|
||||
_masked->setText(Data::CountryNameByISO2(iso2));
|
||||
_masked->setText(Countries::CountryNameByISO2(iso2));
|
||||
_masked->hideError();
|
||||
raw->closeBox();
|
||||
if (!iso2.isEmpty()) {
|
||||
|
@@ -16,7 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "ui/wrap/fade_wrap.h"
|
||||
#include "ui/text/format_values.h"
|
||||
#include "ui/text/text_utilities.h"
|
||||
#include "data/data_countries.h"
|
||||
#include "countries/countries_instance.h"
|
||||
#include "lang/lang_keys.h"
|
||||
#include "base/unixtime.h"
|
||||
#include "styles/style_payments.h"
|
||||
@@ -508,7 +508,7 @@ void FormSummary::setupSections(not_null<VerticalLayout*> layout) {
|
||||
push(_information.shippingAddress.address2);
|
||||
push(_information.shippingAddress.city);
|
||||
push(_information.shippingAddress.state);
|
||||
push(Data::CountryNameByISO2(
|
||||
push(Countries::CountryNameByISO2(
|
||||
_information.shippingAddress.countryIso2));
|
||||
push(_information.shippingAddress.postcode);
|
||||
add(
|
||||
|
Reference in New Issue
Block a user