Skip to content
Snippets Groups Projects
Commit 307fe555 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

QtOptionsPage: Convert to Qt5-style connects


Change-Id: I20b8c7b14cd9e74c5d26578000ed660847968021
Reviewed-by: default avatarDaniel Teske <daniel.teske@theqtcompany.com>
parent d1331045
No related branches found
No related tags found
No related merge requests found
...@@ -126,17 +126,18 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent) ...@@ -126,17 +126,18 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent)
m_infoBrowser->setOpenLinks(false); m_infoBrowser->setOpenLinks(false);
m_infoBrowser->setTextInteractionFlags(Qt::TextBrowserInteraction); 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); m_ui->infoWidget->setWidget(m_infoBrowser);
connect(m_ui->infoWidget, SIGNAL(expanded(bool)), connect(m_ui->infoWidget, &DetailsWidget::expanded,
this, SLOT(setInfoWidgetVisibility())); this, &QtOptionsPageWidget::setInfoWidgetVisibility);
m_ui->versionInfoWidget->setWidget(versionInfoWidget); m_ui->versionInfoWidget->setWidget(versionInfoWidget);
m_ui->versionInfoWidget->setState(DetailsWidget::NoSummary); m_ui->versionInfoWidget->setState(DetailsWidget::NoSummary);
m_ui->debuggingHelperWidget->setWidget(debuggingHelperDetailsWidget); m_ui->debuggingHelperWidget->setWidget(debuggingHelperDetailsWidget);
connect(m_ui->debuggingHelperWidget, SIGNAL(expanded(bool)), connect(m_ui->debuggingHelperWidget, &DetailsWidget::expanded,
this, SLOT(setInfoWidgetVisibility())); this, &QtOptionsPageWidget::setInfoWidgetVisibility);
// setup parent items for auto-detected and manual versions // setup parent items for auto-detected and manual versions
m_ui->qtdirList->header()->setStretchLastSection(false); m_ui->qtdirList->header()->setStretchLastSection(false);
...@@ -158,42 +159,43 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent) ...@@ -158,42 +159,43 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent)
m_ui->qtdirList->expandAll(); m_ui->qtdirList->expandAll();
connect(m_versionUi->nameEdit, SIGNAL(textEdited(QString)), connect(m_versionUi->nameEdit, &QLineEdit::textEdited,
this, SLOT(updateCurrentQtName())); this, &QtOptionsPageWidget::updateCurrentQtName);
connect(m_versionUi->editPathPushButton, SIGNAL(clicked()), connect(m_versionUi->editPathPushButton, &QAbstractButton::clicked,
this, SLOT(editPath())); this, &QtOptionsPageWidget::editPath);
connect(m_ui->addButton, SIGNAL(clicked()), connect(m_ui->addButton, &QAbstractButton::clicked,
this, SLOT(addQtDir())); this, &QtOptionsPageWidget::addQtDir);
connect(m_ui->delButton, SIGNAL(clicked()), connect(m_ui->delButton, &QAbstractButton::clicked,
this, SLOT(removeQtDir())); this, &QtOptionsPageWidget::removeQtDir);
connect(m_ui->qtdirList, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), connect(m_ui->qtdirList, &QTreeWidget::currentItemChanged,
this, SLOT(versionChanged(QTreeWidgetItem*,QTreeWidgetItem*))); this, &QtOptionsPageWidget::versionChanged);
connect(m_debuggingHelperUi->rebuildButton, SIGNAL(clicked()), connect(m_debuggingHelperUi->rebuildButton, &QAbstractButton::clicked,
this, SLOT(buildDebuggingHelper())); this, [this]() { buildDebuggingHelper(); });
connect(m_debuggingHelperUi->qmlDumpBuildButton, SIGNAL(clicked()), connect(m_debuggingHelperUi->qmlDumpBuildButton, &QAbstractButton::clicked,
this, SLOT(buildQmlDump())); this, &QtOptionsPageWidget::buildQmlDump);
connect(m_debuggingHelperUi->showLogButton, SIGNAL(clicked()), connect(m_debuggingHelperUi->showLogButton, &QAbstractButton::clicked,
this, SLOT(slotShowDebuggingBuildLog())); this, &QtOptionsPageWidget::slotShowDebuggingBuildLog);
connect(m_debuggingHelperUi->toolChainComboBox, SIGNAL(activated(int)), connect(m_debuggingHelperUi->toolChainComboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated),
this, SLOT(selectedToolChainChanged(int))); this, &QtOptionsPageWidget::selectedToolChainChanged);
connect(m_ui->cleanUpButton, SIGNAL(clicked()), this, SLOT(cleanUpQtVersions())); connect(m_ui->cleanUpButton, &QAbstractButton::clicked,
this, &QtOptionsPageWidget::cleanUpQtVersions);
userChangedCurrentVersion(); userChangedCurrentVersion();
updateCleanUpButton(); updateCleanUpButton();
connect(QtVersionManager::instance(), SIGNAL(dumpUpdatedFor(Utils::FileName)), connect(QtVersionManager::instance(), &QtVersionManager::dumpUpdatedFor,
this, SLOT(qtVersionsDumpUpdated(Utils::FileName))); this, &QtOptionsPageWidget::qtVersionsDumpUpdated);
connect(QtVersionManager::instance(), SIGNAL(qtVersionsChanged(QList<int>,QList<int>,QList<int>)), connect(QtVersionManager::instance(), &QtVersionManager::qtVersionsChanged,
this, SLOT(updateQtVersions(QList<int>,QList<int>,QList<int>))); this, &QtOptionsPageWidget::updateQtVersions);
connect(ProjectExplorer::ToolChainManager::instance(), SIGNAL(toolChainsChanged()), connect(ProjectExplorer::ToolChainManager::instance(), &ToolChainManager::toolChainsChanged,
this, SLOT(toolChainsUpdated())); this, &QtOptionsPageWidget::toolChainsUpdated);
auto chooser = new Core::VariableChooser(this); auto chooser = new Core::VariableChooser(this);
chooser->addSupportedWidget(m_versionUi->nameEdit, "Qt:Name"); chooser->addSupportedWidget(m_versionUi->nameEdit, "Qt:Name");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment