Commit e71c9807 authored by hjk's avatar hjk
Browse files

Fixes: fakevim: use proper QObject parent for handler

    Details:  before that it was the plugin, so there was a lot of
inactive handlers left around
parent ad76902f
...@@ -2114,10 +2114,6 @@ FakeVimHandler::~FakeVimHandler() ...@@ -2114,10 +2114,6 @@ FakeVimHandler::~FakeVimHandler()
bool FakeVimHandler::eventFilter(QObject *ob, QEvent *ev) bool FakeVimHandler::eventFilter(QObject *ob, QEvent *ev)
{ {
//if (ev->type() == QEvent::KeyPress || ev->type() == QEvent::ShortcutOverride)
// qDebug() << ob << ev->type() << qApp << d->editor()
// << QEvent::KeyPress << QEvent::ShortcutOverride;
if (ev->type() == QEvent::KeyPress && ob == d->editor()) if (ev->type() == QEvent::KeyPress && ob == d->editor())
return d->handleEvent(static_cast<QKeyEvent *>(ev)); return d->handleEvent(static_cast<QKeyEvent *>(ev));
......
...@@ -187,7 +187,7 @@ void FakeVimPluginPrivate::installHandler(Core::IEditor *editor) ...@@ -187,7 +187,7 @@ void FakeVimPluginPrivate::installHandler(Core::IEditor *editor)
{ {
QWidget *widget = editor->widget(); QWidget *widget = editor->widget();
FakeVimHandler *handler = new FakeVimHandler(widget, this); FakeVimHandler *handler = new FakeVimHandler(widget, widget);
connect(handler, SIGNAL(extraInformationChanged(QString)), connect(handler, SIGNAL(extraInformationChanged(QString)),
this, SLOT(showExtraInformation(QString))); this, SLOT(showExtraInformation(QString)));
......
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