summaryrefslogtreecommitdiff
authorandyq <andyq>2002-10-22 19:28:22 (UTC)
committer andyq <andyq>2002-10-22 19:28:22 (UTC)
commitedcbb8b9bae3db2fae18ec6cd9efd202af4f913c (patch) (side-by-side diff)
tree7a1671b8b8e469a21841348732c6548705f2e5d7
parent85f0e72ed11d2c065f46ac0db99483c4025fab8e (diff)
downloadopie-edcbb8b9bae3db2fae18ec6cd9efd202af4f913c.zip
opie-edcbb8b9bae3db2fae18ec6cd9efd202af4f913c.tar.gz
opie-edcbb8b9bae3db2fae18ec6cd9efd202af4f913c.tar.bz2
Set pIpkg to 0 in constructor
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/installdlgimpl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/settings/aqpkg/installdlgimpl.cpp b/noncore/settings/aqpkg/installdlgimpl.cpp
index a924daf..f5aef94 100644
--- a/noncore/settings/aqpkg/installdlgimpl.cpp
+++ b/noncore/settings/aqpkg/installdlgimpl.cpp
@@ -1,133 +1,134 @@
/***************************************************************************
installdlgimpl.cpp - description
-------------------
begin : Mon Aug 26 2002
copyright : (C) 2002 by Andy Qua
email : andy.qua@blueyonder.co.uk
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifdef QWS
#include <qpe/config.h>
#endif
#include <qmultilineedit.h>
#include <qdialog.h>
#include <qcombobox.h>
#include <qcheckbox.h>
#include <qpushbutton.h>
#include "datamgr.h"
#include "instoptionsimpl.h"
#include "destination.h"
#include "installdlgimpl.h"
#include "global.h"
InstallDlgImpl::InstallDlgImpl( vector<InstallData> &packageList, DataManager *dataManager, QWidget * parent, const char* name, bool modal, WFlags fl )
: InstallDlg( parent, name, modal, fl )
{
+ pIpkg = 0;
upgradePackages = false;
dataMgr = dataManager;
vector<Destination>::iterator dit;
QString defaultDest = "root";
#ifdef QWS
Config cfg( "aqpkg" );
cfg.setGroup( "settings" );
defaultDest = cfg.readEntry( "dest", "root" );
// Grab flags - Turn MAKE_LINKS on by default (if no flags found)
// flags = cfg.readNumEntry( "installFlags", MAKE_LINKS );
flags = 0;
#else
flags = 0;
#endif
// Output text is read only
output->setReadOnly( true );
QFont f( "helvetica" );
f.setPointSize( 10 );
output->setFont( f );
// setup destination data
int defIndex = 0;
int i;
for ( i = 0 , dit = dataMgr->getDestinationList().begin() ; dit != dataMgr->getDestinationList().end() ; ++dit, ++i )
{
destination->insertItem( dit->getDestinationName() );
if ( dit->getDestinationName() == defaultDest )
defIndex = i;
}
destination->setCurrentItem( defIndex );
vector<InstallData>::iterator it;
// setup package data
QString remove = "Remove\n";
QString install = "\nInstall\n";
QString upgrade = "\nUpgrade\n";
for ( it = packageList.begin() ; it != packageList.end() ; ++it )
{
InstallData item = *it;
if ( item.option == "I" )
{
installList.push_back( item );
install += " " + item.packageName + "\n";
}
else if ( item.option == "D" )
{
removeList.push_back( item );
remove += " " + item.packageName + "\n";
}
else if ( item.option == "U" )
{
updateList.push_back( item );
upgrade += " " + item.packageName + "\n";
}
}
output->setText( remove + install + upgrade );
}
InstallDlgImpl::InstallDlgImpl( Ipkg *ipkg, QString initialText, QWidget *parent, const char *name, bool modal, WFlags fl )
: InstallDlg( parent, name, modal, fl )
{
pIpkg = ipkg;
output->setText( initialText );
}
InstallDlgImpl::~InstallDlgImpl()
{
}
bool InstallDlgImpl :: showDlg()
{
showMaximized();
bool ret = exec();
return ret;
}
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() )