diff options
author | Eike Ziller <eike.ziller@nokia.com> | 2012-05-23 13:25:51 +0200 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2012-05-23 13:47:13 +0200 |
commit | 1781617f8e88f1466ab2a1ad3d87ba3be92bca23 (patch) | |
tree | 1d2f7b7afac1ba78e4f10eb4afd5e380a79645ea /src/plugins/designer/formeditorw.cpp | |
parent | 1a81c33e2f4b061610b0169e819250e2124c41c8 (diff) | |
download | qt-creator-1781617f8e88f1466ab2a1ad3d87ba3be92bca23.tar.gz |
Get rid of lots of ifdef Q_OS_MAC for shortcuts.
Using a central enum now.
Change-Id: I20d88c9a3f8c62cf33e4b89a3442269f71918b06
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/designer/formeditorw.cpp')
-rw-r--r-- | src/plugins/designer/formeditorw.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/plugins/designer/formeditorw.cpp b/src/plugins/designer/formeditorw.cpp index 8f366d70f9..d1d339ddd1 100644 --- a/src/plugins/designer/formeditorw.cpp +++ b/src/plugins/designer/formeditorw.cpp @@ -105,12 +105,6 @@ static const char settingsGroupC[] = "Designer"; -#ifdef Q_OS_MAC - enum { osMac = 1 }; -#else - enum { osMac = 0 }; -#endif - /* Actions of the designer plugin: * Designer provides a toolbar which is subject to a context change (to * "edit mode" context) when it is focused. @@ -499,12 +493,12 @@ void FormEditorW::setupActions() //tool actions m_toolActionIds.push_back(Core::Id("FormEditor.LayoutHorizontally")); - const QString horizLayoutShortcut = osMac ? tr("Meta+Shift+H") : tr("Ctrl+H"); + const QString horizLayoutShortcut = Core::UseMacShortcuts ? tr("Meta+Shift+H") : tr("Ctrl+H"); addToolAction(m_fwm->actionHorizontalLayout(), am, m_contexts, m_toolActionIds.back(), mformtools, horizLayoutShortcut); m_toolActionIds.push_back(Core::Id("FormEditor.LayoutVertically")); - const QString vertLayoutShortcut = osMac ? tr("Meta+L") : tr("Ctrl+L"); + const QString vertLayoutShortcut = Core::UseMacShortcuts ? tr("Meta+L") : tr("Ctrl+L"); addToolAction(m_fwm->actionVerticalLayout(), am, m_contexts, m_toolActionIds.back(), mformtools, vertLayoutShortcut); @@ -521,7 +515,7 @@ void FormEditorW::setupActions() m_toolActionIds.back(), mformtools); m_toolActionIds.push_back(Core::Id("FormEditor.LayoutGrid")); - const QString gridShortcut = osMac ? tr("Meta+Shift+G") : tr("Ctrl+G"); + const QString gridShortcut = Core::UseMacShortcuts ? tr("Meta+Shift+G") : tr("Ctrl+G"); addToolAction(m_fwm->actionGridLayout(), am, m_contexts, m_toolActionIds.back(), mformtools, gridShortcut); @@ -530,7 +524,7 @@ void FormEditorW::setupActions() m_toolActionIds.back(), mformtools); m_toolActionIds.push_back(Core::Id("FormEditor.LayoutAdjustSize")); - const QString adjustShortcut = osMac ? tr("Meta+J") : tr("Ctrl+J"); + const QString adjustShortcut = Core::UseMacShortcuts ? tr("Meta+J") : tr("Ctrl+J"); addToolAction(m_fwm->actionAdjustSize(), am, m_contexts, m_toolActionIds.back(), mformtools, adjustShortcut); |