TextEditor: Use Qt5-style connects

The heavy lifting was done by clazy.

Change-Id: I380120e3419d2a3c0e272f51cc3e0d5f6aaa5e9b
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-12-13 01:18:33 +02:00
committed by Orgad Shaneh
parent b6131e1b1d
commit 9d3b2f0998
53 changed files with 314 additions and 339 deletions

View File

@@ -5311,17 +5311,17 @@ void TextEditorWidget::setCodeStyle(ICodeStylePreferences *preferences)
{
textDocument()->indenter()->setCodeStylePreferences(preferences);
if (d->m_codeStylePreferences) {
disconnect(d->m_codeStylePreferences, SIGNAL(currentTabSettingsChanged(TextEditor::TabSettings)),
d->m_document.data(), SLOT(setTabSettings(TextEditor::TabSettings)));
disconnect(d->m_codeStylePreferences, SIGNAL(currentValueChanged(QVariant)),
this, SLOT(slotCodeStyleSettingsChanged(QVariant)));
disconnect(d->m_codeStylePreferences, &ICodeStylePreferences::currentTabSettingsChanged,
d->m_document.data(), &TextDocument::setTabSettings);
disconnect(d->m_codeStylePreferences, &ICodeStylePreferences::currentValueChanged,
this, &TextEditorWidget::slotCodeStyleSettingsChanged);
}
d->m_codeStylePreferences = preferences;
if (d->m_codeStylePreferences) {
connect(d->m_codeStylePreferences, SIGNAL(currentTabSettingsChanged(TextEditor::TabSettings)),
d->m_document.data(), SLOT(setTabSettings(TextEditor::TabSettings)));
connect(d->m_codeStylePreferences, SIGNAL(currentValueChanged(QVariant)),
this, SLOT(slotCodeStyleSettingsChanged(QVariant)));
connect(d->m_codeStylePreferences, &ICodeStylePreferences::currentTabSettingsChanged,
d->m_document.data(), &TextDocument::setTabSettings);
connect(d->m_codeStylePreferences, &ICodeStylePreferences::currentValueChanged,
this, &TextEditorWidget::slotCodeStyleSettingsChanged);
d->m_document->setTabSettings(d->m_codeStylePreferences->currentTabSettings());
slotCodeStyleSettingsChanged(d->m_codeStylePreferences->currentValue());
}