summaryrefslogtreecommitdiff
Unidiff
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,85 +1,86 @@
1/*************************************************************************** 1/***************************************************************************
2 installdlgimpl.cpp - description 2 installdlgimpl.cpp - description
3 ------------------- 3 -------------------
4 begin : Mon Aug 26 2002 4 begin : Mon Aug 26 2002
5 copyright : (C) 2002 by Andy Qua 5 copyright : (C) 2002 by Andy Qua
6 email : andy.qua@blueyonder.co.uk 6 email : andy.qua@blueyonder.co.uk
7 ***************************************************************************/ 7 ***************************************************************************/
8 8
9/*************************************************************************** 9/***************************************************************************
10 * * 10 * *
11 * This program is free software; you can redistribute it and/or modify * 11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by * 12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or * 13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. * 14 * (at your option) any later version. *
15 * * 15 * *
16 ***************************************************************************/ 16 ***************************************************************************/
17 17
18#ifdef QWS 18#ifdef QWS
19#include <qpe/config.h> 19#include <qpe/config.h>
20#endif 20#endif
21 21
22#include <qmultilineedit.h> 22#include <qmultilineedit.h>
23#include <qdialog.h> 23#include <qdialog.h>
24#include <qcombobox.h> 24#include <qcombobox.h>
25#include <qcheckbox.h> 25#include <qcheckbox.h>
26#include <qpushbutton.h> 26#include <qpushbutton.h>
27 27
28 28
29#include "datamgr.h" 29#include "datamgr.h"
30#include "instoptionsimpl.h" 30#include "instoptionsimpl.h"
31#include "destination.h" 31#include "destination.h"
32#include "installdlgimpl.h" 32#include "installdlgimpl.h"
33#include "global.h" 33#include "global.h"
34 34
35InstallDlgImpl::InstallDlgImpl( vector<InstallData> &packageList, DataManager *dataManager, QWidget * parent, const char* name, bool modal, WFlags fl ) 35InstallDlgImpl::InstallDlgImpl( vector<InstallData> &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 pIpkg = 0;
38 upgradePackages = false; 39 upgradePackages = false;
39 dataMgr = dataManager; 40 dataMgr = dataManager;
40 vector<Destination>::iterator dit; 41 vector<Destination>::iterator dit;
41 42
42 QString defaultDest = "root"; 43 QString defaultDest = "root";
43#ifdef QWS 44#ifdef QWS
44 Config cfg( "aqpkg" ); 45 Config cfg( "aqpkg" );
45 cfg.setGroup( "settings" ); 46 cfg.setGroup( "settings" );
46 defaultDest = cfg.readEntry( "dest", "root" ); 47 defaultDest = cfg.readEntry( "dest", "root" );
47 48
48 // Grab flags - Turn MAKE_LINKS on by default (if no flags found) 49 // Grab flags - Turn MAKE_LINKS on by default (if no flags found)
49// flags = cfg.readNumEntry( "installFlags", MAKE_LINKS ); 50// flags = cfg.readNumEntry( "installFlags", MAKE_LINKS );
50 flags = 0; 51 flags = 0;
51#else 52#else
52 flags = 0; 53 flags = 0;
53#endif 54#endif
54 55
55 // Output text is read only 56 // Output text is read only
56 output->setReadOnly( true ); 57 output->setReadOnly( true );
57 QFont f( "helvetica" ); 58 QFont f( "helvetica" );
58 f.setPointSize( 10 ); 59 f.setPointSize( 10 );
59 output->setFont( f ); 60 output->setFont( f );
60 61
61 62
62 // setup destination data 63 // setup destination data
63 int defIndex = 0; 64 int defIndex = 0;
64 int i; 65 int i;
65 for ( i = 0 , dit = dataMgr->getDestinationList().begin() ; dit != dataMgr->getDestinationList().end() ; ++dit, ++i ) 66 for ( i = 0 , dit = dataMgr->getDestinationList().begin() ; dit != dataMgr->getDestinationList().end() ; ++dit, ++i )
66 { 67 {
67 destination->insertItem( dit->getDestinationName() ); 68 destination->insertItem( dit->getDestinationName() );
68 if ( dit->getDestinationName() == defaultDest ) 69 if ( dit->getDestinationName() == defaultDest )
69 defIndex = i; 70 defIndex = i;
70 } 71 }
71 72
72 destination->setCurrentItem( defIndex ); 73 destination->setCurrentItem( defIndex );
73 74
74 vector<InstallData>::iterator it; 75 vector<InstallData>::iterator it;
75 // setup package data 76 // setup package data
76 QString remove = "Remove\n"; 77 QString remove = "Remove\n";
77 QString install = "\nInstall\n"; 78 QString install = "\nInstall\n";
78 QString upgrade = "\nUpgrade\n"; 79 QString upgrade = "\nUpgrade\n";
79 for ( it = packageList.begin() ; it != packageList.end() ; ++it ) 80 for ( it = packageList.begin() ; it != packageList.end() ; ++it )
80 { 81 {
81 InstallData item = *it; 82 InstallData item = *it;
82 if ( item.option == "I" ) 83 if ( item.option == "I" )
83 { 84 {
84 installList.push_back( item ); 85 installList.push_back( item );
85 install += " " + item.packageName + "\n"; 86 install += " " + item.packageName + "\n";