Diffstat (limited to 'noncore/settings/aqpkg/installdlgimpl.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/installdlgimpl.cpp | 15 |
1 files changed, 6 insertions, 9 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 | |||
@@ -14,12 +14,13 @@ | |||
14 | * (at your option) any later version. * | 14 | * (at your option) any later version. * |
15 | * * | 15 | * * |
16 | ***************************************************************************/ | 16 | ***************************************************************************/ |
17 | 17 | ||
18 | #ifdef QWS | 18 | #ifdef QWS |
19 | #include <qpe/config.h> | 19 | #include <qpe/config.h> |
20 | #include <qpe/qpeapplication.h> | ||
20 | #endif | 21 | #endif |
21 | 22 | ||
22 | #include <qmultilineedit.h> | 23 | #include <qmultilineedit.h> |
23 | #include <qdialog.h> | 24 | #include <qdialog.h> |
24 | #include <qcombobox.h> | 25 | #include <qcombobox.h> |
25 | #include <qcheckbox.h> | 26 | #include <qcheckbox.h> |
@@ -125,37 +126,32 @@ bool InstallDlgImpl :: showDlg() | |||
125 | void InstallDlgImpl :: optionsSelected() | 126 | void InstallDlgImpl :: optionsSelected() |
126 | { | 127 | { |
127 | InstallOptionsDlgImpl opt( flags, this, "Option", true ); | 128 | InstallOptionsDlgImpl opt( flags, this, "Option", true ); |
128 | opt.exec(); | 129 | opt.exec(); |
129 | 130 | ||
130 | // set options selected from dialog | 131 | // set options selected from dialog |
131 | flags = 0; | 132 | flags = opt.getFlags(); |
132 | if ( opt.forceDepends->isChecked() ) | ||
133 | flags |= FORCE_DEPENDS; | ||
134 | if ( opt.forceReinstall->isChecked() ) | ||
135 | flags |= FORCE_REINSTALL; | ||
136 | if ( opt.forceRemove->isChecked() ) | ||
137 | flags |= FORCE_REMOVE; | ||
138 | if ( opt.forceOverwrite->isChecked() ) | ||
139 | flags |= FORCE_OVERWRITE; | ||
140 | 133 | ||
141 | #ifdef QWS | 134 | #ifdef QWS |
142 | Config cfg( "aqpkg" ); | 135 | Config cfg( "aqpkg" ); |
143 | cfg.setGroup( "settings" ); | 136 | cfg.setGroup( "settings" ); |
144 | cfg.writeEntry( "installFlags", flags ); | 137 | cfg.writeEntry( "installFlags", flags ); |
145 | #endif | 138 | #endif |
146 | } | 139 | } |
147 | 140 | ||
148 | void InstallDlgImpl :: installSelected() | 141 | void InstallDlgImpl :: installSelected() |
149 | { | 142 | { |
143 | |||
150 | if ( btnInstall->text() == "Close" ) | 144 | if ( btnInstall->text() == "Close" ) |
151 | { | 145 | { |
152 | done( 1 ); | 146 | done( 1 ); |
153 | return; | 147 | return; |
154 | } | 148 | } |
155 | 149 | ||
150 | // Disable buttons | ||
151 | btnOptions->setEnabled( false ); | ||
156 | btnInstall->setEnabled( false ); | 152 | btnInstall->setEnabled( false ); |
157 | 153 | ||
158 | if ( pIpkg ) | 154 | if ( pIpkg ) |
159 | { | 155 | { |
160 | output->setText( "" ); | 156 | output->setText( "" ); |
161 | 157 | ||
@@ -227,12 +223,13 @@ void InstallDlgImpl :: installSelected() | |||
227 | pIpkg->runIpkg(); | 223 | pIpkg->runIpkg(); |
228 | } | 224 | } |
229 | 225 | ||
230 | delete pIpkg; | 226 | delete pIpkg; |
231 | } | 227 | } |
232 | 228 | ||
229 | btnOptions->setEnabled( true ); | ||
233 | btnInstall->setEnabled( true ); | 230 | btnInstall->setEnabled( true ); |
234 | btnInstall->setText( tr( "Close" ) ); | 231 | btnInstall->setText( tr( "Close" ) ); |
235 | } | 232 | } |
236 | 233 | ||
237 | void InstallDlgImpl :: displayText(const QString &text ) | 234 | void InstallDlgImpl :: displayText(const QString &text ) |
238 | { | 235 | { |