diff options
| author | Linus Jahn <lnj@kaidan.im> | 2018-12-29 12:58:39 +0100 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2019-01-03 08:44:23 +0100 |
| commit | 8d80cd99304a1c75d62acde408f4fdbff406df35 (patch) | |
| tree | 12912204a14a570a3c1e8181f420cbb61efd69d5 /src/client | |
| parent | 439ad968c60d7cf44cc05cda72ebfdb1f8741045 (diff) | |
| download | qxmpp-8d80cd99304a1c75d62acde408f4fdbff406df35.tar.gz | |
Set client type in discovery manager based on Qt OS
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/QXmppDiscoveryManager.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client/QXmppDiscoveryManager.cpp b/src/client/QXmppDiscoveryManager.cpp index 72dbc15f..a525861b 100644 --- a/src/client/QXmppDiscoveryManager.cpp +++ b/src/client/QXmppDiscoveryManager.cpp @@ -48,7 +48,11 @@ QXmppDiscoveryManager::QXmppDiscoveryManager() { d->clientCapabilitiesNode = "https://github.com/qxmpp-project/qxmpp"; d->clientCategory = "client"; +#if defined Q_OS_ANDROID || defined Q_OS_BLACKBERRY || defined Q_OS_IOS || defined Q_OS_WP + d->clientType = "phone"; +#else d->clientType = "pc"; +#endif if (qApp->applicationName().isEmpty() && qApp->applicationVersion().isEmpty()) d->clientName = QString("%1 %2").arg("Based on QXmpp", QXmppVersion()); else @@ -212,7 +216,8 @@ QString QXmppDiscoveryManager::clientCategory() const /// Returns the type of the local XMPP client. /// -/// By default this is "pc". +/// With Qt builds for Android, Blackberry, iOS or Windows Phone this is set to +/// "phone", otherwise it defaults to "pc". QString QXmppDiscoveryManager::clientType() const { |
