Commit ef7e95a7 authored by Lorenz Haas's avatar Lorenz Haas Committed by David Schulz

Beautifier: Consistently use qt5 connection style

Change-Id: Iea7a554dbb323b3a2b691d3e254c4e111897beb8
Reviewed-by: default avatarDavid Schulz <david.schulz@theqtcompany.com>
parent 16905f2d
......@@ -58,7 +58,7 @@ ArtisticStyleOptionsPageWidget::ArtisticStyleOptionsPageWidget(ArtisticStyleSett
ui->command->setExpectedKind(Utils::PathChooser::ExistingCommand);
ui->command->setPromptDialogTitle(BeautifierPlugin::msgCommandPromptDialogTitle(
QLatin1String(Constants::ArtisticStyle::DISPLAY_NAME)));
connect(ui->command, SIGNAL(validChanged(bool)), ui->options, SLOT(setEnabled(bool)));
connect(ui->command, &Utils::PathChooser::validChanged, ui->options, &QWidget::setEnabled);
ui->configurations->setSettings(m_settings);
}
......
......@@ -59,7 +59,8 @@ ArtisticStyleSettings::ArtisticStyleSettings() :
AbstractSettings(QLatin1String(Constants::ArtisticStyle::SETTINGS_NAME),
QLatin1String(".astyle"))
{
connect(&m_versionWatcher, SIGNAL(finished()), this, SLOT(helperSetVersion()));
connect(&m_versionWatcher, &QFutureWatcherBase::finished,
this, &ArtisticStyleSettings::helperSetVersion);
setCommand(QLatin1String("astyle"));
m_settings.insert(QLatin1String(kUseOtherFiles), QVariant(true));
......
......@@ -75,8 +75,9 @@ namespace Internal {
BeautifierPlugin::BeautifierPlugin() :
m_asyncFormatMapper(new QSignalMapper)
{
connect(m_asyncFormatMapper, SIGNAL(mapped(QObject*)),
this, SLOT(formatCurrentFileContinue(QObject*)));
connect(m_asyncFormatMapper,
static_cast<void (QSignalMapper::*)(QObject *)>(&QSignalMapper::mapped),
this, &BeautifierPlugin::formatCurrentFileContinue);
connect(this, &BeautifierPlugin::pipeError, this, &BeautifierPlugin::showError);
}
......@@ -114,8 +115,8 @@ bool BeautifierPlugin::initialize(const QStringList &arguments, QString *errorSt
void BeautifierPlugin::extensionsInitialized()
{
if (const Core::EditorManager *editorManager = Core::EditorManager::instance()) {
connect(editorManager, SIGNAL(currentEditorChanged(Core::IEditor*)),
this, SLOT(updateActions(Core::IEditor*)));
connect(editorManager, &Core::EditorManager::currentEditorChanged,
this, &BeautifierPlugin::updateActions);
}
}
......@@ -237,7 +238,8 @@ void BeautifierPlugin::formatCurrentFile(const Command &command, int startPos, i
QFutureWatcher<FormatTask> *watcher = new QFutureWatcher<FormatTask>;
connect(doc, &TextDocument::contentsChanged,
watcher, &QFutureWatcher<FormatTask>::cancel);
connect(watcher, SIGNAL(finished()), m_asyncFormatMapper, SLOT(map()));
connect(watcher, &QFutureWatcherBase::finished, m_asyncFormatMapper,
static_cast<void (QSignalMapper::*)()>(&QSignalMapper::map));
m_asyncFormatMapper->setMapping(watcher, watcher);
watcher->setFuture(QtConcurrent::run(&BeautifierPlugin::formatAsync, this, task));
}
......
......@@ -57,7 +57,7 @@ ClangFormatOptionsPageWidget::ClangFormatOptionsPageWidget(ClangFormatSettings *
ui->command->setExpectedKind(Utils::PathChooser::ExistingCommand);
ui->command->setPromptDialogTitle(
BeautifierPlugin::msgCommandPromptDialogTitle(QLatin1String("Clang Format")));
connect(ui->command, SIGNAL(validChanged(bool)), ui->options, SLOT(setEnabled(bool)));
connect(ui->command, &Utils::PathChooser::validChanged, ui->options, &QWidget::setEnabled);
ui->configurations->setSettings(m_settings);
}
......
......@@ -57,8 +57,8 @@ ConfigurationDialog::ConfigurationDialog(QWidget *parent) :
updateDocumentation();
connect(ui->name, &QLineEdit::textChanged, this, &ConfigurationDialog::updateOkButton);
updateOkButton(); // force initial test.
connect(ui->editor, SIGNAL(documentationChanged(QString,QString)),
this, SLOT(updateDocumentation(QString,QString)));
connect(ui->editor, &ConfigurationEditor::documentationChanged,
this, &ConfigurationDialog::updateDocumentation);
// Set palette and font according to settings
const TextEditor::FontSettings fs = TextEditor::TextEditorSettings::instance()->fontSettings();
......
......@@ -58,7 +58,7 @@ UncrustifyOptionsPageWidget::UncrustifyOptionsPageWidget(UncrustifySettings *set
ui->command->setExpectedKind(Utils::PathChooser::ExistingCommand);
ui->command->setPromptDialogTitle(BeautifierPlugin::msgCommandPromptDialogTitle(
QLatin1String(Constants::Uncrustify::DISPLAY_NAME)));
connect(ui->command, SIGNAL(validChanged(bool)), ui->options, SLOT(setEnabled(bool)));
connect(ui->command, &Utils::PathChooser::validChanged, ui->options, &QWidget::setEnabled);
ui->configurations->setSettings(m_settings);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment