summaryrefslogtreecommitdiff
authortille <tille>2002-05-12 12:07:14 (UTC)
committer tille <tille>2002-05-12 12:07:14 (UTC)
commit06e723cc7942af2691828e7fdc6a6ec47b44edab (patch) (side-by-side diff)
treef96bd547911c4fdc2aa8db95bd6175ebae02b027
parent026a99ad2360a9abc2964cbdc3b71b49adcd66e6 (diff)
downloadopie-06e723cc7942af2691828e7fdc6a6ec47b44edab.zip
opie-06e723cc7942af2691828e7fdc6a6ec47b44edab.tar.gz
opie-06e723cc7942af2691828e7fdc6a6ec47b44edab.tar.bz2
fixed crash when remove dest
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/mainwindow.cpp10
-rw-r--r--noncore/unsupported/oipkg/package.cpp8
-rw-r--r--noncore/unsupported/oipkg/pksettings.cpp6
-rw-r--r--noncore/unsupported/oipkg/pmipkg.cpp2
-rw-r--r--noncore/unsupported/oipkg/settings.cpp4
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 ) :
pvDebug(9,"makeMenu");
makeMenu();
makeChannel();
//opie is hardcoded default ;)
- pvDebug(9,"section->setCurrentItem");
- for (int i=0;i<section->count();i++)
- if (section->text(i)=="opie")
- section->setCurrentItem(i);
- sectionChanged();
+// pvDebug(9,"section->setCurrentItem");
+// for (int i=0;i<section->count();i++)
+// if (section->text(i)=="opie")
+// section->setCurrentItem(i);
+// sectionChanged();
connect( section, SIGNAL(activated(int)), SLOT(sectionChanged()) );
connect( subsection, SIGNAL(activated(int)), SLOT(subSectionChanged()) );
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 )
_status = "";
_dest = settings->getDestinationName();
_link = settings->createLinks();
_versions=0;
+ _version="";
}
Package::Package( QStringList pack, PackageManagerSettings *s )
{
@@ -234,9 +235,14 @@ void Package::copyValues( Package* pack )
if (_subsection.isEmpty()&& !pack->_subsection.isEmpty()) _subsection = QString( pack->_subsection );
if (_shortDesc.isEmpty() && !pack->_shortDesc.isEmpty()) _shortDesc = QString( pack->_shortDesc );
if (_desc.isEmpty() && !pack->_desc.isEmpty()) _desc = QString( pack->_desc );
if (_name.isEmpty() && !pack->_name.isEmpty()) _name = QString( pack->_name );
- if (!installed() && _status.isEmpty() && !pack->_status.isEmpty()) _status = QString( pack->_status );
+ if (_dest.isEmpty() && !pack->_dest.isEmpty()) _dest= QString( pack->_dest );
+ if (_displayName.isEmpty()&& !pack->_displayName.isEmpty()) _displayName = QString( pack->_displayName );
+ if (_fileName.isEmpty() && !pack->_fileName.isEmpty()) _fileName = QString( pack->_fileName );
+ if (_version.isEmpty() && !pack->_version.isEmpty()) _version = QString( pack->_version );
+ if (_values.isEmpty() && !pack->_values.isEmpty())_values = QDict<QString>( pack->_values );
+ if (!installed() && _status.isEmpty() && !pack->_status.isEmpty()) _status = QString( pack->_status );
}
QString Package::section()
{
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()
void PackageManagerSettings::removeDestination()
{
disconnect( destinationname, SIGNAL(textChanged(const QString&)), this, SLOT(destNameChanged(const QString&)) );
disconnect( destinationurl, SIGNAL(textChanged(const QString&)), this, SLOT(destUrlChanged(const QString&)) );
- destinationname->setText(destinations->text(editedserver));
- destinationurl->setText(*destinationurlDic[editedserver]);
+ destinationname->setText("");
+ destinationurl->setText("");
disconnect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) );
destinations->removeItem(editeddestination);
activeDestination->removeItem(editeddestination);
activeLinkDestination->removeItem(editeddestination);
+ editeddestination=0;
connect( destinations, SIGNAL(highlighted(int)), this, SLOT(editDestination(int)) );
destinationname->setEnabled(FALSE);
destinationurl->setEnabled(FALSE);
changed = true;
@@ -353,8 +354,9 @@ bool PackageManagerSettings::readIpkgConfig(const QString& conffile)
if ( conf.open(IO_ReadOnly) ) {
QTextStream s(&conf);
servers->clear();
activeServers->clear();
+ destinations->clear();
activeDestination->clear();
activeLinkDestination->clear();
serverurlDic.clear();
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()
{
runwindow->progress->setProgress( 1 );
linkOpp = removeLink;
to_remove.at(i)->processed();
+ pvDebug(4,"link "+QString::number(i));
if ( to_remove.at(i)->link() )
processFileList( fileList, to_remove.at(i)->dest() );
+ pvDebug(4,"take "+QString::number(i));
to_remove.take( i );
out("\n");
}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)
{
QFile conf(conffile);
if ( ! conf.open(IO_WriteOnly) ) return;
QTextStream s(&conf);
- s << "# Written by qpie Package Manager\n";
+ s << "# "+tr("Written by Opie Package Manager")+"\n";
for (int i=0; i<(int)activeServers->count(); i++)
{
QString url = serverurlDic[i] ? *serverurlDic[i] : QString("???");
if ( !activeServers->isSelected(i) )
- s << "#";
+ s << "#";
s << "src " << activeServers->text(i) << " " << url << "\n";
}
for (int i=0; i<(int)destinations->count(); i++)
{