Diffstat (limited to 'noncore/settings/aqpkg/installdlgimpl.cpp') (more/less context) (show whitespace changes)
-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 | |||
@@ -36,4 +36,5 @@ InstallDlgImpl::InstallDlgImpl( vector<QString> &packageList, DataManager *dataM | |||
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; |
@@ -100,4 +101,13 @@ InstallDlgImpl::InstallDlgImpl( vector<QString> &packageList, DataManager *dataM | |||
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 | { |
@@ -147,4 +157,15 @@ void InstallDlgImpl :: installSelected() | |||
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() ); |
@@ -185,4 +206,5 @@ void InstallDlgImpl :: installSelected() | |||
185 | ipkg.runIpkg(); | 206 | ipkg.runIpkg(); |
186 | } | 207 | } |
208 | } | ||
187 | 209 | ||
188 | btnInstall->setEnabled( true ); | 210 | btnInstall->setEnabled( true ); |