Plasma5Support
location_ip.cpp
35 QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation) + QLatin1String("/plasmashell/hsts/"));
118 const KConfigGroup config = KSharedConfig::openConfig()->group(QStringLiteral("org.kde.plasma.geolocation.ip"));
123 QSharedPointer<NetworkManager::WirelessDevice> wifi = qSharedPointerDynamicCast<NetworkManager::WirelessDevice>(device);
134 wifiAccessPoints.append(QJsonObject{{QStringLiteral("macAddress"), accessPoint->hardwareAddress()}});
156 qCDebug(DATAENGINE_GEOLOCATION) << "Fetching https://location.services.mozilla.com/v1/geolocate";
157 QNetworkRequest locationRequest(QUrl(QStringLiteral("https://location.services.mozilla.com/v1/geolocate?key=%1").arg(apiKey)));
158 locationRequest.setHeader(QNetworkRequest::ContentTypeHeader, QStringLiteral("application/json"));
167 QNetworkRequest countryRequest(QUrl(QStringLiteral("https://location.services.mozilla.com/v1/country?key=%1").arg(apiKey)));
168 countryRequest.setHeader(QNetworkRequest::ContentTypeHeader, QStringLiteral("application/json"));
KConfigGroup group(const QString &group)
QString readEntry(const char *key, const char *aDefault=nullptr) const
#define K_PLUGIN_CLASS(classname)
QVariant location(const QVariant &res)
NETWORKMANAGERQT_EXPORT bool isWirelessEnabled()
NETWORKMANAGERQT_EXPORT bool isNetworkingEnabled()
NETWORKMANAGERQT_EXPORT Device::List networkInterfaces()
QString errorString() const const
QByteArray readAll()
void append(const QJsonValue &value)
qsizetype count() const const
Compact
QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error)
QJsonObject object() const const
QByteArray toJson(JsonFormat format) const const
iterator end()
iterator find(QLatin1StringView key)
iterator insert(QLatin1StringView key, const QJsonValue &value)
QJsonValue value(QLatin1StringView key) const const
QString toString() const const
void clear()
void enableStrictTransportSecurityStore(bool enabled, const QString &storeDir)
QNetworkReply * post(const QNetworkRequest &request, QHttpMultiPart *multiPart)
void setRedirectPolicy(QNetworkRequest::RedirectPolicy policy)
void setStrictTransportSecurityEnabled(bool enabled)
NetworkError error() const const
void finished()
ContentTypeHeader
NoLessSafeRedirectPolicy
Q_OBJECTQ_OBJECT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void deleteLater()
GenericCacheLocation
QString writableLocation(StandardLocation type)
bool endsWith(QChar c, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
T value() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:57 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:57 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.