LoginWindow::LoginWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::LoginWindow)
{
    ui->setupUi(this);
    //set connections
    setConn();
    //test
    ui->lineEditUsername->setText("stefan");
    ui->lineEditpwd->setText("stefan");
//    ui->lineEditUsername->setText("laolv");
//    ui->lineEditpwd->setText("@JCYZ421lzj");
}
Exemplo n.º 2
0
bool FtpCmd :: tryOpen()
{
    int state=ftpconn->state();
    if( state==QFtp::Unconnected || state==QFtp::Closing )
    {
        if( setConn())
        {
            exec();
        }
    }        

    state=ftpconn->state();
    qDebug()<<"connection state:";
    qDebug()<<QVariant(state).toString();
    return not(lastErr.isError());
}
Exemplo n.º 3
0
static void second(HttpConn *conn) {
    setConn(conn);
    render("World\n");
    finalize();
}