forked from qt-creator/qt-creator
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:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user