diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2011-10-03 16:33:53 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2011-10-03 16:33:53 +0200 |
commit | ea60274a43eb6586d5f8283be90b465a7c4ce775 (patch) | |
tree | a0285615d3753c6511dc1c362d3f392576150ae1 /src | |
parent | Improve the mechanism of thumnbs file names generation (diff) | |
download | rekonq-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')
-rw-r--r-- | src/useragent/useragentinfo.cpp | 17 |
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; } |