根据review意见更改部分代码

This commit is contained in:
hewenfei 2022-04-26 14:33:06 +08:00
parent d5ddceee51
commit 95ccbf787f
2 changed files with 7 additions and 6 deletions

View File

@ -37,32 +37,32 @@ PluginInterface::PluginType FileContentSearchTask::pluginType()
const QString FileContentSearchTask::name()
{
return "File Content";
return tr("File Content");
}
const QString FileContentSearchTask::description()
{
return "File Content Search";
return tr("File Content Search");
}
const QIcon FileContentSearchTask::icon()
{
return QIcon::fromTheme("folder");
return QIcon::fromTheme("folder", QIcon(":/unknown.svg"));
}
void FileContentSearchTask::setEnable(bool enable)
{
e_enable = enable;
}
bool FileContentSearchTask::isEnable()
{
return true;
return e_enable && IndexStatusRecorder::getInstance()->contentIndexDatabaseEnable();
}
QString FileContentSearchTask::getCustomSearchType()
{
return "File Content";
return tr("File Content");
}
SearchType FileContentSearchTask::getSearchType()

View File

@ -38,6 +38,7 @@ public:
private:
QThreadPool *m_pool = nullptr;
bool e_enable = true;
};
class FileContentSearchWorker : public QRunnable