author | andyq <andyq> | 2002-10-16 18:58:39 (UTC) |
---|---|---|
committer | andyq <andyq> | 2002-10-16 18:58:39 (UTC) |
commit | 0feff4043ce813c63e501d6bbd3114e7fcfd8ce6 (patch) (unidiff) | |
tree | e6b8c256adf0f615280417a042a7b0edcb989dc7 /noncore/settings/aqpkg | |
parent | 7569cbeec99b6bfcf960cfa1941e7d43bfb93a4d (diff) | |
download | opie-0feff4043ce813c63e501d6bbd3114e7fcfd8ce6.zip opie-0feff4043ce813c63e501d6bbd3114e7fcfd8ce6.tar.gz opie-0feff4043ce813c63e501d6bbd3114e7fcfd8ce6.tar.bz2 |
Changed dialog to work with upgrading all packages
-rw-r--r-- | noncore/settings/aqpkg/installdlgimpl.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/noncore/settings/aqpkg/installdlgimpl.cpp b/noncore/settings/aqpkg/installdlgimpl.cpp index d4f751c..b92a245 100644 --- a/noncore/settings/aqpkg/installdlgimpl.cpp +++ b/noncore/settings/aqpkg/installdlgimpl.cpp | |||
@@ -34,8 +34,9 @@ | |||
34 | 34 | ||
35 | InstallDlgImpl::InstallDlgImpl( vector<QString> &packageList, DataManager *dataManager, QWidget * parent, const char* name, bool modal, WFlags fl ) | 35 | InstallDlgImpl::InstallDlgImpl( vector<QString> &packageList, DataManager *dataManager, QWidget * parent, const char* name, bool modal, WFlags fl ) |
36 | : InstallDlg( parent, name, modal, fl ) | 36 | : InstallDlg( parent, name, modal, fl ) |
37 | { | 37 | { |
38 | upgradePackages = false; | ||
38 | dataMgr = dataManager; | 39 | dataMgr = dataManager; |
39 | vector<Destination>::iterator dit; | 40 | vector<Destination>::iterator dit; |
40 | 41 | ||
41 | QString defaultDest = "root"; | 42 | QString defaultDest = "root"; |
@@ -98,8 +99,17 @@ InstallDlgImpl::InstallDlgImpl( vector<QString> &packageList, DataManager *dataM | |||
98 | 99 | ||
99 | connect( &ipkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &))); | 100 | connect( &ipkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &))); |
100 | } | 101 | } |
101 | 102 | ||
103 | InstallDlgImpl::InstallDlgImpl( QWidget *parent, const char *name, bool modal, WFlags fl ) | ||
104 | : InstallDlg( parent, name, modal, fl ) | ||
105 | { | ||
106 | upgradePackages = true; | ||
107 | output->setText( "Upgrading installed packages" ); | ||
108 | connect( &ipkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &))); | ||
109 | } | ||
110 | |||
111 | |||
102 | InstallDlgImpl::~InstallDlgImpl() | 112 | InstallDlgImpl::~InstallDlgImpl() |
103 | { | 113 | { |
104 | } | 114 | } |
105 | 115 | ||
@@ -145,8 +155,19 @@ void InstallDlgImpl :: installSelected() | |||
145 | } | 155 | } |
146 | 156 | ||
147 | btnInstall->setEnabled( false ); | 157 | btnInstall->setEnabled( false ); |
148 | 158 | ||
159 | if ( upgradePackages ) | ||
160 | { | ||
161 | output->setText( "" ); | ||
162 | |||
163 | Ipkg ipkg; | ||
164 | connect( &ipkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &))); | ||
165 | ipkg.setOption( "upgrade" ); | ||
166 | ipkg.runIpkg(); | ||
167 | } | ||
168 | else | ||
169 | { | ||
149 | output->setText( "" ); | 170 | output->setText( "" ); |
150 | Destination *d = dataMgr->getDestination( destination->currentText() ); | 171 | Destination *d = dataMgr->getDestination( destination->currentText() ); |
151 | QString dest = d->getDestinationName(); | 172 | QString dest = d->getDestinationName(); |
152 | QString destDir = d->getDestinationPath(); | 173 | QString destDir = d->getDestinationPath(); |
@@ -183,8 +204,9 @@ void InstallDlgImpl :: installSelected() | |||
183 | { | 204 | { |
184 | ipkg.setPackage( *it ); | 205 | ipkg.setPackage( *it ); |
185 | ipkg.runIpkg(); | 206 | ipkg.runIpkg(); |
186 | } | 207 | } |
208 | } | ||
187 | 209 | ||
188 | btnInstall->setEnabled( true ); | 210 | btnInstall->setEnabled( true ); |
189 | btnInstall->setText( tr( "Close" ) ); | 211 | btnInstall->setText( tr( "Close" ) ); |
190 | } | 212 | } |