Commit 307fe555 authored by Tobias Hunger's avatar Tobias Hunger

QtOptionsPage: Convert to Qt5-style connects

Change-Id: I20b8c7b14cd9e74c5d26578000ed660847968021
Reviewed-by: default avatarDaniel Teske <daniel.teske@theqtcompany.com>
parent d1331045
......@@ -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");
......
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