From 04b4fcb6bd7b4c20ed11606281ec2bd1cd089917 Mon Sep 17 00:00:00 2001
From: hjk <qtc-committer@nokia.com>
Date: Fri, 12 Feb 2010 10:52:09 +0100
Subject: [PATCH] debugger: change capitalization of context menu action texts
 to Book Style

---
 src/plugins/debugger/breakwindow.cpp          | 32 ++++++++++++-------
 src/plugins/debugger/debuggeroutputwindow.cpp |  4 +--
 src/plugins/debugger/moduleswindow.cpp        | 22 ++++++-------
 src/plugins/debugger/registerwindow.cpp       | 10 +++---
 src/plugins/debugger/snapshotwindow.cpp       |  4 +--
 src/plugins/debugger/sourcefileswindow.cpp    |  6 ++--
 src/plugins/debugger/stackwindow.cpp          | 10 +++---
 src/plugins/debugger/threadswindow.cpp        |  6 ++--
 src/plugins/debugger/watchwindow.cpp          | 18 +++++------
 9 files changed, 61 insertions(+), 51 deletions(-)

diff --git a/src/plugins/debugger/breakwindow.cpp b/src/plugins/debugger/breakwindow.cpp
index e27b4b3a713..f3ee5db74b1 100644
--- a/src/plugins/debugger/breakwindow.cpp
+++ b/src/plugins/debugger/breakwindow.cpp
@@ -145,48 +145,56 @@ void BreakWindow::contextMenuEvent(QContextMenuEvent *ev)
     const int rowCount = itemModel->rowCount();
     const unsigned engineCapabilities = m_manager->debuggerCapabilities();
 
-    QAction *deleteAction = new QAction(tr("Delete breakpoint"), &menu);
+    QAction *deleteAction = new QAction(tr("Delete Breakpoint"), &menu);
     deleteAction->setEnabled(si.size() > 0);
 
-    QAction *deleteAllAction = new QAction(tr("Delete all breakpoints"), &menu);
+    QAction *deleteAllAction = new QAction(tr("Delete All Breakpoints"), &menu);
     deleteAllAction->setEnabled(si.size() > 0);
 
-    // Delete by file: Find indexes of breakpoints of the same file
+    // Delete by file: Find indices of breakpoints of the same file.
     QAction *deleteByFileAction = 0;
     QList<int> breakPointsOfFile;
     if (indexUnderMouse.isValid()) {
-        const QString file = itemModel->data(indexUnderMouse.sibling(indexUnderMouse.row(), 2)).toString();
+        const QModelIndex index = indexUnderMouse.sibling(indexUnderMouse.row(), 2);
+        const QString file = itemModel->data(index).toString();
         if (!file.isEmpty()) {
             for (int i = 0; i < rowCount; i++)
                 if (itemModel->data(itemModel->index(i, 2)).toString() == file)
                     breakPointsOfFile.push_back(i);
             if (breakPointsOfFile.size() > 1) {
-                deleteByFileAction = new QAction(tr("Delete breakpoints of \"%1\"").arg(file), &menu);
+                deleteByFileAction =
+                    new QAction(tr("Delete Breakpoints of \"%1\"").arg(file), &menu);
                 deleteByFileAction->setEnabled(true);
             }
         }
     }
     if (!deleteByFileAction) {
-        deleteByFileAction = new QAction(tr("Delete breakpoints of file"), &menu);
+        deleteByFileAction = new QAction(tr("Delete Breakpoints of File"), &menu);
         deleteByFileAction->setEnabled(false);
     }
 
-    QAction *adjustColumnAction = new QAction(tr("Adjust column widths to contents"), &menu);
+    QAction *adjustColumnAction =
+        new QAction(tr("Adjust Column Widths to Contents"), &menu);
+
+    QAction *alwaysAdjustAction =
+        new QAction(tr("Always Adjust Column Widths to Contents"), &menu);
 
-    QAction *alwaysAdjustAction = new QAction(tr("Always adjust column widths to contents"), &menu);
     alwaysAdjustAction->setCheckable(true);
     alwaysAdjustAction->setChecked(m_alwaysResizeColumnsToContents);
 
-    QAction *editConditionAction = new QAction(tr("Edit condition..."), &menu);
+    QAction *editConditionAction =
+        new QAction(tr("Edit Condition..."), &menu);
     editConditionAction->setEnabled(si.size() > 0);
 
