summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-05-06 20:48:13 (UTC)
committer llornkcor <llornkcor>2002-05-06 20:48:13 (UTC)
commit24259e7b1446f671861b86ee1abb5d8021b98387 (patch) (unidiff)
tree2bbc06dbc590ba5cc5f5dd0e56025b07c9fa729b
parentd1dd3ae2eb11a9c6e83eaad817a6f84a53d68691 (diff)
downloadopie-24259e7b1446f671861b86ee1abb5d8021b98387.zip
opie-24259e7b1446f671861b86ee1abb5d8021b98387.tar.gz
opie-24259e7b1446f671861b86ee1abb5d8021b98387.tar.bz2
fix for rmdir crash
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/tabmanager/tabmanager.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/noncore/settings/tabmanager/tabmanager.cpp b/noncore/settings/tabmanager/tabmanager.cpp
index af76251..f54c837 100644
--- a/noncore/settings/tabmanager/tabmanager.cpp
+++ b/noncore/settings/tabmanager/tabmanager.cpp
@@ -59,7 +59,7 @@ TabManager::TabManager( QWidget* parent, const char* name):TabManagerBase(parent
59 rescanFolder(HOME_APP_DIR); 59 rescanFolder(HOME_APP_DIR);
60 60
61 // Connect the signals and slots 61 // Connect the signals and slots
62 connect(tabList, SIGNAL(doubleClicked(QListViewItem *)), 62 connect(tabList, SIGNAL(doubleClicked(QListViewItem *)),
63 this, SLOT(editItem(QListViewItem*))); 63 this, SLOT(editItem(QListViewItem*)));
64 (tabList->header())->hide(); 64 (tabList->header())->hide();
65 connect(tabList, SIGNAL(moveItem(QListViewItem *, QListViewItem *)), 65 connect(tabList, SIGNAL(moveItem(QListViewItem *, QListViewItem *)),
@@ -205,7 +205,7 @@ void TabManager::removeItem(){
205 if(!item) 205 if(!item)
206 return; 206 return;
207 if(item->childCount() > 0){ 207 if(item->childCount() > 0){
208 QMessageBox::critical(this, tr("Message"), tr("Can't remove with applications\nstill in the group."), 208 QMessageBox::critical(this, tr("Message"), tr("Can't remove with applications\nstill in the group."),
209 tr("Ok") ); 209 tr("Ok") );
210 return; 210 return;
211 } 211 }
@@ -229,12 +229,15 @@ void TabManager::removeItem(){
229 QDir dir; 229 QDir dir;
230 if(!dir.rmdir(location)) 230 if(!dir.rmdir(location))
231 removeSuccessfull = false; 231 removeSuccessfull = false;
232 else
233 removeSuccessfull = true;
234
232 } 235 }
233 236
234 // If removing failed. 237 // If removing failed.
235 if(!removeSuccessfull){ 238 if(!removeSuccessfull){
236 qDebug((QString("removeItem: ") + location).latin1()); 239 qDebug((QString("removeItem: ") + location).latin1());
237 QMessageBox::critical(this, tr("Message"), tr("Can't remove."), 240 QMessageBox::critical(this, tr("Message"), tr("Can't remove."),
238 tr("Ok") ); 241 tr("Ok") );
239 return; 242 return;
240 } 243 }
@@ -370,7 +373,7 @@ void TabManager::moveApplication(QListViewItem *item, QListViewItem *newGroup){
370 // Move file 373 // Move file
371 QDir r; 374 QDir r;
372 if(!r.rename(itemList[item], newFolder)){ 375 if(!r.rename(itemList[item], newFolder)){
373 QMessageBox::critical(this, tr("Message"), tr("Can't move application."), 376 QMessageBox::critical(this, tr("Message"), tr("Can't move application."),
374 tr("Ok") ); 377 tr("Ok") );
375 return; 378 return;
376 } 379 }