forked from qt-creator/qt-creator
fakevim: Use internal editor widget in tests
Use internal editor with highlighting and folding support for tests to be able to check folding commands. Change-Id: Iaab3bc9edb65c8e2a5a7efc4456e021c8a178d7f Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -1932,6 +1932,18 @@ void FakeVimPlugin::extensionsInitialized()
|
||||
addAutoReleasedObject(d->m_statusBar);
|
||||
}
|
||||
|
||||
#ifdef WITH_TESTS
|
||||
void FakeVimPlugin::setupTest(QString *title, FakeVimHandler **handler, QWidget **edit)
|
||||
{
|
||||
*title = QString("test.cpp");
|
||||
Core::IEditor *iedit = Core::EditorManager::openEditorWithContents(Core::Id(), title);
|
||||
Core::EditorManager::activateEditor(iedit);
|
||||
*edit = iedit->widget();
|
||||
*handler = d->m_editorToHandler.value(iedit, 0);
|
||||
(*handler)->handleCommand("set startofline");
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace FakeVim
|
||||
|
||||
|
||||
Reference in New Issue
Block a user