summaryrefslogtreecommitdiff
path: root/src/useragent
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-10-03 16:33:53 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-10-03 16:33:53 +0200
commitea60274a43eb6586d5f8283be90b465a7c4ce775 (patch)
treea0285615d3753c6511dc1c362d3f392576150ae1 /src/useragent
parentImprove the mechanism of thumnbs file names generation (diff)
downloadrekonq-ea60274a43eb6586d5f8283be90b465a7c4ce775.tar.xz
Fix UAs description
This patch from Andrea Di Menna fixes UA description visualization in the UI. I changed it in two lines: fixed an empty string call using QL1S and removed i18n as we are in string freeze. Will need proper string translation after 0.8 stable release. REVIEW:102712
Diffstat (limited to 'src/useragent')
-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;
}