summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/installdlgimpl.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/noncore/settings/aqpkg/installdlgimpl.cpp b/noncore/settings/aqpkg/installdlgimpl.cpp
index bbb0be75..e122064 100644
--- a/noncore/settings/aqpkg/installdlgimpl.cpp
+++ b/noncore/settings/aqpkg/installdlgimpl.cpp
@@ -161,49 +161,47 @@ void InstallDlgImpl :: installSelected()
161 161
162 Ipkg ipkg; 162 Ipkg ipkg;
163 connect( &ipkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &))); 163 connect( &ipkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &)));
164 ipkg.setOption( "upgrade" ); 164 ipkg.setOption( "upgrade" );
165 ipkg.runIpkg(); 165 ipkg.runIpkg();
166 } 166 }
167 else 167 else
168 { 168 {
169 output->setText( "" ); 169 output->setText( "" );
170 Destination *d = dataMgr->getDestination( destination->currentText() ); 170 Destination *d = dataMgr->getDestination( destination->currentText() );
171 QString dest = d->getDestinationName(); 171 QString dest = d->getDestinationName();
172 QString destDir = d->getDestinationPath(); 172 QString destDir = d->getDestinationPath();
173 int instFlags = 0; 173 int instFlags = flags;
174 if ( d->linkToRoot() ) 174 if ( d->linkToRoot() )
175 instFlags = MAKE_LINKS; 175 instFlags |= MAKE_LINKS;
176 176
177#ifdef QWS 177#ifdef QWS
178 // Save settings 178 // Save settings
179 Config cfg( "aqpkg" ); 179 Config cfg( "aqpkg" );
180 cfg.setGroup( "settings" ); 180 cfg.setGroup( "settings" );
181 cfg.writeEntry( "dest", dest ); 181 cfg.writeEntry( "dest", dest );
182#endif 182#endif
183 183
184 // First run through the remove list, then the install list then the upgrade list 184 // First run through the remove list, then the install list then the upgrade list
185 vector<InstallData>::iterator it; 185 vector<InstallData>::iterator it;
186 ipkg.setOption( "remove" ); 186 ipkg.setOption( "remove" );
187 for ( it = removeList.begin() ; it != removeList.end() ; ++it ) 187 for ( it = removeList.begin() ; it != removeList.end() ; ++it )
188 { 188 {
189 ipkg.setDestination( it->destination->getDestinationName() ); 189 ipkg.setDestination( it->destination->getDestinationName() );
190 ipkg.setDestinationDir( it->destination->getDestinationPath() ); 190 ipkg.setDestinationDir( it->destination->getDestinationPath() );
191 ipkg.setPackage( it->packageName ); 191 ipkg.setPackage( it->packageName );
192 192
193 int tmpFlags = flags; 193 int tmpFlags = flags;
194 if ( it->destination->linkToRoot() ) 194 if ( it->destination->linkToRoot() )
195 tmpFlags |= MAKE_LINKS; 195 tmpFlags |= MAKE_LINKS;
196 else
197 tmpFlags ^= MAKE_LINKS;
198 196
199 ipkg.setFlags( tmpFlags ); 197 ipkg.setFlags( tmpFlags );
200 ipkg.runIpkg(); 198 ipkg.runIpkg();
201 } 199 }
202 200
203 ipkg.setOption( "install" ); 201 ipkg.setOption( "install" );
204 ipkg.setDestination( dest ); 202 ipkg.setDestination( dest );
205 ipkg.setDestinationDir( destDir ); 203 ipkg.setDestinationDir( destDir );
206 ipkg.setFlags( instFlags ); 204 ipkg.setFlags( instFlags );
207 for ( it = installList.begin() ; it != installList.end() ; ++it ) 205 for ( it = installList.begin() ; it != installList.end() ; ++it )
208 { 206 {
209 ipkg.setPackage( it->packageName ); 207 ipkg.setPackage( it->packageName );
@@ -212,26 +210,24 @@ void InstallDlgImpl :: installSelected()
212 210
213 flags |= FORCE_REINSTALL; 211 flags |= FORCE_REINSTALL;
214 ipkg.setOption( "reinstall" ); 212 ipkg.setOption( "reinstall" );
215 for ( it = updateList.begin() ; it != updateList.end() ; ++it ) 213 for ( it = updateList.begin() ; it != updateList.end() ; ++it )
216 { 214 {
217 ipkg.setDestination( it->destination->getDestinationName() ); 215 ipkg.setDestination( it->destination->getDestinationName() );
218 ipkg.setDestinationDir( it->destination->getDestinationPath() ); 216 ipkg.setDestinationDir( it->destination->getDestinationPath() );
219 ipkg.setPackage( it->packageName ); 217 ipkg.setPackage( it->packageName );
220 218
221 int tmpFlags = flags; 219 int tmpFlags = flags;
222 if ( it->destination->linkToRoot() && it->recreateLinks ) 220 if ( it->destination->linkToRoot() && it->recreateLinks )
223 tmpFlags |= MAKE_LINKS; 221 tmpFlags |= MAKE_LINKS;
224 else
225 tmpFlags ^= MAKE_LINKS;
226 ipkg.setFlags( tmpFlags ); 222 ipkg.setFlags( tmpFlags );
227 ipkg.runIpkg(); 223 ipkg.runIpkg();
228 } 224 }
229 } 225 }
230 226
231 btnInstall->setEnabled( true ); 227 btnInstall->setEnabled( true );
232 btnInstall->setText( tr( "Close" ) ); 228 btnInstall->setText( tr( "Close" ) );
233} 229}
234 230
235void InstallDlgImpl :: displayText(const QString &text ) 231void InstallDlgImpl :: displayText(const QString &text )
236{ 232{
237 QString t = output->text() + "\n" + text; 233 QString t = output->text() + "\n" + text;