Commit 60c837b7 authored by Pablo Rauzy's avatar Pablo Rauzy Committed by Christoph Cullmann
Browse files

code cleanup

parent 0f249ec6
......@@ -8,7 +8,6 @@
#include <QAction>
#include <QApplication>
#include <QCoreApplication>
#include <QDateTime>
#include <QKeyEvent>
#include <QKeySequence>
#include <QList>
......@@ -134,7 +133,6 @@ bool KeyboardMacrosPlugin::play()
Macro::Iterator it;
for (it = m_macro.begin(); it != m_macro.end(); it++) {
QKeyEvent *keyEvent = *it;
QKeySequence s(keyEvent->key() | keyEvent->modifiers());
keyEvent->setAccepted(false);
qApp->sendEvent(qApp->focusWidget(), keyEvent);
}
......
......@@ -15,15 +15,13 @@
#include <KTextEditor/Plugin>
#include <KTextEditor/View>
class KeyboardMacrosPluginView;
typedef QList<QKeyEvent *> Macro;
class KeyboardMacrosPlugin : public KTextEditor::Plugin
{
Q_OBJECT
friend KeyboardMacrosPluginView;
friend class KeyboardMacrosPluginView;
public:
explicit KeyboardMacrosPlugin(QObject *parent = nullptr, const QList<QVariant> & = QList<QVariant>());
......@@ -41,12 +39,12 @@ public:
bool eventFilter(QObject *obj, QEvent *event) override;
private:
KTextEditor::MainWindow *m_mainWindow;
QWidget *m_focusWidget;
KTextEditor::MainWindow *m_mainWindow = nullptr;
QWidget *m_focusWidget = nullptr;
QAction *m_recordAction;
QAction *m_cancelAction;
QAction *m_playAction;
QAction *m_recordAction = nullptr;
QAction *m_cancelAction = nullptr;
QAction *m_playAction = nullptr;
bool m_recording = false;
Macro m_tape;
......
Supports Markdown
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