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
This commit is contained in:
hjk
2009-01-27 14:50:36 +01:00
parent ad76902f86
commit e71c9807e3
2 changed files with 1 additions and 5 deletions

View File

@@ -2114,10 +2114,6 @@ FakeVimHandler::~FakeVimHandler()
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())
return d->handleEvent(static_cast<QKeyEvent *>(ev));

View File

@@ -187,7 +187,7 @@ void FakeVimPluginPrivate::installHandler(Core::IEditor *editor)
{
QWidget *widget = editor->widget();
FakeVimHandler *handler = new FakeVimHandler(widget, this);
FakeVimHandler *handler = new FakeVimHandler(widget, widget);
connect(handler, SIGNAL(extraInformationChanged(QString)),
this, SLOT(showExtraInformation(QString)));