aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/panel-plugins
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2016-02-18 07:42:57 -0500
committerKen Moore <moorekou@gmail.com>2016-02-18 07:42:57 -0500
commit42ab2f95f82522085fdc4ffc8bad1fb182b5ec9c (patch)
treea376ecf43921aea37b548ded5844cae84a156f02 /lumina-desktop/panel-plugins
parentFix the "amixer" command used to set the volume in the generic "Linux" suppor... (diff)
downloadlumina-42ab2f95f82522085fdc4ffc8bad1fb182b5ec9c.tar.gz
lumina-42ab2f95f82522085fdc4ffc8bad1fb182b5ec9c.tar.bz2
lumina-42ab2f95f82522085fdc4ffc8bad1fb182b5ec9c.zip
Find/switch a bunch of other "delete" calls on QWidgets to the Qt deleteLater() function instead. This seems to fix the start menu category change crash with Qt 5.5.1
Diffstat (limited to 'lumina-desktop/panel-plugins')
-rw-r--r--lumina-desktop/panel-plugins/systemstart/StartMenu.cpp5
-rw-r--r--lumina-desktop/panel-plugins/systemtray/LSysTray.cpp6
-rw-r--r--lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp2
3 files changed, 7 insertions, 6 deletions
diff --git a/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp b/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp
index 2c5565df..9f172096 100644
--- a/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp
+++ b/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp
@@ -149,8 +149,7 @@ void StartMenu::UpdateQuickLaunch(QString path, bool keep){
// PRIVATE FUNCTIONS
// ==========================
void StartMenu::ClearScrollArea(QScrollArea *area){
- QWidget *wgt = area->takeWidget();
- delete wgt; //delete the widget and all children
+ area->takeWidget()->deleteLater();
area->setWidget( new QWidget() ); //create a new widget in the scroll area
area->widget()->setContentsMargins(0,0,0,0);
QVBoxLayout *layout = new QVBoxLayout;
@@ -257,6 +256,7 @@ void StartMenu::UpdateApps(){
connect(it, SIGNAL(RunItem(QString)), this, SLOT(LaunchItem(QString)) );
}
}else{
+ //qDebug() << "Show Apps For category:" << CCat;
//Show the "go back" button
ItemWidget *it = new ItemWidget(ui->scroll_apps->widget(), CCat, "chcat::::"+CCat, true);
//if(!it->gooditem){ continue; } //invalid for some reason
@@ -265,6 +265,7 @@ void StartMenu::UpdateApps(){
//Show apps for this cat
QList<XDGDesktop> apps = sysapps->value(CCat);
for(int i=0; i<apps.length(); i++){
+ //qDebug() << " - App:" << apps[i].name;
ItemWidget *it = new ItemWidget(ui->scroll_apps->widget(), apps[i] );
if(!it->gooditem){ continue; } //invalid for some reason
ui->scroll_apps->widget()->layout()->addWidget(it);
diff --git a/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp b/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp
index a921d314..b6af4451 100644
--- a/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp
+++ b/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp
@@ -65,7 +65,7 @@ void LSysTray::stop(){
trayIcons[i]->detachApp();
TrayIcon *cont = trayIcons.takeAt(i);
LI->removeWidget(cont);
- delete cont;
+ cont->deleteLater();
}
}
//Now let some other visual tray take over
@@ -92,7 +92,7 @@ void LSysTray::checkAll(){
TrayIcon *cont = trayIcons.takeAt(i);
cont->cleanup();
LI->removeWidget(cont);
- delete cont;
+ cont->deleteLater();
i--; //List size changed
//Re-adjust the maximum widget size to account for what is left
if(this->layout()->direction()==QBoxLayout::LeftToRight){
@@ -131,7 +131,7 @@ void LSysTray::checkAll(){
qDebug() << " - Invalid Tray App: Could Not Embed:";
trayIcons.takeAt(trayIcons.length()-1); //Always at the end
LI->removeWidget(cont);
- delete cont;
+ cont->deleteLater();
continue;
}
LI->update(); //make sure there is no blank space in the layout
diff --git a/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp b/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp
index be3e665a..3e31a534 100644
--- a/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp
+++ b/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp
@@ -57,7 +57,7 @@ void LTaskManagerPlugin::UpdateButtons(){
//Remove the entire button
//qDebug() << "Window Closed: Remove Button" ;
this->layout()->takeAt(i); //remove from the layout
- delete BUTTONS.takeAt(i);
+ BUTTONS.takeAt(i)->deleteLater();
i--;
updated = true; //prevent updating a removed button
break; //break out of the button->window loop
bgstack15