summaryrefslogtreecommitdiffstats
path: root/src/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Merge 5.14 into 5.14.2Kari Oikarinen2020-03-109-87/+116
|\ | | | | | | Change-Id: Ib4b26bad47a850cde6253fb3422aae34b2cf622b
| * QSortFilterProxyModel doc: do not mention deprecated function reset()Christian Ehrlicher2020-03-091-2/+3
| | | | | | | | | | | | | | | | | | | | QSFPM::reset() is deprecated and begin/endResetModel() should be used. Therefore adjust the documentation to reflect this. Fixes: QTBUG-82470 Change-Id: I786b3f25e5674d97d0ef6a0c91342973d5e952e9 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * Port from deprecated std::is_pod to is_trivial + is_standard_layoutMarc Mutz2020-03-062-2/+4
| | | | | | | | | | | | | | | | The std::is_pod trait is deprecated in C++20; is_trivial and is_standard_layout exist since C++11. Change-Id: I4b901d8edf1a55001764445aee9c338d3dc23b21 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * QLibrary: introduce a mutex to protect non-atomic internalsThiago Macieira2020-03-035-52/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And make pHnd atomic. The majority of the variables is updated in QLibraryPrivate::load_sys and updatePluginState(), which get the mutex protection. QLibraryPrivate::unload_sys() doesn't need a mutex protection because we have the refcounting. [ChangeLog][QtCore][QLibrary & QPluginLoader] Fixed a number of race conditions caused by having two QLibrary objects pointing to the same library being operated in different threads. Fixes: QTBUG-39642 Change-Id: I46bf1f65e8db46afbde5fffd15e1a5b3f5e74ea4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * QLibrary: stop setting errorString after resolve()Thiago Macieira2020-03-032-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | resolve() is technically thread-safe if the library has been loadaed. We don't promise that, but it's there. More importantly, because QLibraryPrivate is shared among QPluginLoader and QLibrary that point to the same file, we can't thread-safely set the error string. [ChangeLog][Important Behavior Changes] QLibrary::resolve() will no longer set or clear the error string based on the success of finding the symbol. The error string will reflect the result of loading the library. Change-Id: I46bf1f65e8db46afbde5fffd15e1a4f4c2713c17 Reviewed-by: David Faure <david.faure@kdab.com>
| * QPluginLoader: rework the loading and the caching of instanceThiago Macieira2020-03-033-22/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a race condition in accessing the cached instance factory member, so rework loadPlugin() to return the cached or newly discovered instance, with proper, atomic caching. Because I had to change that, I took the opportunity to fix the QFactoryLoader code that calls loadPlugin(). Note that QLibraryPrivate::loadPlugin() returns non-nullptr now if the instance is known, which means the last return in QPluginLoader::load() will convert to true, not false, if the instance got cached between the earlier check and the call to loadPlugin(). That's probably what was intended. Task-number: QTBUG-39642 Change-Id: I46bf1f65e8db46afbde5fffd15e1a42d2b6cbf2c Reviewed-by: David Faure <david.faure@kdab.com>
* | QLibraryInfo: avoid unneeded conversion for path prefixKirill Burtsev2020-03-041-8/+6
|/ | | | | | | | | | | Ammends 4ac872639e. Change return type for getPrefix to eliminate toLatin1/fromLocal8bit conversion of initial value for relocatable prefix to preserve not-latin1 characters and return valid prefix path. Fixes: QTBUG-81462 Change-Id: I15cfa49e9e440e257b04dd31803cd1478f3b07f5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QObject: treat T* -> bool conversions as narrowingMarc Mutz2020-02-261-0/+4
| | | | | | | | | | | | | | | | | | | | Following wg21.link/LWG3228, it was found that a proper variant fix requires that T* -> bool conversions be treated as narrowing conversions in subclause wg21.link/dcl.init.lst. wg21.link/P1957R2 was accepted in Prague 2020 as a DR and retroactively applies to older C++ standards. Since we hard-code the algorithm of [dcl.init.lst], we can and must add this manually. [ChangeLog][QtCore][QObject] For the purposes of QT_NO_NARROWING_CONVERSIONS_IN_CONNECT, pointer (incl. pointer-to-member) to bool conversions are now considered narrowing. This matches the resolution of a defect report in C++ itself. Change-Id: Ifa9a3724c9c8ccd3dd6614928dbbe37477591dc1 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Use QT_DEPRECATED_X instead of Q_DECL_DEPRECATED_XThomas Sondergaard2020-02-253-12/+12
| | | | | | | | | Allow deprecation warnings to be controlled with QT_NO_DEPRECATED_WARNINGS. Fixes: QTBUG-82424 Change-Id: I6df55ee2abaf4c141ac9b0e7661e46ba3706b20e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Replace usage of std::result_of with decltypeMårten Nordheim2020-02-211-1/+1
| | | | | | | | It's slated for removal in c++20 Fixes: QTBUG-82240 Change-Id: I7b35c151413b131ca49b2c09b6382efc3fc8ccb6 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QString: Add missing number() crosslinks to setNum()Andre Hartmann2020-02-201-0/+6
| | | | | | Change-Id: I22a4c86034b399782115bb078c298b211095476a Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* wasm: add platform qsettingsLorn Potter2020-02-185-31/+276
| | | | | | | | | | | | | | Since the backend is async, the settings will not be ready to read/write instantly as on other platforms, but only be ready after the filesystem has been synced to the sandbox. This takes at least 250 to 500 ms. The QSettings status() or isWritable() can be used to discern when the settings are ready for use. This also fixes a crash in threaded wasm Task-number: QTBUG-70002 Change-Id: I080bdb940aa8e9a126d7358b524f32477db151b6 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: fix crash when qtvkb tries to load a pluginLorn Potter2020-02-161-1/+1
| | | | | | | | | | We do not have dlopen, harfbuzz seems to try and load the thai plugin using dlopen when just iterating through the language selector in virtualkeyboard.. Fixes: QTBUG-78825 Change-Id: Iee064a1d9a628784e3ce46d641cd157a69bcb696 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Only read the first BOM as a BOM; the rest are ZWNBS !Edward Welbourne2020-02-141-0/+1
| | | | | | | | | | QUtf32::convertToUnicode() was forgetting to set headerdone when it dealt with the header (for contrast, Utf16::convertToUnicode() does). Fixes: QTBUG-62011 Change-Id: Ia254782ce0967a6cf9ce0e81eb06d41521150eed Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QUrl doc: Fix typoFabian Kosmale2020-02-141-1/+1
| | | | | Change-Id: I76cd27ac07d09bd2ea9b818d34d1882230f66b10 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* QLinkedListData: Move Q_CORE_EXPORT from class to shared_nullThiago Macieira2020-02-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This makes no difference for the IA-64 C++ ABI nor for MSVC until MSVC 2019 16.6. But it does with 16.6, where the std::atomic constructor becomes non-trivial, which makes QtPrivate::RefCount non-trivial, which makes QLinkedListData non-trivial. Before this change: User code \ Qt MSVC <=16.5 MSVC >=16.6 MSVC <=16.5 works works MSVC >=16.6 fails works With this change, they should all work. The list of symbols exported should not change either, so linking against a Qt compiled with MSVC <=16.5 should continue to work. [ChangeLog][MSVC] Fixed a compatibility issue found when linking code compiled with version 16.6 to a Qt compiled with 16.5. Fixes: QTBUG-81727 Change-Id: If79a52e476594446baccfffd15ee771397467f8b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QStringView: Fix warning about conversion from qsizetype to intThiago Macieira2020-02-131-1/+1
| | | | | | Fixes: QTBUG-81764 Change-Id: If79a52e476594446baccfffd15eecb9d9e578118 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Doc: Fix documentation for QSortFilterProxyModel::filterAcceptsColumnPaul Wicking2020-02-121-6/+2
| | | | | | | | | | filterAcceptsColumn always returns true unconditionally and must be reimplemented (overridden) by user code to achieve the described behavior. Change the documentation to reflect this fact. Fixes: QTBUG-81654 Change-Id: I0dade63294598238d2ad54ab251b4c1b27c72cdf Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* QStorageInfo/Linux: resolve non-existent devices via /dev/blockThiago Macieira2020-02-091-3/+18
| | | | | | | | | | | | | | | | | On systems with very simple boot sequences, the kernel will create a device called /dev/root and use that to mount the root filesystem. However, that doesn't actually exist in /dev and could cause confusion. So we try to resolve using /dev/block if the /dev entry does not exist but udev is in use (udevd has the string "/dev/%s/%u:%u"). [ChangeLog][QtCore][QStorageInfo] Improved discovery of device nodes on Linux if the /dev entry was renamed after the filesystem was mounted and udev is in use. Fixes: QTBUG-81464 Change-Id: If79a52e476594446baccfffd15eec573ae3deb0d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: QPersistentModelIndex cannot be stored in a QStandardItemVolker Hilsheimer2020-02-061-0/+3
| | | | | | | | | | | As discussed in the bug report, making sure that the reference counts are correct in such scenarios adds substantial complexity to the code, only to support a bad use-case for which QStandardItemModel was not designed. Change-Id: I663b490ed3471875386add17e7eadb7d8df50489 Fixes: QTBUG-78142 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Coding style: put case bodies on separate lines from the case labelEdward Welbourne2020-02-051-12/+25
| | | | | | | | | While the single-line-case format is more readable when consistently applied through the whole switch, it works less well when several of the cases are too complex to fit on a single line. Change-Id: I6a84a3d3d1493dadddab103da0336a8ef860563c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Take care of NULL data from QStringView in QCollatorEdward Welbourne2020-02-054-4/+24
| | | | | | | | | | | | | Back-ends need to catch NULL data so as not to call system APIs with invalid pointers. [ChangeLog][QtCore][QCollator] Fixed a regression introduced in 5.14.0 that caused QCollator not to operate with default-constructed QStrings and print a warning on Windows. Fixes: QTBUG-81673 Change-Id: I2eafe1e188b436afcca3cf2ecdf98bba707c44c9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qfloat16: include the tables in AVX2 binaries regardlessThiago Macieira2020-02-031-1/+1
| | | | | | | | | | | | Having a QtCore build optimized for AVX2 does not imply all user binaries and libraries are optimized the same way. Most of them will actually have been built for the base platform, which means they require access to these tables to operate if they are using qfloat16. Introduced by 5e40d3d982d014cd01db4dbe6aecc6ea6baf840a. Change-Id: If79a52e476594446baccfffd15ee2da9e3693cce Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Enable system locale to skip digit-grouping if configured to do soEdward Welbourne2020-02-033-15/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | On macOS it's possible to configure the system locale to not do digit grouping (separating "thousands", in most western locales); it then returns an empty string when asked for the grouping character, which QLocale's system-configuration then ignored, falling back on using the base UI locale's grouping separator. This could lead to the same separator being used for decimal and grouping, which should never happen, least of all when configured to not group at all. In order to notice when this happens, query() must take care to return an empty QString (as a QVariant, which is then non-null) when it *has* a value for the locale property, and that value is empty, as opposed to a null QVariant when it doesn't find a configured value. The caller can then distinguish the two cases. Furthermore, the group and decimal separators need to be distinct, so we need to take care to avoid cases where the system overrides one with what the CLDR has given for the other and doesn't over-ride that other. Only presently implemented for macOS and MS-Win, since the (other) Unix implementation of the system locale returns single QChar values for the numeric tokens - see QTBUG-69324, QTBUG-81053. Fixes: QTBUG-80459 Change-Id: Ic3fbb0fb86e974604a60781378b09abc13bab15d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fall back to "+" if MS returns empty string for positive signEdward Welbourne2020-02-031-1/+11
| | | | | | | | | | | MS's documentation says empty means "+" here, so implement that fallback (which shall over-ride whatever the CLDR has given us for the fallbackUiLanguage's positive sign). Task-number: QTBUG-81530 Change-Id: Ic3f10dd061d0c46d1433f29b8065988da94c38e6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qlocale_win.cpp: distinguish empty QString from null QVariantEdward Welbourne2020-02-031-26/+29
| | | | | | | | | | | | | | | | | An empty string, when packaged as a QVariant, is non-null (as a QVariant); and QSystemLocale::query()'s callers care about the difference. Some callers of the internal getLocaleInfo(LCTYPE type, int maxlen) need an actual QString return, while others are what query() returns, so need to return a QVariant; where the former want an empty string, the latter need a null QVariant. So make that getLocaleInfo() into a template, so callers can chose QString or QVariant as return type, only affecting the failure returns. Change-Id: I7b9a698badedc0e0d8aef8c6e85c22931c33297a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Win: work around (estimated) 32k char limit for OutputDebugStringOliver Wolff2020-02-021-5/+25
| | | | | | | | | | | | Reaching a certain number of characters, OutputDebugString will just eat the string and not give any output. As there is no way of handling that error properly we divide the string into usable chunks. Fixes: QTBUG-80996 Change-Id: Ic7ef34c48c212cbaec3a03790d1020506b7b4319 Reviewed-by: Miguel Costa <miguel.costa@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix 'the the' typo in commentsLinus Jahn2020-02-023-3/+3
| | | | | Change-Id: I00fcb1c2374e7ca168b6240f9d41c0323fb0867c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Check for (__ARM_FP & 2) to verify 16-bit FP supportAllan Sandfeld Jensen2020-02-011-1/+1
| | | | | | | | | | | | It appears __ARM_FP16_FORMAT_IEEE is sometimes incorrectly set, and we need to double-check that 16-bit floating point is available in the __ARM_FP macro as well. Task-number: QTBUG-68314 Fixes: QTBUG-81461 Change-Id: I878d6b286aa31e21271163dc6c8f8038b9534c76 Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Pass QDate and QTime by value in various static and local functionsEdward Welbourne2020-01-314-9/+9
| | | | | | | They're value types, so pass them as such. Change-Id: I0dc46c63a3a0e6d859b821362f71390f0148b64c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLockFile: Disable flock() on QNXThiago Macieira2020-01-301-1/+2
| | | | | | | | | | | | | | It appears it's not implemented. [ChangeLog][QtCore][QLockFile] Suppressed the warning on QNX that said 'setNativeLocks failed: "Function not implemented"'. There is no difference in behavior: Qt will continue not to be able to apply an OS- level file lock, which means the lock could be accidentally stolen by buggy software. Correct software using QLockFile should not be affected. Fixes: QTBUG-81701 Change-Id: If79a52e476594446baccfffd15ee35bbac6c6e47 Reviewed-by: David Faure <david.faure@kdab.com>
* Fix flawed logic in QSystemLocalePrivate::getLocaleInfo()Edward Welbourne2020-01-301-3/+3
| | | | | | | | | | | If the first call to GetLocaleInfo() returned non-zero, then GetLastError()'s return has nothing to do with GetLocaleInfo(), since it didn't fail. The check for ERROR_INSUFFICIENT_BUFFER as last error needs to happen in the branch where GetLocaleInfo() failed, returning zero. Change-Id: Idb6eaad1515a003133c787998aff0c265ef98251 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Change examples and snippets to pass QDate and QTime by valueEdward Welbourne2020-01-302-3/+3
| | | | | | | They're value types, so we should show them being used as such. Change-Id: If9f0c366fac66306b7861f04e2f047540d444acc Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Simplify textdate/datestring #if-eryEdward Welbourne2020-01-301-20/+8
| | | | | | | | Since datestring implies textdate, we don't need to check the latter inside the #if-ery of the former. Change-Id: I01e648245bc7707db024eac925092ed816173781 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix qt5_make_output_file macro for file base names with dotsJoerg Bornemann2020-01-301-1/+8
| | | | | | | | | | | | | The qt5_make_output_file macro returns the wrong outfile for infiles containing multiple dots in the file name, e.g. 'foo.bar.h'. To fix this we need to use get_filename_component(... NAME_WLE) which is available since CMake 3.14. Re-implement the NAME_WLE functionality for older CMake versions by using multiple get_filename_component calls. Fixes: QTBUG-80295 Change-Id: Ib8e11a69a41ba7f6739eb3d5541ce8f6f59dc18c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Add since version to enum value documentationPaul Wicking2020-01-302-16/+17
| | | | | | Fixes: QTBUG-80980 Change-Id: I707c4f45d45cb088fb7419038a448d29a2e8dbf5 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Merge remote-tracking branch 'origin/5.14.1' into 5.14Liang Qi2020-01-283-10/+84
|\ | | | | | | | | | | | | | | Conflicts: mkspecs/features/create_cmake.prf Done-With: Artem Pisarenko <artem.k.pisarenko@gmail.com> Change-Id: I2ecb9fdca06fe687be8ab3457a58dd81e5e81c4c
| * Doc: QPluginLoader: remove the claim we search the current dirThiago Macieira2020-01-181-1/+1
| | | | | | | | | | | | | | | | Commit bf131e8d2181b3404f5293546ed390999f760404 removed it and it's a good thing. Change-Id: Idc3fae4d0f614c389d27fffd15ea245420035e66 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
| * QLibrary/Unix: do not attempt to load a library relative to $PWDThiago Macieira2020-01-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I added the code in commit 5219c37f7c98f37f078fee00fe8ca35d83ff4f5d to find libraries in a haswell/ subdir of the main path, but we only need to do that transformation if the library is contains at least one directory seprator. That is, if the user asks to load "lib/foo", then we should try "lib/haswell/foo" (often, the path prefix will be absolute). When the library name the user requested has no directory separators, we let dlopen() do the transformation for us. Testing on Linux confirms glibc does so: $ LD_DEBUG=libs /lib64/ld-linux-x86-64.so.2 --inhibit-cache ./qml -help |& grep Xcursor 1972475: find library=libXcursor.so.1 [0]; searching 1972475: trying file=/usr/lib64/haswell/avx512_1/libXcursor.so.1 1972475: trying file=/usr/lib64/haswell/libXcursor.so.1 1972475: trying file=/usr/lib64/libXcursor.so.1 1972475: calling init: /usr/lib64/libXcursor.so.1 1972475: calling fini: /usr/lib64/libXcursor.so.1 [0] Fixes: QTBUG-81272 Change-Id: I596aec77785a4e4e84d5fffd15e89689bb91ffbb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Merge 5.14 into 5.14.1Kari Oikarinen2020-01-1520-123/+189
| |\ | | | | | | | | | Change-Id: Ie90edfd16f48e1907fd18288473ac403f62b9032
| * | QSequentialIterableImpl: support appendFabian Kosmale2020-01-151-8/+80
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-80916 Change-Id: I87e74da0ce454e56b5fe94d9db3693a587d35edf Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | updateSystemPrivate(): fix handling of empty string as non-null QVariantEdward Welbourne2020-01-231-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSystemLocale::query() can return an empty string for PositiveSign on Windows, apparently. In any case, we shouldn't be taking .at(0) of a QString without checking it's non-empty. Fixes: QTBUG-81530 Change-Id: I4d496a2650362f225d02998bd7b8be9fd783edb4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | QXmlStreamReader: fix memory leakGiuseppe D'Angelo2020-01-232-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some inputs a QXmlStreamReaderPrivate may allocate another QXmlStreamReaderPrivate as its entityResolver. Which, recursively, may allocate yet another one. This "chain" of QXmlStreamReaderPrivate objects was managed using raw pointers, and a leak was possible by resetting one of these pointers to nullptr without freeing the corresponding object. Change-Id: I2c6e1f023a2ed68b2b1857db25c53cce7f6bd3e7 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* | | QXmlStreamReader: early return in case of malformed attributesGiuseppe D'Angelo2020-01-231-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | There's no point at keep raising errors after encountering the first malformed attribute. Change-Id: Idb37e577ea96c3bd850b3caf008fe3ecd57dd32e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Fix QLocale::system() and uiLanguages() for the mobile platformsAndy Shaw2020-01-222-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On iOS, it was no longer using the Cocoa specific code needed to get the locale and uiLanguages information so this functionality is brought back as it was accidently lost. In addition, this has a side-effect of fixing a problem with Android versions below API 24 where it has no UiLanguages functionality so it gets the information based on the system locale as a fallback. Fixes: QTBUG-81307 Fixes: QTBUG-81357 Change-Id: I1709675b5bd5e9cedefb99eaec28279f20a347a4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | macOS: Work around CoreFoundation failing to resolve bundle resourcesTor Arne Vestbø2020-01-221-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a framework is loaded from a Samba share CoreFoundation will fail to resolve its Resources directory, and hence its Info.plist, which means we can't look up the bundle by id. Until this has been fixed in CoreFoundation and/or the macOS Samba implementation we work around it by manually looking for QtCore. This fixes our particular use-case of finding QtCore so we can resolve the relocatable prefix, but there's still a potential issue if any other code tries to use CF for bundle lookups. We don't seem to have any of those in Qt itself, but this should be kept in mind if we see similar issues in the future. Change-Id: I8fd471e44f6afe33a7459ce550f0fcec9acfefb4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | macOS: Remove doc references to the Carbon frameworkTor Arne Vestbø2020-01-221-1/+1
| | | | | | | | | | | | | | | Change-Id: I4d496acfc3d810d6334baba99cd697168bef0b75 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Doc: Fix qdoc compilation errors qtbaseNico Vertriest2020-01-175-5/+4
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-79824 Change-Id: I5a39525e3e735415ba96e2d585c5de754deb15de Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | | Fix MS-Win system locale code to return QString for numeric tokensEdward Welbourne2020-01-161-35/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QSystemLocale::query() is specified to return a QString (wrapped in a QVariant) for the various tokens used in formatting numbers (zero digit, signs, separators) but the MS-Win back-end was returning QChar (wrapped as QVariant) instead, using the first UCS-2 code-point of the string (even if this was the first of a surrogate pair). The same error shall be perpetrated by its caller, but we can at least DTRT in the back-end, ready for the coming fix (in Qt 6) to its caller. In the process, eliminate some local variables that shadowed a member variable and adapt number-conversion to cope with surrogate-pair digits. Optimised the latter for the case where zero is "0". Change-Id: Idfb416c301add4c961dde613b3dc28b2e31fd0af Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QRegularExpression: fixup docs of wildcardToRegularExpressionGiuseppe D'Angelo2020-01-151-2/+6
| |/ |/| | | | | | | | | | | | | | | | | Fix a couple of typos, and add a paragraph explaining that there is no need of anchor the pattern again; a wildcard is always anchored. Fixes: QTBUG-81396 Change-Id: Ia67dc7477a05a450bdcc3def1ebbacce2006da4d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>