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:
Hiroshi Miura 2019-01-13 11:55:20 +09:00 committed by Le Tan
parent e8b2530ca3
commit 3c9c121d91

View File

@ -151,8 +151,14 @@ VSearchEngine::VSearchEngine(QObject *p_parent)
VSearchEngine::~VSearchEngine()
{
stop();
clear();
for (auto const & th : m_workers) {
th->stop();
th->quit();
th->wait();
delete th;
}
m_workers.clear();
m_result.clear();
}
void VSearchEngine::search(const QSharedPointer<VSearchConfig> &p_config,