summaryrefslogtreecommitdiffstats
path: root/tools/designer/src/lib/shared/actioneditor.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-04-15 06:18:30 (GMT)
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2009-04-15 06:18:30 (GMT)
commit6c4b9cb575292f5f81afc772d993c1a53eb96ea5 (patch)
treef06be19545a6e7521707060c4d56eaeb2ba2c16e /tools/designer/src/lib/shared/actioneditor.cpp
parent3eb4aacf07c77876c6ce68e9746906424934433b (diff)
downloadQt-6c4b9cb575292f5f81afc772d993c1a53eb96ea5.zip
Qt-6c4b9cb575292f5f81afc772d993c1a53eb96ea5.tar.gz
Qt-6c4b9cb575292f5f81afc772d993c1a53eb96ea5.tar.bz2
Display QAction keyboard shortcuts in action editor correctly.
Use PropertySheetKeySequenceValue instead of plain strings.
Diffstat (limited to 'tools/designer/src/lib/shared/actioneditor.cpp')
-rw-r--r--tools/designer/src/lib/shared/actioneditor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/designer/src/lib/shared/actioneditor.cpp b/tools/designer/src/lib/shared/actioneditor.cpp
index 6a66442..7f96a15 100644
--- a/tools/designer/src/lib/shared/actioneditor.cpp
+++ b/tools/designer/src/lib/shared/actioneditor.cpp
@@ -456,7 +456,7 @@ void ActionEditor::slotNewAction()
if (actionData.checkable)
setInitialProperty(sheet, QLatin1String(checkablePropertyC), QVariant(true));
- if (!actionData.keysequence.isEmpty())
+ if (!actionData.keysequence.value().isEmpty())
setInitialProperty(sheet, QLatin1String(shortcutPropertyC), qVariantFromValue(actionData.keysequence));
sheet->setProperty(sheet->indexOf(QLatin1String(iconPropertyC)), qVariantFromValue(actionData.icon));
@@ -491,10 +491,10 @@ static QDesignerFormWindowCommand *setIconPropertyCommand(const PropertySheetIco
// return a FormWindow command to apply a QKeySequence or a reset command
// in case it is empty.
-static QDesignerFormWindowCommand *setKeySequencePropertyCommand(const QKeySequence &ks, QAction *action, QDesignerFormWindowInterface *fw)
+static QDesignerFormWindowCommand *setKeySequencePropertyCommand(const PropertySheetKeySequenceValue &ks, QAction *action, QDesignerFormWindowInterface *fw)
{
const QString shortcutProperty = QLatin1String(shortcutPropertyC);
- if (ks.isEmpty()) {
+ if (ks.value().isEmpty()) {
ResetPropertyCommand *cmd = new ResetPropertyCommand(fw);
cmd->init(action, shortcutProperty);
return cmd;
@@ -544,7 +544,7 @@ void ActionEditor::editAction(QAction *action)
oldActionData.text = action->text();
oldActionData.toolTip = textPropertyValue(sheet, QLatin1String(toolTipPropertyC));
oldActionData.icon = qVariantValue<PropertySheetIconValue>(sheet->property(sheet->indexOf(QLatin1String(iconPropertyC))));
- oldActionData.keysequence = qVariantValue<QKeySequence>(sheet->property(sheet->indexOf(QLatin1String(shortcutPropertyC))));
+ oldActionData.keysequence = ActionModel::actionShortCut(sheet);
oldActionData.checkable = action->isCheckable();
dlg.setActionData(oldActionData);