From bbfe7bad3d7a293fac23b24c8747c163209d68ea Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <daniel.molkentin@nokia.com>
Date: Tue, 27 Apr 2010 10:48:13 +0200
Subject: [PATCH] Add standard shortcut for print action.

Also update Visual Studio keyboard scheme. Xcode already had a proper
key binding.

Reviewed-by: con
---
 share/qtcreator/schemes/MS_Visual_C++.kms | 2 +-
 src/plugins/coreplugin/mainwindow.cpp     | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/share/qtcreator/schemes/MS_Visual_C++.kms b/share/qtcreator/schemes/MS_Visual_C++.kms
index 29285164828..064282f0d5a 100644
--- a/share/qtcreator/schemes/MS_Visual_C++.kms
+++ b/share/qtcreator/schemes/MS_Visual_C++.kms
@@ -127,7 +127,7 @@
   <key value="Ctrl+Shift+S" />
  </shortcut>
  <shortcut id="QtCreator.Print" >
-  <key value="" />
+  <key value="Ctrl+P" />
  </shortcut>
  <shortcut id="QtCreator.Exit" >
   <key value="Ctrl+Q" />
diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp
index 292e7feb1ba..72d1da273e3 100644
--- a/src/plugins/coreplugin/mainwindow.cpp
+++ b/src/plugins/coreplugin/mainwindow.cpp
@@ -603,6 +603,7 @@ void MainWindow::registerDefaultActions()
     icon = QIcon::fromTheme(QLatin1String("document-print"));
     tmpaction = new QAction(icon, tr("&Print..."), this);
     cmd = am->registerAction(tmpaction, Constants::PRINT, m_globalContext);
+    cmd->setDefaultKeySequence(QKeySequence::Print);
     mfile->addAction(cmd, Constants::G_FILE_PRINT);
 
     // Exit Action
-- 
GitLab