Commit 390deee4 authored by Harald Sitter's avatar Harald Sitter 🏳️‍🌈
Browse files

delegate remotelister stopping to dtor

parent 5d72be1b
Pipeline #188865 passed with stage
in 2 minutes and 31 seconds
......@@ -116,4 +116,10 @@ void RemoteLister::onCompleted()
Q_ASSERT(m_root == m_store);
Q_EMIT branchCompleted(m_store->folder);
}
RemoteLister::~RemoteLister()
{
stop();
}
} // namespace Filelight
......@@ -24,6 +24,7 @@ class RemoteLister : public KDirLister
Q_OBJECT
public:
RemoteLister(const QUrl &url, ScanManager *parent);
~RemoteLister() override;
Q_SIGNALS:
void branchCompleted(Folder *tree);
......@@ -36,5 +37,6 @@ private:
std::shared_ptr<Store> m_root;
std::shared_ptr<Store> m_store;
ScanManager *m_manager;
Q_DISABLE_COPY_MOVE(RemoteLister);
};
} // namespace Filelight
......@@ -179,7 +179,9 @@ bool ScanManager::abort()
{
m_abort = true;
m_remoteLister->stop();
if (m_remoteLister) {
m_remoteLister->stop();
}
m_remoteLister = nullptr;
const bool ret = m_thread && m_thread->wait();
Q_EMIT runningChanged();
......
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