diff --git a/src/libs/qmleditorwidgets/contextpanetextwidget.cpp b/src/libs/qmleditorwidgets/contextpanetextwidget.cpp index 3d7bdc5dcdc..9332c82ce14 100644 --- a/src/libs/qmleditorwidgets/contextpanetextwidget.cpp +++ b/src/libs/qmleditorwidgets/contextpanetextwidget.cpp @@ -67,31 +67,50 @@ ContextPaneTextWidget::ContextPaneTextWidget(QWidget *parent) : ui->colorButton->setShowArrow(false); ui->textColorButton->setShowArrow(false); - connect(ui->colorButton, SIGNAL(toggled(bool)), this, SLOT(onColorButtonToggled(bool))); - connect(ui->textColorButton, SIGNAL(toggled(bool)), this, SLOT(onTextColorButtonToggled(bool))); + connect(ui->colorButton, &QmlEditorWidgets::ColorButton::toggled, + this, &ContextPaneTextWidget::onColorButtonToggled); + connect(ui->textColorButton, &QmlEditorWidgets::ColorButton::toggled, + this, &ContextPaneTextWidget::onTextColorButtonToggled); ContextPaneWidget *parentContextWidget = qobject_cast(parentWidget()); - connect(parentContextWidget->colorDialog(), SIGNAL(accepted(QColor)), this, SLOT(onColorDialogApplied(QColor))); - connect(parentContextWidget->colorDialog(), SIGNAL(rejected()), this, SLOT(onColorDialogCancled())); + connect(parentContextWidget->colorDialog(), &CustomColorDialog::accepted, + this, &ContextPaneTextWidget::onColorDialogApplied); + connect(parentContextWidget->colorDialog(), &CustomColorDialog::rejected, + this, &ContextPaneTextWidget::onColorDialogCancled); - connect(ui->fontSizeSpinBox, SIGNAL(valueChanged(int)), this, SLOT(onFontSizeChanged(int))); - connect(ui->fontSizeSpinBox, SIGNAL(formatChanged()), this, SLOT(onFontFormatChanged())); + connect(ui->fontSizeSpinBox, + static_cast(&QmlEditorWidgets::FontSizeSpinBox::valueChanged), + this, &ContextPaneTextWidget::onFontSizeChanged); + connect(ui->fontSizeSpinBox, &QmlEditorWidgets::FontSizeSpinBox::formatChanged, + this, &ContextPaneTextWidget::onFontFormatChanged); - connect(ui->boldButton, SIGNAL(toggled(bool)), this, SLOT(onBoldCheckedChanged(bool))); - connect(ui->italicButton, SIGNAL(toggled(bool)), this, SLOT(onItalicCheckedChanged(bool))); - connect(ui->underlineButton, SIGNAL(toggled(bool)), this, SLOT(onUnderlineCheckedChanged(bool))); - connect(ui->strikeoutButton, SIGNAL(toggled(bool)), this, SLOT(onStrikeoutCheckedChanged(bool))); - connect(ui->fontComboBox, SIGNAL(currentFontChanged(QFont)), this, SLOT(onCurrentFontChanged(QFont))); + connect(ui->boldButton, &QToolButton::toggled, + this, &ContextPaneTextWidget::onBoldCheckedChanged); + connect(ui->italicButton, &QToolButton::toggled, + this, &ContextPaneTextWidget::onItalicCheckedChanged); + connect(ui->underlineButton, &QToolButton::toggled, + this, &ContextPaneTextWidget::onUnderlineCheckedChanged); + connect(ui->strikeoutButton, &QToolButton::toggled, + this, &ContextPaneTextWidget::onStrikeoutCheckedChanged); + connect(ui->fontComboBox, &QFontComboBox::currentFontChanged, + this, &ContextPaneTextWidget::onCurrentFontChanged); - connect(ui->centerHAlignmentButton, SIGNAL(toggled(bool)), this, SLOT(onHorizontalAlignmentChanged())); - connect(ui->leftAlignmentButton, SIGNAL(toggled(bool)), this, SLOT(onHorizontalAlignmentChanged())); - connect(ui->rightAlignmentButton, SIGNAL(toggled(bool)), this, SLOT(onHorizontalAlignmentChanged())); + connect(ui->centerHAlignmentButton, &QToolButton::toggled, + this, &ContextPaneTextWidget::onHorizontalAlignmentChanged); + connect(ui->leftAlignmentButton, &QToolButton::toggled, + this, &ContextPaneTextWidget::onHorizontalAlignmentChanged); + connect(ui->rightAlignmentButton, &QToolButton::toggled, + this, &ContextPaneTextWidget::onHorizontalAlignmentChanged); - connect(ui->centerVAlignmentButton, SIGNAL(toggled(bool)), this, SLOT(onVerticalAlignmentChanged())); - connect(ui->topAlignmentButton, SIGNAL(toggled(bool)), this, SLOT(onVerticalAlignmentChanged())); - connect(ui->bottomAlignmentButton, SIGNAL(toggled(bool)), this, SLOT(onVerticalAlignmentChanged())); + connect(ui->centerVAlignmentButton, &QToolButton::toggled, + this, &ContextPaneTextWidget::onVerticalAlignmentChanged); + connect(ui->topAlignmentButton, &QToolButton::toggled, + this, &ContextPaneTextWidget::onVerticalAlignmentChanged); + connect(ui->bottomAlignmentButton, &QToolButton::toggled, + this, &ContextPaneTextWidget::onVerticalAlignmentChanged); - connect(ui->styleComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(onStyleComboBoxChanged(QString))); + connect(ui->styleComboBox, static_cast(&QComboBox::currentIndexChanged), + this, &ContextPaneTextWidget::onStyleComboBoxChanged); } static inline bool checkIfBoolean(const QVariant &v) diff --git a/src/libs/qmleditorwidgets/contextpanewidget.cpp b/src/libs/qmleditorwidgets/contextpanewidget.cpp index 57580b76243..8ff29087209 100644 --- a/src/libs/qmleditorwidgets/contextpanewidget.cpp +++ b/src/libs/qmleditorwidgets/contextpanewidget.cpp @@ -183,7 +183,7 @@ ContextPaneWidget::ContextPaneWidget(QWidget *parent) : DragWidget(parent), m_cu m_toolButton->setFixedSize(16, 16); m_toolButton->setToolTip(tr("Hides this toolbar.")); - connect(m_toolButton, SIGNAL(clicked()), this, SLOT(onTogglePane())); + connect(m_toolButton, &QToolButton::clicked, this, &ContextPaneWidget::onTogglePane); layout->addWidget(m_toolButton, 0, 0, 1, 1); colorDialog(); @@ -431,9 +431,12 @@ void ContextPaneWidget::protectedMoved() QWidget* ContextPaneWidget::createFontWidget() { m_textWidget = new ContextPaneTextWidget(this); - connect(m_textWidget, SIGNAL(propertyChanged(QString,QVariant)), this, SIGNAL(propertyChanged(QString,QVariant))); - connect(m_textWidget, SIGNAL(removeProperty(QString)), this, SIGNAL(removeProperty(QString))); - connect(m_textWidget, SIGNAL(removeAndChangeProperty(QString,QString,QVariant,bool)), this, SIGNAL(removeAndChangeProperty(QString,QString,QVariant,bool))); + connect(m_textWidget, &ContextPaneTextWidget::propertyChanged, + this, &ContextPaneWidget::propertyChanged); + connect(m_textWidget, &ContextPaneTextWidget::removeProperty, + this, &ContextPaneWidget::removeProperty); + connect(m_textWidget, &ContextPaneTextWidget::removeAndChangeProperty, + this, &ContextPaneWidget::removeAndChangeProperty); return m_textWidget; } @@ -442,9 +445,12 @@ QWidget* ContextPaneWidget::createEasingWidget() { m_easingWidget = new EasingContextPane(this); - connect(m_easingWidget, SIGNAL(propertyChanged(QString,QVariant)), this, SIGNAL(propertyChanged(QString,QVariant))); - connect(m_easingWidget, SIGNAL(removeProperty(QString)), this, SIGNAL(removeProperty(QString))); - connect(m_easingWidget, SIGNAL(removeAndChangeProperty(QString,QString,QVariant,bool)), this, SIGNAL(removeAndChangeProperty(QString,QString,QVariant,bool))); + connect(m_easingWidget, &EasingContextPane::propertyChanged, + this, &ContextPaneWidget::propertyChanged); + connect(m_easingWidget, &EasingContextPane::removeProperty, + this, &ContextPaneWidget::removeProperty); + connect(m_easingWidget, &EasingContextPane::removeAndChangeProperty, + this, &ContextPaneWidget::removeAndChangeProperty); return m_easingWidget; } @@ -452,9 +458,12 @@ QWidget* ContextPaneWidget::createEasingWidget() QWidget *ContextPaneWidget::createImageWidget() { m_imageWidget = new ContextPaneWidgetImage(this); - connect(m_imageWidget, SIGNAL(propertyChanged(QString,QVariant)), this, SIGNAL(propertyChanged(QString,QVariant))); - connect(m_imageWidget, SIGNAL(removeProperty(QString)), this, SIGNAL(removeProperty(QString))); - connect(m_imageWidget, SIGNAL(removeAndChangeProperty(QString,QString,QVariant,bool)), this, SIGNAL(removeAndChangeProperty(QString,QString,QVariant,bool))); + connect(m_imageWidget, &ContextPaneWidgetImage::propertyChanged, + this, &ContextPaneWidget::propertyChanged); + connect(m_imageWidget, &ContextPaneWidgetImage::removeProperty, + this, &ContextPaneWidget::removeProperty); + connect(m_imageWidget, &ContextPaneWidgetImage::removeAndChangeProperty, + this, &ContextPaneWidget::removeAndChangeProperty); return m_imageWidget; } @@ -462,9 +471,12 @@ QWidget *ContextPaneWidget::createImageWidget() QWidget *ContextPaneWidget::createBorderImageWidget() { m_borderImageWidget = new ContextPaneWidgetImage(this, true); - connect(m_borderImageWidget, SIGNAL(propertyChanged(QString,QVariant)), this, SIGNAL(propertyChanged(QString,QVariant))); - connect(m_borderImageWidget, SIGNAL(removeProperty(QString)), this, SIGNAL(removeProperty(QString))); - connect(m_borderImageWidget, SIGNAL(removeAndChangeProperty(QString,QString,QVariant,bool)), this, SIGNAL(removeAndChangeProperty(QString,QString,QVariant,bool))); + connect(m_borderImageWidget, &ContextPaneWidgetImage::propertyChanged, + this, &ContextPaneWidget::propertyChanged); + connect(m_borderImageWidget, &ContextPaneWidgetImage::removeProperty, + this, &ContextPaneWidget::removeProperty); + connect(m_borderImageWidget, &ContextPaneWidgetImage::removeAndChangeProperty, + this, &ContextPaneWidget::removeAndChangeProperty); return m_borderImageWidget; @@ -473,9 +485,12 @@ QWidget *ContextPaneWidget::createBorderImageWidget() QWidget *ContextPaneWidget::createRectangleWidget() { m_rectangleWidget = new ContextPaneWidgetRectangle(this); - connect(m_rectangleWidget, SIGNAL(propertyChanged(QString,QVariant)), this, SIGNAL(propertyChanged(QString,QVariant))); - connect(m_rectangleWidget, SIGNAL(removeProperty(QString)), this, SIGNAL(removeProperty(QString))); - connect(m_rectangleWidget, SIGNAL(removeAndChangeProperty(QString,QString,QVariant,bool)), this, SIGNAL(removeAndChangeProperty(QString,QString,QVariant,bool))); + connect(m_rectangleWidget, &ContextPaneWidgetRectangle::propertyChanged, + this, &ContextPaneWidget::propertyChanged); + connect(m_rectangleWidget, &ContextPaneWidgetRectangle::removeProperty, + this, &ContextPaneWidget::removeProperty); + connect(m_rectangleWidget, &ContextPaneWidgetRectangle::removeAndChangeProperty, + this, &ContextPaneWidget::removeAndChangeProperty); return m_rectangleWidget; } diff --git a/src/libs/qmleditorwidgets/contextpanewidgetimage.cpp b/src/libs/qmleditorwidgets/contextpanewidgetimage.cpp index b45f82fd107..349356dfcba 100644 --- a/src/libs/qmleditorwidgets/contextpanewidgetimage.cpp +++ b/src/libs/qmleditorwidgets/contextpanewidgetimage.cpp @@ -89,18 +89,28 @@ ContextPaneWidgetImage::ContextPaneWidgetImage(QWidget *parent, bool borderImage uiBorderImage->label->installEventFilter(labelFilter); - connect(uiBorderImage->verticalTileRadioButton, SIGNAL(toggled(bool)), this, SLOT(onVerticalStretchChanged())); - connect(uiBorderImage->verticalStretchRadioButton, SIGNAL(toggled(bool)), this, SLOT(onVerticalStretchChanged())); - connect(uiBorderImage->verticalTileRadioButtonNoCrop, SIGNAL(toggled(bool)), this, SLOT(onVerticalStretchChanged())); + connect(uiBorderImage->verticalTileRadioButton, &QRadioButton::toggled, + this, &ContextPaneWidgetImage::onVerticalStretchChanged); + connect(uiBorderImage->verticalStretchRadioButton, &QRadioButton::toggled, + this, &ContextPaneWidgetImage::onVerticalStretchChanged); + connect(uiBorderImage->verticalTileRadioButtonNoCrop, &QRadioButton::toggled, + this, &ContextPaneWidgetImage::onVerticalStretchChanged); - connect(uiBorderImage->horizontalTileRadioButton, SIGNAL(toggled(bool)), this, SLOT(onHorizontalStretchChanged())); - connect(uiBorderImage->horizontalStretchRadioButton, SIGNAL(toggled(bool)), this, SLOT(onHorizontalStretchChanged())); - connect(uiBorderImage->horizontalTileRadioButtonNoCrop, SIGNAL(toggled(bool)), this, SLOT(onHorizontalStretchChanged())); + connect(uiBorderImage->horizontalTileRadioButton, &QRadioButton::toggled, + this, &ContextPaneWidgetImage::onHorizontalStretchChanged); + connect(uiBorderImage->horizontalStretchRadioButton, &QRadioButton::toggled, + this, &ContextPaneWidgetImage::onHorizontalStretchChanged); + connect(uiBorderImage->horizontalTileRadioButtonNoCrop, &QRadioButton::toggled, + this, &ContextPaneWidgetImage::onHorizontalStretchChanged); PreviewLabel *previewLabel = previewDialog()->previewLabel(); - connect(previewLabel, SIGNAL(leftMarginChanged()), this, SLOT(onLeftMarginsChanged())); - connect(previewLabel, SIGNAL(rightMarginChanged()), this, SLOT(onRightMarginsChanged())); - connect(previewLabel, SIGNAL(topMarginChanged()), this, SLOT(onTopMarginsChanged())); - connect(previewLabel, SIGNAL(bottomMarginChanged()), this, SLOT(onBottomMarginsChanged())); + connect(previewLabel, &PreviewLabel::leftMarginChanged, + this, &ContextPaneWidgetImage::onLeftMarginsChanged); + connect(previewLabel, &PreviewLabel::rightMarginChanged, + this, &ContextPaneWidgetImage::onRightMarginsChanged); + connect(previewLabel, &PreviewLabel::topMarginChanged, + this, &ContextPaneWidgetImage::onTopMarginsChanged); + connect(previewLabel, &PreviewLabel::bottomMarginChanged, + this, &ContextPaneWidgetImage::onBottomMarginsChanged); } else { ui = new Ui::ContextPaneWidgetImage; @@ -110,19 +120,27 @@ ContextPaneWidgetImage::ContextPaneWidgetImage(QWidget *parent, bool borderImage m_fileWidget = ui->fileWidget; m_sizeLabel = ui->sizeLabel; - connect(ui->stretchRadioButton, SIGNAL(toggled(bool)), this, SLOT(onStretchChanged())); - connect(ui->tileRadioButton, SIGNAL(toggled(bool)), this, SLOT(onStretchChanged())); - connect(ui->horizontalStretchRadioButton, SIGNAL(toggled(bool)), this, SLOT(onStretchChanged())); - connect(ui->verticalStretchRadioButton, SIGNAL(toggled(bool)), this, SLOT(onStretchChanged())); - connect(ui->preserveAspectFitRadioButton, SIGNAL(toggled(bool)), this, SLOT(onStretchChanged())); - connect(ui->cropAspectFitRadioButton, SIGNAL(toggled(bool)), this, SLOT(onStretchChanged())); + connect(ui->stretchRadioButton, &QRadioButton::toggled, + this, &ContextPaneWidgetImage::onStretchChanged); + connect(ui->tileRadioButton, &QRadioButton::toggled, + this, &ContextPaneWidgetImage::onStretchChanged); + connect(ui->horizontalStretchRadioButton, &QRadioButton::toggled, + this, &ContextPaneWidgetImage::onStretchChanged); + connect(ui->verticalStretchRadioButton, &QRadioButton::toggled, + this, &ContextPaneWidgetImage::onStretchChanged); + connect(ui->preserveAspectFitRadioButton, &QRadioButton::toggled, + this, &ContextPaneWidgetImage::onStretchChanged); + connect(ui->cropAspectFitRadioButton, &QRadioButton::toggled, + this, &ContextPaneWidgetImage::onStretchChanged); } previewDialog(); m_fileWidget->setShowComboBox(true); m_fileWidget->setFilter(QLatin1String("*.png *.gif *.jpg")); - connect(m_fileWidget, SIGNAL(fileNameChanged(QUrl)), this, SLOT(onFileNameChanged())); - connect(labelFilter, SIGNAL(doubleClicked()), this, SLOT(onPixmapDoubleClicked())); + connect(m_fileWidget, &FileWidget::fileNameChanged, + this, &ContextPaneWidgetImage::onFileNameChanged); + connect(labelFilter, &LabelFilter::doubleClicked, + this, &ContextPaneWidgetImage::onPixmapDoubleClicked); } @@ -881,7 +899,7 @@ PreviewDialog::PreviewDialog(QWidget *parent) : DragWidget(parent) toolButton->setIcon(icon); toolButton->setToolButtonStyle(Qt::ToolButtonIconOnly); toolButton->setFixedSize(icon.availableSizes().value(0) + QSize(4, 4)); - connect(toolButton, SIGNAL(clicked()), this, SLOT(onTogglePane())); + connect(toolButton, &QToolButton::clicked, this, &PreviewDialog::onTogglePane); QScrollArea *scrollArea = new QScrollArea(this); WheelFilter *wheelFilter = new WheelFilter(scrollArea); @@ -906,7 +924,7 @@ PreviewDialog::PreviewDialog(QWidget *parent) : DragWidget(parent) wheelFilter->setTarget(this); - connect(m_slider, SIGNAL(valueChanged(int)), this, SLOT(onSliderMoved(int))); + connect(m_slider, &QSlider::valueChanged, this, &PreviewDialog::onSliderMoved); foreach (QWidget *childWidget, findChildren()) { childWidget->installEventFilter(wheelFilter); diff --git a/src/libs/qmleditorwidgets/contextpanewidgetrectangle.cpp b/src/libs/qmleditorwidgets/contextpanewidgetrectangle.cpp index 4e286eaa9da..059316b13ac 100644 --- a/src/libs/qmleditorwidgets/contextpanewidgetrectangle.cpp +++ b/src/libs/qmleditorwidgets/contextpanewidgetrectangle.cpp @@ -50,23 +50,33 @@ ContextPaneWidgetRectangle::ContextPaneWidgetRectangle(QWidget *parent) : ui->colorColorButton->setShowArrow(false); ui->borderColorButton->setShowArrow(false); - connect(ui->colorColorButton, SIGNAL(toggled(bool)), this, SLOT(onColorButtonToggled(bool))); - connect(ui->borderColorButton, SIGNAL(toggled(bool)), this, SLOT(onBorderColorButtonToggled(bool))); + connect(ui->colorColorButton, &QmlEditorWidgets::ColorButton::toggled, + this, &ContextPaneWidgetRectangle::onColorButtonToggled); + connect(ui->borderColorButton, &QmlEditorWidgets::ColorButton::toggled, + this, &ContextPaneWidgetRectangle::onBorderColorButtonToggled); - connect(ui->colorSolid, SIGNAL(clicked()), this, SLOT(onColorSolidClicked())); - connect(ui->borderSolid, SIGNAL(clicked()), this, SLOT(onBorderSolidClicked())); + connect(ui->colorSolid, &QToolButton::clicked, + this, &ContextPaneWidgetRectangle::onColorSolidClicked); + connect(ui->borderSolid, &QToolButton::clicked, + this, &ContextPaneWidgetRectangle::onBorderSolidClicked); - connect(ui->colorNone, SIGNAL(clicked()), this, SLOT(onColorNoneClicked())); - connect(ui->borderNone, SIGNAL(clicked()), this, SLOT(onBorderNoneClicked())); + connect(ui->colorNone, &QToolButton::clicked, + this, &ContextPaneWidgetRectangle::onColorNoneClicked); + connect(ui->borderNone, &QToolButton::clicked, + this, &ContextPaneWidgetRectangle::onBorderNoneClicked); - connect(ui->colorGradient, SIGNAL(clicked()), this, SLOT(onGradientClicked())); + connect(ui->colorGradient, &QToolButton::clicked, this, &ContextPaneWidgetRectangle::onGradientClicked); ContextPaneWidget *parentContextWidget = qobject_cast(parentWidget()); - connect(parentContextWidget->colorDialog(), SIGNAL(accepted(QColor)), this, SLOT(onColorDialogApplied(QColor))); - connect(parentContextWidget->colorDialog(), SIGNAL(rejected()), this, SLOT(onColorDialogCancled())); + connect(parentContextWidget->colorDialog(), &CustomColorDialog::accepted, + this, &ContextPaneWidgetRectangle::onColorDialogApplied); + connect(parentContextWidget->colorDialog(), &CustomColorDialog::rejected, + this, &ContextPaneWidgetRectangle::onColorDialogCancled); - connect(ui->gradientLine, SIGNAL(openColorDialog(QPoint)), this, SLOT(onGradientLineDoubleClicked(QPoint))); - connect(ui->gradientLine, SIGNAL(gradientChanged()), this, SLOT(onUpdateGradient())); + connect(ui->gradientLine, &QmlEditorWidgets::GradientLine::openColorDialog, + this, &ContextPaneWidgetRectangle::onGradientLineDoubleClicked); + connect(ui->gradientLine, &QmlEditorWidgets::GradientLine::gradientChanged, + this, &ContextPaneWidgetRectangle::onUpdateGradient); } ContextPaneWidgetRectangle::~ContextPaneWidgetRectangle() diff --git a/src/libs/qmleditorwidgets/customcolordialog.cpp b/src/libs/qmleditorwidgets/customcolordialog.cpp index 65d705337e6..de7a0d3132d 100644 --- a/src/libs/qmleditorwidgets/customcolordialog.cpp +++ b/src/libs/qmleditorwidgets/customcolordialog.cpp @@ -121,15 +121,23 @@ CustomColorDialog::CustomColorDialog(QWidget *parent) : QFrame(parent ) resize(sizeHint()); - connect(m_colorBox, SIGNAL(colorChanged()), this, SLOT(onColorBoxChanged())); - connect(m_alphaSpinBox, SIGNAL(valueChanged(double)), this, SLOT(spinBoxChanged())); - connect(m_rSpinBox, SIGNAL(valueChanged(double)), this, SLOT(spinBoxChanged())); - connect(m_gSpinBox, SIGNAL(valueChanged(double)), this, SLOT(spinBoxChanged())); - connect(m_bSpinBox, SIGNAL(valueChanged(double)), this, SLOT(spinBoxChanged())); - connect(m_hueControl, SIGNAL(hueChanged(int)), this, SLOT(onHueChanged(int))); + connect(m_colorBox, &ColorBox::colorChanged, this, &CustomColorDialog::onColorBoxChanged); + connect(m_alphaSpinBox, + static_cast(&QDoubleSpinBox::valueChanged), + this, &CustomColorDialog::spinBoxChanged); + connect(m_rSpinBox, + static_cast(&QDoubleSpinBox::valueChanged), + this, &CustomColorDialog::spinBoxChanged); + connect(m_gSpinBox, + static_cast(&QDoubleSpinBox::valueChanged), + this, &CustomColorDialog::spinBoxChanged); + connect(m_bSpinBox, + static_cast(&QDoubleSpinBox::valueChanged), + this, &CustomColorDialog::spinBoxChanged); + connect(m_hueControl, &HueControl::hueChanged, this, &CustomColorDialog::onHueChanged); - connect(applyButton, SIGNAL(pressed()), this, SLOT(onAccept())); - connect(cancelButton, SIGNAL(pressed()), this, SIGNAL(rejected())); + connect(applyButton, &QPushButton::pressed, this, &CustomColorDialog::onAccept); + connect(cancelButton, &QPushButton::pressed, this, &CustomColorDialog::rejected); m_alphaSpinBox->setMaximum(1); m_rSpinBox->setMaximum(1); diff --git a/src/libs/qmleditorwidgets/filewidget.cpp b/src/libs/qmleditorwidgets/filewidget.cpp index 6490b8a1689..e3c63101bd4 100644 --- a/src/libs/qmleditorwidgets/filewidget.cpp +++ b/src/libs/qmleditorwidgets/filewidget.cpp @@ -62,9 +62,9 @@ FileWidget::FileWidget(QWidget *parent) : m_comboBox->setEditable(true); layout->addWidget(m_pushButton); m_pushButton->setText(QLatin1String("...")); - connect(m_lineEdit, SIGNAL(editingFinished()), this, SLOT(lineEditChanged())); - connect(m_pushButton, SIGNAL(released()), this, SLOT(onButtonReleased())); - connect(m_comboBox, SIGNAL(editTextChanged(QString)), this, SLOT(comboBoxChanged())); + connect(m_lineEdit, &QLineEdit::editingFinished, this, &FileWidget::lineEditChanged); + connect(m_pushButton, &QToolButton::released, this, &FileWidget::onButtonReleased); + connect(m_comboBox, &QComboBox::editTextChanged, this, &FileWidget::comboBoxChanged); } FileWidget::~FileWidget() diff --git a/src/libs/qmleditorwidgets/fontsizespinbox.cpp b/src/libs/qmleditorwidgets/fontsizespinbox.cpp index 5a6f04939bd..2f4638c4e34 100644 --- a/src/libs/qmleditorwidgets/fontsizespinbox.cpp +++ b/src/libs/qmleditorwidgets/fontsizespinbox.cpp @@ -38,7 +38,8 @@ namespace QmlEditorWidgets { FontSizeSpinBox::FontSizeSpinBox(QWidget *parent) : QAbstractSpinBox(parent), m_isPointSize(true), m_value(0) { - connect(this, SIGNAL(editingFinished()), this, SLOT(onEditingFinished())); + connect(this, &FontSizeSpinBox::editingFinished, + this, &FontSizeSpinBox::onEditingFinished); } void FontSizeSpinBox::stepBy(int steps) diff --git a/src/plugins/coreplugin/find/currentdocumentfind.cpp b/src/plugins/coreplugin/find/currentdocumentfind.cpp index 50f6b93196b..5bcf36474e2 100644 --- a/src/plugins/coreplugin/find/currentdocumentfind.cpp +++ b/src/plugins/coreplugin/find/currentdocumentfind.cpp @@ -45,8 +45,8 @@ using namespace Core::Internal; CurrentDocumentFind::CurrentDocumentFind() : m_currentFind(0) { - connect(qApp, SIGNAL(focusChanged(QWidget*,QWidget*)), - this, SLOT(updateCandidateFindFilter(QWidget*,QWidget*))); + connect(qApp, &QApplication::focusChanged, + this, &CurrentDocumentFind::updateCandidateFindFilter); } void CurrentDocumentFind::removeConnections() @@ -189,7 +189,8 @@ void CurrentDocumentFind::acceptCandidate() m_currentFind = m_candidateFind; if (m_currentFind) { - connect(m_currentFind, SIGNAL(changed()), this, SIGNAL(changed())); + connect(m_currentFind.data(), &IFindSupport::changed, + this, &CurrentDocumentFind::changed); connect(m_currentFind, SIGNAL(destroyed(QObject*)), SLOT(clearFindSupport())); } if (m_currentWidget) @@ -200,8 +201,10 @@ void CurrentDocumentFind::acceptCandidate() void CurrentDocumentFind::removeFindSupportConnections() { if (m_currentFind) { - disconnect(m_currentFind, SIGNAL(changed()), this, SIGNAL(changed())); - disconnect(m_currentFind, SIGNAL(destroyed(QObject*)), this, SLOT(clearFindSupport())); + disconnect(m_currentFind.data(), &IFindSupport::changed, + this, &CurrentDocumentFind::changed); + disconnect(m_currentFind.data(), &IFindSupport::destroyed, + this, &CurrentDocumentFind::clearFindSupport); } if (m_currentWidget) m_currentWidget->removeEventFilter(this); diff --git a/src/plugins/coreplugin/find/findplugin.cpp b/src/plugins/coreplugin/find/findplugin.cpp index 0c740595607..321a2aea504 100644 --- a/src/plugins/coreplugin/find/findplugin.cpp +++ b/src/plugins/coreplugin/find/findplugin.cpp @@ -214,7 +214,8 @@ void FindPlugin::setupMenu() cmd = ActionManager::registerAction(d->m_openFindDialog, Constants::ADVANCED_FIND, globalcontext); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+F"))); mfindadvanced->addAction(cmd); - connect(d->m_openFindDialog, SIGNAL(triggered()), this, SLOT(openFindFilter())); + connect(d->m_openFindDialog, &QAction::triggered, + this, &FindPlugin::openFindFilter); } void FindPlugin::setupFilterMenuItems() @@ -240,8 +241,8 @@ void FindPlugin::setupFilterMenuItems() cmd->setDefaultKeySequence(filter->defaultShortcut()); mfindadvanced->addAction(cmd); d->m_filterActions.insert(filter, action); - connect(action, SIGNAL(triggered(bool)), this, SLOT(openFindFilter())); - connect(filter, SIGNAL(enabledChanged(bool)), this, SLOT(filterChanged())); + connect(action, &QAction::triggered, this, &FindPlugin::openFindFilter); + connect(filter, &IFindFilter::enabledChanged, this, &FindPlugin::filterChanged); } d->m_findDialog->setFindFilters(findInterfaces); d->m_openFindDialog->setEnabled(haveEnabledFilters); diff --git a/src/plugins/coreplugin/find/findtoolbar.cpp b/src/plugins/coreplugin/find/findtoolbar.cpp index 1202aed6ffe..23c47c53d1d 100644 --- a/src/plugins/coreplugin/find/findtoolbar.cpp +++ b/src/plugins/coreplugin/find/findtoolbar.cpp @@ -92,10 +92,12 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen m_ui.findEdit->setAttribute(Qt::WA_MacShowFocusRect, false); m_ui.replaceEdit->setAttribute(Qt::WA_MacShowFocusRect, false); - connect(m_ui.findEdit, SIGNAL(editingFinished()), this, SLOT(invokeResetIncrementalSearch())); + connect(m_ui.findEdit, &Utils::FancyLineEdit::editingFinished, + this, &FindToolBar::invokeResetIncrementalSearch); setLightColoredIcon(false); - connect(m_ui.close, SIGNAL(clicked()), this, SLOT(hideAndResetFocus())); + connect(m_ui.close, &QToolButton::clicked, + this, &FindToolBar::hideAndResetFocus); m_findCompleter->setModel(m_plugin->findCompletionModel()); m_replaceCompleter->setModel(m_plugin->replaceCompletionModel()); @@ -108,35 +110,42 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen m_ui.findEdit->button(Utils::FancyLineEdit::Left)->setFocusPolicy(Qt::TabFocus); m_ui.replaceEdit->setPlaceholderText(QString()); - connect(m_ui.findEdit, SIGNAL(textChanged(QString)), this, SLOT(invokeFindIncremental())); - connect(m_ui.findEdit, SIGNAL(leftButtonClicked()), - this, SLOT(findEditButtonClicked())); + connect(m_ui.findEdit, &Utils::FancyLineEdit::textChanged, + this, &FindToolBar::invokeFindIncremental); + connect(m_ui.findEdit, &Utils::FancyLineEdit::leftButtonClicked, + this, &FindToolBar::findEditButtonClicked); // invoke{Find,Replace}Helper change the completion model. QueuedConnection is used to perform these // changes only after the completer's activated() signal is handled (QTCREATORBUG-8408) - connect(m_ui.findEdit, SIGNAL(returnPressed()), this, SLOT(invokeFindEnter()), Qt::QueuedConnection); - connect(m_ui.replaceEdit, SIGNAL(returnPressed()), this, SLOT(invokeReplaceEnter()), Qt::QueuedConnection); + connect(m_ui.findEdit, &Utils::FancyLineEdit::returnPressed, + this, &FindToolBar::invokeFindEnter, Qt::QueuedConnection); + connect(m_ui.replaceEdit, &Utils::FancyLineEdit::returnPressed, + this, &FindToolBar::invokeReplaceEnter, Qt::QueuedConnection); QAction *shiftEnterAction = new QAction(m_ui.findEdit); shiftEnterAction->setShortcut(QKeySequence(tr("Shift+Enter"))); shiftEnterAction->setShortcutContext(Qt::WidgetShortcut); - connect(shiftEnterAction, SIGNAL(triggered()), this, SLOT(invokeFindPrevious())); + connect(shiftEnterAction, &QAction::triggered, + this, &FindToolBar::invokeFindPrevious); m_ui.findEdit->addAction(shiftEnterAction); QAction *shiftReturnAction = new QAction(m_ui.findEdit); shiftReturnAction->setShortcut(QKeySequence(tr("Shift+Return"))); shiftReturnAction->setShortcutContext(Qt::WidgetShortcut); - connect(shiftReturnAction, SIGNAL(triggered()), this, SLOT(invokeFindPrevious())); + connect(shiftReturnAction, &QAction::triggered, + this, &FindToolBar::invokeFindPrevious); m_ui.findEdit->addAction(shiftReturnAction); QAction *shiftEnterReplaceAction = new QAction(m_ui.replaceEdit); shiftEnterReplaceAction->setShortcut(QKeySequence(tr("Shift+Enter"))); shiftEnterReplaceAction->setShortcutContext(Qt::WidgetShortcut); - connect(shiftEnterReplaceAction, SIGNAL(triggered()), this, SLOT(invokeReplacePrevious())); + connect(shiftEnterReplaceAction, &QAction::triggered, + this, &FindToolBar::invokeReplacePrevious); m_ui.replaceEdit->addAction(shiftEnterReplaceAction); QAction *shiftReturnReplaceAction = new QAction(m_ui.replaceEdit); shiftReturnReplaceAction->setShortcut(QKeySequence(tr("Shift+Return"))); shiftReturnReplaceAction->setShortcutContext(Qt::WidgetShortcut); - connect(shiftReturnReplaceAction, SIGNAL(triggered()), this, SLOT(invokeReplacePrevious())); + connect(shiftReturnReplaceAction, &QAction::triggered, + this, &FindToolBar::invokeReplacePrevious); m_ui.replaceEdit->addAction(shiftReturnReplaceAction); // need to make sure QStringList is registered as metatype @@ -153,14 +162,16 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen m_goToCurrentFindAction = new QAction(this); ActionManager::registerAction(m_goToCurrentFindAction, Constants::S_RETURNTOEDITOR, findcontext); - connect(m_goToCurrentFindAction, SIGNAL(triggered()), this, SLOT(setFocusToCurrentFindSupport())); + connect(m_goToCurrentFindAction, &QAction::triggered, + this, &FindToolBar::setFocusToCurrentFindSupport); QIcon icon = QIcon::fromTheme(QLatin1String("edit-find-replace")); m_findInDocumentAction = new QAction(icon, tr("Find/Replace"), this); cmd = ActionManager::registerAction(m_findInDocumentAction, Constants::FIND_IN_DOCUMENT, globalcontext); cmd->setDefaultKeySequence(QKeySequence::Find); mfind->addAction(cmd, Constants::G_FIND_CURRENTDOCUMENT); - connect(m_findInDocumentAction, SIGNAL(triggered()), this, SLOT(openFind())); + connect(m_findInDocumentAction, &QAction::triggered, + this, &FindToolBar::openFind); // Pressing the find shortcut while focus is in the tool bar should not change the search text, // so register a different find action for the tool bar @@ -175,7 +186,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen cmd = ActionManager::registerAction(m_enterFindStringAction, "Find.EnterFindString", globalcontext); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+E"))); mfind->addAction(cmd, Constants::G_FIND_ACTIONS); - connect(m_enterFindStringAction, SIGNAL(triggered()), this, SLOT(putSelectionToFindClipboard())); + connect(m_enterFindStringAction, &QAction::triggered, this, &FindToolBar::putSelectionToFindClipboard); connect(QApplication::clipboard(), SIGNAL(findBufferChanged()), this, SLOT(updateFromFindClipboard())); } @@ -183,7 +194,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen cmd = ActionManager::registerAction(m_findNextAction, Constants::FIND_NEXT, globalcontext); cmd->setDefaultKeySequence(QKeySequence::FindNext); mfind->addAction(cmd, Constants::G_FIND_ACTIONS); - connect(m_findNextAction, SIGNAL(triggered()), this, SLOT(invokeGlobalFindNext())); + connect(m_findNextAction, &QAction::triggered, this, &FindToolBar::invokeGlobalFindNext); m_localFindNextAction = new QAction(m_findNextAction->text(), this); cmd = ActionManager::registerAction(m_localFindNextAction, Constants::FIND_NEXT, findcontext); cmd->augmentActionWithShortcutToolTip(m_localFindNextAction); @@ -194,7 +205,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen cmd = ActionManager::registerAction(m_findPreviousAction, Constants::FIND_PREVIOUS, globalcontext); cmd->setDefaultKeySequence(QKeySequence::FindPrevious); mfind->addAction(cmd, Constants::G_FIND_ACTIONS); - connect(m_findPreviousAction, SIGNAL(triggered()), this, SLOT(invokeGlobalFindPrevious())); + connect(m_findPreviousAction, &QAction::triggered, this, &FindToolBar::invokeGlobalFindPrevious); m_localFindPreviousAction = new QAction(m_findPreviousAction->text(), this); cmd = ActionManager::registerAction(m_localFindPreviousAction, Constants::FIND_PREVIOUS, findcontext); cmd->augmentActionWithShortcutToolTip(m_localFindPreviousAction); @@ -205,19 +216,19 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen cmd = ActionManager::registerAction(m_findNextSelectedAction, Constants::FIND_NEXT_SELECTED, globalcontext); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+F3"))); mfind->addAction(cmd, Constants::G_FIND_ACTIONS); - connect(m_findNextSelectedAction, SIGNAL(triggered()), this, SLOT(findNextSelected())); + connect(m_findNextSelectedAction, &QAction::triggered, this, &FindToolBar::findNextSelected); m_findPreviousSelectedAction = new QAction(tr("Find Previous (Selected)"), this); cmd = ActionManager::registerAction(m_findPreviousSelectedAction, Constants::FIND_PREV_SELECTED, globalcontext); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+F3"))); mfind->addAction(cmd, Constants::G_FIND_ACTIONS); - connect(m_findPreviousSelectedAction, SIGNAL(triggered()), this, SLOT(findPreviousSelected())); + connect(m_findPreviousSelectedAction, &QAction::triggered, this, &FindToolBar::findPreviousSelected); m_replaceAction = new QAction(tr("Replace"), this); cmd = ActionManager::registerAction(m_replaceAction, Constants::REPLACE, globalcontext); cmd->setDefaultKeySequence(QKeySequence()); mfind->addAction(cmd, Constants::G_FIND_ACTIONS); - connect(m_replaceAction, SIGNAL(triggered()), this, SLOT(invokeGlobalReplace())); + connect(m_replaceAction, &QAction::triggered, this, &FindToolBar::invokeGlobalReplace); m_localReplaceAction = new QAction(m_replaceAction->text(), this); cmd = ActionManager::registerAction(m_localReplaceAction, Constants::REPLACE, findcontext); cmd->augmentActionWithShortcutToolTip(m_localReplaceAction); @@ -228,7 +239,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen cmd = ActionManager::registerAction(m_replaceNextAction, Constants::REPLACE_NEXT, globalcontext); cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+="))); mfind->addAction(cmd, Constants::G_FIND_ACTIONS); - connect(m_replaceNextAction, SIGNAL(triggered()), this, SLOT(invokeGlobalReplaceNext())); + connect(m_replaceNextAction, &QAction::triggered, this, &FindToolBar::invokeGlobalReplaceNext); m_localReplaceNextAction = new QAction(m_replaceNextAction->text(), this); m_localReplaceNextAction->setIconText(m_replaceNextAction->text()); // Workaround QTBUG-23396 cmd = ActionManager::registerAction(m_localReplaceNextAction, Constants::REPLACE_NEXT, findcontext); @@ -239,7 +250,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen m_replacePreviousAction = new QAction(tr("Replace && Find Previous"), this); cmd = ActionManager::registerAction(m_replacePreviousAction, Constants::REPLACE_PREVIOUS, globalcontext); mfind->addAction(cmd, Constants::G_FIND_ACTIONS); - connect(m_replacePreviousAction, SIGNAL(triggered()), this, SLOT(invokeGlobalReplacePrevious())); + connect(m_replacePreviousAction, &QAction::triggered, this, &FindToolBar::invokeGlobalReplacePrevious); m_localReplacePreviousAction = new QAction(m_replacePreviousAction->text(), this); cmd = ActionManager::registerAction(m_localReplacePreviousAction, Constants::REPLACE_PREVIOUS, findcontext); cmd->augmentActionWithShortcutToolTip(m_localReplacePreviousAction); @@ -248,7 +259,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen m_replaceAllAction = new QAction(tr("Replace All"), this); cmd = ActionManager::registerAction(m_replaceAllAction, Constants::REPLACE_ALL, globalcontext); mfind->addAction(cmd, Constants::G_FIND_ACTIONS); - connect(m_replaceAllAction, SIGNAL(triggered()), this, SLOT(invokeGlobalReplaceAll())); + connect(m_replaceAllAction, &QAction::triggered, this, &FindToolBar::invokeGlobalReplaceAll); m_localReplaceAllAction = new QAction(m_replaceAllAction->text(), this); cmd = ActionManager::registerAction(m_localReplaceAllAction, Constants::REPLACE_ALL, findcontext); cmd->augmentActionWithShortcutToolTip(m_localReplaceAllAction); @@ -261,7 +272,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen m_caseSensitiveAction->setChecked(false); cmd = ActionManager::registerAction(m_caseSensitiveAction, Constants::CASE_SENSITIVE, globalcontext); mfind->addAction(cmd, Constants::G_FIND_FLAGS); - connect(m_caseSensitiveAction, SIGNAL(toggled(bool)), this, SLOT(setCaseSensitive(bool))); + connect(m_caseSensitiveAction, &QAction::toggled, this, &FindToolBar::setCaseSensitive); m_wholeWordAction = new QAction(tr("Whole Words Only"), this); m_wholeWordAction->setIcon(QIcon(QLatin1String(":/find/images/wholewords.png"))); @@ -269,7 +280,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen m_wholeWordAction->setChecked(false); cmd = ActionManager::registerAction(m_wholeWordAction, Constants::WHOLE_WORDS, globalcontext); mfind->addAction(cmd, Constants::G_FIND_FLAGS); - connect(m_wholeWordAction, SIGNAL(toggled(bool)), this, SLOT(setWholeWord(bool))); + connect(m_wholeWordAction, &QAction::toggled, this, &FindToolBar::setWholeWord); m_regularExpressionAction = new QAction(tr("Use Regular Expressions"), this); m_regularExpressionAction->setIcon(QIcon(QLatin1String(":/find/images/regexp.png"))); @@ -277,7 +288,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen m_regularExpressionAction->setChecked(false); cmd = ActionManager::registerAction(m_regularExpressionAction, Constants::REGULAR_EXPRESSIONS, globalcontext); mfind->addAction(cmd, Constants::G_FIND_FLAGS); - connect(m_regularExpressionAction, SIGNAL(toggled(bool)), this, SLOT(setRegularExpressions(bool))); + connect(m_regularExpressionAction, &QAction::toggled, this, &FindToolBar::setRegularExpressions); m_preserveCaseAction = new QAction(tr("Preserve Case when Replacing"), this); m_preserveCaseAction->setIcon(QPixmap(QLatin1String(":/find/images/preservecase.png"))); @@ -285,22 +296,18 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen m_preserveCaseAction->setChecked(false); cmd = ActionManager::registerAction(m_preserveCaseAction, Constants::PRESERVE_CASE, globalcontext); mfind->addAction(cmd, Constants::G_FIND_FLAGS); - connect(m_preserveCaseAction, SIGNAL(toggled(bool)), this, SLOT(setPreserveCase(bool))); + connect(m_preserveCaseAction, &QAction::toggled, this, &FindToolBar::setPreserveCase); - connect(m_currentDocumentFind, &CurrentDocumentFind::candidateChanged, - this, &FindToolBar::adaptToCandidate); - connect(m_currentDocumentFind, &CurrentDocumentFind::changed, - this, &FindToolBar::updateGlobalActions); - connect(m_currentDocumentFind, &CurrentDocumentFind::changed, - this, &FindToolBar::updateToolBar); + connect(m_currentDocumentFind, &CurrentDocumentFind::candidateChanged, this, &FindToolBar::adaptToCandidate); + connect(m_currentDocumentFind, &CurrentDocumentFind::changed, this, &FindToolBar::updateGlobalActions); + connect(m_currentDocumentFind, &CurrentDocumentFind::changed, this, &FindToolBar::updateToolBar); updateGlobalActions(); updateToolBar(); m_findIncrementalTimer.setSingleShot(true); m_findStepTimer.setSingleShot(true); - connect(&m_findIncrementalTimer, SIGNAL(timeout()), - this, SLOT(invokeFindIncremental())); - connect(&m_findStepTimer, SIGNAL(timeout()), this, SLOT(invokeFindStep())); + connect(&m_findIncrementalTimer, &QTimer::timeout, this, &FindToolBar::invokeFindIncremental); + connect(&m_findStepTimer, &QTimer::timeout, this, &FindToolBar::invokeFindStep); } FindToolBar::~FindToolBar() @@ -493,12 +500,14 @@ QString FindToolBar::getReplaceText() void FindToolBar::setFindText(const QString &text) { - disconnect(m_ui.findEdit, SIGNAL(textChanged(QString)), this, SLOT(invokeFindIncremental())); + disconnect(m_ui.findEdit, &Utils::FancyLineEdit::textChanged, + this, &FindToolBar::invokeFindIncremental); if (hasFindFlag(FindRegularExpression)) m_ui.findEdit->setText(QRegExp::escape(text)); else m_ui.findEdit->setText(text); - connect(m_ui.findEdit, SIGNAL(textChanged(QString)), this, SLOT(invokeFindIncremental())); + connect(m_ui.findEdit, &Utils::FancyLineEdit::textChanged, + this, &FindToolBar::invokeFindIncremental); } void FindToolBar::selectFindText() @@ -994,8 +1003,8 @@ QCheckBox *OptionsPopup::createCheckboxForCommand(Id id) checkbox->setChecked(action->isChecked()); checkbox->setEnabled(action->isEnabled()); checkbox->installEventFilter(this); // enter key handling - QObject::connect(checkbox, SIGNAL(clicked(bool)), action, SLOT(setChecked(bool))); - QObject::connect(action, SIGNAL(changed()), this, SLOT(actionChanged())); + QObject::connect(checkbox, &QCheckBox::clicked, action, &QAction::setChecked); + QObject::connect(action, &QAction::changed, this, &OptionsPopup::actionChanged); m_checkboxMap.insert(action, checkbox); return checkbox; } diff --git a/src/plugins/coreplugin/find/searchresulttreeview.cpp b/src/plugins/coreplugin/find/searchresulttreeview.cpp index 1931284b6cf..d28b4d9e412 100644 --- a/src/plugins/coreplugin/find/searchresulttreeview.cpp +++ b/src/plugins/coreplugin/find/searchresulttreeview.cpp @@ -51,7 +51,8 @@ SearchResultTreeView::SearchResultTreeView(QWidget *parent) setExpandsOnDoubleClick(true); header()->hide(); - connect(this, SIGNAL(activated(QModelIndex)), this, SLOT(emitJumpToSearchResult(QModelIndex))); + connect(this, &SearchResultTreeView::activated, + this, &SearchResultTreeView::emitJumpToSearchResult); } void SearchResultTreeView::setAutoExpandResults(bool expand)