diff options
author | Ken Moore <ken@ixsystems.com> | 2019-04-03 08:15:07 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2019-04-03 08:15:07 -0400 |
commit | 11b8c5de6957220e04d843d471bf1b6295f3b75c (patch) | |
tree | 1d6cee634cbc0303fa66401b0b5c4ffa6660a376 | |
parent | Remove the lumina-[calculator/pdf] ports. (diff) | |
download | lumina-11b8c5de6957220e04d843d471bf1b6295f3b75c.tar.gz lumina-11b8c5de6957220e04d843d471bf1b6295f3b75c.tar.bz2 lumina-11b8c5de6957220e04d843d471bf1b6295f3b75c.zip |
A tiny bit of cleanup.
Turn off the in-search stop detection for the start menu. Might be causing a race condition between the mutex locks and the processEvents calls.
This might make the search populate a bit slower, but should never hang up in the middle of a search.
-rw-r--r-- | src-qt5/core/lumina-desktop/panel-plugins/systemstart/ItemWidget.h | 20 | ||||
-rw-r--r-- | src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp | 5 |
2 files changed, 13 insertions, 12 deletions
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/ItemWidget.h b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/ItemWidget.h index 11394dd6..c20b1c80 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/ItemWidget.h +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/ItemWidget.h @@ -32,7 +32,7 @@ public: // - Favorites (path/type) ItemWidget(QWidget *parent=0, QString itemPath="", QString type="unknown", bool goback=false); // - Generic Apps - ItemWidget(QWidget *parent=0, XDGDesktop *item= 0); + ItemWidget(QWidget *parent=0, XDGDesktop *item=0); ~ItemWidget(); @@ -47,7 +47,7 @@ private: bool isDirectory, isShortcut, menuopen; QString linkPath, iconPath, text; QTimer *menureset; - + void createWidget(); void setupContextMenu(); @@ -64,29 +64,29 @@ private slots: void ItemClicked(); void actionClicked(QAction*); //Functions to fix the submenu open/close issues - void actionMenuOpen(){ - if(menureset->isActive()){ menureset->stop(); } - menuopen = true; + void actionMenuOpen(){ + if(menureset->isActive()){ menureset->stop(); } + menuopen = true; } void resetmenuflag(){ menuopen = false; } //tied to the "menureset" timer void actionMenuClosed(){ menureset->start(); } - + protected: void mouseReleaseEvent(QMouseEvent *event){ if(menuopen){ resetmenuflag(); } //skip this event if a submenu was open - else if(event->button() == Qt::RightButton && !icon->whatsThis().startsWith("chcat::::") ){ - menuopen = true; + else if(event->button() == Qt::RightButton && !icon->whatsThis().startsWith("chcat::::") ){ + menuopen = true; setupContextMenu(); contextMenu->popup(event->globalPos()); }else if(event->button() != Qt::NoButton){ ItemClicked(); } } - + void resizeEvent(QResizeEvent *ev){ updateItems(); //update the sizing of everything QFrame::resizeEvent(ev); // do the normal procedures } - + signals: void NewShortcut(); void RemovedShortcut(); diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp index 997d2377..bcb15784 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp @@ -244,6 +244,7 @@ void StartMenu::do_search(QString search, bool force, Ui::StartMenu *tui){ if(LUtils::isValidBinary(tmp)){ found << "0::::application/x-executable::::"+tmp; } QList<XDGDesktop*> apps = LSession::handle()->applicationMenu()->currentAppHash()->value("All"); for(int i=0; i<apps.length(); i++){ + if(apps[i]==0){ continue; } int priority = -1; if(apps[i]->name.toLower()==search.toLower()){ priority = 10; } else if(apps[i]->name.startsWith(search, Qt::CaseInsensitive)){ priority = 15; } @@ -276,10 +277,10 @@ void StartMenu::do_search(QString search, bool force, Ui::StartMenu *tui){ connect(it, SIGNAL(RemovedShortcut()), this, SLOT(UpdateFavs()) ); connect(it, SIGNAL(RunItem(QString)), this, SLOT(LaunchItem(QString)) ); connect(it, SIGNAL(toggleQuickLaunch(QString, bool)), this, SLOT(UpdateQuickLaunch(QString, bool)) ); - if(i%3==0){ + /*if(i%3==0){ QApplication::processEvents(); if(searchTimer->isActive()){ searchmutex.unlock(); return; } //search changed - go ahead and stop here - } + }*/ } tui->stackedWidget->setCurrentWidget(tui->page_search); searchmutex.unlock(); |