diff --git a/src/input-box.cpp b/src/input-box.cpp index cf2c5e8..d6d751a 100644 --- a/src/input-box.cpp +++ b/src/input-box.cpp @@ -217,7 +217,7 @@ SearchLineEdit::SearchLineEdit() m_model->setStringList(GlobalSettings::getInstance()->getSearchRecord()); m_completer->setModel(m_model); m_completer->setCompletionMode(QCompleter::InlineCompletion); - m_completer->setCaseSensitivity(Qt::CaseInsensitive); + m_completer->setMaxVisibleItems(14); setCompleter(m_completer); diff --git a/src/main.cpp b/src/main.cpp index 2c3c9cd..8fff0fe 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -135,32 +135,21 @@ int main(int argc, char *argv[]) { qWarning()<<"I can't find home! I'm done here!!"; printf("I can't find home! I'm done here!!"); + syslog(LOG_ERR,"I can't find home! I'm done here!!\n"); } } p_home = NULL; while(!QDir(QDir::homePath()).exists()) { - qWarning()<<"Home not exits!!"; - printf("Home not exits!!"); + qWarning()<<"Home is not exits!!"; + printf("Home is not exits!!"); + syslog(LOG_ERR,"Home is not exits!!\n"); ::sleep(1); } - QDir fifoDir = QDir(QDir::homePath()+"/.config/org.ukui/ukui-search"); - if(!fifoDir.exists()) - qDebug()<<"create fifo path"<>("QPair"); qRegisterMetaType("Document"); @@ -191,6 +180,21 @@ int main(int argc, char *argv[]) //here need to be modified /*-------------ukuisearchdbus Test start-----------------*/ + + QDir fifoDir = QDir(QDir::homePath()+"/.config/org.ukui/ukui-search"); + if(!fifoDir.exists()) + qDebug()<<"create fifo path"<start(); - qDebug() << "main start"; AppMatch::getAppMatch()->start(); //wtf??? // AppMatch apm; diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4c40069..b869465 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -54,6 +54,7 @@ MainWindow::MainWindow(QWidget *parent) : { m_searcher = new SearchManager(); + m_settingsMatch = new SettingsMatch(this); // FileUtils::findMultiToneWords("仇仇仇仇仇仇仇仇仇仇仇翟康宁test"); /*-------------Inotify Test Start---------------*/ // QTime t1 = QTime::currentTime(); @@ -329,9 +330,8 @@ void MainWindow::searchContent(QString keyword){ m_contentFrame->setKeyword(keyword); //设置搜索 - SettingsMatch * settingMatchor = new SettingsMatch(this); QStringList settingList; - settingList = settingMatchor->startMatchApp(keyword); + settingList = m_settingsMatch->startMatchApp(keyword); m_contentFrame->resetSearchList(); m_contentFrame->setSettingList(settingList); diff --git a/src/mainwindow.h b/src/mainwindow.h index 535799b..7384b31 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -100,6 +100,7 @@ private: SearchAppThread * m_seach_app_thread = nullptr; SearchManager* m_searcher = nullptr; + SettingsMatch *m_settingsMatch = nullptr; QSystemTrayIcon *m_sys_tray_icon; protected: