summaryrefslogtreecommitdiff
path: root/noncore/settings/packagemanager/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/settings/packagemanager/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/mainwindow.cpp42
1 files changed, 16 insertions, 26 deletions
diff --git a/noncore/settings/packagemanager/mainwindow.cpp b/noncore/settings/packagemanager/mainwindow.cpp
index 349094d..5e15874 100644
--- a/noncore/settings/packagemanager/mainwindow.cpp
+++ b/noncore/settings/packagemanager/mainwindow.cpp
@@ -315,3 +315,3 @@ void MainWindow::installLocalPackage( const QString &ipkFile )
315 InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Install local package" ), true, 315 InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Install local package" ), true,
316 OPackage::Install, new QStringList( ipkFile ) ); 316 OPackage::Install, ipkFile );
317 connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) ); 317 connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) );
@@ -412,3 +412,3 @@ void MainWindow::slotDownload()
412 // Retrieve list of packages selected for download (if any) 412 // Retrieve list of packages selected for download (if any)
413 QStringList *workingPackages = new QStringList(); 413 QStringList workingPackages;
414 414
@@ -419,6 +419,6 @@ void MainWindow::slotDownload()
419 if ( item->isOn() ) 419 if ( item->isOn() )
420 workingPackages->append( item->text() ); 420 workingPackages.append( item->text() );
421 } 421 }
422 422
423 if ( workingPackages->isEmpty() ) 423 if ( workingPackages.isEmpty() )
424 { 424 {
@@ -459,5 +459,5 @@ void MainWindow::slotApply()
459{ 459{
460 QStringList *removeList = 0x0; 460 QStringList removeList;
461 QStringList *installList = 0x0; 461 QStringList installList;
462 QStringList *upgradeList = 0x0; 462 QStringList upgradeList;
463 463
@@ -482,5 +482,3 @@ void MainWindow::slotApply()
482 { 482 {
483 if ( !removeList ) 483 removeList.append( item->text() );
484 removeList = new QStringList();
485 removeList->append( item->text() );
486 } 484 }
@@ -488,5 +486,3 @@ void MainWindow::slotApply()
488 { 486 {
489 if ( !upgradeList ) 487 upgradeList.append( item->text() );
490 upgradeList = new QStringList();
491 upgradeList->append( item->text() );
492 } 488 }
@@ -501,5 +497,3 @@ void MainWindow::slotApply()
501 { 497 {
502 if ( !removeList ) 498 removeList.append( item->text() );
503 removeList = new QStringList();
504 removeList->append( item->text() );
505 } 499 }
@@ -507,5 +501,3 @@ void MainWindow::slotApply()
507 { 501 {
508 if ( !installList ) 502 installList.append( item->text() );
509 installList = new QStringList();
510 installList->append( item->text() );
511 } 503 }
@@ -516,5 +508,3 @@ void MainWindow::slotApply()
516 // Install package 508 // Install package
517 if ( !installList ) 509 installList.append( item->text() );
518 installList = new QStringList();
519 installList->append( item->text() );
520 } 510 }
@@ -525,3 +515,3 @@ void MainWindow::slotApply()
525 // If nothing is selected, display message and exit 515 // If nothing is selected, display message and exit
526 if ( !removeList && !installList && !upgradeList ) 516 if ( removeList.isEmpty() && installList.isEmpty() && upgradeList.isEmpty() )
527 { 517 {
@@ -533,9 +523,9 @@ void MainWindow::slotApply()
533 OPackage::Command removeCmd = OPackage::NotDefined; 523 OPackage::Command removeCmd = OPackage::NotDefined;
534 if ( removeList && !removeList->isEmpty() ) 524 if ( !removeList.isEmpty() )
535 removeCmd = OPackage::Remove; 525 removeCmd = OPackage::Remove;
536 OPackage::Command installCmd = OPackage::NotDefined; 526 OPackage::Command installCmd = OPackage::NotDefined;
537 if ( installList && !installList->isEmpty() ) 527 if ( !installList.isEmpty() )
538 installCmd = OPackage::Install; 528 installCmd = OPackage::Install;
539 OPackage::Command upgradeCmd = OPackage::NotDefined; 529 OPackage::Command upgradeCmd = OPackage::NotDefined;
540 if ( upgradeList && !upgradeList->isEmpty() ) 530 if ( !upgradeList.isEmpty() )
541 upgradeCmd = OPackage::Upgrade; 531 upgradeCmd = OPackage::Upgrade;