summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
Commit message (Collapse)AuthorAgeFilesLines
* Allow QDir::mkpath() to work on QNX QNet pathsMatt Hoosier2013-09-251-1/+8
| | | | | | | | | | | | | | | | Due to a quirk in the way that QNX's mkdir() implementation reports return values when the requested pathname is the mountpoint of a QNet filesystem, the usual recursive directory creation algorithm used by QDir fails if the destination directory happens to exist inside QNet. This is an artificial failure; the desired directory can still be created with the normal mkdir() algorithm. There just needs to error handling in place to allow the recursive creation of parents to recognize this situation. Change-Id: I350fd9cb39858570032f9146c1154a9287701569 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add tracing to logging frameworkhjk2013-09-253-5/+370
| | | | | | | | | Change-Id: I4d5b9a24a214785019ff1238c1790ead79205b15 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix WinCE/MSVC2008 build errors related to std::lower_bound patches.Sérgio Martins2013-09-251-0/+5
| | | | | | | See QTBUG-33473 for more information about this compiler bug. Change-Id: I13b945350fdc38165c1515f0cdd75a53cf37cd6c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix a crash in QProcess signal handling on Mac.Friedemann Kleint2013-09-251-1/+2
| | | | | | | | On Mac, SA_SIGINFO can be set while the handler is SIG_DFL. Change-Id: Ibaeaa1612e27217826841d7400309c45b5a101ea Initial-patch-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove qBinaryFind usages from QtCoreGiuseppe D'Angelo2013-09-231-4/+5
| | | | | | | | This is done per the mailing list discussion at http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I6207982c08c92f3e01fb236d2e7546a1c9acd287 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Merge "Merge branch 'stable' into dev" into refs/staging/devSergio Ahumada2013-09-213-14/+52
|\
| * Merge branch 'stable' into devSergio Ahumada2013-09-213-14/+52
| |\ | | | | | | | | | Change-Id: I37d85631ab1165ab91457d8880c4da907a9df73b
| | * Fix QFileSystemWatcher inotifyRiccardo Ferrazzo2013-09-192-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On linux using QFileSystemWatcher with inotify backend when a watched file is moved and added again to the watched files its path is not replaced with the new one. This behavior prevents the emission of the fileChanged signal with the wrong file path. Task-number: QTBUG-33211 Change-Id: Ib45d8efdf5afbf8b8f6b4b26e43f3d6ee740aca6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Fix sigchld-HandlerH. Rittich2013-09-171-9/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed the sigchld-Handler such that the SA_SIGINFO flag is handeled correctly. Furthermore the signal mask is preserved such that the original signal handler is not interrupted when not allowed. Task-number: QTBUG-32979 Change-Id: Iec7663e7289ea5d95155f52cf8788ebf646cfabd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Fix some doc errors.Frederik Gladhorn2013-09-211-1/+1
|/ / | | | | | | | | | | | | Change-Id: Ib874d7e9671d9cee75fe41f4dac5d0de7b09245e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Add Mac type conversion functions to QtCoreMorten Johan Sørvig2013-09-214-0/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New API: static QString QString::fromCFString(CFStringRef string); CFStringRef QString::toCFString() const; static QString QString::fromNSString(const NSString *string); NSString *QString::toNSString() const; static QUrl QUrl::fromCFURL(CFURLRef url); CFURLRef QUrl::toCFURL() const; static QUrl QUrl::fromNSURL(const NSURL *url); NSURL * QUrl::toNSURL() const; Add Q_OS_MAC-protected function declarations to header files, add implementation to _mm files. CF and NS types are forward-declared in the header files to avoid including the CoreFoundation and Foundation headers. This prevents accidental use of native types in application code. Add helper macros for forward- declaration to qglobal.h Add cf_returns_retained/ns_returns_autoreleased attributes to toCFString() and toNSURL(). These attributes assists the clang static analyzer. Add Q_DECL_ helper macros to qcompilerdetection.h. Add test functions (in _mac.mm files) to the QString and QUrl tests. Split out the test class declarations into a separate headers files. Change-Id: I60fd5e93f042316196284c3db0595835fe8c4ad4 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Use the correct identifier for the OS X operating system.Jake Petroules2013-09-211-3/+3
| | | | | | | | | | | | | | | | This is consistent with other areas of Qt: qmake, Qt.platform.os (QML), qbs.targetOS (QBS), and #define Q_OS_OSX. Change-Id: Ibf98e6ba3556a14187dadae1b0235e9c907c9001 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Import qlogger frameworkKai Koehne2013-09-206-2/+1010
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge most parts of the qlogger framework from git://gitorious.org/qtplayground/qlogger.git The categorized logging feature is a replacement for qDebug, qWarning and friends. With logging statements in an app/library, a developer can turn on the statements they care about and turn off the ones they don't. Most work for this was done by Wolfgang Beck and Lincoln Ramsay. Task-number: QTBUG-25694 Change-Id: Ib0cdfbbf3694f86ad9ec553b2ea36f09a477cded Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QT_NO_PROCESS for WinRTOliver Wolff2013-09-201-12/+15
| | | | | | | | | | | | | | | | | | | | | | As Windows Runtime does not really support the use of spawning processes QT_NO_PROCESS is defined for winrt builds and the corresponding sources are excluded from build. Change-Id: I79263417c985b23678c55ac44a5591a9a69d3c13 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Change QT_FILE_SELECTORS to be comma separatedAlan Alpert2013-09-201-5/+1
| | | | | | | | | | | | | | | | | | | | It is not full paths being used, so switching to comma does not require different environment variables per platform nor does it appear to be platform dependent. Change-Id: I219517d740fa7385e923a9e09cb7e241378f85ba Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | Add QFileSelector APIAlan Alpert2013-09-164-2/+544
| | | | | | | | | | | | | | | | | | | | | | | | | | For easy cross-platform and cross-device UIs, automatic asset swapping based on filename is being developed. This API provides the logic for the swapping, so that applications can use it themselves with the same logic as any automatic swapping done in application templates. Selector set is initially minimal, aiming for just platform selection and enabling a common selection mechanism for Qt platforms to use. Change-Id: I219517d740fa7385e923a9e09cb7e241378f857a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge "Merge branch 'stable' into dev" into refs/staging/devSergio Ahumada2013-09-141-2/+0
|\ \
| * | Merge branch 'stable' into devSergio Ahumada2013-09-131-2/+0
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/concurrent/qtconcurrentmedian.h src/corelib/itemmodels/qabstractitemmodel.cpp Change-Id: Iac46a90bbb2958cef7670031a4b59c3becd8538a
| | * Fix the internal QDir sortingGiuseppe D'Angelo2013-09-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If two items are equal according to the current sorting criterion, the sorting predicate uses the address of the items to break the tie. The problem is that the items themselves are being moved during the sort; therefore, this will break the Strict Weak Ordering that std::sort requires. For instance, suppose to be sorting case-insensitively the following array: ("b", "a", "A") Simulating a swapped-based sorting can lead to: Array before Evaluated predicate Array after ("b", "a", "A") "a" < "A" (1) ("b", "a", "A") ^ ^ ("b", "a", "A") "b" < "A" (2) ("A", "a", "b") ^ ^ ("A", "a", "b") "A" < "a" (3) (XXXXXXXXXXXXX) ^ ^ (1) True, because of the array ordering (they're equal otherwise) (2) False: swap them (3) True, because of the array ordering (they're equal otherwise) (1) and (3) say that "a" < "A" and "A" < "a", SWO gets violated, leading to undefined behavior. This problem was causing QFileSystemModel autotests failures (cf. [1]) after switching to STL algorithms instead of using qSort. The array to be ordered in that case is ("a", "c", "C"), cf. tst_QFileSystemModel::caseSensitivity. (STL algorithms are much smarter than good ol' quicksort in qSort; if we're ordering on an array which fits in a cache line, they turn to the much faster (~1 robe) insertion sort. Violating SWO with a quick sort usually just gets to a non-sorted container; insertion sort is implementable in ways that rely on SWO, otherwise they will overflow the iterator; cf. Cormen/Leiserson/Rivest and the other literature on the topic.) This commit reverts commit fa5f3a44 (in Qt 4). [1] http://testresults.qt-project.org/ci/QtBase_dev_Integration/build_01749/linux-g++_shadow-build_Ubuntu_11.10_x86/log.txt.gz Change-Id: I5d8ac0d0907675c501717969abee2816b41eca18 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | | Add a static QFileInfo::exists(fileName) functionhjk2013-09-133-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids dynamic construction of the private class. According to the benchmark we go from 4,550 to 3,900 instruction reads per iteration. (without change 32629676 the baseline is 5,600) Change-Id: I5df925e30dbd49bdde87173e481820574ce5abe1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add a note on symlink behavior of QFile::existshjk2013-09-131-0/+3
|/ / | | | | | | | | | | Change-Id: I41ede0536f1b7093a7cde3d74a5e221df413aeea Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix typo in note on symlink behavior of QFileInfo::existshjk2013-09-131-2/+2
| | | | | | | | | | Change-Id: Iacd957cd9cd04e9153efd826bb42d872f8963f75 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | QUrl: ensure that setPath("//path") doesn't lead to scheme://pathDavid Faure2013-09-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | which would interpret 'path' as a hostname. The check is in the public setPath so that the internal one can still support parsing URLs such as ftp://ftp.example.com//path. [ChangeLog][Important Behavior Changes][QUrl and QUrlQuery]QUrl now normalizes the path given in setPath, removing ./ and ../ and duplicate slashes. Change-Id: I05ccd8a1d813de45e460384239c059418a8e6a08 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-09-101-1/+5
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2013-09-071-1/+5
| |\| | | | | | | | | | Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
| | * Windows: Fix compilation with MinGW-64, gcc 4.8.1Friedemann Kleint2013-08-291-1/+5
| | | | | | | | | | | | | | | | | | | | | A definition for FILE_ID_128 was added. Change-Id: Ifdfe5da1b15a90afdf5cf09d92838a04b1cf5c19 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | | Normalise and deduplicate paths for XDG_DATA_DIRSMartin Klapetek2013-09-091-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the trailing slashes from the path and then removes dirs set twice in XDG_DATA_DIRS (always removes those from the right side). There's no use for duplicit dirs in XDG_DATA_DIRS because if whatever is being looked up is not found in the duplicated dir the first time, it won't be there the second time. Currently it causes troubles for example in mime types, where it returns duplicated mime types as the same dir is searched multiple times. For obtaining the original value of XDG_DATA_DIRS, one can use qgetenv("XDG_DATA_DIRS"). Change-Id: Ic4f8ef6c6fe096555948e318899207e9d4ca8289 Reviewed-by: David Faure KDE (deprecated, use kdab instead) <faure@kde.org>
* | | Remove qSort usage from QSettingsGiuseppe D'Angelo2013-09-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I5aabfd2dd4fa48a4d94407ca444591e9df7b981d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | | Constify QDirSortItemComparator::operator() (used for sorting)Giuseppe D'Angelo2013-09-091-2/+2
|/ / | | | | | | | | | | Change-Id: I7149ec2fdabdfcfa7d6f28b1105da154a333096f Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | add QProcess::InputChannelModeOswald Buddenhagen2013-09-055-10/+75
| | | | | | | | | | | | | | | | | | | | | | this enables forwarding standard input from the parent process. Change-Id: I7ee72b9842acc96320d4da693b95dd15d9a7b4d4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | add QProcess::Forwarded{Output,Error}ChannelOswald Buddenhagen2013-09-054-6/+36
| | | | | | | | | | | | | | Change-Id: Ifc5ed20c38f3228ef25c28681f296d0456b61abe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | make the pipe setup code less convolutedOswald Buddenhagen2013-09-051-16/+21
| | | | | | | | | | | | | | Change-Id: Ied870c892cc3dbbf24a3d9416f685e51a74e5c17 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* | never create a console for command line tools launched from gui appsOswald Buddenhagen2013-09-051-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 219b0d217 fixed forwarding of stdio to a console. unfortunately, it also forced the creation of a console in the first place if there was none, which is not part of the contract. instead, give the child process a window (== console) only we we already have one. this can be done irrespective of our channel mode, which has the nice side effect that an explicit redirection to a console would now also work. Change-Id: Id25cab5da1ac1cc8ce452127ff95bac8d0a0fea8 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* | remove redundant conditionOswald Buddenhagen2013-09-051-3/+2
| | | | | | | | | | | | | | ForwardedChannels implies that both stdoutReader and stderrReader are null. Change-Id: I9d5f02d3a1eac62316a6016b90c612d716ecaafc Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Remove qSort usage from QIODeviceGiuseppe D'Angelo2013-09-041-1/+3
| | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: If9fbcaf714f10659a3571f9e55ab913a85538038 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Get rid of qSort usages in QDirGiuseppe D'Angelo2013-09-041-2/+2
| | | | | | | | | | | | | | | | QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I951a2b9b16fce9d6d29cca0012cdeb06cad79fce Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | add QProcess::nullDevice()Oswald Buddenhagen2013-08-302-0/+29
| | | | | | | | | | | | Change-Id: I15273fa3f3ba323a835350153f2a20404f12420b Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QDateTime - Improve and expose Qt::OffsetFromUtcJohn Layt2013-08-282-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Qt::OffsetFromUtc TimeSpec was made public in Qt 4.4 but the access methods were never made public in the apidox effectively meaning the feature was never used. The implementation was also incomplete and inconsistent. This change cleans up the implementation and exports new public API for using the TimeSpec using new method names consistent with the new QTimeZone support. This change increases the QDataStream Version number for Qt 5.2 to 15. The behavior of one constructor has changed slightly to be consistent with the rest of the feature, but this behavior was never documented. [ChangeLog][QtCore][QDateTime] Fully implement support for Qt::TimeSpec of Qt::OffsetFromUTC, added new methods for offsetFromUTC(), toTimeSpec(), and toOffsetFromUTC(). Task-number: QTBUG-26161 Task-number: QTBUG-29666 Change-Id: If3cc7fc9778ca2b831644408ae749448d5975a3a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | Fix name of configure flag in QSettings documentation.Christian Kandeler2013-08-231-1/+1
| | | | | | | | | | | | | | It's "-sysconfdir", with one hyphen. Change-Id: I62ddece98ee23989ae8d1881feb375e30d872190 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | QUrl: Use decoded mode by default for individual getters/setters.David Faure2013-08-212-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the wrong value for path() and fileName() when a path or file name actually contains a '%'. userInfo() and authority() are not individual getters, they combine two or more fields, so full decoding isn't possible (e.g. username containing a ':'). [ChangeLog][Important Behavior Changes][QUrl and QUrlQuery]QUrl now defaults to decoded mode in the getters and setters for userName, password, host, topLevelDomain, path and fileName. This means a '%' in one of those fields is now returned (or set) as '%' rather than "%25". In the unlikely case where the former behavior was expected, pass PrettyDecoded to the getter and TolerantMode to the setter. Change-Id: Iaeecbde9c269882e79f08b29ff8c661157c41743 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QUrl: fix host(FullyDecoded), it shouldn't trigger EncodeUnicode.David Faure2013-08-211-2/+5
| | | | | | | | | | Change-Id: I9a62d5eb8b099b659cfcfc591c983b3d73ca9569 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-141-3/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-xcode/Info.plist.app mkspecs/macx-xcode/Info.plist.lib qmake/doc/qmake.qdocconf src/corelib/global/qglobal.h tests/auto/other/exceptionsafety/exceptionsafety.pro tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
| * Fix crash in QProcess::waitForStarted() on Unix.Christian Strømme2013-08-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Invoking waitForStarted() on a QProcess before or after an unsuccessful call to start() (e.g., with an empty command), would execute FD_SET with an invalid file descriptor and cause the process to abort. The bug can be reliably reproduced on OSX. Task-number: QTBUG-32958 Change-Id: Id25b7781168489281645e21571361ca1a71d43e3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add a Qt-API style QStandardPaths::setTestModeEnabledThiago Macieira2013-08-092-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QStandardPaths::enableTestMode has a verb in the imperative ("enable") as the core word in the name. That indicates an action. The function should not have had a parameter. Instead, add a Qt-style setXXXEnabled function. [ChangeLog][QtCore][QStandardPaths] QStandardPaths::enableTestMode is deprecated and is replaced by QStandardPaths::setTestModeEnabled. Change-Id: Ib26ad72d7c635890d2cb22ae9d44cbda08a6f17c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: David Faure (KDE) <faure@kde.org>
* | QUrl: do not decode "#" in fragmentsThiago Macieira2013-08-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some time, we've assumed that the URL specification had a mistake in that it didn't allow the "#" character to appear decoded in the fragment. We've gotten away with it so far. However, turns out that the CoreFoundation NSURL class doesn't like it. So we have to be stricter. [ChangeLog][Important Behavior Changes][QUrl and QUrlQuery] QUrl no longer decodes %23 found in the fragment to "#" in the output of toString(QUrl::FullyEncoded) or toEncoded() Task-number: QTBUG-31945 Change-Id: If5e0fb37bae84710986c9ca89bd69ec98437cd63 Reviewed-by: David Faure (KDE) <faure@kde.org>
* | Make sure that QUrl::FullyDecoded mode uses U+FFFD for bad UTF-8Thiago Macieira2013-08-041-0/+23
| | | | | | | | | | | | | | | | It's a good practice to always replace bad UTF-8 sequences with the replacement character. It could be considered a security issue too. Change-Id: I9e7d72e4c4102cdb8334449b5e7f882228a9048f Reviewed-by: David Faure (KDE) <faure@kde.org>
* | Remove fully-decoded QUrl user info and authority sectionsThiago Macieira2013-08-041-28/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Those sections contain more than one components of a URL, separated by delimiters. For that reason, QUrl::FullyDecoded and QUrl::DecodedMode do not make sense, since they would cause the returned value to be ambiguous and/or fail to parse again. In fact, there was a comment in the test saying "look how it becomes ambiguous". Those modes are already forbidden in the setters and getters of the full URL (setUrl(), url(), toString() and toEncoded()). [ChangeLog][Important Behavior Changes][QUrl and QUrlQuery] QUrl no longer supports QUrl::FullyDecoded mode in authority() and userInfo(), nor QUrl::DecodedMode in setAuthority() and setUserInfo(). Change-Id: I538f7981a9f5a09f07d3879d31ccf6f0c8bfd940 Reviewed-by: David Faure (KDE) <faure@kde.org>
* | QUrl: remove temporary codeThiago Macieira2013-08-041-3/+0
| | | | | | | | | | | | | | | | | | The setting of EncodeDelimiters was temporary until we could remove the old qt_urlRecode "decode all" mode (not the FullyDecoded mode, that stays). Change-Id: Ic07ebe4bb7fc72351b65bfb4619b71206cc8c0cd Reviewed-by: David Faure (KDE) <faure@kde.org>
* | Doc: update the QUrl and QUrlQuery documentationThiago Macieira2013-08-042-28/+102
| | | | | | | | | | | | | | | | Just minor fixes and changes in wording, to support the new understanding of the percent-encoded characters. Change-Id: I77ec10e41f32292d705e4aa8197b9ddce5bef6d2 Reviewed-by: David Faure (KDE) <faure@kde.org>
* | QUrlQuery: update our understanding of delimitersThiago Macieira2013-08-042-35/+27
| | | | | | | | | | | | | | | | | | | | | | | | This commit is similar to the previous commit that changed the behavior of QUrl, but now to QUrlQuery. We can now remove a section of qt_urlDecode, which is no longer used: there's no "decode everything" mode anymore. Task-number: QTBUG-31660 Change-Id: I66cfbfd290eeba5b04688cd5ffd615dd57cc6309 Reviewed-by: David Faure (KDE) <faure@kde.org>