Commit a21a55b5 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.ShortcutManager: Fix CLANG static analysis warnings



Change-Id: I9600439e1236c52b347c667bac6b6d79e2335375
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
Reviewed-by: default avatarTim Jenssen <tim.jenssen@digia.com>
parent a158ed44
...@@ -115,36 +115,36 @@ void ShortCutManager::registerActions(const Core::Context &qmlDesignerMainContex ...@@ -115,36 +115,36 @@ void ShortCutManager::registerActions(const Core::Context &qmlDesignerMainContex
//Edit Menu //Edit Menu
command = Core::ActionManager::registerAction(&m_deleteAction, QmlDesigner::Constants::C_BACKSPACE, qmlDesignerFormEditorContext); Core::ActionManager::registerAction(&m_deleteAction, QmlDesigner::Constants::C_BACKSPACE, qmlDesignerFormEditorContext);
command = Core::ActionManager::registerAction(&m_deleteAction, QmlDesigner::Constants::C_BACKSPACE, qmlDesignerNavigatorContext); command = Core::ActionManager::registerAction(&m_deleteAction, QmlDesigner::Constants::C_BACKSPACE, qmlDesignerNavigatorContext);
command->setDefaultKeySequence(QKeySequence(Qt::Key_Backspace)); command->setDefaultKeySequence(QKeySequence(Qt::Key_Backspace));
command->setAttribute(Core::Command::CA_Hide); // don't show delete in other modes command->setAttribute(Core::Command::CA_Hide); // don't show delete in other modes
if (Utils::HostOsInfo::isMacHost()) if (Utils::HostOsInfo::isMacHost())
editMenu->addAction(command, Core::Constants::G_EDIT_COPYPASTE); editMenu->addAction(command, Core::Constants::G_EDIT_COPYPASTE);
command = Core::ActionManager::registerAction(&m_deleteAction, QmlDesigner::Constants::C_DELETE, qmlDesignerFormEditorContext); Core::ActionManager::registerAction(&m_deleteAction, QmlDesigner::Constants::C_DELETE, qmlDesignerFormEditorContext);
command = Core::ActionManager::registerAction(&m_deleteAction, QmlDesigner::Constants::C_DELETE, qmlDesignerNavigatorContext); command = Core::ActionManager::registerAction(&m_deleteAction, QmlDesigner::Constants::C_DELETE, qmlDesignerNavigatorContext);
command->setDefaultKeySequence(QKeySequence::Delete); command->setDefaultKeySequence(QKeySequence::Delete);
command->setAttribute(Core::Command::CA_Hide); // don't show delete in other modes command->setAttribute(Core::Command::CA_Hide); // don't show delete in other modes
if (!Utils::HostOsInfo::isMacHost()) if (!Utils::HostOsInfo::isMacHost())
editMenu->addAction(command, Core::Constants::G_EDIT_COPYPASTE); editMenu->addAction(command, Core::Constants::G_EDIT_COPYPASTE);
command = Core::ActionManager::registerAction(&m_cutAction, Core::Constants::CUT, qmlDesignerFormEditorContext); Core::ActionManager::registerAction(&m_cutAction, Core::Constants::CUT, qmlDesignerFormEditorContext);
command = Core::ActionManager::registerAction(&m_cutAction, Core::Constants::CUT, qmlDesignerNavigatorContext); command = Core::ActionManager::registerAction(&m_cutAction, Core::Constants::CUT, qmlDesignerNavigatorContext);
command->setDefaultKeySequence(QKeySequence::Cut); command->setDefaultKeySequence(QKeySequence::Cut);
editMenu->addAction(command, Core::Constants::G_EDIT_COPYPASTE); editMenu->addAction(command, Core::Constants::G_EDIT_COPYPASTE);
command = Core::ActionManager::registerAction(&m_copyAction, Core::Constants::COPY, qmlDesignerFormEditorContext); Core::ActionManager::registerAction(&m_copyAction, Core::Constants::COPY, qmlDesignerFormEditorContext);
command = Core::ActionManager::registerAction(&m_copyAction, Core::Constants::COPY, qmlDesignerNavigatorContext); command = Core::ActionManager::registerAction(&m_copyAction, Core::Constants::COPY, qmlDesignerNavigatorContext);
command->setDefaultKeySequence(QKeySequence::Copy); command->setDefaultKeySequence(QKeySequence::Copy);
editMenu->addAction(command, Core::Constants::G_EDIT_COPYPASTE); editMenu->addAction(command, Core::Constants::G_EDIT_COPYPASTE);
command = Core::ActionManager::registerAction(&m_pasteAction, Core::Constants::PASTE, qmlDesignerFormEditorContext); Core::ActionManager::registerAction(&m_pasteAction, Core::Constants::PASTE, qmlDesignerFormEditorContext);
command = Core::ActionManager::registerAction(&m_pasteAction, Core::Constants::PASTE, qmlDesignerNavigatorContext); command = Core::ActionManager::registerAction(&m_pasteAction, Core::Constants::PASTE, qmlDesignerNavigatorContext);
command->setDefaultKeySequence(QKeySequence::Paste); command->setDefaultKeySequence(QKeySequence::Paste);
editMenu->addAction(command, Core::Constants::G_EDIT_COPYPASTE); editMenu->addAction(command, Core::Constants::G_EDIT_COPYPASTE);
command = Core::ActionManager::registerAction(&m_selectAllAction, Core::Constants::SELECTALL, qmlDesignerFormEditorContext); Core::ActionManager::registerAction(&m_selectAllAction, Core::Constants::SELECTALL, qmlDesignerFormEditorContext);
command = Core::ActionManager::registerAction(&m_selectAllAction, Core::Constants::SELECTALL, qmlDesignerNavigatorContext); command = Core::ActionManager::registerAction(&m_selectAllAction, Core::Constants::SELECTALL, qmlDesignerNavigatorContext);
command->setDefaultKeySequence(QKeySequence::SelectAll); command->setDefaultKeySequence(QKeySequence::SelectAll);
...@@ -166,7 +166,7 @@ void ShortCutManager::registerActions(const Core::Context &qmlDesignerMainContex ...@@ -166,7 +166,7 @@ void ShortCutManager::registerActions(const Core::Context &qmlDesignerMainContex
command->setAttribute(Core::Command::CA_Hide); command->setAttribute(Core::Command::CA_Hide);
viewsMenu->addAction(command); viewsMenu->addAction(command);
command = Core::ActionManager::registerAction(&m_hideSidebarsAction, Core::Constants::TOGGLE_SIDEBAR, qmlDesignerMainContext); Core::ActionManager::registerAction(&m_hideSidebarsAction, Core::Constants::TOGGLE_SIDEBAR, qmlDesignerMainContext);
} }
void ShortCutManager::updateActions(Core::IEditor* currentEditor) void ShortCutManager::updateActions(Core::IEditor* currentEditor)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment