summaryrefslogtreecommitdiff
path: root/noncore/settings/packagemanager/mainwindow.cpp
authordrw <drw>2004-11-17 00:43:35 (UTC)
committer drw <drw>2004-11-17 00:43:35 (UTC)
commit718a7a8ba68e10faa1a22fcc6bdc26e1723b2a40 (patch) (side-by-side diff)
treea6bf4f10db4141ba7098d76d0444bd4d1dd759c1 /noncore/settings/packagemanager/mainwindow.cpp
parent216434aff5921f3c3c2efc9adb58e653a5d224b3 (diff)
downloadopie-718a7a8ba68e10faa1a22fcc6bdc26e1723b2a40.zip
opie-718a7a8ba68e10faa1a22fcc6bdc26e1723b2a40.tar.gz
opie-718a7a8ba68e10faa1a22fcc6bdc26e1723b2a40.tar.bz2
Some code clean-up items (thanks to zecke)
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 )
InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Install local package" ), true,
- OPackage::Install, new QStringList( ipkFile ) );
+ OPackage::Install, ipkFile );
connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) );
@@ -412,3 +412,3 @@ void MainWindow::slotDownload()
// Retrieve list of packages selected for download (if any)
- QStringList *workingPackages = new QStringList();
+ QStringList workingPackages;
@@ -419,6 +419,6 @@ void MainWindow::slotDownload()
if ( item->isOn() )
- workingPackages->append( item->text() );
+ workingPackages.append( item->text() );
}
- if ( workingPackages->isEmpty() )
+ if ( workingPackages.isEmpty() )
{
@@ -459,5 +459,5 @@ void MainWindow::slotApply()
{
- QStringList *removeList = 0x0;
- QStringList *installList = 0x0;
- QStringList *upgradeList = 0x0;
+ QStringList removeList;
+ QStringList installList;
+ QStringList upgradeList;
@@ -482,5 +482,3 @@ void MainWindow::slotApply()
{
- if ( !removeList )
- removeList = new QStringList();
- removeList->append( item->text() );
+ removeList.append( item->text() );
}
@@ -488,5 +486,3 @@ void MainWindow::slotApply()
{
- if ( !upgradeList )
- upgradeList = new QStringList();
- upgradeList->append( item->text() );
+ upgradeList.append( item->text() );
}
@@ -501,5 +497,3 @@ void MainWindow::slotApply()
{
- if ( !removeList )
- removeList = new QStringList();
- removeList->append( item->text() );
+ removeList.append( item->text() );
}
@@ -507,5 +501,3 @@ void MainWindow::slotApply()
{
- if ( !installList )
- installList = new QStringList();
- installList->append( item->text() );
+ installList.append( item->text() );
}
@@ -516,5 +508,3 @@ void MainWindow::slotApply()
// Install package
- if ( !installList )
- installList = new QStringList();
- installList->append( item->text() );
+ installList.append( item->text() );
}
@@ -525,3 +515,3 @@ void MainWindow::slotApply()
// If nothing is selected, display message and exit
- if ( !removeList && !installList && !upgradeList )
+ if ( removeList.isEmpty() && installList.isEmpty() && upgradeList.isEmpty() )
{
@@ -533,9 +523,9 @@ void MainWindow::slotApply()
OPackage::Command removeCmd = OPackage::NotDefined;
- if ( removeList && !removeList->isEmpty() )
+ if ( !removeList.isEmpty() )
removeCmd = OPackage::Remove;
OPackage::Command installCmd = OPackage::NotDefined;
- if ( installList && !installList->isEmpty() )
+ if ( !installList.isEmpty() )
installCmd = OPackage::Install;
OPackage::Command upgradeCmd = OPackage::NotDefined;
- if ( upgradeList && !upgradeList->isEmpty() )
+ if ( !upgradeList.isEmpty() )
upgradeCmd = OPackage::Upgrade;