Use tab width in search results.

Task-number: QTCREATORBUG-2042
Change-Id: Ie1769cb44f60da8ef6b26d5d27f9c7a600534f6b
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Francois Ferrand
2013-07-03 18:23:03 +02:00
parent edc08ba2bc
commit 24626a6835
10 changed files with 65 additions and 14 deletions

View File

@@ -48,6 +48,10 @@
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/externaltoolmanager.h>
#include <extensionsystem/pluginmanager.h>
#include <texteditor/icodestylepreferences.h>
#include <texteditor/tabsettings.h>
#include <utils/qtcassert.h>
#include <utils/macroexpander.h>
@@ -143,6 +147,11 @@ void TextEditorPlugin::extensionsInitialized()
updateSearchResultsFont(m_settings->fontSettings());
connect(m_settings->codeStyle(), &ICodeStylePreferences::currentTabSettingsChanged,
this, &TextEditorPlugin::updateSearchResultsTabWidth);
updateSearchResultsTabWidth(m_settings->codeStyle()->currentTabSettings());
addAutoReleasedObject(new FindInFiles);
addAutoReleasedObject(new FindInCurrentFile);
addAutoReleasedObject(new FindInOpenFiles);
@@ -221,6 +230,12 @@ void TextEditorPlugin::updateSearchResultsFont(const FontSettings &settings)
}
}
void TextEditorPlugin::updateSearchResultsTabWidth(const TabSettings &tabSettings)
{
if (auto window = SearchResultWindow::instance())
window->setTabWidth(tabSettings.m_tabSize);
}
void TextEditorPlugin::updateCurrentSelection(const QString &text)
{
if (BaseTextEditor *editor = BaseTextEditor::currentTextEditor()) {