Diffstat (limited to 'noncore/settings/aqpkg/installdlgimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/installdlgimpl.cpp | 55 |
1 files changed, 26 insertions, 29 deletions
diff --git a/noncore/settings/aqpkg/installdlgimpl.cpp b/noncore/settings/aqpkg/installdlgimpl.cpp index db9a259..485fe3d 100644 --- a/noncore/settings/aqpkg/installdlgimpl.cpp +++ b/noncore/settings/aqpkg/installdlgimpl.cpp @@ -19,2 +19,3 @@ #include <qpe/config.h> +#include <qpe/qpeapplication.h> #endif @@ -93,3 +94,3 @@ InstallDlgImpl::InstallDlgImpl( vector<InstallData> &packageList, DataManager *d { - updateList.push_back( item ); + updateList.push_back( item ); QString type = " (Upgrade)"; @@ -97,7 +98,7 @@ InstallDlgImpl::InstallDlgImpl( vector<InstallData> &packageList, DataManager *d type = " (ReInstall)"; - upgrade += " " + item.packageName + type + "\n"; - } - } + upgrade += " " + item.packageName + type + "\n"; + } + } - output->setText( remove + install + upgrade ); + output->setText( remove + install + upgrade ); } @@ -118,6 +119,6 @@ bool InstallDlgImpl :: showDlg() { - showMaximized(); - bool ret = exec(); + showMaximized(); + bool ret = exec(); - return ret; + return ret; } @@ -126,15 +127,7 @@ void InstallDlgImpl :: optionsSelected() { - InstallOptionsDlgImpl opt( flags, this, "Option", true ); - opt.exec(); - - // set options selected from dialog - flags = 0; - if ( opt.forceDepends->isChecked() ) - flags |= FORCE_DEPENDS; - if ( opt.forceReinstall->isChecked() ) - flags |= FORCE_REINSTALL; - if ( opt.forceRemove->isChecked() ) - flags |= FORCE_REMOVE; - if ( opt.forceOverwrite->isChecked() ) - flags |= FORCE_OVERWRITE; + InstallOptionsDlgImpl opt( flags, this, "Option", true ); + opt.exec(); + + // set options selected from dialog + flags = opt.getFlags(); @@ -149,9 +142,12 @@ void InstallDlgImpl :: installSelected() { - if ( btnInstall->text() == "Close" ) - { - done( 1 ); - return; - } + + if ( btnInstall->text() == "Close" ) + { + done( 1 ); + return; + } - btnInstall->setEnabled( false ); + // Disable buttons + btnOptions->setEnabled( false ); + btnInstall->setEnabled( false ); @@ -185,3 +181,3 @@ void InstallDlgImpl :: installSelected() // First run through the remove list, then the install list then the upgrade list - vector<InstallData>::iterator it; + vector<InstallData>::iterator it; pIpkg->setOption( "remove" ); @@ -232,3 +228,4 @@ void InstallDlgImpl :: installSelected() - btnInstall->setEnabled( true ); + btnOptions->setEnabled( true ); + btnInstall->setEnabled( true ); btnInstall->setText( tr( "Close" ) ); |