aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@theqtcompany.com>2015-07-06 10:41:09 +0200
committerTobias Hunger <tobias.hunger@theqtcompany.com>2015-07-06 10:08:31 +0000
commit307fe5553a5780e24ac161c3fec68fcd95c60eb1 (patch)
tree330c4060ce16a2aaf091b50d46e366f0cfd0b55b
parentd133104596099c4805404095a72520a77c89f205 (diff)
QtOptionsPage: Convert to Qt5-style connects
Change-Id: I20b8c7b14cd9e74c5d26578000ed660847968021 Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
-rw-r--r--src/plugins/qtsupport/qtoptionspage.cpp62
1 files changed, 32 insertions, 30 deletions
diff --git a/src/plugins/qtsupport/qtoptionspage.cpp b/src/plugins/qtsupport/qtoptionspage.cpp
index a4ed8e7236..b62de6fb49 100644
--- a/src/plugins/qtsupport/qtoptionspage.cpp
+++ b/src/plugins/qtsupport/qtoptionspage.cpp
@@ -126,17 +126,18 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent)
m_infoBrowser->setOpenLinks(false);
m_infoBrowser->setTextInteractionFlags(Qt::TextBrowserInteraction);
- connect(m_infoBrowser, SIGNAL(anchorClicked(QUrl)), this, SLOT(infoAnchorClicked(QUrl)));
+ connect(m_infoBrowser, &QTextBrowser::anchorClicked,
+ this, &QtOptionsPageWidget::infoAnchorClicked);
m_ui->infoWidget->setWidget(m_infoBrowser);
- connect(m_ui->infoWidget, SIGNAL(expanded(bool)),
- this, SLOT(setInfoWidgetVisibility()));
+ connect(m_ui->infoWidget, &DetailsWidget::expanded,
+ this, &QtOptionsPageWidget::setInfoWidgetVisibility);
m_ui->versionInfoWidget->setWidget(versionInfoWidget);
m_ui->versionInfoWidget->setState(DetailsWidget::NoSummary);
m_ui->debuggingHelperWidget->setWidget(debuggingHelperDetailsWidget);
- connect(m_ui->debuggingHelperWidget, SIGNAL(expanded(bool)),
- this, SLOT(setInfoWidgetVisibility()));
+ connect(m_ui->debuggingHelperWidget, &DetailsWidget::expanded,
+ this, &QtOptionsPageWidget::setInfoWidgetVisibility);
// setup parent items for auto-detected and manual versions
m_ui->qtdirList->header()->setStretchLastSection(false);
@@ -158,42 +159,43 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent)
m_ui->qtdirList->expandAll();
- connect(m_versionUi->nameEdit, SIGNAL(textEdited(QString)),
- this, SLOT(updateCurrentQtName()));
+ connect(m_versionUi->nameEdit, &QLineEdit::textEdited,
+ this, &QtOptionsPageWidget::updateCurrentQtName);
- connect(m_versionUi->editPathPushButton, SIGNAL(clicked()),
- this, SLOT(editPath()));
+ connect(m_versionUi->editPathPushButton, &QAbstractButton::clicked,
+ this, &QtOptionsPageWidget::editPath);
- connect(m_ui->addButton, SIGNAL(clicked()),
- this, SLOT(addQtDir()));
- connect(m_ui->delButton, SIGNAL(clicked()),
- this, SLOT(removeQtDir()));
+ connect(m_ui->addButton, &QAbstractButton::clicked,
+ this, &QtOptionsPageWidget::addQtDir);
+ connect(m_ui->delButton, &QAbstractButton::clicked,
+ this, &QtOptionsPageWidget::removeQtDir);
- connect(m_ui->qtdirList, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),
- this, SLOT(versionChanged(QTreeWidgetItem*,QTreeWidgetItem*)));
+ connect(m_ui->qtdirList, &QTreeWidget::currentItemChanged,
+ this, &QtOptionsPageWidget::versionChanged);
- connect(m_debuggingHelperUi->rebuildButton, SIGNAL(clicked()),
- this, SLOT(buildDebuggingHelper()));
- connect(m_debuggingHelperUi->qmlDumpBuildButton, SIGNAL(clicked()),
- this, SLOT(buildQmlDump()));
+ connect(m_debuggingHelperUi->rebuildButton, &QAbstractButton::clicked,
+ this, [this]() { buildDebuggingHelper(); });
+ connect(m_debuggingHelperUi->qmlDumpBuildButton, &QAbstractButton::clicked,
+ this, &QtOptionsPageWidget::buildQmlDump);
- connect(m_debuggingHelperUi->showLogButton, SIGNAL(clicked()),
- this, SLOT(slotShowDebuggingBuildLog()));
- connect(m_debuggingHelperUi->toolChainComboBox, SIGNAL(activated(int)),
- this, SLOT(selectedToolChainChanged(int)));
+ connect(m_debuggingHelperUi->showLogButton, &QAbstractButton::clicked,
+ this, &QtOptionsPageWidget::slotShowDebuggingBuildLog);
+ connect(m_debuggingHelperUi->toolChainComboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated),
+ this, &QtOptionsPageWidget::selectedToolChainChanged);
- connect(m_ui->cleanUpButton, SIGNAL(clicked()), this, SLOT(cleanUpQtVersions()));
+ connect(m_ui->cleanUpButton, &QAbstractButton::clicked,
+ this, &QtOptionsPageWidget::cleanUpQtVersions);
userChangedCurrentVersion();
updateCleanUpButton();
- connect(QtVersionManager::instance(), SIGNAL(dumpUpdatedFor(Utils::FileName)),
- this, SLOT(qtVersionsDumpUpdated(Utils::FileName)));
+ connect(QtVersionManager::instance(), &QtVersionManager::dumpUpdatedFor,
+ this, &QtOptionsPageWidget::qtVersionsDumpUpdated);
- connect(QtVersionManager::instance(), SIGNAL(qtVersionsChanged(QList<int>,QList<int>,QList<int>)),
- this, SLOT(updateQtVersions(QList<int>,QList<int>,QList<int>)));
+ connect(QtVersionManager::instance(), &QtVersionManager::qtVersionsChanged,
+ this, &QtOptionsPageWidget::updateQtVersions);
- connect(ProjectExplorer::ToolChainManager::instance(), SIGNAL(toolChainsChanged()),
- this, SLOT(toolChainsUpdated()));
+ connect(ProjectExplorer::ToolChainManager::instance(), &ToolChainManager::toolChainsChanged,
+ this, &QtOptionsPageWidget::toolChainsUpdated);
auto chooser = new Core::VariableChooser(this);
chooser->addSupportedWidget(m_versionUi->nameEdit, "Qt:Name");