From 5af6bb27d2ba6a1d00fd0a6df0550d02164f87e6 Mon Sep 17 00:00:00 2001 From: alwin Date: Fri, 05 Mar 2004 13:14:20 +0000 Subject: moved string parameters for construktor to const references possible problem with not initialized variables fixed --- (limited to 'noncore/net') diff --git a/noncore/net/mail/libmailwrapper/logindialog.cpp b/noncore/net/mail/libmailwrapper/logindialog.cpp index d2c6a07..67479e6 100644 --- a/noncore/net/mail/libmailwrapper/logindialog.cpp +++ b/noncore/net/mail/libmailwrapper/logindialog.cpp @@ -2,11 +2,11 @@ #include "logindialog.h" -LoginDialog::LoginDialog( QString user, QString pass, QWidget *parent, const char *name, bool modal, WFlags flags ) +LoginDialog::LoginDialog(const QString&user,const QString&pass, QWidget *parent, const char *name, bool modal, WFlags flags ) : LoginDialogUI( parent, name, modal, flags ) { - userLine->setText( user ); - passLine->setText( pass ); + userLine->setText( (user.isEmpty()?"":user) ); + passLine->setText( (pass.isEmpty()?"":pass) ); _user = user; _pass = pass; @@ -19,8 +19,11 @@ LoginDialog::LoginDialog( QString user, QString pass, QWidget *parent, const cha void LoginDialog::accept() { - _user.replace( 0, _user.length(), userLine->text() ); - _pass.replace( 0, _pass.length(), passLine->text() ); + //_user.replace( 0, _user.length(), userLine->text() ); + //_pass.replace( 0, _pass.length(), passLine->text() ); + _user = userLine->text(); + _pass = passLine->text(); + qDebug("User im accept: |%s|",_user.latin1()); QDialog::accept(); } diff --git a/noncore/net/mail/libmailwrapper/logindialog.h b/noncore/net/mail/libmailwrapper/logindialog.h index 7a0d1b0..f406f2c 100644 --- a/noncore/net/mail/libmailwrapper/logindialog.h +++ b/noncore/net/mail/libmailwrapper/logindialog.h @@ -8,7 +8,7 @@ class LoginDialog : public LoginDialogUI Q_OBJECT public: - LoginDialog( QString user, QString pass, QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags flags = 0 ); + LoginDialog(const QString&user,const QString&pass, QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags flags = 0 ); QString getUser() { return _user; } QString getPassword() { return _pass; } -- cgit v0.9.0.2