diff options
author | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2015-11-06 16:38:50 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2015-11-09 11:13:26 +0000 |
commit | 8b37025cde3848fbd8acabe9ff50fbd68a196416 (patch) | |
tree | 9b445489f4ffbbb3d5f94ef6a05b70c91b588471 /src/webengine/ui_delegates_manager.cpp | |
parent | 161eba561d854c3f0125a859b40b11ba3131ea5c (diff) |
fix translations in UIDelegatesManager
Declare UIDelegatesManager::tr and harmonize translations in
that class.
Change-Id: I6dfdb29b24d8912150d0af637b8dc1af633e21df
Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/webengine/ui_delegates_manager.cpp')
-rw-r--r-- | src/webengine/ui_delegates_manager.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/webengine/ui_delegates_manager.cpp b/src/webengine/ui_delegates_manager.cpp index 6c4282eb3..91cec865b 100644 --- a/src/webengine/ui_delegates_manager.cpp +++ b/src/webengine/ui_delegates_manager.cpp @@ -44,7 +44,6 @@ #include <QAbstractListModel> #include <QClipboard> #include <QFileInfo> -#include <QGuiApplication> #include <QMimeData> #include <QQmlContext> #include <QQmlEngine> @@ -249,19 +248,19 @@ void UIDelegatesManager::showDialog(QSharedPointer<JavaScriptDialogController> d switch (dialogController->type()) { case WebContentsAdapterClient::AlertDialog: dialogComponentType = AlertDialog; - title = QCoreApplication::translate("UIDelegatesManager", "Javascript Alert - %1").arg(m_view->url().toString()); + title = tr("Javascript Alert - %1").arg(m_view->url().toString()); break; case WebContentsAdapterClient::ConfirmDialog: dialogComponentType = ConfirmDialog; - title = QCoreApplication::translate("UIDelegatesManager", "Javascript Confirm - %1").arg(m_view->url().toString()); + title = tr("Javascript Confirm - %1").arg(m_view->url().toString()); break; case WebContentsAdapterClient::PromptDialog: dialogComponentType = PromptDialog; - title = QCoreApplication::translate("UIDelegatesManager", "Javascript Prompt - %1").arg(m_view->url().toString()); + title = tr("Javascript Prompt - %1").arg(m_view->url().toString()); break; case WebContentsAdapterClient::UnloadDialog: dialogComponentType = ConfirmDialog; - title = QCoreApplication::translate("UIDelegatesManager", "Are you sure you want to leave this page?"); + title = tr("Are you sure you want to leave this page?"); break; case WebContentsAdapterClient::InternalAuthorizationDialog: dialogComponentType = ConfirmDialog; @@ -339,10 +338,10 @@ void UIDelegatesManager::showDialog(QSharedPointer<AuthenticationDialogControlle QString introMessage; if (dialogController->isProxy()) { - introMessage = QObject::tr("Connect to proxy \"%1\" using:"); + introMessage = tr("Connect to proxy \"%1\" using:"); introMessage = introMessage.arg(dialogController->host().toHtmlEscaped()); } else { - introMessage = QObject::tr("Enter username and password for \"%1\" at %2"); + introMessage = tr("Enter username and password for \"%1\" at %2"); introMessage = introMessage.arg(dialogController->realm()).arg(dialogController->url().toString().toHtmlEscaped()); } QQmlProperty textProp(authenticationDialog, QStringLiteral("text")); |