7#include <QRandomGenerator>
16 const QString &hostParameterName,
17 const QString &internationalHost,
20 , m_internationalHost(parameters.
value(hostParameterName, internationalHost).
toString())
21 , m_localizedHost(localizedHost)
25 setCurrentHost(isInternationalNetwork() || m_localizedHost.
isEmpty() ? m_internationalHost : m_localizedHost);
30 if (m_maxSubdomains) {
32 result +=
'.' + m_currentHost;
38void QGeoUriProvider::setCurrentHost(
const QString &host)
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)
57 setCurrentHost(isInternationalNetwork() || m_localizedHost.
isEmpty() ? m_internationalHost : m_localizedHost);
60bool QGeoUriProvider::isInternationalNetwork()
const
QString getCurrentHost() const
QGeoUriProvider(QObject *parent, const QVariantMap ¶meters, const QString &hostParameterName, const QString &internationalHost, const QString &localizedHost=QString())
static Q_DECL_CONST_FUNCTION QRandomGenerator * global()
\threadsafe
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool isEmpty() const noexcept
Returns true if the string has no characters; otherwise returns false.
QString arg(qlonglong a, int fieldwidth=0, int base=10, QChar fillChar=u' ') const
QString right(qsizetype n) const &
const QChar at(qsizetype i) const
Returns the character at the given index position in the string.
qsizetype length() const noexcept
Returns the number of characters in this string.
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
char * toString(const MyType &t)
[31]