From 26d363ab3f0e5b719eecb7dadc80d83434b6bccd Mon Sep 17 00:00:00 2001 From: iaom Date: Mon, 16 Oct 2023 13:31:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(file-search-plugin):=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=90=9C=E7=B4=A2=E6=8F=92=E4=BB=B6=E4=B8=AD?= =?UTF-8?q?=E6=AD=BB=E5=BE=AA=E7=8E=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libsearch/index/search-manager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libsearch/index/search-manager.cpp b/libsearch/index/search-manager.cpp index 0da7955..aad23aa 100644 --- a/libsearch/index/search-manager.cpp +++ b/libsearch/index/search-manager.cpp @@ -150,14 +150,14 @@ uint FileSearch::keywordSearchFile() { if(resultCount == 0) return 0; if(getResult(result) == -1) - return -1; + return 0; qDebug() << "--keywordSearchFile finish--"; return resultCount; } catch(const Xapian::Error &e) { qWarning() << QString::fromStdString(e.get_description()); qDebug() << "--keywordSearchFile finish--"; - return -1; + return 0; } } @@ -311,7 +311,7 @@ uint FileContentSearch::keywordSearchContent() { qDebug() << "keywordSearchContent results count=" << resultCount; if(getResult(result, words) == -1) { - return -1; + return 0; } qDebug() << "--keywordSearchContent search finish--"; @@ -319,7 +319,7 @@ uint FileContentSearch::keywordSearchContent() { } catch(const Xapian::Error &e) { qWarning() << QString::fromStdString(e.get_description()); qDebug() << "--keywordSearchContent search finish--"; - return -1; + return 0; } }