diff --git a/libsearch/searchinterface/searchtasks/file-content-search-task.cpp b/libsearch/searchinterface/searchtasks/file-content-search-task.cpp index ea9e272..b855d18 100644 --- a/libsearch/searchinterface/searchtasks/file-content-search-task.cpp +++ b/libsearch/searchinterface/searchtasks/file-content-search-task.cpp @@ -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() diff --git a/libsearch/searchinterface/searchtasks/file-content-search-task.h b/libsearch/searchinterface/searchtasks/file-content-search-task.h index a77d9f2..82ff757 100644 --- a/libsearch/searchinterface/searchtasks/file-content-search-task.h +++ b/libsearch/searchinterface/searchtasks/file-content-search-task.h @@ -38,6 +38,7 @@ public: private: QThreadPool *m_pool = nullptr; + bool e_enable = true; }; class FileContentSearchWorker : public QRunnable