summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/useragent/useragentinfo.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/useragent/useragentinfo.cpp b/src/useragent/useragentinfo.cpp
index 82871108..d7defd59 100644
--- a/src/useragent/useragentinfo.cpp
+++ b/src/useragent/useragentinfo.cpp
@@ -41,6 +41,8 @@
#include <KProtocolManager>
+// Qt includes
+#include <QStringBuilder>
UserAgentInfo::UserAgentInfo()
{
@@ -128,10 +130,17 @@ QString UserAgentInfo::userAgentDescription(int i)
return QL1S("Default");
}
- QString tmp = m_providers.at(i)->property("Name").toString();
- tmp.remove(QL1S("UADescription ("));
- tmp.remove(QL1C(')'));
- return tmp;
+ QString systemName = m_providers.at(i)->property("X-KDE-UA-SYSNAME").toString();
+ QString systemRelease = m_providers.at(i)->property("X-KDE-UA-SYSRELEASE").toString();
+ QString systemSummary = QL1S("");
+
+ if (!systemName.isEmpty() && !systemRelease.isEmpty())
+ {
+ // FIXME: needs a proper translation after stable release
+ systemSummary = " " % QL1S("on") % " " % systemName % " " % systemRelease;
+ }
+
+ return userAgentName(i) % " " % userAgentVersion(i) % systemSummary;
}