fix: Update index readiness check to allow for multiple valid statuses#182
fix: Update index readiness check to allow for multiple valid statuses#182deepin-bot[bot] merged 2 commits intolinuxdeepin:masterfrom
Conversation
This commit modifies the `isFileNameIndexReadyForSearch` function to check if the index status is either "scanning" or "monitoring" instead of just "monitoring". This change improves the flexibility of the index readiness validation, ensuring that the search can proceed under more conditions while providing clearer debug output regarding the expected status. Log:
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Johnson-zs The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
1.3.31 Log:
deepin pr auto review代码审查意见:
综合以上意见,修改后的代码可能如下: // utils/searchutility.cpp
#include "searchutility.h"
// 常量定义,包含所有有效的状态
const QStringList validStatus = { "scanning", "monitoring" };
bool isFileNameIndexReadyForSearch()
{
// 其他代码...
const QString &status = currentStatus.value();
if (!validStatus.contains(status)) {
// 输出所有有效的状态,以便于调试和维护
qDebug() << "Index status is '" << status
<< "', expected one of: " << validStatus.join(", ")
<< ". Index not ready for search.";
return false;
}
// 其他代码...
}以上修改提高了代码的可读性、可维护性和可扩展性。 |
|
TAG Bot TAG: 1.3.31 |
|
/forcemerge |
|
This pr force merged! (status: blocked) |
|
/topic cd-20250627 |
|
Add topic: cd-20250627 successed. |
|
/integr-topic cd-20250627 |
|
Integrated with pr deepin-community/Repository-Integration#2959 |
This commit modifies the
isFileNameIndexReadyForSearchfunction to check if the index status is either "scanning" or "monitoring" instead of just "monitoring". This change improves the flexibility of the index readiness validation, ensuring that the search can proceed under more conditions while providing clearer debug output regarding the expected status.Log: