From 0df6799232bb8884bebc0158a18ea180a156d914 Mon Sep 17 00:00:00 2001
From: Kai Koehne <kai.koehne@nokia.com>
Date: Fri, 9 Apr 2010 17:09:03 +0200
Subject: [PATCH] Let backspace delete current selection only on Mac OS X

Since a lot of Mac keyboards don't have a delete button we enabled
also backspace to delete the current item a while ago. However,
this can be confusing e.g. when editing an item in the property editor,
and you're accidentally loosing focus.

Reviewed-by: Thomas Hartmann
---
 src/plugins/qmldesigner/qmldesignerplugin.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/plugins/qmldesigner/qmldesignerplugin.cpp b/src/plugins/qmldesigner/qmldesignerplugin.cpp
index bf347e23c75..ae96d433634 100644
--- a/src/plugins/qmldesigner/qmldesignerplugin.cpp
+++ b/src/plugins/qmldesigner/qmldesignerplugin.cpp
@@ -223,6 +223,7 @@ void BauhausPlugin::createDesignModeWidget()
     command->setDefaultKeySequence(QKeySequence::SelectAll);
     editMenu->addAction(command, Core::Constants::G_EDIT_SELECTALL);
 
+#ifdef Q_OS_MACX
     // add second shortcut to trigger delete
     QAction *deleteAction = new QAction(m_mainWidget);
     deleteAction->setShortcut(QKeySequence(QLatin1String("Backspace")));
@@ -230,6 +231,7 @@ void BauhausPlugin::createDesignModeWidget()
             SIGNAL(triggered()));
 
     m_mainWidget->addAction(deleteAction);
+#endif // Q_OS_MACX
 
     connect(m_editorManager, SIGNAL(currentEditorChanged(Core::IEditor*)),
             this, SLOT(updateEditor(Core::IEditor*)));
-- 
GitLab