summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opieftp/opieftp.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp
index 3d97ecb..292cc9d 100644
--- a/noncore/net/opieftp/opieftp.cpp
+++ b/noncore/net/opieftp/opieftp.cpp
@@ -1335,97 +1335,97 @@ void OpieFtp::serverComboSelected(int index)
remotePath->setText(cfg.readEntry("RemotePath", "/"));
username = cfg.readEntry("Username", "anonymous");
UsernameComboBox->lineEdit()->setText(username);
qDebug(username);
// qDebug("Password is "+cfg.readEntryCrypt(username, "me@opieftp.org"));
PasswordEdit->setText(cfg.readEntryCrypt(username, "me@opieftp.org"));
// UsernameComboBox
// PasswordEdit
cfg.setGroup("Server");
temp.sprintf("%d",currentServerConfig);
cfg.writeEntry("currentServer", temp);
fuckeduphack = TRUE;
serverListView->setCurrentItem( index);
fuckeduphack=FALSE;
qDebug("server list set selected %d",index);
update();
}
void OpieFtp::deleteServer()
{
QString username, remoteServerStr, remotePathStr, password, port, temp, servername;
remoteServerStr = ServerComboBox->currentText( );
username = UsernameComboBox->currentText();
servername=serverListView->currentText();
Config cfg("opieftp");
cfg.setGroup("Server");
QString tempname;
int numberOfEntries = cfg.readNumEntry("numberOfEntries",0);
for (int i = 1; i <= numberOfEntries; i++) {
temp.setNum(i);
// cfg.setGroup("Server");
cfg.setGroup(QString::number(i));
tempname=cfg.readEntry( "ServerName","");
if( tempname.find( servername,0,TRUE) != -1 ) {
// servername.find( cfg.readEntry("ServerName")) != -1 &&
// remoteServerStr.find( cfg.readEntry("RemotePath")) != -1 &&
// username.find( cfg.readEntry("Username")) != -1) {
serverListView->removeItem(i);
qDebug("OK DELETE "+tempname);
cfg.removeEntry(QString::number(i));
- for ( i; i <= numberOfEntries; i++) {
+ for ( ; i <= numberOfEntries; i++) {
cfg.setGroup("Server");
cfg.writeEntry("Server", QString::number(numberOfEntries + 1 ));
cfg.setGroup(QString::number(i+1)); //get next server config
servername=cfg.readEntry("ServerName");
remoteServerStr=cfg.readEntry("RemotePath");
username=cfg.readEntry("Username");
password=cfg.readEntryCrypt( username);
cfg.setGroup(QString::number(i));
cfg.writeEntry("RemotePath", remoteServerStr);
cfg.writeEntry("ServerName", servername);
cfg.writeEntry("Username", username);
cfg.writeEntryCrypt( username, password);
}
cfg.setGroup("Server");
cfg.writeEntry("numberOfEntries", QString::number(numberOfEntries - 1 ));
}
}
cfg.setGroup(QString::number(numberOfEntries));
cfg.removeEntry("Server");
cfg.removeEntry("RemotePath");
cfg.removeEntry("ServerName");
username=cfg.readEntry("Username");
cfg.removeEntry("Username");
cfg.removeEntry(username);
currentServerConfig=currentServerConfig-1;
fillCombos();
update();
}
void OpieFtp::upDir()
{
if (TabWidget->currentPageIndex() == 0) {
QString current = currentDir.canonicalPath();
QDir dir(current);
dir.cdUp();
current = dir.canonicalPath();
chdir( current.latin1() );
currentDir.cd( current, TRUE);
populateLocalView();
update();
} else {
if( FtpCDUp( conn) == 0) {