-    QAction *synchronizeAction = new QAction(tr("Synchronize breakpoints"), &menu);
-    synchronizeAction->setEnabled(Debugger::DebuggerManager::instance()->debuggerActionsEnabled());
+    QAction *synchronizeAction =
+        new QAction(tr("Synchronize Breakpoints"), &menu);
+    synchronizeAction->setEnabled(
+        Debugger::DebuggerManager::instance()->debuggerActionsEnabled());
 
     QModelIndex idx0 = (si.size() ? si.front() : QModelIndex());
     QModelIndex idx2 = idx0.sibling(idx0.row(), 2);
     bool enabled = si.isEmpty() || itemModel->data(idx0, Qt::UserRole).toBool();
-    const QString str5 = enabled ? tr("Disable breakpoint") : tr("Enable breakpoint");
+    const QString str5 = enabled ? tr("Disable Breakpoint") : tr("Enable Breakpoint");
     QAction *toggleEnabledAction = new QAction(str5, &menu);
     toggleEnabledAction->setEnabled(si.size() > 0);
 
diff --git a/src/plugins/debugger/debuggeroutputwindow.cpp b/src/plugins/debugger/debuggeroutputwindow.cpp
index 397d4578821..11391dfc3fe 100644
--- a/src/plugins/debugger/debuggeroutputwindow.cpp
+++ b/src/plugins/debugger/debuggeroutputwindow.cpp
@@ -177,13 +177,13 @@ public:
     {
         setMaximumBlockCount(100000);
         m_clearContentsAction = new QAction(this);
-        m_clearContentsAction->setText(tr("Clear contents"));
+        m_clearContentsAction->setText(tr("Clear Contents"));
         m_clearContentsAction->setEnabled(true);
         connect(m_clearContentsAction, SIGNAL(triggered(bool)),
             parent, SLOT(clearContents()));
 
         m_saveContentsAction = new QAction(this);
-        m_saveContentsAction->setText(tr("Save contents"));
+        m_saveContentsAction->setText(tr("Save Contents"));
         m_saveContentsAction->setEnabled(true);
     }
 
diff --git a/src/plugins/debugger/moduleswindow.cpp b/src/plugins/debugger/moduleswindow.cpp
index 224319b6ac9..33c6324b78b 100644
--- a/src/plugins/debugger/moduleswindow.cpp
+++ b/src/plugins/debugger/moduleswindow.cpp
@@ -109,27 +109,27 @@ void ModulesWindow::contextMenuEvent(QContextMenuEvent *ev)
     QMenu menu;
     const bool enabled = Debugger::DebuggerManager::instance()->debuggerActionsEnabled();
     const unsigned capabilities = Debugger::DebuggerManager::instance()->debuggerCapabilities();
-    QAction *act0 = new QAction(tr("Update module list"), &menu);
+    QAction *act0 = new QAction(tr("Update Module List"), &menu);
     act0->setEnabled(enabled && (capabilities & ReloadModuleCapability));
-    QAction *act3 = new QAction(tr("Show source files for module \"%1\"").arg(name), &menu);
+    QAction *act3 = new QAction(tr("Show Source Files for Module \"%1\"").arg(name), &menu);
     act3->setEnabled(enabled && (capabilities & ReloadModuleCapability));
-    QAction *act4 = new QAction(tr("Load symbols for all modules"), &menu);
+    QAction *act4 = new QAction(tr("Load Symbols for All Modules"), &menu);
     act4->setEnabled(enabled && (capabilities & ReloadModuleSymbolsCapability));
     QAction *act5 = 0;
     QAction *act6 = 0;
     QAction *act7 = 0;
     if (name.isEmpty()) {
-        act5 = new QAction(tr("Load symbols for module"), &menu);
+        act5 = new QAction(tr("Load Symbols for Module"), &menu);
         act5->setEnabled(false);
-        act6 = new QAction(tr("Edit file"), &menu);
+        act6 = new QAction(tr("Edit File"), &menu);
         act6->setEnabled(false);
-        act7 = new QAction(tr("Show symbols"), &menu);
+        act7 = new QAction(tr("Show Symbols"), &menu);
         act7->setEnabled(false);
     } else {
-        act5 = new QAction(tr("Load symbols for module \"%1\"").arg(name), &menu);
+        act5 = new QAction(tr("Load Symbols for Module \"%1\"").arg(name), &menu);
         act5->setEnabled(capabilities & ReloadModuleSymbolsCapability);
-        act6 = new QAction(tr("Edit file \"%1\"").arg(name), &menu);
-        act7 = new QAction(tr("Show symbols in file \"%1\"").arg(name), &menu);
+        act6 = new QAction(tr("Edit File \"%1\"").arg(name), &menu);
+        act7 = new QAction(tr("Show Symbols in File \"%1\"").arg(name), &menu);
     }
 
     menu.addAction(act0);
