Commit 0df67801 authored by Montel Laurent's avatar Montel Laurent Committed by hjk

Convert to new connect api

Change-Id: I80aad51340bcde953763dec36cf989d6e19d4cd0
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent f479c197
......@@ -64,7 +64,8 @@ AutotoolsBuildSettingsWidget::AutotoolsBuildSettingsWidget(AutotoolsBuildConfigu
m_pathChooser->setEnvironment(bc->environment());
m_pathChooser->setHistoryCompleter(QLatin1String("AutoTools.BuildDir.History"));
fl->addRow(tr("Build directory:"), m_pathChooser);
connect(m_pathChooser, SIGNAL(changed(QString)), this, SLOT(buildDirectoryChanged()));
connect(m_pathChooser, &Utils::PathChooser::changed,
this, &AutotoolsBuildSettingsWidget::buildDirectoryChanged);
m_pathChooser->setBaseFileName(bc->target()->project()->projectDirectory());
m_pathChooser->setPath(m_buildConfiguration->rawBuildDirectory().toString());
......
......@@ -101,7 +101,7 @@ BuildPathPage::BuildPathPage(AutotoolsOpenProjectWizard *wizard)
m_pc->setHistoryCompleter(QLatin1String("AutoTools.BuildDir.History"));
m_pc->setBaseDirectory(m_wizard->sourceDirectory());
m_pc->setPath(m_wizard->buildDirectory());
connect(m_pc, SIGNAL(changed(QString)), this, SLOT(buildDirectoryChanged()));
connect(m_pc, &Utils::PathChooser::changed, this, &BuildPathPage::buildDirectoryChanged);
fl->addRow(tr("Build directory:"), m_pc);
setTitle(tr("Build Location"));
}
......
......@@ -143,8 +143,8 @@ bool AutotoolsProject::fromMap(const QVariantMap &map)
if (!Project::fromMap(map))
return false;
connect(m_fileWatcher, SIGNAL(fileChanged(QString)),
this, SLOT(onFileChanged(QString)));
connect(m_fileWatcher, &Utils::FileSystemWatcher::fileChanged,
this, &AutotoolsProject::onFileChanged);
// Load the project tree structure.
loadProjectTree();
......@@ -172,11 +172,11 @@ void AutotoolsProject::loadProjectTree()
// Parse the makefile asynchronously in a thread
m_makefileParserThread = new MakefileParserThread(m_fileName);
connect(m_makefileParserThread, SIGNAL(started()),
this, SLOT(makefileParsingStarted()));
connect(m_makefileParserThread, &MakefileParserThread::started,
this, &AutotoolsProject::makefileParsingStarted);
connect(m_makefileParserThread, SIGNAL(finished()),
this, SLOT(makefileParsingFinished()));
connect(m_makefileParserThread, &MakefileParserThread::finished,
this, &AutotoolsProject::makefileParsingFinished);
m_makefileParserThread->start();
}
......
......@@ -292,7 +292,7 @@ void MakefileParser::parseSubDirs()
continue;
MakefileParser parser(subDirMakefile);
connect(&parser, SIGNAL(status(QString)), this, SIGNAL(status(QString)));
connect(&parser, &MakefileParser::status, this, &MakefileParser::status);
const bool success = parser.parse();
// Don't return, try to parse as many sub directories
......
......@@ -46,7 +46,8 @@ MakefileParserThread::MakefileParserThread(const QString &makefile) :
m_makefiles(),
m_includePaths()
{
connect(&m_parser, SIGNAL(status(QString)), this, SIGNAL(status(QString)));
connect(&m_parser, &MakefileParser::status,
this, &MakefileParserThread::status);
}
QStringList MakefileParserThread::sources() const
......
......@@ -48,7 +48,7 @@ UnCommitDialog::UnCommitDialog(QWidget *parent)
auto dryRunBtn = new QPushButton(tr("Dry Run"));
dryRunBtn->setToolTip(tr("Test the outcome of removing the last committed revision, without actually removing anything."));
m_ui->buttonBox->addButton(dryRunBtn, QDialogButtonBox::ApplyRole);
connect(dryRunBtn, SIGNAL(clicked()), this, SLOT(dryRun()));
connect(dryRunBtn, &QPushButton::clicked, this, &UnCommitDialog::dryRun);
}
UnCommitDialog::~UnCommitDialog()
......
......@@ -172,7 +172,7 @@ Parser::Parser(QObject *parent)
// connect signal/slots
// internal data reset
connect(this, SIGNAL(resetDataDone()), SLOT(onResetDataDone()), Qt::QueuedConnection);
connect(this, &Parser::resetDataDone, this, &Parser::onResetDataDone, Qt::QueuedConnection);
// timer for emitting changes
connect(d->timer, SIGNAL(timeout()), SLOT(requestCurrentState()), Qt::QueuedConnection);
......
......@@ -114,7 +114,7 @@ void FormEditorPlugin::extensionsInitialized()
mformtools->menu()->setTitle(tr("For&m Editor"));
mtools->addMenu(mformtools);
connect(m_actionSwitchSource, SIGNAL(triggered()), this, SLOT(switchSourceForm()));
connect(m_actionSwitchSource, &QAction::triggered, this, &FormEditorPlugin::switchSourceForm);
Core::Context context(Designer::Constants::C_FORMEDITOR, Core::Constants::C_EDITORMANAGER);
Core::Command *cmd = Core::ActionManager::registerAction(m_actionSwitchSource,
"FormEditor.FormSwitchSource", context);
......
......@@ -91,10 +91,10 @@ FormTemplateWizardPage::FormTemplateWizardPage(QWidget * parent) :
setTitle(tr("Choose a Form Template"));
QVBoxLayout *layout = new QVBoxLayout;
connect(m_newFormWidget, SIGNAL(currentTemplateChanged(bool)),
this, SLOT(slotCurrentTemplateChanged(bool)));
connect(m_newFormWidget, SIGNAL(templateActivated()),
this, SIGNAL(templateActivated()));
connect(m_newFormWidget, &QDesignerNewFormWidgetInterface::currentTemplateChanged,
this, &FormTemplateWizardPage::slotCurrentTemplateChanged);
connect(m_newFormWidget, &QDesignerNewFormWidgetInterface::templateActivated,
this, &FormTemplateWizardPage::templateActivated);
layout->addWidget(m_newFormWidget);
setLayout(layout);
......
......@@ -85,10 +85,10 @@ QtCreatorIntegration::QtCreatorIntegration(QDesignerFormEditorInterface *core, Q
f |= SlotNavigationFeature;
f &= ~ResourceEditorFeature;
setFeatures(f);
connect(this, SIGNAL(navigateToSlot(QString,QString,QStringList)),
this, SLOT(slotNavigateToSlot(QString,QString,QStringList)));
connect(this, SIGNAL(helpRequested(QString,QString)),
this, SLOT(slotDesignerHelpRequested(QString,QString)));
connect(this, &QtCreatorIntegration::navigateToSlot,
this, &QtCreatorIntegration::slotNavigateToSlot);
connect(this, &QtCreatorIntegration::helpRequested,
this, &QtCreatorIntegration::slotDesignerHelpRequested);
slotSyncSettingsToDesigner();
connect(Core::ICore::instance(), SIGNAL(saveSettingsRequested()),
this, SLOT(slotSyncSettingsToDesigner()));
......
......@@ -115,7 +115,7 @@ void FilesSelectionWizardPage::createApplyButton(QVBoxLayout *layout)
hbox->addWidget(m_applyFilterButton);
layout->addLayout(hbox);
connect(m_applyFilterButton, SIGNAL(clicked()), this, SLOT(applyFilter()));
connect(m_applyFilterButton, &QPushButton::clicked, this, &FilesSelectionWizardPage::applyFilter);
}
void FilesSelectionWizardPage::initializePage()
......@@ -123,10 +123,10 @@ void FilesSelectionWizardPage::initializePage()
m_view->setModel(0);
delete m_model;
m_model = new ProjectExplorer::SelectableFilesModel(this);
connect(m_model, SIGNAL(parsingProgress(QString)),
this, SLOT(parsingProgress(QString)));
connect(m_model, SIGNAL(parsingFinished()),
this, SLOT(parsingFinished()));
connect(m_model, &ProjectExplorer::SelectableFilesModel::parsingProgress,
this, &FilesSelectionWizardPage::parsingProgress);
connect(m_model, &ProjectExplorer::SelectableFilesModel::parsingFinished,
this, &FilesSelectionWizardPage::parsingFinished);
m_model->startParsing(m_genericProjectWizardDialog->path());
m_hideFilesFilterLabel->setVisible(false);
......
......@@ -215,7 +215,8 @@ GenericBuildSettingsWidget::GenericBuildSettingsWidget(GenericBuildConfiguration
m_pathChooser->setHistoryCompleter(QLatin1String("Generic.BuildDir.History"));
m_pathChooser->setEnabled(true);
fl->addRow(tr("Build directory:"), m_pathChooser);
connect(m_pathChooser, SIGNAL(changed(QString)), this, SLOT(buildDirectoryChanged()));
connect(m_pathChooser, &Utils::PathChooser::changed,
this, &GenericBuildSettingsWidget::buildDirectoryChanged);
m_buildConfiguration = bc;
m_pathChooser->setBaseFileName(bc->target()->project()->projectDirectory());
......@@ -223,7 +224,8 @@ GenericBuildSettingsWidget::GenericBuildSettingsWidget(GenericBuildConfiguration
m_pathChooser->setPath(m_buildConfiguration->rawBuildDirectory().toString());
setDisplayName(tr("Generic Manager"));
connect(bc, SIGNAL(environmentChanged()), this, SLOT(environmentHasChanged()));
connect(bc, &GenericBuildConfiguration::environmentChanged,
this, &GenericBuildSettingsWidget::environmentHasChanged);
}
void GenericBuildSettingsWidget::buildDirectoryChanged()
......
......@@ -245,12 +245,12 @@ GenericMakeStepConfigWidget::GenericMakeStepConfigWidget(GenericMakeStep *makeSt
updateMakeOverrrideLabel();
updateDetails();
connect(m_ui->targetsList, SIGNAL(itemChanged(QListWidgetItem*)),
this, SLOT(itemChanged(QListWidgetItem*)));
connect(m_ui->makeLineEdit, SIGNAL(textEdited(QString)),
this, SLOT(makeLineEditTextEdited()));
connect(m_ui->makeArgumentsLineEdit, SIGNAL(textEdited(QString)),
this, SLOT(makeArgumentsLineEditTextEdited()));
connect(m_ui->targetsList, &QListWidget::itemChanged,
this, &GenericMakeStepConfigWidget::itemChanged);
connect(m_ui->makeLineEdit, &QLineEdit::textEdited,
this, &GenericMakeStepConfigWidget::makeLineEditTextEdited);
connect(m_ui->makeArgumentsLineEdit, &QLineEdit::textEdited,
this, &GenericMakeStepConfigWidget::makeArgumentsLineEditTextEdited);
connect(ProjectExplorerPlugin::instance(), SIGNAL(settingsChanged()),
this, SLOT(updateMakeOverrrideLabel()));
......@@ -260,10 +260,10 @@ GenericMakeStepConfigWidget::GenericMakeStepConfigWidget(GenericMakeStep *makeSt
connect(m_makeStep->target(), SIGNAL(kitChanged()),
this, SLOT(updateMakeOverrrideLabel()));
connect(pro, SIGNAL(environmentChanged()),
this, SLOT(updateMakeOverrrideLabel()));
connect(pro, SIGNAL(environmentChanged()),
this, SLOT(updateDetails()));
connect(pro, &GenericProject::environmentChanged,
this, &GenericMakeStepConfigWidget::updateMakeOverrrideLabel);
connect(pro, &GenericProject::environmentChanged,
this, &GenericMakeStepConfigWidget::updateDetails);
}
GenericMakeStepConfigWidget::~GenericMakeStepConfigWidget()
......
......@@ -82,8 +82,7 @@ bool GenericProjectPlugin::initialize(const QStringList &, QString *errorMessage
command->setAttribute(Command::CA_Hide);
mproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_FILES);
connect(editFilesAction, &QAction::triggered,
this, &GenericProjectPlugin::editFiles);
connect(editFilesAction, &QAction::triggered, this, &GenericProjectPlugin::editFiles);
connect(ProjectTree::instance(), &ProjectTree::aboutToShowContextMenu,
[this] (Project *project, Node *) { m_contextMenuProject = project; });
......
......@@ -51,10 +51,10 @@ PerforceChecker::PerforceChecker(QObject *parent) :
m_useOverideCursor(false),
m_isOverrideCursor(false)
{
connect(&m_process, SIGNAL(error(QProcess::ProcessError)),
this, SLOT(slotError(QProcess::ProcessError)));
connect(&m_process, SIGNAL(finished(int,QProcess::ExitStatus)),
this, SLOT(slotFinished(int,QProcess::ExitStatus)));
connect(&m_process, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
this, &PerforceChecker::slotError);
connect(&m_process, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
this, &PerforceChecker::slotFinished);
}
PerforceChecker::~PerforceChecker()
......
......@@ -51,7 +51,7 @@ SettingsPageWidget::SettingsPageWidget(QWidget *parent) :
m_ui.pathChooser->setPromptDialogTitle(tr("Perforce Command"));
m_ui.pathChooser->setHistoryCompleter(QLatin1String("Perforce.Command.History"));
m_ui.pathChooser->setExpectedKind(PathChooser::Command);
connect(m_ui.testPushButton, SIGNAL(clicked()), this, SLOT(slotTest()));
connect(m_ui.testPushButton, &QPushButton::clicked, this, &SettingsPageWidget::slotTest);
}
void SettingsPageWidget::slotTest()
......
......@@ -87,7 +87,7 @@ DocumentWarningWidget::DocumentWarningWidget(DesignModeWidget *parent) :
m_errorMessage->setForegroundRole(QPalette::ToolTipText);
m_goToError->setText(tr("<a href=\"goToError\">Go to error</a>"));
m_goToError->setForegroundRole(QPalette::Link);
connect(m_goToError, SIGNAL(linkActivated(QString)), this, SLOT(goToError()));
connect(m_goToError, &QLabel::linkActivated, this, &DocumentWarningWidget::goToError);
QVBoxLayout *layout = new QVBoxLayout(this);
layout->setMargin(20);
......@@ -405,8 +405,8 @@ void DesignModeWidget::setup()
m_toolBar->setToolbarCreationFlags(Core::EditorToolBar::FlagsStandalone);
m_toolBar->setNavigationVisible(true);
connect(m_toolBar, SIGNAL(goForwardClicked()), this, SLOT(toolBarOnGoForwardClicked()));
connect(m_toolBar, SIGNAL(goBackClicked()), this, SLOT(toolBarOnGoBackClicked()));
connect(m_toolBar, &Core::EditorToolBar::goForwardClicked, this, &DesignModeWidget::toolBarOnGoForwardClicked);
connect(m_toolBar, &Core::EditorToolBar::goBackClicked, this, &DesignModeWidget::toolBarOnGoBackClicked);
if (currentDesignDocument())
setupNavigatorHistory(currentDesignDocument()->textEditor());
......
......@@ -45,7 +45,8 @@ SettingsPageWidget::SettingsPageWidget(QWidget *parent) :
QWidget(parent)
{
m_ui.setupUi(this);
connect(m_ui.designerEnableDebuggerCheckBox, SIGNAL(toggled(bool)), this, SLOT(debugViewEnabledToggled(bool)));
connect(m_ui.designerEnableDebuggerCheckBox, &QCheckBox::toggled,
this, &SettingsPageWidget::debugViewEnabledToggled);
}
DesignerSettings SettingsPageWidget::settings() const
......
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