forked from openkylin/ukui-search
Add autostart confs;
This commit is contained in:
parent
1d6c0c3374
commit
483947db31
|
@ -8,7 +8,6 @@ Comment[zh_CN]=全局搜索
|
|||
Exec=/usr/bin/ukui-search %U
|
||||
Type=Application
|
||||
Icon=kylin-search
|
||||
X-UKUI-AutoRestart=true
|
||||
OnlyShowIn=UKUI
|
||||
X-UKUI-Autostart-Phase=Application
|
||||
Terminal=false
|
||||
OnlyShowIn=MATE;
|
||||
X-MATE-Autostart-Phase=Application
|
||||
X-MATE-AutoRestart=true
|
||||
|
|
|
@ -129,7 +129,7 @@ void FirstIndex::run(){
|
|||
mutex2.lock();
|
||||
mutex3.lock();
|
||||
sem.acquire(4);
|
||||
QtConcurrent::run([&](){
|
||||
// QtConcurrent::run([&](){
|
||||
sem.acquire(1);
|
||||
mutex1.unlock();
|
||||
this->setPath(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
|
||||
|
@ -137,7 +137,7 @@ void FirstIndex::run(){
|
|||
FileUtils::_max_index_count = this->q_index->length();
|
||||
qDebug()<<"max_index_count:"<<FileUtils::_max_index_count;
|
||||
sem.release(5);
|
||||
});
|
||||
// });
|
||||
QtConcurrent::run([&](){
|
||||
sem.acquire(2);
|
||||
mutex2.unlock();
|
||||
|
@ -189,7 +189,7 @@ void FirstIndex::run(){
|
|||
if (p_indexGenerator)
|
||||
delete p_indexGenerator;
|
||||
p_indexGenerator = nullptr;
|
||||
GlobalSettings::getInstance()->forceSync();
|
||||
// GlobalSettings::getInstance()->forceSync();
|
||||
::_exit(0);
|
||||
}
|
||||
else if(pid < 0)
|
||||
|
|
|
@ -323,7 +323,7 @@ fork:
|
|||
qDebug() << "select timeout!";
|
||||
::free(read_timeout);
|
||||
IndexGenerator::getInstance()->~IndexGenerator();
|
||||
GlobalSettings::getInstance()->forceSync();
|
||||
// GlobalSettings::getInstance()->forceSync();
|
||||
::_exit(0);
|
||||
}else{
|
||||
GlobalSettings::getInstance()->setValue(INOTIFY_NORMAL_EXIT, "0");
|
||||
|
|
|
@ -39,8 +39,10 @@ SearchApp::~SearchApp()
|
|||
|
||||
void SearchApp::run()
|
||||
{
|
||||
size_t tmp_uniqueSymbol;
|
||||
m_mutex.lock();
|
||||
uniqueSymbol++;
|
||||
tmp_uniqueSymbol = uniqueSymbol;
|
||||
m_mutex.unlock();
|
||||
//nameList:应用名,pathList:已安装的是.desktop路径,未安装为空,iconList:已安装的是图标名,未安装的是图标路径
|
||||
QStringList nameList, pathList, iconList, descList;
|
||||
|
@ -74,7 +76,7 @@ void SearchApp::run()
|
|||
appVector.append(iconList);
|
||||
appVector.append(descList);
|
||||
m_mutex.lock();
|
||||
if (uniqueSymbol == uniqueSymbol) {
|
||||
if (tmp_uniqueSymbol == uniqueSymbol) {
|
||||
Q_EMIT this->searchResultApp(appVector);
|
||||
}
|
||||
m_mutex.unlock();
|
||||
|
|
Loading…
Reference in New Issue