Diffstat (limited to 'noncore/settings/packagemanager/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/mainwindow.cpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/noncore/settings/packagemanager/mainwindow.cpp b/noncore/settings/packagemanager/mainwindow.cpp index 459a75b..8a5b90c 100644 --- a/noncore/settings/packagemanager/mainwindow.cpp +++ b/noncore/settings/packagemanager/mainwindow.cpp @@ -314,3 +314,3 @@ void MainWindow::installLocalPackage( const QString &ipkFile ) // Install selected file - InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Install local package" ), true, + InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Install local package" ), OPackage::Install, ipkFile ); @@ -388,3 +388,3 @@ void MainWindow::slotUpdate() // Create package manager output widget - InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Update package information" ), false, + InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Update package information" ), OPackage::Update ); @@ -400,3 +400,3 @@ void MainWindow::slotUpgrade() // Create package manager output widget - InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Upgrade installed packages" ), false, + InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Upgrade installed packages" ), OPackage::Upgrade ); @@ -447,3 +447,3 @@ void MainWindow::slotDownload() // Create package manager output widget - InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Download packages" ), false, + InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Download packages" ), OPackage::Download, workingPackages ); @@ -522,14 +522,11 @@ void MainWindow::slotApply() // Send command only if there are packages to process - OPackage::Command removeCmd = OPackage::NotDefined; - if ( !removeList.isEmpty() ) - removeCmd = OPackage::Remove; - OPackage::Command installCmd = OPackage::NotDefined; - if ( !installList.isEmpty() ) - installCmd = OPackage::Install; - OPackage::Command upgradeCmd = OPackage::NotDefined; - if ( !upgradeList.isEmpty() ) - upgradeCmd = OPackage::Upgrade; + OPackage::Command removeCmd = !removeList.isEmpty() ? OPackage::Remove + : OPackage::NotDefined; + OPackage::Command installCmd = !installList.isEmpty() ? OPackage::Install + : OPackage::NotDefined; + OPackage::Command upgradeCmd = !upgradeList.isEmpty() ? OPackage::Upgrade + : OPackage::NotDefined; // Create package manager output widget - InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Apply changes" ), !installList.isEmpty(), + InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Apply changes" ), removeCmd, removeList, |