diff options
author | Pierre Rossi <pierre.rossi@digia.com> | 2014-06-17 16:15:35 +0200 |
---|---|---|
committer | Pierre Rossi <pierre.rossi@gmail.com> | 2014-08-04 17:22:42 +0200 |
commit | 7d90b44187cfa8f93df6a6341da41cf8192d18ad (patch) | |
tree | 47384a6837549df6c80759ae270bbd8651477bde /src/core/content_client_qt.cpp | |
parent | 35d66ce48248f07759cbe2a17437198e8e1948ed (diff) |
Expose better error information in loadRequest.
Use the chromium localized error strings for that purpose, otherwise the
error description is always empty.
While we're at it, let's tap into the chromium error pages, which should
hopefully make sense for most errors, and add some static asserts to
check that the qt quick enum and the core one are in sync.
Change-Id: Icf8fa7c3bf4a674c60a10950422135fb6930447a
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'src/core/content_client_qt.cpp')
-rw-r--r-- | src/core/content_client_qt.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/content_client_qt.cpp b/src/core/content_client_qt.cpp index 6a52cb5d4..972fd43f7 100644 --- a/src/core/content_client_qt.cpp +++ b/src/core/content_client_qt.cpp @@ -46,6 +46,9 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" +#include <QCoreApplication> +#include <QStringBuilder> + base::StringPiece ContentClientQt::GetDataResource(int resource_id, ui::ScaleFactor scale_factor) const { return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(resource_id, scale_factor); } @@ -54,3 +57,9 @@ base::string16 ContentClientQt::GetLocalizedString(int message_id) const { return l10n_util::GetStringUTF16(message_id); } + +std::string ContentClientQt::GetProduct() const +{ + QString productName(qApp->applicationName() % '/' % qApp->applicationVersion()); + return productName.toStdString(); +} |