Fixes: fakevim: fix crash when installed on binary editor

This commit is contained in:
hjk
2009-02-04 16:48:03 +01:00
parent 7364cda1d4
commit 50661f994d

View File

@@ -186,6 +186,10 @@ void FakeVimPluginPrivate::installHandler(Core::IEditor *editor)
QWidget *widget = editor->widget();
if (!widget)
return;
// we can only handle QTextEdit and QPlainTextEdit
if (!qobject_cast<QTextEdit *>(widget) && !qobject_cast<QPlainTextEdit *>(widget))
return;
FakeVimHandler *handler = new FakeVimHandler(widget, widget);