From 1217425f85f54c45a64a5ec7d7c78a5c1881a137 Mon Sep 17 00:00:00 2001 From: iaom Date: Thu, 29 Dec 2022 14:27:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=A4=E5=A4=84=E5=86=85?= =?UTF-8?q?=E5=AD=98=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/model/search-result-manager.cpp | 4 ++-- libsearch/websearch/web-search-plugin.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/model/search-result-manager.cpp b/frontend/model/search-result-manager.cpp index 91179f2..a8efa63 100644 --- a/frontend/model/search-result-manager.cpp +++ b/frontend/model/search-result-manager.cpp @@ -73,7 +73,7 @@ void ReceiveResultThread::stop() void ReceiveResultThread::run() { - QTimer * m_timer = new QTimer; + QTimer *m_timer = new QTimer; m_timer->setInterval(3000); bool is_empty; while(!isInterruptionRequested()) { @@ -86,7 +86,6 @@ void ReceiveResultThread::run() } if(m_timer->isActive() && m_timer->remainingTime() < 0.01) { this->requestInterruption(); - qWarning()<<"-------------->stopped by itself"; } if(is_empty && !m_timer->isActive()) { m_timer->start(); @@ -96,4 +95,5 @@ void ReceiveResultThread::run() msleep(100); } } + delete m_timer; } diff --git a/libsearch/websearch/web-search-plugin.cpp b/libsearch/websearch/web-search-plugin.cpp index fc411bc..6c2462a 100644 --- a/libsearch/websearch/web-search-plugin.cpp +++ b/libsearch/websearch/web-search-plugin.cpp @@ -40,11 +40,12 @@ void UkuiSearch::WebSearchPlugin::KeywordSearch(QString keyword, DataQueue