@@ -139,9 +139,9 @@ void ModulesWindow::contextMenuEvent(QContextMenuEvent *ev)
     menu.addAction(act7);
     menu.addSeparator();
     QAction *actAdjustColumnWidths =
-        menu.addAction(tr("Adjust column widths to contents"));
+        menu.addAction(tr("Adjust Column Widths to Contents"));
     QAction *actAlwaysAdjustColumnWidth =
-        menu.addAction(tr("Always adjust column widths to contents"));
+        menu.addAction(tr("Always Adjust Column Widths to Contents"));
     actAlwaysAdjustColumnWidth->setCheckable(true);
     actAlwaysAdjustColumnWidth->setChecked(m_alwaysResizeColumnsToContents);
     menu.addSeparator();
diff --git a/src/plugins/debugger/registerwindow.cpp b/src/plugins/debugger/registerwindow.cpp
index 6ca0e191f5b..aa79c3c59cb 100644
--- a/src/plugins/debugger/registerwindow.cpp
+++ b/src/plugins/debugger/registerwindow.cpp
@@ -168,7 +168,7 @@ void RegisterWindow::contextMenuEvent(QContextMenuEvent *ev)
     const unsigned engineCapabilities = m_manager->debuggerCapabilities();
     const bool actionsEnabled = m_manager->debuggerActionsEnabled();
 
-    QAction *actReload = menu.addAction(tr("Reload register listing"));
+    QAction *actReload = menu.addAction(tr("Reload Register Listing"));
     actReload->setEnabled((engineCapabilities & RegisterCapability)
         && (m_manager->state() == InferiorStopped 
             || m_manager->state() == InferiorUnrunnable));
@@ -179,10 +179,10 @@ void RegisterWindow::contextMenuEvent(QContextMenuEvent *ev)
     QString address = model()->data(idx, RegisterAddressRole).toString();
     QAction *actShowMemory = menu.addAction(QString());
     if (address.isEmpty()) {
-        actShowMemory->setText(tr("Open memory editor"));
+        actShowMemory->setText(tr("Open Memory Editor"));
         actShowMemory->setEnabled(false);
     } else {
-        actShowMemory->setText(tr("Open memory editor at %1").arg(address));
+        actShowMemory->setText(tr("Open Memory Editor at %1").arg(address));
         actShowMemory->setEnabled(actionsEnabled
             && (engineCapabilities & ShowMemoryCapability));
     }
@@ -203,9 +203,9 @@ void RegisterWindow::contextMenuEvent(QContextMenuEvent *ev)
     act2->setChecked(base == 2);
     menu.addSeparator();
 
-    QAction *actAdjust = menu.addAction(tr("Adjust column widths to contents"));
+    QAction *actAdjust = menu.addAction(tr("Adjust Column Widths to Contents"));
     QAction *actAlwaysAdjust =
-        menu.addAction(tr("Always adjust column widths to contents"));
+        menu.addAction(tr("Always Adjust Column Widths to Contents"));
     actAlwaysAdjust->setCheckable(true);
     actAlwaysAdjust->setChecked(m_alwaysResizeColumnsToContents);
     menu.addSeparator();
diff --git a/src/plugins/debugger/snapshotwindow.cpp b/src/plugins/debugger/snapshotwindow.cpp
index 6cf04f78732..a942b44c4f9 100644
--- a/src/plugins/debugger/snapshotwindow.cpp
+++ b/src/plugins/debugger/snapshotwindow.cpp
@@ -138,10 +138,10 @@ void SnapshotWindow::contextMenuEvent(QContextMenuEvent *ev)
 
     QMenu menu;
 
