summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -125,116 +125,112 @@ bool InstallDlgImpl :: showDlg()
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;
#ifdef QWS
Config cfg( "aqpkg" );
cfg.setGroup( "settings" );
cfg.writeEntry( "installFlags", flags );
#endif
}
void InstallDlgImpl :: installSelected()
{
if ( btnInstall->text() == "Close" )
{
done( 1 );
return;
}
btnInstall->setEnabled( false );
if ( upgradePackages )
{
output->setText( "" );
Ipkg ipkg;
connect( &ipkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &)));
ipkg.setOption( "upgrade" );
ipkg.runIpkg();
}
else
{
output->setText( "" );
Destination *d = dataMgr->getDestination( destination->currentText() );
QString dest = d->getDestinationName();
QString destDir = d->getDestinationPath();
- int instFlags = 0;
+ int instFlags = flags;
if ( d->linkToRoot() )
- instFlags = MAKE_LINKS;
+ instFlags |= MAKE_LINKS;
#ifdef QWS
// Save settings
Config cfg( "aqpkg" );
cfg.setGroup( "settings" );
cfg.writeEntry( "dest", dest );
#endif
// First run through the remove list, then the install list then the upgrade list
vector<InstallData>::iterator it;
ipkg.setOption( "remove" );
for ( it = removeList.begin() ; it != removeList.end() ; ++it )
{
ipkg.setDestination( it->destination->getDestinationName() );
ipkg.setDestinationDir( it->destination->getDestinationPath() );
ipkg.setPackage( it->packageName );
int tmpFlags = flags;
if ( it->destination->linkToRoot() )
tmpFlags |= MAKE_LINKS;
- else
- tmpFlags ^= MAKE_LINKS;
ipkg.setFlags( tmpFlags );
ipkg.runIpkg();
}
ipkg.setOption( "install" );
ipkg.setDestination( dest );
ipkg.setDestinationDir( destDir );
ipkg.setFlags( instFlags );
for ( it = installList.begin() ; it != installList.end() ; ++it )
{
ipkg.setPackage( it->packageName );
ipkg.runIpkg();
}
flags |= FORCE_REINSTALL;
ipkg.setOption( "reinstall" );
for ( it = updateList.begin() ; it != updateList.end() ; ++it )
{
ipkg.setDestination( it->destination->getDestinationName() );
ipkg.setDestinationDir( it->destination->getDestinationPath() );
ipkg.setPackage( it->packageName );
int tmpFlags = flags;
if ( it->destination->linkToRoot() && it->recreateLinks )
tmpFlags |= MAKE_LINKS;
- else
- tmpFlags ^= MAKE_LINKS;
ipkg.setFlags( tmpFlags );
ipkg.runIpkg();
}
}
btnInstall->setEnabled( true );
btnInstall->setText( tr( "Close" ) );
}
void InstallDlgImpl :: displayText(const QString &text )
{
QString t = output->text() + "\n" + text;
output->setText( t );
output->setCursorPosition( output->numLines(), 0 );
}