aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-desktop')
-rw-r--r--lumina-desktop/LDesktop.cpp18
-rw-r--r--lumina-desktop/LDesktopPluginSpace.cpp8
-rw-r--r--lumina-desktop/panel-plugins/systemstart/LStartButton.cpp2
3 files changed, 8 insertions, 20 deletions
diff --git a/lumina-desktop/LDesktop.cpp b/lumina-desktop/LDesktop.cpp
index b7259e86..be34c123 100644
--- a/lumina-desktop/LDesktop.cpp
+++ b/lumina-desktop/LDesktop.cpp
@@ -35,7 +35,6 @@ LDesktop::LDesktop(int deskNum, bool setdefault) : QObject(){
LDesktop::~LDesktop(){
delete deskMenu;
- //delete appmenu;
delete winMenu;
delete bgWindow;
delete workspacelabel;
@@ -61,7 +60,7 @@ void LDesktop::hide(){
void LDesktop::prepareToClose(){
//Get any panels ready to close
issyncing = true; //Stop handling any watcher events
- for(int i=0; i<PANELS.length(); i++){ PANELS[i]->prepareToClose(); delete PANELS.takeAt(i); i--; }
+ for(int i=0; i<PANELS.length(); i++){ PANELS[i]->prepareToClose(); PANELS.takeAt(i)->deleteLater(); i--; }
//Now close down any desktop plugins
desktoplocked = true; //make sure that plugin settings are preserved during removal
//Remove all the current containers
@@ -362,18 +361,7 @@ void LDesktop::RemoveDeskPlugin(QString ID){
settings->setValue(DPREFIX+"pluginlist", plugs);
settings->sync();
QTimer::singleShot(200, this, SLOT(UnlockSettings()) );
- }/*else if(ID.startsWith("applauncher::") ){
- //This was a temporary plugin (desktop file?) check for existance/dir and remove it as necessary
- QString path = ID.section("---",0,0).section("::",1,50); //full file path
- QFileInfo info(path);
- qDebug() << "Removing applauncher:" << path << ID;
- if(info.exists() && info.absolutePath()==QDir::homePath()+"/Desktop"){
- //Need to remove this file/dir as well
- qDebug() << "Removing File:" << path;
- if(!info.isSymLink() && info.isDir()){ QProcess::startDetached("rm -r \""+path+"\""); }
- else{ QFile::remove(path); } //just remove the file/symlink directly
- }
- }*/
+ }
}
void LDesktop::IncreaseDesktopPluginIcons(){
@@ -410,7 +398,7 @@ void LDesktop::UpdatePanels(){
if(panels <= PANELS[i]->number()){
if(DEBUG){ qDebug() << " -- Remove Panel:" << PANELS[i]->number(); }
PANELS[i]->prepareToClose();
- delete PANELS.takeAt(i);
+ PANELS.takeAt(i)->deleteLater();
i--;
}
}
diff --git a/lumina-desktop/LDesktopPluginSpace.cpp b/lumina-desktop/LDesktopPluginSpace.cpp
index 00d3c34c..7ee3f28a 100644
--- a/lumina-desktop/LDesktopPluginSpace.cpp
+++ b/lumina-desktop/LDesktopPluginSpace.cpp
@@ -54,7 +54,7 @@ void LDesktopPluginSpace::SetIconSize(int size){
void LDesktopPluginSpace::cleanup(){
//Perform any final cleanup actions here
for(int i=0; i<ITEMS.length(); i++){
- delete ITEMS.takeAt(i);
+ ITEMS.takeAt(i)->deleteLater();
i--;
}
plugins.clear();
@@ -78,7 +78,7 @@ void LDesktopPluginSpace::UpdateGeom(int oldgrid){
if(!ValidGrid(grid)){
qDebug() << "No Place for plugin:" << ITEMS[i]->whatsThis();
qDebug() << " - Removing it for now...";
- delete ITEMS.takeAt(i);
+ ITEMS.takeAt(i)->deleteLater();
i--;
}else{
//NOTE: We are not doing the ValidGeometry() checks because we are only resizing existing plugin with pre-set & valid grid positions
@@ -278,12 +278,12 @@ void LDesktopPluginSpace::reloadPlugins(bool ForceIconUpdate ){
ITEMS[i]->savePluginGeometry( gridToGeom(geom)); //save it back in pixel coords
}*/
//Now remove the plugin for the moment - run it through the re-creation routine below
- delete ITEMS.takeAt(i);
+ ITEMS.takeAt(i)->deleteLater();
i--;
}
else if(plugs.contains(ITEMS[i]->whatsThis())){ plugs.removeAll(ITEMS[i]->whatsThis()); }
else if(items.contains(ITEMS[i]->whatsThis().section("---",0,0).section("::",1,50))){ items.removeAll(ITEMS[i]->whatsThis().section("---",0,0).section("::",1,50)); }
- else{ ITEMS[i]->removeSettings(true); delete ITEMS.takeAt(i); i--; } //this is considered a permanent removal (cleans settings)
+ else{ ITEMS[i]->removeSettings(true); ITEMS.takeAt(i)->deleteLater(); i--; } //this is considered a permanent removal (cleans settings)
}
//Now create any new items
diff --git a/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp b/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp
index cf37cf88..e08ef1c8 100644
--- a/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp
+++ b/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp
@@ -52,7 +52,7 @@ void LStartButtonPlugin::updateQuickLaunch(QStringList apps){
for(int i=0; i<QUICKL.length(); i++){
if( !apps.contains(QUICKL[i]->whatsThis()) ){
//App was removed
- delete QUICKL.takeAt(i);
+ QUICKL.takeAt(i)->deleteLater();
i--;
}else{
//App still listed - update the button
bgstack15