Commit 9038818c authored by Ahmad Samir's avatar Ahmad Samir
Browse files

Fix connection to KCoreDirLister::redirection() signal

- KCoreDirLister::redirection(const QUrl &, const QUrl &) has been in KIO
for a long time, and both it and the other deprecated redirection(const QUrl &)
signal are emitted by KCoreDirLister, hence no need for the conditional
in the code; spotted by kossebau.

- Call setCurrentDirUrl() directly in the lambda, and drop the now redundant
slotDirListerRedirection() slot.
parent 9dcbfca8
......@@ -26,7 +26,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// KF
#include <KDirLister>
#include <kio_version.h>
#include <KProtocolManager>
// Local
......@@ -118,14 +117,11 @@ ContextManager::ContextManager(SortedDirModel* dirModel, QObject* parent)
connect(d->mDirModel, &SortedDirModel::rowsInserted, this, &ContextManager::slotRowsInserted);
#if KIO_VERSION < QT_VERSION_CHECK(5, 80, 0)
connect(d->mDirModel->dirLister(), SIGNAL(redirection(QUrl)),
SLOT(slotDirListerRedirection(QUrl)));
#else
connect(d->mDirModel->dirLister(), QOverload<const QUrl &, const QUrl &>::of(&KDirLister::redirection), this, [this](const QUrl &, const QUrl &newUrl) {
slotDirListerRedirection(newUrl);
});
#endif
connect(d->mDirModel->dirLister(),
QOverload<const QUrl &, const QUrl &>::of(&KDirLister::redirection),
this, [this](const QUrl &, const QUrl &newUrl) {
setCurrentDirUrl(newUrl);
});
connect(d->mDirModel->dirLister(), QOverload<>::of(&KDirLister::completed), this, &ContextManager::slotDirListerCompleted);
......@@ -362,11 +358,6 @@ void ContextManager::selectUrlToSelect()
}
}
void ContextManager::slotDirListerRedirection(const QUrl &newUrl)
{
setCurrentDirUrl(newUrl);
}
void ContextManager::slotDirListerCompleted()
{
d->mDirListerFinished = true;
......
......@@ -94,7 +94,6 @@ private Q_SLOTS:
void slotRowsAboutToBeRemoved(const QModelIndex& /*parent*/, int start, int end);
void slotRowsInserted();
void selectUrlToSelect();
void slotDirListerRedirection(const QUrl&);
void slotDirListerCompleted();
private:
......
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