forked from qt-creator/qt-creator
Fixes: fakevim: fix crash when installed on binary editor
This commit is contained in:
@@ -186,6 +186,10 @@ void FakeVimPluginPrivate::installHandler(Core::IEditor *editor)
|
|||||||
QWidget *widget = editor->widget();
|
QWidget *widget = editor->widget();
|
||||||
if (!widget)
|
if (!widget)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// we can only handle QTextEdit and QPlainTextEdit
|
||||||
|
if (!qobject_cast<QTextEdit *>(widget) && !qobject_cast<QPlainTextEdit *>(widget))
|
||||||
|
return;
|
||||||
|
|
||||||
FakeVimHandler *handler = new FakeVimHandler(widget, widget);
|
FakeVimHandler *handler = new FakeVimHandler(widget, widget);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user