author | tille <tille> | 2002-05-12 12:07:14 (UTC) |
---|---|---|
committer | tille <tille> | 2002-05-12 12:07:14 (UTC) |
commit | 06e723cc7942af2691828e7fdc6a6ec47b44edab (patch) (unidiff) | |
tree | f96bd547911c4fdc2aa8db95bd6175ebae02b027 | |
parent | 026a99ad2360a9abc2964cbdc3b71b49adcd66e6 (diff) | |
download | opie-06e723cc7942af2691828e7fdc6a6ec47b44edab.zip opie-06e723cc7942af2691828e7fdc6a6ec47b44edab.tar.gz opie-06e723cc7942af2691828e7fdc6a6ec47b44edab.tar.bz2 |
fixed crash when remove dest
-rw-r--r-- | noncore/unsupported/oipkg/mainwindow.cpp | 10 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/package.cpp | 8 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pksettings.cpp | 6 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.cpp | 2 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/settings.cpp | 4 |
5 files changed, 20 insertions, 10 deletions
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp index 19a1420..a23c900 100644 --- a/noncore/unsupported/oipkg/mainwindow.cpp +++ b/noncore/unsupported/oipkg/mainwindow.cpp | |||
@@ -56,13 +56,13 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) : | |||
56 | pvDebug(9,"makeMenu"); | 56 | pvDebug(9,"makeMenu"); |
57 | makeMenu(); | 57 | makeMenu(); |
58 | makeChannel(); | 58 | makeChannel(); |
59 | //opie is hardcoded default ;) | 59 | //opie is hardcoded default ;) |
60 | pvDebug(9,"section->setCurrentItem"); | 60 | //pvDebug(9,"section->setCurrentItem"); |
61 | for (int i=0;i<section->count();i++) | 61 | // for (int i=0;i<section->count();i++) |
62 | if (section->text(i)=="opie") | 62 | // if (section->text(i)=="opie") |
63 | section->setCurrentItem(i); | 63 | // section->setCurrentItem(i); |
64 | sectionChanged(); | 64 | // sectionChanged(); |
65 | 65 | ||
66 | connect( section, SIGNAL(activated(int)), SLOT(sectionChanged()) ); | 66 | connect( section, SIGNAL(activated(int)), SLOT(sectionChanged()) ); |
67 | connect( subsection, SIGNAL(activated(int)), SLOT(subSectionChanged()) ); | 67 | connect( subsection, SIGNAL(activated(int)), SLOT(subSectionChanged()) ); |
68 | 68 | ||
diff --git a/noncore/unsupported/oipkg/package.cpp b/noncore/unsupported/oipkg/package.cpp index c947c64..4542e42 100644 --- a/noncore/unsupported/oipkg/package.cpp +++ b/noncore/unsupported/oipkg/package.cpp | |||
@@ -33,8 +33,9 @@ void Package::init( PackageManagerSettings *s ) | |||
33 | _status = ""; | 33 | _status = ""; |
34 | _dest = settings->getDestinationName(); | 34 | _dest = settings->getDestinationName(); |
35 | _link = settings->createLinks(); | 35 | _link = settings->createLinks(); |
36 | _versions=0; | 36 | _versions=0; |
37 | _version=""; | ||
37 | } | 38 | } |
38 | 39 | ||
39 | Package::Package( QStringList pack, PackageManagerSettings *s ) | 40 | Package::Package( QStringList pack, PackageManagerSettings *s ) |
40 | { | 41 | { |
@@ -234,9 +235,14 @@ void Package::copyValues( Package* pack ) | |||
234 | if (_subsection.isEmpty()&& !pack->_subsection.isEmpty()) _subsection = QString( pack->_subsection ); | 235 | if (_subsection.isEmpty()&& !pack->_subsection.isEmpty()) _subsection = QString( pack->_subsection ); |
235 | if (_shortDesc.isEmpty() && !pack->_shortDesc.isEmpty()) _shortDesc = QString( pack->_shortDesc ); | 236 | if (_shortDesc.isEmpty() && !pack->_shortDesc.isEmpty()) _shortDesc = QString( pack->_shortDesc ); |
236 | if (_desc.isEmpty() && !pack->_desc.isEmpty()) _desc = QString( pack->_desc ); | 237 | if (_desc.isEmpty() && !pack->_desc.isEmpty()) _desc = QString( pack->_desc ); |
237 | if (_name.isEmpty() && !pack->_name.isEmpty()) _name = QString( pack->_name ); | 238 | if (_name.isEmpty() && !pack->_name.isEmpty()) _name = QString( pack->_name ); |
238 | if (!installed() && _status.isEmpty() && !pack->_status.isEmpty()) _status = QString( pack->_status ); | 239 | if (_dest.isEmpty() && !pack->_dest.isEmpty()) _dest= QString( pack->_dest ); |
240 | if (_displayName.isEmpty()&& !pack->_displayName.isEmpty()) _displayName = QString( pack->_displayName ); | ||
241 | if (_fileName.isEmpty() && !pack->_fileName.isEmpty()) _fileName = QString( pack->_fileName ); | ||
242 | if (_version.isEmpty() && !pack->_version.isEmpty()) _version = QString( pack->_version ); | ||
243 | if (_values.isEmpty() && !pack->_values.isEmpty())_values = QDict<QString>( pack->_values ); | ||
244 | if (!installed() && _status.isEmpty() && !pack->_status.isEmpty()) _status = QString( pack->_status ); | ||
239 | } | 245 | } |
240 | 246 | ||
241 | QString Package::section() | 247 | QString Package::section() |
242 | { | 248 | { |
diff --git a/noncore/unsupported/oipkg/pksettings.cpp b/noncore/unsupported/oipkg/pksettings.cpp index 24c7beb..09975b0 100644 --- a/noncore/unsupported/oipkg/pksettings.cpp +++ b/noncore/unsupported/oipkg/pksettings.cpp | |||
@@ -168,14 +168,15 @@ void PackageManagerSettings::removeServer() | |||
168 | void PackageManagerSettings::removeDestination() | 168 | void PackageManagerSettings::removeDestination() |
169 | { | 169 | { |
170 | disconnect( destinationname, SIGNAL(textChanged(const QString&)), this, SLOT(destNameChanged(const QString&)) ); | 170 | disconnect( destinationname, SIGNAL(textChanged(const QString&)), this, SLOT(destNameChanged(const QString&)) ); |
171 | disconnect( destinationurl, SIGNAL(textChanged(const QString&)), this, SLOT(destUrlChanged(const QString&)) ); | 171 | disconnect( destinationurl, SIGNAL(textChanged(const QString&)), this, SLOT(destUrlChanged(const QString&)) ); |
172 | destinationname->setText(destinations->text(editedserver)); | 172 | destinationname->setText(""); |
173 | destinationurl->setText(*destinationurlDic[editedserver]); | 173 | destinationurl->setText(""); |
174 | disconnect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) ); | 174 | disconnect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) ); |
175 | destinations->removeItem(editeddestination); | 175 | destinations->removeItem(editeddestination); |
176 | activeDestination->removeItem(editeddestination); | 176 | activeDestination->removeItem(editeddestination); |
177 | activeLinkDestination->removeItem(editeddestination); | 177 | activeLinkDestination->removeItem(editeddestination); |
178 | editeddestination=0; | ||
178 | connect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) ); | 179 | connect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) ); |
179 | destinationname->setEnabled(FALSE); | 180 | destinationname->setEnabled(FALSE); |
180 | destinationurl->setEnabled(FALSE); | 181 | destinationurl->setEnabled(FALSE); |
181 | changed = true; | 182 | changed = true; |
@@ -353,8 +354,9 @@ bool PackageManagerSettings::readIpkgConfig(const QString& conffile) | |||
353 | if ( conf.open(IO_ReadOnly) ) { | 354 | if ( conf.open(IO_ReadOnly) ) { |
354 | QTextStream s(&conf); | 355 | QTextStream s(&conf); |
355 | servers->clear(); | 356 | servers->clear(); |
356 | activeServers->clear(); | 357 | activeServers->clear(); |
358 | destinations->clear(); | ||
357 | activeDestination->clear(); | 359 | activeDestination->clear(); |
358 | activeLinkDestination->clear(); | 360 | activeLinkDestination->clear(); |
359 | serverurlDic.clear(); | 361 | serverurlDic.clear(); |
360 | destinationurlDic.clear(); | 362 | destinationurlDic.clear(); |
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp index 6ef6d19..0401a5b 100644 --- a/noncore/unsupported/oipkg/pmipkg.cpp +++ b/noncore/unsupported/oipkg/pmipkg.cpp | |||
@@ -267,10 +267,12 @@ void PmIpkg::remove() | |||
267 | { | 267 | { |
268 | runwindow->progress->setProgress( 1 ); | 268 | runwindow->progress->setProgress( 1 ); |
269 | linkOpp = removeLink; | 269 | linkOpp = removeLink; |
270 | to_remove.at(i)->processed(); | 270 | to_remove.at(i)->processed(); |
271 | pvDebug(4,"link "+QString::number(i)); | ||
271 | if ( to_remove.at(i)->link() ) | 272 | if ( to_remove.at(i)->link() ) |
272 | processFileList( fileList, to_remove.at(i)->dest() ); | 273 | processFileList( fileList, to_remove.at(i)->dest() ); |
274 | pvDebug(4,"take "+QString::number(i)); | ||
273 | to_remove.take( i ); | 275 | to_remove.take( i ); |
274 | 276 | ||
275 | out("\n"); | 277 | out("\n"); |
276 | }else{ | 278 | }else{ |
diff --git a/noncore/unsupported/oipkg/settings.cpp b/noncore/unsupported/oipkg/settings.cpp index 8f91995..85daa98 100644 --- a/noncore/unsupported/oipkg/settings.cpp +++ b/noncore/unsupported/oipkg/settings.cpp | |||
@@ -180,14 +180,14 @@ void PackageManagerSettings::writeIpkgConfig(const QString& conffile) | |||
180 | { | 180 | { |
181 | QFile conf(conffile); | 181 | QFile conf(conffile); |
182 | if ( ! conf.open(IO_WriteOnly) ) return; | 182 | if ( ! conf.open(IO_WriteOnly) ) return; |
183 | QTextStream s(&conf); | 183 | QTextStream s(&conf); |
184 | s << "# Written by qpie Package Manager\n"; | 184 | s << "# "+tr("Written by Opie Package Manager")+"\n"; |
185 | for (int i=0; i<(int)activeServers->count(); i++) | 185 | for (int i=0; i<(int)activeServers->count(); i++) |
186 | { | 186 | { |
187 | QString url = serverurlDic[i] ? *serverurlDic[i] : QString("???"); | 187 | QString url = serverurlDic[i] ? *serverurlDic[i] : QString("???"); |
188 | if ( !activeServers->isSelected(i) ) | 188 | if ( !activeServers->isSelected(i) ) |
189 | s << "#"; | 189 | s << "#"; |
190 | s << "src " << activeServers->text(i) << " " << url << "\n"; | 190 | s << "src " << activeServers->text(i) << " " << url << "\n"; |
191 | } | 191 | } |
192 | for (int i=0; i<(int)destinations->count(); i++) | 192 | for (int i=0; i<(int)destinations->count(); i++) |
193 | { | 193 | { |