Core: Apply 'static' pattern to Core::FindPlugin

Also, rename it to Core::Find. It hasn't been a plugin for a while.

Change-Id: I845885ccf18bdc1440258d523b033758d5583881
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
hjk
2016-03-11 19:12:07 +01:00
parent 2ffd95f66a
commit bcf7a11c24
15 changed files with 172 additions and 212 deletions

View File

@@ -1561,12 +1561,9 @@ void FakeVimPluginPrivate::keepOnlyWindow()
void FakeVimPluginPrivate::find(bool reverse)
{
if (FindPlugin *plugin = FindPlugin::instance()) {
plugin->setUseFakeVim(true);
plugin->openFindToolBar(reverse
? FindPlugin::FindBackwardDirection
: FindPlugin::FindForwardDirection);
}
Find::setUseFakeVim(true);
Find::openFindToolBar(reverse ? Find::FindBackwardDirection
: Find::FindForwardDirection);
}
void FakeVimPluginPrivate::findNext(bool reverse)
@@ -1873,8 +1870,7 @@ void FakeVimPluginPrivate::setUseFakeVim(const QVariant &value)
{
//qDebug() << "SET USE FAKEVIM" << value;
bool on = value.toBool();
if (FindPlugin::instance())
FindPlugin::instance()->setUseFakeVim(on);
Find::setUseFakeVim(on);
setUseFakeVimInternal(on);
setShowRelativeLineNumbers(theFakeVimSetting(ConfigRelativeNumber)->value());
}