summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Doc: make a note about use of QStringLiteral with non-ASCII charsThiago Macieira2018-01-221-1/+5
| | | | | | | | | | | | | | | | | Both ICC and MSVC have bugs concatenating strings and that's despite the standard giving an example ([lex.string] table 9) that says that u"a" "b" is the same as u"ab" We can't change to preprocessor concatenation (u ## STR) because that fails when QStringLiteral is used with a macro instead of an actual string literal. Task-number: QTBUG-65479 Change-Id: I39332e0a867442d58082fffd1504a0a868c291ef Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Support for Q_OS_ANDROID_EMBEDDED and android-embedded build flagsOtto Ryynänen2018-01-2010-24/+24
| | | | | | | | | | | | The Embedded Android build (Boot to Qt Android injection) is defined by having both Q_OS_ANDROID and Q_OS_ANDROID_EMBEDDED flags defined, as well as having Qt config android-embedded. This commit enables the possibility to build embedded Android builds. (i.e. Qt build for Android baselayer only, without JNI) Change-Id: I8406e959fdf1c8d9efebbbe53f1a391fa25f336a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Handle OOM condition in the validation of plugin metadataAndre de la Rocha2018-01-191-8/+21
| | | | | | | | | | | | | | | | | | | | | | A large plugin dll (e.g., one with many MB of debug info) could cause a 32-bit application to crash when the entire dll file could not fit within the address space of the process. The code for validating a plugin library and retrieving metadata from it first tried to map the entire file in memory, which failed for large files, returning NULL. In this case, the code tried then to read the entire file via QFile::readAll(), which deep below caused a bad_alloc exception in malloc, resulting in the termination of the application. This change handles the case where the library could not be mapped into memory, in spite of memory mapping being supported, by reporting the error and returning false, making the plugin unavailable. [ChangeLog][QtCore][QPluginLoader] Fixed a bug that would cause the Qt plugin scanning system to allocate too much memory and possibly crash the process. Task-number: QTBUG-65197 Change-Id: I8c7235d86175c9fcd2b87fcb1151570da9b9ebe3 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Doc: Mention exact Qt version the third party attributions apply toKai Koehne2018-01-191-3/+4
| | | | | | | | | | | | | | | | We do add, remove or update third party code in minor releases, sometimes even in patch level releases. However, the documentation is supposed to be valid for all existing Qt 5 versions, but doing this for attributions would require infrastructure we don't have. Therefore rather make it explicit which Qt version the attributions apply to. Also mention since when Qt is available under LGPLv3 (starting with Qt 5.4). Task-number: QTBUG-65665 Change-Id: I328b5bf0c143f78ea61aad51f0644c3cbb6dee49 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix QMacTimeZonePrivate::previousTransition() for early after epochEdward Welbourne2018-01-181-18/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The native APIs don't support previous transition, only next after a stipulated date. The prior code started its search at the epoch; if used for a time before the first transition after the epoch, this found no transitions so returned invalid data, when the last transition before the epoch would have been suitable. It also wound through all transitions since the epoch, on its way to the selected time, which was potentially laborious. Instead, start a year before the stipulated time; this should get a transition if the zone uses DST. If it doesn't, start with the first known transition and binary-chop our way to one within a year of the last before the stipulated time; then wind forward one transition at a time, as before. The chopping is actually faster than binary: each time we find a transition after the interval mid-point but early enough, we move the early end of our interval to the transition, which is later than the old interval's middle. Using halving, starting with a vast interval, should thus only incur modest cost, while ensuring we give up early when no transition data is available at all or the zone's first transition ever was after the stipulated time. Task-number: QTBUG-65443 Change-Id: I96c14540fc2600837e6a22e480fb8dc36cb37220 (cherry picked from commit 7c0b706488b0edcc2fd6db7870db700ff0548f21) (cherry picked from commit a090076e93487f8e461d9b866b9da1c0c21cb59b) Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Jason Dolan <jason.t.dolan@gmail.com>
* Win: Document limitation regarding registry types not being preservedAndy Shaw2018-01-181-0/+5
| | | | | | | | | | | | QSettings does not preserve the original key type in the registry, it will set the type for the key based on the value that is being set. Therefore we should make it clear that existing key types will be overridden as this can cause some problems with types we do not directly support (such as REG_EXPAND_SZ). Task-number: QTBUG-2894 Change-Id: Ib2f2eed02759591e69fefb98a4a1f3cf897dd5cb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QProcess/Windows: Include PID in pipe namesFrank Richter2018-01-181-1/+1
| | | | | | | | | | | | | | | | Although qt_create_pipe() tries again if the pipe name is already in use, it doesn't handle the case when another user has created the pipe with the name (the error is "access denied" in that case). The chance that it happens is small, but it can be entirely eliminated by including a unique part in the pipe name, in this case the PID. [ChangeLog][Windows] Named pipes internally created by QProcess now contain the PID in their name to ensure uniqueness. Change-Id: I079f1b68695c1ddea3eccad241061d11e08b60f4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QThreadPool: Add missing semicolon after class in documentationAndre Hartmann2018-01-171-1/+1
| | | | | | | Makes it easier to copy and paste the snippet into a code editor. Change-Id: I27c0a7aa268bd4fd0af885e929f67a28f083dabf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Prevent O(n^2) behavior when calling QObject::deleteLaterErik Verbruggen2018-01-163-14/+31
| | | | | | | | | | | | | | When a deleteLater event is queued, a check if done if the same event for the same receiver is queued before by scanning all pending events. This leads to quadratic behavior, which is quite noticeable. By using an unused bit in QObjectData, this can be prevented. Now the duplicate event scanning in QCoreApplication is only done for the quit event. Task-number: QTBUG-65712 Change-Id: Ie505acbbec802f91ebd0b94ac067e362c2476113 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix memory leak in QStandardPaths::displayName() on Apple platformsJake Petroules2018-01-121-2/+2
| | | | | | | Task-number: QTBUG-65687 Change-Id: Ie795c8ac715e36656dabcbcdf8976d303ebaf0d1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Merge remote-tracking branch 'origin/5.9.4' into 5.9Liang Qi2018-01-112-12797/+13273
|\ | | | | | | Change-Id: Ic23e90146470d69060313628562f76a710696bab
| * Update qurltlds_p.hAllan Sandfeld Jensen2018-01-052-12797/+13273
| | | | | | | | | | | | | | | | | | It has been a while and it is supposed to be updated at every release. [ChangeLog][Third-Party Code] Updated top level domain-list from Mozilla Change-Id: Ifd3e5fe33166e793908b3ce28d29a507b483dd8a Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Document Q_COREAPP_STARTUP_FUNCTION is no good in static libsLaszlo Agocs2018-01-101-0/+4
| | | | | | | | | | Change-Id: Iaffa08332c87095a64e25e2da4ed56bfd3d0e84f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | CMake: qt5_add_binary_resource: re-run if neededKevin Funk2018-01-091-1/+1
|/ | | | | | | | | | | qt5_add_binary_resources() macro did not recompile for CMake generated input before this patch. Adding the input files to the DEPENDS option corrects this issue: Task-number: QTBUG-60714 Change-Id: I0f46918c6f1079fed7ee1b21305b18ff38f863f8 Reviewed-by: David Faure <david.faure@kdab.com>
* Fix source code file permissionsSimon Hausmann2018-01-021-0/+0
| | | | | | | | Fix permissions after commit ffc8409aa58c04c1dd140001976b55925ac959f6 - our source files are not executable. Change-Id: Idc5103704256b6f73857b645c323492beaabe879 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QMap: fix another UB (invalid cast) relating to QMap's endThiago Macieira2017-12-271-2/+2
| | | | | | | | | | | | | Like in commit 75cdf654bcc192ba73a8834e507583a59140e7e4, we use the pointer value of the QMap header (which is of type QMapNodeBase) as a sentinel. It's never dereferenced. In that commit, the issue was calling end() directly; in here, it happens when iterating forward from any element, which means nextNode() can reach back to the header. However, using static_cast is wrong, so we use reinterpret_cast. Change-Id: I39332e0a867442d58082fffd15040317704a87ce Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* qfloat16: NaN is not infiniteThiago Macieira2017-12-271-2/+2
| | | | | | Change-Id: I39332e0a867442d58082fffd1502b7010424f0f8 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Use AccessCheck for current user effective file permissionsDyami Caliri2017-12-211-9/+55
| | | | | | | | | | | | | On Windows, QFileInfo.isWritable() was returning true in situations where the file would only be writable with elevated privileges. Using AccessCheck instead of GetEffectiveRightsFromAcl to get the correct results. Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io> Done-with: Edward Welbourne <edward.welbourne@qt.io> Task-number: QTBUG-30148 Change-Id: I7a3468ac069bf782ca312078e3a84107b6cd468c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add more code examples to QUrl documentationMitch Curtis2017-12-211-5/+105
| | | | | | | | | Code examples make it much easier to learn how an API behaves. One area that the patch tries to address is the distinction between a relative URL and a relative path. Change-Id: Ife52172816b89afb6cd810b07d3573480e2cd747 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Don't crash with null receiver/context in new-style connectsSergio Martins2017-12-191-1/+1
| | | | | | | | | old style connects have protection against null sender and null receiver, but new style only had against null sender. Change-Id: Ie555ac078412918e60c3b60830fe1f3abfb7f5af Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix pps and imf support for QNX buildsKarim Pinter2017-12-192-2/+2
| | | | | | | Change from config to feature in the json and pro files. Change-Id: I58ddac3c4ad739253bae010f1d5023fc1d481047 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Derive QPpsObjectPrivate from QObjectPrivateKarim Pinter2017-12-151-1/+3
| | | | | | | | Fixes 5d4089299ab4c39463e228e5896a3010268a36f2 commit, which was causing a build break if qnx pps is enabled. Change-Id: I8c29f48bde0187a9db02d6325e8a9a0fae760bcb Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Allow empty namespace URIPaul Olav Tvete2017-12-141-1/+0
| | | | | | | | | | W3C Namespaces Standard states that "The attribute value in a default namespace declaration MAY be empty" (secion 6.2). Analysis and fix thanks to Eugenio Rustico. Task-number: QTBUG-63538 Change-Id: Icd8d4df639b9737d8e0d215bf2bea56fe1e161ac Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix assert when emitting a signal from a different threadJesus Fernandez2017-12-141-2/+4
| | | | | | | | | | | | | If a signal is emitted more than once in a multithreaded application the QSignalEventGenerator::execute function asserts in the check for a valid signal index. It happens after abandoning the state and all the connections are disconnected. If we have pending signal to be processed the QObject::sender() won't be able to resolve the sender object. Task-number: QTBUG-61463 Change-Id: I9d4b7266c6dddc9ff2e7453b05a6989876ccb332 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Copy argv[0] to prevent it pointing to invalid memory laterAndy Shaw2017-12-141-3/+3
| | | | | | | | | | | If QCoreApplication is recreated, it is possible the previous argv[0] pointer has become invalid, so we should not rely on it. So to prevent that, we copy the original argv[0] to a static QByteArray. Task-number: QTBUG-58919 Change-Id: Idadd4cb78e4281830165fb681ea7925109f316ff Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Teach QPlatformWindow about safe area margins and implement for iOSTor Arne Vestbø2017-12-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | The safe area margins of a window represent the area that is safe to place content within, without intersecting areas of the screen where system UI is placed, or where a screen bezel may cover the content. QWidget will incorporate the safe area margins into its contents margins, so that they are are never smaller than the safe area margins. This can be disabled by unsetting the Qt::WA_ContentsMarginsRespectsSafeArea widget attribute, which is set by default. QLayouts will automatically use the contents area of a widget for their layout, unless the Qt::WA_LayoutOnEntireRect attribute has been set. This can be used, along with a contents margin of 0 on the actual layout, to allow e.g. a background image to underlay the status bar and other system areas on an iOS device, while still allowing child widgets of that background to be inset based on the safe area. [ChangeLog][iOS/tvOS] Qt will now take the safe area margins of the device into account when computing layouts for QtWidgets. Change-Id: Ife3827ab663f0625c1451e75b14fb8eeffb00754 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix a bug in the generation of the Unicode joining property dataLars Knoll2017-12-132-12/+12
| | | | | | | | | | | The code that was supposed to initialize the joining property of characters to the correct defaults was actually applied after reading in the data from the Unicode file, and was in a couple of cases overwriting explicitly specified data in ArabicShaping.txt Task-number: QTBUG-63191 Change-Id: Ie35261039b2211a827322ca11afacd9555ccefc7 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Fix typoOliver Wolff2017-12-132-3/+3
| | | | | Change-Id: If6111c59b958ba03f6ec5966af5cf443cae5cf9b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QString: fix documentation of NUL-termination of unicode(), data(), constData()Marc Mutz2017-12-132-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (or lack thereof). * `QString::utf16()` reallocates if `*this` has been constructed using `fromRawData()`. * `QString::data()` ensures a writable string, so will detach from raw data. * `QString::unicode()`, `constData()`, and `data() const` do not. They just return `QStringData::data()`, which may point to raw, non-NUL-terminated data. These functions can therefore not possibly have the same behavior, but were documented the same. Fix. Also drop the discussion of operator[](size()), as that, too, was not correct, and anyone who indexes with op[] beyond size() - 1 should not rely on proper behavior. [ChangeLog][QtCore][QString] QString::unicode(), constData() and `data() const` do not return a NUL-terminated string. This was true before, but the documentation claimed the opposite. Change-Id: I1437f57cd02bdf80264e8559608b46aa749c23a8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNX: fix slog2 for QNX7Samuli Piippo2017-12-132-2/+2
| | | | | | | | | | Change the include header to sys/slog2.h, which is available in both QNX 6.6.0 and 7. Task-number: QTBUG-64033 Change-Id: I26d8c5451376bab33e11f4784ca772f84cd6fc28 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add a "shim" to allow use of Clang 5's __builtin_available everywhereJake Petroules2017-12-086-9/+146
| | | | | | | | | | | This is mostly relevant for Apple platforms, where we can use the new unguarded availability warnings to guarantee that proper version checks are present when using APIs that are not necessarily available on the deployment target. Change-Id: Ie408704b2924e1220491a9ea30f0141dfa4867d9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry-picked from 70422449ef892d7cc3086d88e5e9e43c771e2bc3)
* Use a custom QAnimationDriver to take control over timeJan Arve Sæther2017-12-021-2/+2
| | | | | | | This should reduce flakyness of tests. Change-Id: I26e0a97f7cd3e7cee2ffb44188300c37578cddd7 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* QFutureWatcher: Use nullptr as a default value in constructorAlexander Volkov2017-12-011-1/+1
| | | | | | | ... to make user code buildable with gcc [-Werror=zero-as-null-pointer-constant]. Change-Id: I309953acd7154511660302aa9826410276cfe41b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* [doc] Document QString{,Ref}::split() behavior with empty 'sep'Marc Mutz2017-11-292-16/+28
| | | | | | | We actually test for this already in tst_QString::split(). Change-Id: I35fe8f90900ea9c8e6251facdb3326b9226348d0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix aliasing problem in QVector::removeAll()Marc Mutz2017-11-281-2/+3
| | | | | | | | | | | | Since removeAll() takes its argument by cref, if passing a reference to an element of the container to removeAll(), the element may be deleted (overwritten) by anyother value, leading to UB. Add a test that actually happens to fail for me without the patch, even though that might not be guaranteed (we may invoke UB). Change-Id: If8c795113aeb515f4a9bdf1e072395b932295667 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Initialize QLoggingRegistry rules on first useTor Arne Vestbø2017-11-253-4/+3
| | | | | | | | | | Allows categorized logging before QCoreApplication has been created, which otherwise would silently fail to output anything because the category would never be enabled, despite QT_LOGGING_RULES being set. Change-Id: I1861e5366ea980dff2ffa753b137276c77278eee Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.9.3' into 5.9" into ↵Thiago Macieira2017-11-251-3/+5
|\ | | | | | | refs/staging/5.9
| * Merge remote-tracking branch 'origin/5.9.3' into 5.9Liang Qi2017-11-231-3/+5
| |\ | | | | | | | | | Change-Id: I9add7e07ff1b6a1cf52f59dbb8319f30e114e5fc
| | * QSemaphore: fix regression when the timeout < 0Thiago Macieira2017-11-141-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issue was introduced by eaee1209f0ead5be786e81db8aee604ccfea85b0, so it affected only 5.9.2. [ChangeLog][QtCore][QSemaphore] Fixed a regression that would make tryAcquire() not to wait forever if the timeout was a negative value. Note: new code is advised to only use -1 to indicate "forever", as some other functions taking timeout periods do not accept other values. Task-number: QTBUG-64413 Change-Id: I57a1bd6e0c194530b732fffd14f58fce60d5dfc9 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | QFlags: support enum classes in setFlag()Giuseppe D'Angelo2017-11-241-1/+1
|/ / | | | | | | | | | | | | Unary ~ is not defined for enum classes, so we need a cast. Change-Id: I79d495ebcc24ab960da8dae3be08eb307a9de448 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Windows: Resolve QStandardPaths config location without qApp instanceTor Arne Vestbø2017-11-221-2/+11
| | | | | | | | | | | | | | | | | | | | | | Calling QCoreApplication::applicationDirPath() requires an app instance, but on Windows the implementation just relies on qAppFileName(), which does not require any instance. As resolving the standard paths could be needed before QCoreApplication instantiation, e.g. for categorized logging, we use qAppFileName() directly. Change-Id: Id882cebd528bcb8e945e73a83f1dc3d599b74d1d Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | Fix the build when AVX2 is enabled but __F16C__ isn't definedThiago Macieira2017-11-221-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If -mavx2 is used, __AVX2__ is defined, which enables the F16C code after commit 280e321e52fd4e86545f3f0d4bd4e047786a897e, but that was wrong since we aren't allowed to use the F16C intrinsics with either Clang or GCC (we can only do that with GCC 4.9 and Clang 4.8, and only with an __attribute__ decoration). With ICC and MSVC, we are allowed to use the intrinsics, but the #include was missing. [ChangeLog][QtCore] Fixed a compilation issue with qfloat16 if AVX2 support is enabled in the compiler. Since all processors that support AVX2 also support F16C, for GCC and Clang it is recommended to either add -mf16c to your build or to use the corresponding -march= switch. Task-number: QTBUG-64529 Change-Id: I84e363d735b443cb9beefffd14b8ac1fd4baa978 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | CMake: Set SKIP_AUTOMOC/AUTOUIC where neededKevin Funk2017-11-221-2/+7
| | | | | | | | | | | | | | | | | | | | Make sure we don't run into warnings for CMake 3.10 Task-number: QTBUG-63442 Change-Id: Ida004705646f0c32fb4bf6006036d80b1f279fd7 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Sebastian Holtermann <sebholt@xwmw.org> Reviewed-by: Rolf Eike Beer <eb@emlix.com>
* | Doc: Be more specific on full stop in QVersionNumberKai Koehne2017-11-081-2/+2
|/ | | | | | | So far we just write ... '.'. , which looks weird. Change-Id: Iac6fc781c80976994ea0a182b55958baa39a7e52 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Change fallthrough detection order to fix clang detectionHelio Chissini de Castro2017-11-071-3/+3
| | | | | | | | | | | | Clang compiler defines fallthrough, but wrongly detects QT_HAS_CPP_ATTRIBUTE(fallthrough). This makes compiler breaks compilation due clang be expecting clang::fallthrough. Change the order makes the exceptions. clang/gnu, been tested before the generic, setting then proper defines at end. LLVM-bug: https://bugs.llvm.org/show_bug.cgi?id=33518 Change-Id: Ic287e9028936af3bdade5c1ee319ca8914b36ea7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qGlobalQHashSeed: initialize the seed before returning itThiago Macieira2017-11-041-0/+1
| | | | | | | | | If you had never used QHash before, this function returned -1. That's not useful if you're trying to implement your own QHash that uses Qt's global seed. Change-Id: Ib0e40a7a3ebc44329f23fffd14b2e875b970a55c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QFilesystemWatcher/Windows: Use event dispatcher of threadFriedemann Kleint2017-11-041-2/+2
| | | | | | | | | | | | | | Previously, the native event filter listening on removable drivers was installed on QCoreApplication::eventDispatcher() which led to a mismatch when launched from a non-GUI thread since ~QAbstractNativeEventFilter() removes itself from QAbstractEventDispatcher::instance(). Amends 45580aa92557caa4f3f5be783573ddb80602e494, e612fe8d47bc0fe762668617a5189117ad1aee15. Task-number: QTBUG-64171 Change-Id: Icbe289bd585f124d66989d0cd574040b986e680c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QStorageInfo: Properly decode labels from /dev/disk/by-labelChristian Ehrlicher2017-11-041-1/+33
| | | | | | | | | | udev encodes the labels for /dev/disk/by-label/ with ID_LABEL_FS_ENC which is done with blkid_encode_string(). This function encodes some unsafe 1-byte utf-8 characters as hex (e.g. '\' or ' ') Task-number: QTBUG-61420 Change-Id: If82f4381d348acf9008b79ec5ac7c55e6d3819de Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrl: make sure setPort(nonnegative) is taken as part of authorityThiago Macieira2017-10-261-8/+6
| | | | | | | | | | | There were a couple of corner cases where doing setPort() would result in QUrl thinking that an authority was not present. Since the full URL parsing implies that a host is always present if the authority is present, then we also imply that setting the port number makes the host be present too. Change-Id: I69f37f9304f24709a823fffd14e67c12da18d69f Reviewed-by: David Faure <david.faure@kdab.com>
* Fix clazy-strict-iteratorsFriedemann Kleint2017-10-251-1/+1
| | | | | Change-Id: I9276a85f0a8061b2636687cf694b8ed1abaa18b8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>