Changeset 561 for trunk/src/network/access/qftp.cpp
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/network/access/qftp.cpp
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the QtNetwork module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 315 315 bytesFromSocket.clear(); 316 316 317 if (socket) 317 if (socket) { 318 318 delete socket; 319 socket = 0; 320 } 319 321 socket = new QTcpSocket(this); 320 322 socket->setObjectName(QLatin1String("QFtpDTP Passive state socket")); … … 870 872 // qDebug("QFtpPI state: %d [connected()]", state); 871 873 #endif 874 // try to improve performance by setting TCP_NODELAY 875 commandSocket.setSocketOption(QAbstractSocket::LowDelayOption, 1); 876 872 877 emit connectState(QFtp::Connected); 873 878 } … … 1292 1297 \brief The QFtp class provides an implementation of the client side of FTP protocol. 1293 1298 1294 \ingroup io1299 \ingroup network 1295 1300 \inmodule QtNetwork 1296 \mainclass 1301 1297 1302 1298 1303 This class provides a direct interface to FTP that allows you to … … 1341 1346 their results. 1342 1347 1343 Example: If you want to download the INSTALL file from Trolltech's1348 Example: If you want to download the INSTALL file from the Qt 1344 1349 FTP server, you would write this: 1345 1350 … … 1386 1391 non-Unix FTP servers. 1387 1392 1388 \sa Q Http, QNetworkAccessManager, QNetworkRequest, QNetworkReply,1393 \sa QNetworkAccessManager, QNetworkRequest, QNetworkReply, 1389 1394 {FTP Example} 1390 1395 */ … … 1659 1664 int QFtp::connectToHost(const QString &host, quint16 port) 1660 1665 { 1661 d_func()->pi.transferConnectionExtended = true;1662 1666 QStringList cmds; 1663 1667 cmds << host; 1664 1668 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; 1666 1672 } 1667 1673 … … 1722 1728 int QFtp::setTransferMode(TransferMode mode) 1723 1729 { 1730 int id = d_func()->addCommand(new QFtpCommand(SetTransferMode, QStringList())); 1724 1731 d_func()->pi.transferConnectionExtended = true; 1725 1732 d_func()->transferMode = mode; 1726 return d_func()->addCommand(new QFtpCommand(SetTransferMode, QStringList()));1733 return id; 1727 1734 } 1728 1735 … … 1731 1738 port. Calling this function with \a host empty disables proxying. 1732 1739 1733 QFtp does not support FTP-over-HTTP proxy servers. Use QHttp for1734 this.1740 QFtp does not support FTP-over-HTTP proxy servers. Use 1741 QNetworkAccessManager for this. 1735 1742 */ 1736 1743 int QFtp::setProxy(const QString &host, quint16 port)
Note:
See TracChangeset
for help on using the changeset viewer.