diff --git a/lib/contextmanager.cpp b/lib/contextmanager.cpp --- a/lib/contextmanager.cpp +++ b/lib/contextmanager.cpp @@ -119,7 +119,7 @@ connect(d->mDirModel->dirLister(), SIGNAL(redirection(QUrl)), SLOT(slotDirListerRedirection(QUrl))); - connect(d->mDirModel->dirLister(), static_cast(&KDirLister::completed), this, &ContextManager::slotDirListerCompleted); + connect(d->mDirModel->dirLister(), QOverload<>::of(&KDirLister::completed), this, &ContextManager::slotDirListerCompleted); d->mSelectionModel = new QItemSelectionModel(d->mDirModel); diff --git a/lib/crop/cropwidget.cpp b/lib/crop/cropwidget.cpp --- a/lib/crop/cropwidget.cpp +++ b/lib/crop/cropwidget.cpp @@ -283,19 +283,19 @@ connect(d->mCropTool, &CropTool::rectUpdated, this, &CropWidget::setCropRect); - connect(d->leftSpinBox, static_cast(&QSpinBox::valueChanged), this, &CropWidget::slotPositionChanged); - connect(d->topSpinBox, static_cast(&QSpinBox::valueChanged), this, &CropWidget::slotPositionChanged); - connect(d->widthSpinBox, static_cast(&QSpinBox::valueChanged), this, &CropWidget::slotWidthChanged); - connect(d->heightSpinBox, static_cast(&QSpinBox::valueChanged), this, &CropWidget::slotHeightChanged); + connect(d->leftSpinBox, QOverload::of(&QSpinBox::valueChanged), this, &CropWidget::slotPositionChanged); + connect(d->topSpinBox, QOverload::of(&QSpinBox::valueChanged), this, &CropWidget::slotPositionChanged); + connect(d->widthSpinBox, QOverload::of(&QSpinBox::valueChanged), this, &CropWidget::slotWidthChanged); + connect(d->heightSpinBox, QOverload::of(&QSpinBox::valueChanged), this, &CropWidget::slotHeightChanged); d->initDialogButtonBox(); // We need to listen for both signals because the combobox is multi-function: // Text Changed: required so that manual ratio entry is detected (index doesn't change) // Index Changed: required so that choosing an item with the same text is detected (e.g. going from US Letter portrait // to US Letter landscape) connect(d->ratioComboBox, &QComboBox::editTextChanged, this, &CropWidget::slotRatioComboBoxChanged); - connect(d->ratioComboBox, static_cast(&QComboBox::currentIndexChanged), this, &CropWidget::slotRatioComboBoxChanged); + connect(d->ratioComboBox, QOverload::of(&QComboBox::currentIndexChanged), this, &CropWidget::slotRatioComboBoxChanged); // Don't do this before signals are connected, otherwise the tool won't get // initialized diff --git a/lib/invisiblebuttongroup.cpp b/lib/invisiblebuttongroup.cpp --- a/lib/invisiblebuttongroup.cpp +++ b/lib/invisiblebuttongroup.cpp @@ -45,7 +45,7 @@ hide(); d->mGroup = new QButtonGroup(this); d->mGroup->setExclusive(true); - connect(d->mGroup, static_cast(&QButtonGroup::buttonClicked), this, &InvisibleButtonGroup::selectionChanged); + connect(d->mGroup, QOverload::of(&QButtonGroup::buttonClicked), this, &InvisibleButtonGroup::selectionChanged); const QString name = QString::fromLatin1(metaObject()->className()); if (!KConfigDialogManager::propertyMap()->contains(name)) { KConfigDialogManager::propertyMap()->insert(name, "current"); diff --git a/lib/recursivedirmodel.cpp b/lib/recursivedirmodel.cpp --- a/lib/recursivedirmodel.cpp +++ b/lib/recursivedirmodel.cpp @@ -87,9 +87,9 @@ d->mDirLister = new KDirLister(this); connect(d->mDirLister, &KDirLister::itemsAdded, this, &RecursiveDirModel::slotItemsAdded); connect(d->mDirLister, &KDirLister::itemsDeleted, this, &RecursiveDirModel::slotItemsDeleted); - connect(d->mDirLister, static_cast(&KDirLister::completed), this, &RecursiveDirModel::completed); - connect(d->mDirLister, static_cast(&KDirLister::clear), this, &RecursiveDirModel::slotCleared); - connect(d->mDirLister, static_cast(&KDirLister::clear), this, &RecursiveDirModel::slotDirCleared); + connect(d->mDirLister, QOverload<>::of(&KDirLister::completed), this, &RecursiveDirModel::completed); + connect(d->mDirLister, QOverload<>::of(&KDirLister::clear), this, &RecursiveDirModel::slotCleared); + connect(d->mDirLister, QOverload::of(&KDirLister::clear), this, &RecursiveDirModel::slotDirCleared); } RecursiveDirModel::~RecursiveDirModel() diff --git a/lib/resize/resizeimagedialog.cpp b/lib/resize/resizeimagedialog.cpp --- a/lib/resize/resizeimagedialog.cpp +++ b/lib/resize/resizeimagedialog.cpp @@ -69,10 +69,10 @@ setWindowTitle(content->windowTitle()); d->mWidthSpinBox->setFocus(); - connect(d->mWidthSpinBox, static_cast(&QSpinBox::valueChanged), this, &ResizeImageDialog::slotWidthChanged); - connect(d->mHeightSpinBox, static_cast(&QSpinBox::valueChanged), this, &ResizeImageDialog::slotHeightChanged); - connect(d->mWidthPercentSpinBox, static_cast(&QDoubleSpinBox::valueChanged), this, &ResizeImageDialog::slotWidthPercentChanged); - connect(d->mHeightPercentSpinBox, static_cast(&QDoubleSpinBox::valueChanged), this, &ResizeImageDialog::slotHeightPercentChanged); + connect(d->mWidthSpinBox, QOverload::of(&QSpinBox::valueChanged), this, &ResizeImageDialog::slotWidthChanged); + connect(d->mHeightSpinBox, QOverload::of(&QSpinBox::valueChanged), this, &ResizeImageDialog::slotHeightChanged); + connect(d->mWidthPercentSpinBox, QOverload::of(&QDoubleSpinBox::valueChanged), this, &ResizeImageDialog::slotWidthPercentChanged); + connect(d->mHeightPercentSpinBox, QOverload::of(&QDoubleSpinBox::valueChanged), this, &ResizeImageDialog::slotHeightPercentChanged); connect(d->mKeepAspectCheckBox, &QCheckBox::toggled, this, &ResizeImageDialog::slotKeepAspectChanged); }