Commit fd717b88 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Drop now unneeded QOverload statements

By defining the KF_DISABLE_DEPRECATED_BEFORE_AND_AT and QT_DISABLE_DEPRECATED_BEFOREvalues,
the deprecated overloads are hidden. This way we only have the un-deprecated one visible.
parent 432c7765
Pipeline #109061 failed with stage
in 3 minutes and 5 seconds
......@@ -133,7 +133,7 @@ DolphinMainWindow::DolphinMainWindow() :
KIO::FileUndoManager* undoManager = KIO::FileUndoManager::self();
undoManager->setUiInterface(new UndoUiInterface());
connect(undoManager, QOverload<bool>::of(&KIO::FileUndoManager::undoAvailable),
connect(undoManager, &KIO::FileUndoManager::undoAvailable,
this, &DolphinMainWindow::slotUndoAvailable);
connect(undoManager, &KIO::FileUndoManager::undoTextChanged,
this, &DolphinMainWindow::slotUndoTextChanged);
......@@ -211,7 +211,7 @@ DolphinMainWindow::DolphinMainWindow() :
setupWhatsThis();
connect(KSycoca::self(), QOverload<>::of(&KSycoca::databaseChanged), this, &DolphinMainWindow::updateOpenPreferredSearchToolAction);
connect(KSycoca::self(), &KSycoca::databaseChanged, this, &DolphinMainWindow::updateOpenPreferredSearchToolAction);
QTimer::singleShot(0, this, &DolphinMainWindow::updateOpenPreferredSearchToolAction);
......
......@@ -68,7 +68,7 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent,
connect(&DolphinNewFileMenuObserver::instance(), &DolphinNewFileMenuObserver::errorMessage,
this, &DolphinPart::slotErrorMessage);
connect(m_view, &DolphinView::directoryLoadingCompleted, this, QOverload<>::of(&KParts::ReadOnlyPart::completed));
connect(m_view, &DolphinView::directoryLoadingCompleted, this, &KParts::ReadOnlyPart::completed);
connect(m_view, &DolphinView::directoryLoadingCompleted, this, &DolphinPart::updatePasteAction);
connect(m_view, &DolphinView::directoryLoadingProgress, this, &DolphinPart::updateProgress);
connect(m_view, &DolphinView::errorMessage, this, &DolphinPart::slotErrorMessage);
......@@ -94,7 +94,7 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent,
connect(m_view, &DolphinView::requestContextMenu,
this, &DolphinPart::slotOpenContextMenu);
connect(m_view, &DolphinView::selectionChanged,
m_extension, QOverload<const KFileItemList&>::of(&KParts::BrowserExtension::selectionInfo));
m_extension, &KParts::BrowserExtension::selectionInfo);
connect(m_view, &DolphinView::selectionChanged,
this, &DolphinPart::slotSelectionChanged);
connect(m_view, &DolphinView::requestItemInfo,
......
......@@ -65,15 +65,15 @@ KFileItemModel::KFileItemModel(QObject* parent) :
}
connect(m_dirLister, &KCoreDirLister::started, this, &KFileItemModel::directoryLoadingStarted);
connect(m_dirLister, QOverload<>::of(&KCoreDirLister::canceled), this, &KFileItemModel::slotCanceled);
connect(m_dirLister, &KCoreDirLister::canceled, this, &KFileItemModel::slotCanceled);
connect(m_dirLister, &KCoreDirLister::itemsAdded, this, &KFileItemModel::slotItemsAdded);
connect(m_dirLister, &KCoreDirLister::itemsDeleted, this, &KFileItemModel::slotItemsDeleted);
connect(m_dirLister, &KCoreDirLister::refreshItems, this, &KFileItemModel::slotRefreshItems);
connect(m_dirLister, QOverload<>::of(&KCoreDirLister::clear), this, &KFileItemModel::slotClear);
connect(m_dirLister, &KCoreDirLister::clear, this, &KFileItemModel::slotClear);
connect(m_dirLister, &KCoreDirLister::infoMessage, this, &KFileItemModel::infoMessage);
connect(m_dirLister, &KCoreDirLister::jobError, this, &KFileItemModel::slotListerError);
connect(m_dirLister, &KCoreDirLister::percent, this, &KFileItemModel::directoryLoadingProgress);
connect(m_dirLister, QOverload<const QUrl&, const QUrl&>::of(&KCoreDirLister::redirection), this, &KFileItemModel::directoryRedirection);
connect(m_dirLister, &KCoreDirLister::redirection, this, &KFileItemModel::directoryRedirection);
connect(m_dirLister, &KCoreDirLister::listingDirCompleted, this, &KFileItemModel::slotCompleted);
// Apply default roles that should be determined
......
......@@ -235,7 +235,7 @@ void DolphinFacetsWidget::initComboBox(QComboBox* combo)
combo->setFrame(false);
combo->setMinimumHeight(parentWidget()->height());
combo->setCurrentIndex(0);
connect(combo, QOverload<int>::of(&QComboBox::activated), this, &DolphinFacetsWidget::facetChanged);
connect(combo, &QComboBox::activated, this, &DolphinFacetsWidget::facetChanged);
}
void DolphinFacetsWidget::updateTagsSelector()
......
......@@ -94,8 +94,8 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) :
loadSettings();
connect(m_listView, &QListView::clicked, this, &PreviewsSettingsPage::changed);
connect(m_localFileSizeBox, QOverload<int>::of(&QSpinBox::valueChanged), this, &PreviewsSettingsPage::changed);
connect(m_remoteFileSizeBox, QOverload<int>::of(&QSpinBox::valueChanged), this, &PreviewsSettingsPage::changed);
connect(m_localFileSizeBox, &QSpinBox::valueChanged, this, &PreviewsSettingsPage::changed);
connect(m_remoteFileSizeBox, &QSpinBox::valueChanged, this, &PreviewsSettingsPage::changed);
}
PreviewsSettingsPage::~PreviewsSettingsPage()
......
......@@ -20,7 +20,7 @@ TrashSettingsPage::TrashSettingsPage(QWidget* parent) :
loadSettings();
connect(m_proxy, QOverload<bool>::of(&KCModuleProxy::changed), this, &TrashSettingsPage::changed);
connect(m_proxy, &KCModuleProxy::changed, this, &TrashSettingsPage::changed);
}
TrashSettingsPage::~TrashSettingsPage()
......
......@@ -27,7 +27,7 @@ DolphinFontRequester::DolphinFontRequester(QWidget* parent) :
m_modeCombo = new QComboBox(this);
m_modeCombo->addItem(i18nc("@item:inlistbox Font", "System Font"));
m_modeCombo->addItem(i18nc("@item:inlistbox Font", "Custom Font"));
connect(m_modeCombo, QOverload<int>::of(&QComboBox::activated),
connect(m_modeCombo, &QComboBox::activated,
this, &DolphinFontRequester::changeMode);
m_chooseFontButton = new QPushButton(i18nc("@action:button Choose font", "Choose..."), this);
......
......@@ -112,7 +112,7 @@ ViewSettingsTab::ViewSettingsTab(Mode mode, QWidget* parent) :
sortingModeGroup->addButton(m_sizeOfContents);
m_recursiveDirectorySizeLimit = new QSpinBox();
connect(m_recursiveDirectorySizeLimit, QOverload<int>::of(&QSpinBox::valueChanged), this, [this](int value) {
connect(m_recursiveDirectorySizeLimit, &QSpinBox::valueChanged, this, [this](int value) {
m_recursiveDirectorySizeLimit->setSuffix(i18np(" level deep", " levels deep", value));
});
m_recursiveDirectorySizeLimit->setRange(1, 20);
......@@ -155,16 +155,16 @@ ViewSettingsTab::ViewSettingsTab(Mode mode, QWidget* parent) :
switch (m_mode) {
case IconsMode:
connect(m_widthBox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ViewSettingsTab::changed);
connect(m_maxLinesBox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ViewSettingsTab::changed);
connect(m_widthBox, &QComboBox::currentIndexChanged, this, &ViewSettingsTab::changed);
connect(m_maxLinesBox, &QComboBox::currentIndexChanged, this, &ViewSettingsTab::changed);
break;
case CompactMode:
connect(m_widthBox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ViewSettingsTab::changed);
connect(m_widthBox, &QComboBox::currentIndexChanged, this, &ViewSettingsTab::changed);
break;
case DetailsMode:
connect(m_expandableFolders, &QCheckBox::toggled, this, &ViewSettingsTab::changed);
#ifndef Q_OS_WIN
connect(m_recursiveDirectorySizeLimit, QOverload<int>::of(&QSpinBox::valueChanged), this, &ViewSettingsTab::changed);
connect(m_recursiveDirectorySizeLimit, &QSpinBox::valueChanged, this, &ViewSettingsTab::changed);
connect(m_numberOfItems, &QRadioButton::toggled, this, &ViewSettingsTab::changed);
connect(m_sizeOfContents, &QRadioButton::toggled, this, [=]() {
m_recursiveDirectorySizeLimit->setEnabled(m_sizeOfContents->isChecked());
......
......@@ -150,11 +150,11 @@ ViewPropertiesDialog::ViewPropertiesDialog(DolphinView* dolphinView) :
layout->addRow(QString(), m_showHiddenFiles);
layout->addRow(QString(), m_sortHiddenLast);
connect(m_viewMode, QOverload<int>::of(&QComboBox::currentIndexChanged),
connect(m_viewMode, &QComboBox::currentIndexChanged,
this, &ViewPropertiesDialog::slotViewModeChanged);
connect(m_sorting, QOverload<int>::of(&QComboBox::currentIndexChanged),
connect(m_sorting, &QComboBox::currentIndexChanged,
this, &ViewPropertiesDialog::slotSortingChanged);
connect(m_sortOrder, QOverload<int>::of(&QComboBox::currentIndexChanged),
connect(m_sortOrder, &QComboBox::currentIndexChanged,
this, &ViewPropertiesDialog::slotSortOrderChanged);
connect(m_sortFoldersFirst, &QCheckBox::clicked,
this, &ViewPropertiesDialog::slotSortFoldersFirstChanged);
......
......@@ -28,7 +28,7 @@ Trash::Trash()
bool isTrashEmpty = m_trashDirLister->items().isEmpty();
Q_EMIT emptinessChanged(isTrashEmpty);
};
connect(m_trashDirLister, QOverload<>::of(&KCoreDirLister::completed), this, trashDirContentChanged);
connect(m_trashDirLister, &KCoreDirLister::completed, this, trashDirContentChanged);
connect(m_trashDirLister, &KDirLister::itemsDeleted, this, trashDirContentChanged);
m_trashDirLister->openUrl(QUrl(QStringLiteral("trash:/")));
}
......
......@@ -213,7 +213,7 @@ void DolphinViewActionHandler::createActions()
viewModeActions->addAction(compactAction);
viewModeActions->addAction(detailsAction);
viewModeActions->setToolBarMode(KSelectAction::MenuMode);
connect(viewModeActions, QOverload<QAction*>::of(&KSelectAction::triggered), this, &DolphinViewActionHandler::slotViewModeActionTriggered);
connect(viewModeActions, &KSelectAction::triggered, this, &DolphinViewActionHandler::slotViewModeActionTriggered);
QAction* zoomInAction = KStandardAction::zoomIn(this,
&DolphinViewActionHandler::zoomIn,
......
Supports Markdown
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