summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkaccessftpbackend.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove QFtp sources etc. in favor of alternate distributionMårten Nordheim2020-08-271-436/+0
| | | | | | | | | | | | While we initially wanted to just disable the functionality the way it is currently built forces people to do a full build of Qt just to enable it. Instead of doing this half-measure let's just remove the code completely from QtBase and rather prepare QtNetwork to handle being a plugin that can be compiled at any time. Task-number: QTBUG-80340 Change-Id: I19155c8c167cf932088f01b2a9706d0e7ab792d1 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Make feature datetimeparser depend on feature datestringEdward Welbourne2020-07-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | No client of QDateTimeParser actually uses it unless datestring was enabled, nor is it any use without datestring. Various methods conditioned on datestring are broken unless datetimeparser is enabled. We can't condition public API on datetimeparser, as it's a private feature, but client code can condition use of it on the private feature. All string-to-date/time conversions that use a string format (this includes all locale-specific formats) depend on feature datetimeparser. Change #if-ery (or add it) in all client (including test) code to test the right feature. Tidied up some code in the process. Killed some already-redundant textdate #if-ery. Renamed a test whose name claimed it involved locale, which it doesn't, in the course of #if-ing it. This simplifies the condition for feature datetimeedit (which overtly depended on textdate, redundantly since it depends on datestring which depends on textdate; its dependence on datetimeparser now makes its dependency on datestring also redundant). It also removes the need for assorted datestring checks in QDateTimeParser itself. Change-Id: I5dfe3a977042134b2cfb16cbcc795070634e7adf Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Remove bearermanagement usage inside QNAM and QNetworkProxyMårten Nordheim2020-04-011-4/+0
| | | | | Change-Id: I2c4fdf598b46daf1b69a65848ebe0fd78ef8be24 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNetworkAccessManager: deprecate bearer related functionsMårten Nordheim2020-01-301-1/+1
| | | | | | | | | | | | In Qt6 QNAM will no longer use bearer in any way so we deprecate it now. Also mark bearermanagement-conditioned sections for removal in Qt6, the _q_networksession property is part of how QNAM passes the QNetworkSession around. Task-number: QTBUG-81609 Change-Id: I04aad9dd96482c6822dffba1b9af7aa58961149c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Tidy nullptr usageAllan Sandfeld Jensen2019-12-061-6/+6
| | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* FTP: Workaround for servers without HELP command supportJesus Fernandez2019-04-291-1/+6
| | | | | | | | | | | | | | | Ignores errors produced by the HELP command. It will continue executing the commands sent to QFtp when a server does not have a HELP command implemented. Commands SIZE, MDTM, and PWD are not going to be used if the HELP command failed. [ChangeLog][QtNetwork][QNetworkAccessManager] Don't fail when FTP does not implement the HELP command. Task-number: QTBUG-69477 Change-Id: I0ebd51b134535730c6bef83de1abf1a427b8d2ce Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix: "Emit keyword being used with non-signal"Alessandro Portale2019-02-121-1/+1
| | | | | | | [-Wclazy-incorrect-emit] Change-Id: I21f69d7f6b161d70a687ab17b2821a595c113ec7 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-09-271-1/+1
|\ | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/widgets/util/qcompleter.cpp Change-Id: I4f44f0f074982530f2f2e750ce696230b2754cf3
| * Modernize the "datestring" featureLiang Qi2018-09-241-1/+1
| | | | | | | | | | | | Change-Id: I2236a456fe3758d9054b22e36fe6316f3522d533 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | ftp backend: Dynamically resolving resource path with URL prefixRyan Chu2018-02-191-4/+57
|/ | | | | | | | | | | | | | | | | | | | | | | | | | The code used to retrieve FTP resource with the path of QUrl as an absolute URL starting from the root directory. It is not always working with a relative URL because the root directory and working directory may be different. Depending on the implementation of FTP server, the reference directory of a relative URL could be either the root directory or the working directory. To resolve it, a new state “ResolvingPath” is added to resolve resource paths before retrieving. For both GET and PUT operations supported by QNetworkAccessFtpBackendFactory, the resource will be retrieved via its URL path. Depending on the prefix of the URL path, the path of working directory is prepended to the resource path as an absolute path starting with the working directory. If a URL path starts with “//” or “/%2F” user-input prefix, the resource will be retrieved by an absolute path starting with the root directory. If a path starts with /~/ or the working directory prefix, its resource will be retrieved from the working directory. Task-number: QTBUG-25034 Change-Id: I26198af1c0077f51565afd3f96050235c661f063 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-09-261-4/+0
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h src/plugins/platforms/cocoa/qcocoawindow.h src/testlib/qtestsystem.h Change-Id: I5975ffb3261c2dd82fe02ec4e57df7c0950226c5
| * Convert features.ftp to QT_[REQUIRE_]CONFIGStephan Binner2017-09-061-4/+0
| | | | | | | | | | | | | | | | QUrlInfo is used only by the FTP implementation, so it uses the same conditionals. Change-Id: Ia15abf44d2a538e90b792a31c65926cc9e16aecf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-191-1/+1
|/ | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix reusing FTP connection after abortJesus Fernandez2017-04-071-1/+1
| | | | | | | | | | | The QNetworkAccessCache was keeping the connection alive and it was trying to reuse it for subsequent calls to download files from the same server. After closing the connection, it is not usable anymore and a new one should be created. Task-number: QTBUG-40368 Change-Id: I1a0d08956a94eb36f39d14112cdcab6c1e2add82 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Optimize string usageAnton Kudryavtsev2016-07-151-6/+3
| | | | | | | | Use QStringBuilder more. Use QL1S directly, without QString construction. Change-Id: Iad844391367681fc1013b9725403d009e7c346e6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QtNetwork: eradicate Q_FOREACH loops [rvalues]Marc Mutz2016-05-041-1/+2
| | | | | | | | | | | | | ... by replacing them with C++11 range-for loops. This is the simplest of the patch series: Q_FOREACH took a copy, so we do, too. Except we don't, since we're just catching the return value that comes out of the function (RVO). We can't feed the rvalues into range-for, because they are non-const and would thus detach. Change-Id: I42c9c44d948ab1512a69d42890187bc3cf2d7e58 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-031-1/+1
| | | | | | | | | | Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* refactor disconnectFromFtp to remove cached entries when necessaryMatt Broadstone2014-08-151-11/+9
| | | | | | | | | | | | | | | | In cases where a cached ftp connection fails to connect, or a file transfer has failed, we should removed the cached connection. Since qnam has an idea of a single internal QFtp per full operation, when file transfers failed previously the cached connection would be reused for subsequent connections and thus fail. [ChangeLog][QtNetwork][QNetworkAccessManager] QNetworkAccessManager now properly handles FTP transfer failures by removing failed cached ftp connections. Task-number: QTBUG-40797 Change-Id: Ie090a39ceddd7e58a0d8baf7d01f2a08c70162e5 Reviewed-by: Richard J. Moore <rich@kde.org>
* List the URL schemes supported by QNetworkAccessManagerKevin Ottens2013-04-281-0/+6
| | | | | | | | | | Introducing a new method which allows us to know before hand if an URL scheme will be supported by QNetworkAccessManager. It is especially useful in combination with QFileDialog URL based methods to pass this list as the allowed schemes the user can select in the dialog. Change-Id: If625b045e87959bfd78fea2c9213b69caf506886 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* QNetworkAccessManager - ensure abort reaches QFtpShane Kearns2012-05-031-0/+3
| | | | | | | | | Previously, we just disconnected signals from QFtp and allowed it to continue downloading in the background. Task-number: QTBUG-25494 Change-Id: I891c2fff88ef1ee554d1ccf821a3f7998eeb8406 Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* QNetworkAccessFtpBackend: remove entry from QNetworkAccessCacheMartin Petersson2012-04-011-0/+5
| | | | | | | | | | | When FTP login fails we fail to remove the entry from the cache. This is because the cache key is created from the url with the userInfo. So this needs to be set again to match the key used when inserted. Task-number: QTBUG-11824 Change-Id: Ib3fd2d737581653ae59c56d0810d42e2d8dc2176 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Abort FTP download, not the whole applicationShane Kearns2012-02-151-5/+1
| | | | | | | | | | An old coding error meant that the C runtime abort() function was being called instead of QFtp::abort() when cancelling an FTP download using QNetworkReply::close() Task-number: QTBUG-22820 Change-Id: Ib97fda9769b2b55a08c042c66c4444cb6216d2b1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+382
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12