diff --git a/frontend/control/settings-widget.cpp b/frontend/control/settings-widget.cpp index a827e25..8710126 100644 --- a/frontend/control/settings-widget.cpp +++ b/frontend/control/settings-widget.cpp @@ -271,8 +271,8 @@ void SettingsWidget::clearLayout(QLayout * layout) { * @brief SettingsWidget::refreshIndexState 定时刷新索引项 */ void SettingsWidget::refreshIndexState() { -// qDebug()<<"FileUtils::_index_status: "<setIndexState(true); } else { this->setIndexState(false); @@ -280,8 +280,8 @@ void SettingsWidget::refreshIndexState() { m_indexNumLabel->setText(QString("%1/%2").arg(QString::number(SearchManager::getCurrentIndexCount())).arg(QString::number(FileUtils::_max_index_count))); m_timer = new QTimer; connect(m_timer, &QTimer::timeout, this, [ = ]() { - qDebug() << "FileUtils::_index_status: " << FileUtils::_index_status; - if(FileUtils::_index_status != 0) { + qDebug() << "FileUtils::indexStatus: " << FileUtils::indexStatus; + if(FileUtils::indexStatus != 0) { this->setIndexState(true); } else { this->setIndexState(false); diff --git a/frontend/main.cpp b/frontend/main.cpp index 6271e27..49007f7 100644 --- a/frontend/main.cpp +++ b/frontend/main.cpp @@ -108,7 +108,7 @@ void searchMethod(FileUtils::SearchMethod sm){ printf("enum class error!!!\n"); qWarning("enum class error!!!\n"); } - if (FileUtils::SearchMethod::INDEXSEARCH == sm && 0 == FileUtils::_index_status) { + if (FileUtils::SearchMethod::INDEXSEARCH == sm && 0 == FileUtils::indexStatus) { qWarning() << "start first index"; FirstIndex fi("/home/zhangzihao/Desktop"); fi.start(); diff --git a/libsearch/index/inotify-watch.cpp b/libsearch/index/inotify-watch.cpp index 3d1d8e3..88f63fb 100644 --- a/libsearch/index/inotify-watch.cpp +++ b/libsearch/index/inotify-watch.cpp @@ -236,7 +236,6 @@ void InotifyWatch::slotEvent(char *buf, ssize_t len) { // eventProcess(socket); if(FileUtils::SearchMethod::INDEXSEARCH == FileUtils::searchMethod) { - ++FileUtils::_index_status; pid_t pid; pid = fork(); if(pid == 0) { diff --git a/libsearch/libsearch.h b/libsearch/libsearch.h index 7ef4074..f3a8cc5 100644 --- a/libsearch/libsearch.h +++ b/libsearch/libsearch.h @@ -30,7 +30,6 @@ #include "index/searchmethodmanager.h" #include "index/first-index.h" #include "index/ukui-search-qdbus.h" -#include "index/inotify-index.h" #include "index/search-manager.h"