mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 22:09:52 +08:00
VSearchEngine: avoid virtual func in detor (#570)
Clang-tidy checker warns followings. Call to virtual function during destruction [clang-analyzer-optin.cplusplus.VirtualCall] stop(); clear(); note: This destructor of an object of type '~VSearchEngine' has not returned when the virtual method was called Signed-off-by: Hiroshi Miura <miurahr@linux.com>
This commit is contained in:
parent
e8b2530ca3
commit
3c9c121d91
@ -151,8 +151,14 @@ VSearchEngine::VSearchEngine(QObject *p_parent)
|
|||||||
|
|
||||||
VSearchEngine::~VSearchEngine()
|
VSearchEngine::~VSearchEngine()
|
||||||
{
|
{
|
||||||
stop();
|
for (auto const & th : m_workers) {
|
||||||
clear();
|
th->stop();
|
||||||
|
th->quit();
|
||||||
|
th->wait();
|
||||||
|
delete th;
|
||||||
|
}
|
||||||
|
m_workers.clear();
|
||||||
|
m_result.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void VSearchEngine::search(const QSharedPointer<VSearchConfig> &p_config,
|
void VSearchEngine::search(const QSharedPointer<VSearchConfig> &p_config,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user