From 82ebebfb8a5867b400c1df726a478bdcb9d7c005 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 22 Sep 2016 16:41:42 -0400 Subject: Large update to how XDGDesktop files are created/used. This impacts almost all tools/utilities within Lumina - please test (passed internal tests so far). This cleans up a lot of the backend XDG compliance class, moving lots of functionality into child functions of the XDGDesktop class and ensuring that they get cleaned up more regularly/properly. This *seems* to make the desktop startup a lot faster, even if the overall memory savings are slight (so far). --- src-qt5/core-utils/lumina-search/MainUI.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src-qt5/core-utils/lumina-search/MainUI.cpp') diff --git a/src-qt5/core-utils/lumina-search/MainUI.cpp b/src-qt5/core-utils/lumina-search/MainUI.cpp index 99b04b2b..93ee7411 100644 --- a/src-qt5/core-utils/lumina-search/MainUI.cpp +++ b/src-qt5/core-utils/lumina-search/MainUI.cpp @@ -169,8 +169,8 @@ void MainUI::foundSearchItem(QString path){ //Now setup the visuals if(path.simplified().endsWith(".desktop")){ bool ok = false; - XDGDesktop desk = LXDG::loadDesktopFile(path,ok); - if( !ok || !LXDG::checkValidity(desk) ){delete it; return; } //invalid file + XDGDesktop desk(path); + if( !desk.isValid() ){delete it; return; } //invalid file it->setText(desk.name); it->setIcon( LXDG::findIcon(desk.icon, "application-x-desktop") ); }else{ -- cgit From 102f7c729e55ae92b1bb4b0928dde030a2766b79 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Mon, 28 Nov 2016 08:07:29 -0500 Subject: A few important fixes for lumina-search: 1) Ensure the background search process gets stopped when the app is closed. 2) Add a limit of 100 items to the search results (any more than that and the user should refine their search term) 3) Make sure that any "proc" directory on the system is always excluded from the search. This directory heirarchy is highly recursive in nature and should never really be used for searches anyway. 4) Increase the time delay before starting any live search to 1/2 second (used to be 1/3 second). --- src-qt5/core-utils/lumina-search/MainUI.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src-qt5/core-utils/lumina-search/MainUI.cpp') diff --git a/src-qt5/core-utils/lumina-search/MainUI.cpp b/src-qt5/core-utils/lumina-search/MainUI.cpp index 93ee7411..b3e28f8a 100644 --- a/src-qt5/core-utils/lumina-search/MainUI.cpp +++ b/src-qt5/core-utils/lumina-search/MainUI.cpp @@ -17,7 +17,7 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ ui->tool_configure->setVisible(false); //app search initially set livetime = new QTimer(this); - livetime->setInterval(300); //1/3 second for live searches + livetime->setInterval(500); //1/2 second for live searches livetime->setSingleShot(true); workthread = new QThread(this); @@ -56,6 +56,7 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ } MainUI::~MainUI(){ + searcher->StopSearch(); workthread->quit(); workthread->wait(); } @@ -189,6 +190,7 @@ void MainUI::foundSearchItem(QString path){ } //Now add it to the widget ui->listWidget->addItem(it); + if(ui->listWidget->count()>100){ searcher->StopSearch(); } //just in case } void MainUI::stopSearch(){ -- cgit