summaryrefslogtreecommitdiff
path: root/noncore/net
Side-by-side diff
Diffstat (limited to 'noncore/net') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieftp/inputDialog.cpp4
-rw-r--r--noncore/net/opieftp/inputDialog.h2
-rw-r--r--noncore/net/opieftp/opieftp.cpp4
3 files changed, 7 insertions, 3 deletions
diff --git a/noncore/net/opieftp/inputDialog.cpp b/noncore/net/opieftp/inputDialog.cpp
index 89b345e..373db3b 100644
--- a/noncore/net/opieftp/inputDialog.cpp
+++ b/noncore/net/opieftp/inputDialog.cpp
@@ -29,12 +29,16 @@ InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags
setCaption( tr(name ) );
LineEdit1 = new QLineEdit( this, "LineEdit1" );
LineEdit1->setGeometry( QRect( 10, 10, 216, 22 ) );
}
InputDialog::~InputDialog()
{
inputText= LineEdit1->text();
}
+void InputDialog::setTextEdit(const QString &string)
+{
+ LineEdit1->setText(string);
+}
diff --git a/noncore/net/opieftp/inputDialog.h b/noncore/net/opieftp/inputDialog.h
index 2cd8285..dfe0e8a 100644
--- a/noncore/net/opieftp/inputDialog.h
+++ b/noncore/net/opieftp/inputDialog.h
@@ -19,16 +19,16 @@ class QHBoxLayout;
class QGridLayout;
class QLineEdit;
class InputDialog : public QDialog
{
Q_OBJECT
public:
InputDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~InputDialog();
QString inputText;
QLineEdit* LineEdit1;
-
+ void setTextEdit(const QString &);
};
#endif // INPUTDIALOG_H
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp
index e64fd73..b451925 100644
--- a/noncore/net/opieftp/opieftp.cpp
+++ b/noncore/net/opieftp/opieftp.cpp
@@ -934,47 +934,47 @@ void OpieFtp::remoteDelete()
}
break;
};
}
QCopEnvelope ( "QPE/System", "notBusy()" );
}
void OpieFtp::remoteRename()
{
QString curFile = Remote_View->currentItem()->text(0);
InputDialog *fileDlg;
fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0);
- fileDlg->inputText = curFile;
+ fileDlg->setTextEdit((const QString &)curFile);
fileDlg->exec();
if( fileDlg->result() == 1 ) {
QString oldName = currentRemoteDir +"/"+ curFile;
QString newName = currentRemoteDir +"/"+ fileDlg->LineEdit1->text();//+".playlist";
QCopEnvelope ( "QPE/System", "busy()" );
if(FtpRename( oldName.latin1(), newName.latin1(),conn) == 0) {
QString msg;
msg.sprintf(tr("Unable to rename file\n")+"%s",FtpLastResponse(conn));
msg.replace(QRegExp(":"),"\n");
QMessageBox::message(tr("Note"),msg);
}
QCopEnvelope ( "QPE/System", "notBusy()" );
remoteDirList( (const QString &)currentRemoteDir); //this also calls populate
}
}
void OpieFtp::localRename()
{
QString curFile = Local_View->currentItem()->text(0);
InputDialog *fileDlg;
fileDlg = new InputDialog(this,tr("Rename"),TRUE, 0);
- fileDlg->inputText = curFile;
+ fileDlg->setTextEdit((const QString &)curFile);
fileDlg->exec();
if( fileDlg->result() == 1 ) {
QString oldname = currentDir.canonicalPath() + "/" + curFile;
QString newName = currentDir.canonicalPath() + "/" + fileDlg->LineEdit1->text();//+".playlist";
if( rename(oldname.latin1(), newName.latin1())== -1)
QMessageBox::message(tr("Note"),tr("Could not rename"));
}
populateLocalView();
}
void OpieFtp::currentPathComboActivated(const QString & currentPath) {
if (TabWidget->currentPageIndex() == 0) {