Add autostart confs;

This commit is contained in:
iaom 2021-05-07 19:39:43 +08:00
parent 1d6c0c3374
commit 483947db31
4 changed files with 10 additions and 9 deletions

View File

@ -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

View File

@ -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)

View File

@ -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");

View File

@ -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();