Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/network/access/qftp.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtNetwork module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    315315    bytesFromSocket.clear();
    316316
    317     if (socket)
     317    if (socket) {
    318318        delete socket;
     319        socket = 0;
     320    }
    319321    socket = new QTcpSocket(this);
    320322    socket->setObjectName(QLatin1String("QFtpDTP Passive state socket"));
     
    870872//    qDebug("QFtpPI state: %d [connected()]", state);
    871873#endif
     874    // try to improve performance by setting TCP_NODELAY
     875    commandSocket.setSocketOption(QAbstractSocket::LowDelayOption, 1);
     876
    872877    emit connectState(QFtp::Connected);
    873878}
     
    12921297    \brief The QFtp class provides an implementation of the client side of FTP protocol.
    12931298
    1294     \ingroup io
     1299    \ingroup network
    12951300    \inmodule QtNetwork
    1296     \mainclass
     1301
    12971302
    12981303    This class provides a direct interface to FTP that allows you to
     
    13411346    their results.
    13421347
    1343     Example: If you want to download the INSTALL file from Trolltech's
     1348    Example: If you want to download the INSTALL file from the Qt
    13441349    FTP server, you would write this:
    13451350
     
    13861391    non-Unix FTP servers.
    13871392
    1388     \sa QHttp, QNetworkAccessManager, QNetworkRequest, QNetworkReply,
     1393    \sa QNetworkAccessManager, QNetworkRequest, QNetworkReply,
    13891394        {FTP Example}
    13901395*/
     
    16591664int QFtp::connectToHost(const QString &host, quint16 port)
    16601665{
    1661     d_func()->pi.transferConnectionExtended = true;
    16621666    QStringList cmds;
    16631667    cmds << host;
    16641668    cmds << QString::number((uint)port);
    1665     return d_func()->addCommand(new QFtpCommand(ConnectToHost, cmds));
     1669    int id = d_func()->addCommand(new QFtpCommand(ConnectToHost, cmds));
     1670    d_func()->pi.transferConnectionExtended = true;
     1671    return id;
    16661672}
    16671673
     
    17221728int QFtp::setTransferMode(TransferMode mode)
    17231729{
     1730    int id = d_func()->addCommand(new QFtpCommand(SetTransferMode, QStringList()));
    17241731    d_func()->pi.transferConnectionExtended = true;
    17251732    d_func()->transferMode = mode;
    1726     return d_func()->addCommand(new QFtpCommand(SetTransferMode, QStringList()));
     1733    return id;
    17271734}
    17281735
     
    17311738    port. Calling this function with \a host empty disables proxying.
    17321739
    1733     QFtp does not support FTP-over-HTTP proxy servers. Use QHttp for
    1734     this.
     1740    QFtp does not support FTP-over-HTTP proxy servers. Use
     1741    QNetworkAccessManager for this.
    17351742*/
    17361743int QFtp::setProxy(const QString &host, quint16 port)
Note: See TracChangeset for help on using the changeset viewer.