summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper/logindialog.cpp
blob: 67479e6f04db52594a67830d373b4d2ed195e97e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <qlineedit.h>

#include "logindialog.h"

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.isEmpty()?"":user) );
    passLine->setText( (pass.isEmpty()?"":pass) );
    _user = user;
    _pass = pass;

    if ( user.isEmpty() ) {
        userLine->setFocus();
    } else {
        passLine->setFocus();
    }
}

void LoginDialog::accept()
{
    //_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();
}