7#include <QRandomGenerator>
20 , m_internationalHost(parameters.value(hostParameterName, internationalHost).toString())
21 , m_localizedHost(localizedHost)
22 , m_firstSubdomain(QChar::Null)
25 setCurrentHost(isInternationalNetwork() || m_localizedHost.isEmpty() ? m_internationalHost : m_localizedHost);
30 if (m_maxSubdomains) {
31 auto result = QString(
"%1").arg(
static_cast<
char>(m_firstSubdomain.toLatin1() + QRandomGenerator::global()->bounded(m_maxSubdomains)));
32 result +=
'.' + m_currentHost;
40 if (host.length() > 4 && host.at(1) == QChar(
'-') && host.at(3) == QChar(
'.')) {
41 QString realHost = host.right(host.length() - 4);
42 m_firstSubdomain = host.at(0);
43 m_maxSubdomains = host.at(2).toLatin1() - host.at(0).toLatin1() + 1;
44 m_currentHost = realHost;
47 m_firstSubdomain = QChar::Null;
52void QGeoUriProvider::mobileCountryCodeChanged(
int interfaceId,
const QString& mcc)
54 Q_UNUSED(interfaceId);
57 setCurrentHost(isInternationalNetwork() || m_localizedHost.isEmpty() ? m_internationalHost : m_localizedHost);
QString getCurrentHost() const
Combined button and popup list for selecting options.