Refactor the shortcut management for plugin macros

When saving a macro, a shortcut is created and the user can change the
shortcut in Options->Keyboard.
When the macro is removed, the shortcut is removed from the
actionManager using the removeShortcut method.
This is way simpler than before, where a number of default shortcuts
where defined and macros took the empty space.

Merge-request: 236
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Nicolas Arnaud-Cormos
2011-01-24 11:39:42 +01:00
committed by Tobias Hunger
parent f3d7bbff0c
commit 1f1656163c
13 changed files with 59 additions and 169 deletions

View File

@@ -34,6 +34,13 @@
#ifndef MACROSPLUGIN_MACRO_H
#define MACROSPLUGIN_MACRO_H
#include <coreplugin/uniqueidmanager.h>
#include <QList>
#include <QString>
#include <QShortcut>
#include "macroevent.h"
#include "macros_global.h"
#include "macroevent.h"
@@ -64,9 +71,6 @@ public:
void append(const MacroEvent &event);
const QList<MacroEvent> &events() const;
void setShortcutId(int id);
int shortcutId() const;
bool isWritable() const;
private: