From d1bf51161daf3c6ac7525d82cc9735a507976a57 Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@digia.com>
Date: Mon, 15 Apr 2013 13:43:16 +0200
Subject: [PATCH] tr()-Fixes for ReadOnlyFilesDialog.

Fix contexts, remove exclamation mark.

Change-Id: Icfd698e10d7e9e8c949919a102c7a482f007f91a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
---
 .../coreplugin/dialogs/readonlyfilesdialog.cpp       | 12 ++++++------
 src/plugins/coreplugin/documentmanager.cpp           |  3 +--
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp b/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp
index 1f0d05c9803..ba0d8ccd72b 100644
--- a/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp
+++ b/src/plugins/coreplugin/dialogs/readonlyfilesdialog.cpp
@@ -92,10 +92,10 @@ ReadOnlyFilesDialogPrivate::ReadOnlyFilesDialogPrivate(IDocument *document, bool
     , useVCS(false)
     , showWarnings(false)
     , document(document)
-    , mixedText(QApplication::translate("ReadOnlyFilesDialog", "Mixed"))
-    , makeWritableText(QApplication::translate("ReadOnlyFilesDialog", "Make Writable"))
-    , versionControlOpenText(QApplication::translate("ReadOnlyFilesDialog", "Open With VCS"))
-    , saveAsText(QApplication::translate("ReadOnlyFilesDialog", "Save As"))
+    , mixedText(ReadOnlyFilesDialog::tr("Mixed"))
+    , makeWritableText(ReadOnlyFilesDialog::tr("Make Writable"))
+    , versionControlOpenText(ReadOnlyFilesDialog::tr("Open With VCS"))
+    , saveAsText(ReadOnlyFilesDialog::tr("Save As"))
 {}
 
 ReadOnlyFilesDialogPrivate::~ReadOnlyFilesDialogPrivate()
@@ -220,12 +220,12 @@ void ReadOnlyFilesDialog::promptFailWarning(const QStringList &files, ReadOnlyRe
             message += d->failWarning;
             break;
         default:
-            title = tr("Canceled Changing Permissions!");
+            title = tr("Canceled Changing Permissions");
             message = d->failWarning;
             break;
         }
     } else {
-        title = tr("Could Not Change Permissions On Some Files!");
+        title = tr("Could Not Change Permissions On Some Files");
         message = d->failWarning;
         message += tr("\nSee details for a complete list of files.");
         details = files.join(QLatin1String("\n"));
diff --git a/src/plugins/coreplugin/documentmanager.cpp b/src/plugins/coreplugin/documentmanager.cpp
index 3619f771d2e..63e460bd3bd 100644
--- a/src/plugins/coreplugin/documentmanager.cpp
+++ b/src/plugins/coreplugin/documentmanager.cpp
@@ -653,8 +653,7 @@ static QList<IDocument *> saveModifiedFilesHelper(const QList<IDocument *> &docu
         }
         if (!roDocuments.isEmpty()) {
             Core::Internal::ReadOnlyFilesDialog roDialog(roDocuments, d->m_mainWindow);
-            roDialog.setShowFailWarning(true, QCoreApplication::translate(
-                                            "saveModifiedFilesHelper",
+            roDialog.setShowFailWarning(true, DocumentManager::tr(
                                             "Could not save the files.",
                                             "error message"));
             if (roDialog.exec() == Core::Internal::ReadOnlyFilesDialog::RO_Cancel) {
-- 
GitLab