summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg/pksettings.cpp
Side-by-side diff
Diffstat (limited to 'noncore/unsupported/oipkg/pksettings.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/pksettings.cpp6
1 files changed, 4 insertions, 2 deletions
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
@@ -160,30 +160,31 @@ void PackageManagerSettings::removeServer()
servers->removeItem(editedserver);
activeServers->removeItem(editedserver);
connect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) );
servername->setEnabled(FALSE);
serverurl->setEnabled(FALSE);
changed = true;
}
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;
}
void PackageManagerSettings::serverNameChanged(const QString& t)
{
disconnect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) );
servers->changeItem( t, editedserver );
activeServers->changeItem( t, editedserver );
connect( servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) );
@@ -345,24 +346,25 @@ void PackageManagerSettings::installationSettingSetName(const QString &name)
changed = true;
}
bool PackageManagerSettings::readIpkgConfig(const QString& conffile)
{
QFile conf(conffile);
changed = false;
if ( conf.open(IO_ReadOnly) ) {
QTextStream s(&conf);
servers->clear();
activeServers->clear();
+ destinations->clear();
activeDestination->clear();
activeLinkDestination->clear();
serverurlDic.clear();
destinationurlDic.clear();
ipkg_old=0;
int currentserver=0;
while ( !s.atEnd() ) {
QString l = s.readLine();
QStringList token = QStringList::split(' ', l);
if ( token[0] == "src" || token[0] == "#src" ) {
currentserver=servers->count();
serverurlDic.insert(servers->count(),new QString(token[2]));