Commit ef48b82b authored by Ahmad Samir's avatar Ahmad Samir
Browse files

Port away from deprecated KIO signals

parent dd9d2103
......@@ -22,6 +22,7 @@
#include "dirtree_item.h"
#include <kconfiggroup.h>
#include <kio_version.h>
#include <kprotocolmanager.h>
#include <kdesktopfile.h>
#include <kmessagebox.h>
......@@ -42,8 +43,12 @@ KonqSidebarDirTreeModule::~KonqSidebarDirTreeModule()
{
// KDirLister may still emit canceled while being deleted.
if (m_dirLister) {
#if KIO_VERSION < QT_VERSION_CHECK(5, 79, 0)
disconnect(m_dirLister, SIGNAL(canceled(QUrl)),
this, SLOT(slotListingStopped(QUrl)));
#else
disconnect(m_dirLister, &KCoreDirLister::listingDirCanceled, this, &KonqSidebarDirTreeModule::slotListingStopped);
#endif
delete m_dirLister;
}
}
......@@ -297,10 +302,17 @@ void KonqSidebarDirTreeModule::openSubFolder(KonqSidebarTreeItem *item)
this, SLOT(slotRefreshItems(QList<QPair<KFileItem,KFileItem> >)));
connect(m_dirLister, SIGNAL(deleteItem(KFileItem)),
this, SLOT(slotDeleteItem(KFileItem)));
#if KIO_VERSION < QT_VERSION_CHECK(5, 79, 0)
connect(m_dirLister, SIGNAL(completed(QUrl)),
this, SLOT(slotListingStopped(QUrl)));
connect(m_dirLister, SIGNAL(canceled(QUrl)),
this, SLOT(slotListingStopped(QUrl)));
#else
connect(m_dirLister, &KCoreDirLister::listingDirCompleted, this, &KonqSidebarDirTreeModule::slotListingStopped);
connect(m_dirLister, &KCoreDirLister::listingDirCanceled, this, &KonqSidebarDirTreeModule::slotListingStopped);
#endif
connect(m_dirLister, SIGNAL(redirection(QUrl,QUrl)),
this, SLOT(slotRedirection(QUrl,QUrl)));
}
......
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