-    QAction *actAdjust = menu.addAction(tr("Adjust column widths to contents"));
+    QAction *actAdjust = menu.addAction(tr("Adjust Column Widths to Contents"));
 
     QAction *actAlwaysAdjust =
-        menu.addAction(tr("Always adjust column widths to contents"));
+        menu.addAction(tr("Always Adjust Column Widths to Contents"));
     actAlwaysAdjust->setCheckable(true);
     actAlwaysAdjust->setChecked(m_alwaysResizeColumnsToContents);
 
diff --git a/src/plugins/debugger/sourcefileswindow.cpp b/src/plugins/debugger/sourcefileswindow.cpp
index b2f8323350b..75851c56bc9 100644
--- a/src/plugins/debugger/sourcefileswindow.cpp
+++ b/src/plugins/debugger/sourcefileswindow.cpp
@@ -196,15 +196,15 @@ void SourceFilesWindow::contextMenuEvent(QContextMenuEvent *ev)
     QString name = model()->data(index).toString();
 
     QMenu menu;
-    QAction *act1 = new QAction(tr("Reload data"), &menu);
+    QAction *act1 = new QAction(tr("Reload Data"), &menu);
     act1->setEnabled(Debugger::DebuggerManager::instance()->debuggerActionsEnabled());
     //act1->setCheckable(true);
     QAction *act2 = 0;
     if (name.isEmpty()) {
-        act2 = new QAction(tr("Open file"), &menu);
+        act2 = new QAction(tr("Open File"), &menu);
         act2->setEnabled(false);
     } else {
-        act2 = new QAction(tr("Open file \"%1\"'").arg(name), &menu);
+        act2 = new QAction(tr("Open File \"%1\"'").arg(name), &menu);
         act2->setEnabled(true);
     }
 
diff --git a/src/plugins/debugger/stackwindow.cpp b/src/plugins/debugger/stackwindow.cpp
index 53595cc3845..dab46990637 100644
--- a/src/plugins/debugger/stackwindow.cpp
+++ b/src/plugins/debugger/stackwindow.cpp
@@ -107,16 +107,16 @@ void StackWindow::contextMenuEvent(QContextMenuEvent *ev)
         actShowMemory->setText(tr("Open memory editor"));
         actShowMemory->setEnabled(false);
     } else {
-        actShowMemory->setText(tr("Open memory editor at %1").arg(address));
+        actShowMemory->setText(tr("Open Memory Editor at %1").arg(address));
         actShowMemory->setEnabled(engineCapabilities & ShowMemoryCapability);
     }
 
     QAction *actShowDisassembler = menu.addAction(QString());
     if (address.isEmpty()) {
-        actShowDisassembler->setText(tr("Open disassembler"));
+        actShowDisassembler->setText(tr("Open Disassembler"));
         actShowDisassembler->setEnabled(false);
     } else {
-        actShowDisassembler->setText(tr("Open disassembler at %1").arg(address));
+        actShowDisassembler->setText(tr("Open Disassembler at %1").arg(address));
         actShowDisassembler->setEnabled(engineCapabilities & DisassemblerCapability);
     }
 
@@ -126,10 +126,10 @@ void StackWindow::contextMenuEvent(QContextMenuEvent *ev)
 #endif
     menu.addAction(theDebuggerAction(UseAddressInStackView));
 
-    QAction *actAdjust = menu.addAction(tr("Adjust column widths to contents"));
+    QAction *actAdjust = menu.addAction(tr("Adjust Column Widths to Contents"));
 
     QAction *actAlwaysAdjust =
-        menu.addAction(tr("Always adjust column widths to contents"));
+        menu.addAction(tr("Always Adjust Column Widths to Contents"));
     actAlwaysAdjust->setCheckable(true);
     actAlwaysAdjust->setChecked(m_alwaysResizeColumnsToContents);
 
diff --git a/src/plugins/debugger/threadswindow.cpp b/src/plugins/debugger/threadswindow.cpp
index a004a9d59ac..989e97e937f 100644
--- a/src/plugins/debugger/threadswindow.cpp
+++ b/src/plugins/debugger/threadswindow.cpp
@@ -64,8 +64,10 @@ void ThreadsWindow::rowActivated(const QModelIndex &index)
 void ThreadsWindow::contextMenuEvent(QContextMenuEvent *ev)
 {
     QMenu menu;
-    QAction *adjustColumnAction = menu.addAction(tr("Adjust column widths to contents"));
-    QAction *alwaysAdjustColumnAction = menu.addAction(tr("Always adjust column widths to contents"));
+    QAction *adjustColumnAction =
+        menu.addAction(tr("Adjust Column Widths to Contents"));
+    QAction *alwaysAdjustColumnAction =
+        menu.addAction(tr("Always Adjust Column Widths to Contents"));
     alwaysAdjustColumnAction->setCheckable(true);
     alwaysAdjustColumnAction->setChecked(m_alwaysResizeColumnsToContents);
     menu.addSeparator();
diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp
index c23eef459b3..bd85271605e 100644
--- a/src/plugins/debugger/watchwindow.cpp
+++ b/src/plugins/debugger/watchwindow.cpp
@@ -223,8 +223,8 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
     QList<QAction *> individualFormatActions;
     QAction *clearIndividualFormatAction = 0;
     if (idx.isValid()) {
-        typeFormatMenu.setTitle(tr("Change format for type '%1'").arg(type));
-        individualFormatMenu.setTitle(tr("Change format for expression '%1'").arg(exp));
+        typeFormatMenu.setTitle(tr("Change Format for Type '%1'").arg(type));
+        individualFormatMenu.setTitle(tr("Change Format for Expression '%1'").arg(exp));
         if (alternativeFormats.isEmpty()) {
             typeFormatMenu.setEnabled(false);
             individualFormatMenu.setEnabled(false);
@@ -257,19 +257,19 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
 
     QMenu menu;
 
-    QAction *actInsertNewWatchItem = menu.addAction(tr("Insert new watch item"));
-    QAction *actSelectWidgetToWatch = menu.addAction(tr("Select widget to watch"));
+    QAction *actInsertNewWatchItem = menu.addAction(tr("Insert New Watch Item"));
+    QAction *actSelectWidgetToWatch = menu.addAction(tr("Select Widget to Watch"));
 
     const bool actionsEnabled = m_manager->debuggerActionsEnabled();
     const unsigned engineCapabilities = m_manager->debuggerCapabilities();
     const QString address = model()->data(mi0, AddressRole).toString();
     QAction *actWatchKnownMemory = 0;
-    QAction *actWatchUnknownMemory = new QAction(tr("Open memory editor..."), &menu);
+    QAction *actWatchUnknownMemory = new QAction(tr("Open Memory Editor..."), &menu);
     const bool canShowMemory = engineCapabilities & ShowMemoryCapability;
     actWatchUnknownMemory->setEnabled(actionsEnabled && canShowMemory);
 
     if (canShowMemory && !address.isEmpty())
-        actWatchKnownMemory = new QAction(tr("Open memory editor at %1").arg(address), &menu);
+        actWatchKnownMemory = new QAction(tr("Open Memory Editor at %1").arg(address), &menu);
     menu.addSeparator();
 
     QAction *actWatchOrRemove;
@@ -293,7 +293,7 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
 
     menu.addAction(theDebuggerAction(RecheckDebuggingHelpers));
     menu.addAction(theDebuggerAction(UseDebuggingHelpers));
-    QAction *actClearCodeModelSnapshot = new QAction(tr("Refresh code model snapshot"), &menu);
+    QAction *actClearCodeModelSnapshot = new QAction(tr("Refresh Code Model Snapshot"), &menu);
     actClearCodeModelSnapshot->setEnabled(actionsEnabled && theDebuggerAction(UseCodeModel)->isChecked());
     menu.addAction(actClearCodeModelSnapshot);
     menu.addSeparator();
@@ -304,9 +304,9 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
     menu.addAction(theDebuggerAction(ShowQtNamespace));
 
     QAction *actAdjustColumnWidths =
-        menu.addAction(tr("Adjust column widths to contents"));
+        menu.addAction(tr("Adjust Column Widths to Contents"));
     QAction *actAlwaysAdjustColumnWidth =
-        menu.addAction(tr("Always adjust column widths to contents"));
+        menu.addAction(tr("Always Adjust Column Widths to Contents"));
     actAlwaysAdjustColumnWidth->setCheckable(true);
     actAlwaysAdjustColumnWidth->setChecked(m_alwaysResizeColumnsToContents);
 
-- 
GitLab