summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Change qHash() to work with size_t instead of uintLars Knoll2020-04-09105-258/+253
| | | | | | | | | | | This is required, so that QHash and QSet can hold more than 2^32 items on 64 bit platforms. The actual hashing functions for strings are still 32bit, this will be changed in a follow-up commit. Change-Id: I4372125252486075ff3a0b45ecfa818359fe103b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix the documentation for QHash and QMultiHashLars Knoll2020-04-091-312/+749
| | | | | | Change-Id: Iecf742c5e5bd4716e2d17394770e992024c5bdbb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Optimize QHash when using QHashDummyValueLars Knoll2020-04-091-2/+27
| | | | | | | | This is used by QSet to avoid storing extra data for the value in the Hash. Re-implement the optimization after the changes to QHash. Change-Id: Ic7eba53d1c0398399ed5b25fef589ad62567445f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* new QCache implementationLars Knoll2020-04-093-127/+214
| | | | | | | | Make use of the new features available in QHash and do a more performant implementation than the old one. Change-Id: Ie74b3cdcc9871cd241aca205672093dc395d04a7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* New QHash implementationLars Knoll2020-04-094-1344/+1570
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A brand new QHash implementation using a faster and more memory efficient data structure than the old QHash. A new implementation for QHash. Instead of a node based approach as the old QHash, this implementation now uses a two stage lookup table. The total amount of buckets in the table are divided into spans of 128 entries. Inside each span, we use an array of chars to index into a storage area for the span. The storage area for each span is a simple array, that gets (re-)allocated with size increments of 16 items. This gives an average memory overhead of 8*sizeof(struct{ Key; Value; }) + 128*sizeof(char) + 16 for each span. To give good performance and avoid too many collisions, the array keeps its load factor between .25 and .5 (and grows and rehashes if the load factor goes above .5). This design allows us to keep the memory overhead of the Hash very small, while at the same time giving very good performance. The calculated overhead for a QHash<int, int> comes to 1.7-3.3 bytes per entry and to 2.2-4.3 bytes for a QHash<ptr, ptr>. The new implementation also completely splits the QHash and QMultiHash classes. One behavioral change to note is that the new QHash implementation will not provide stable references to nodes in the hash when the table needs to grow. Benchmarking using https://github.com/Tessil/hash-table-shootout shows very nice performance compared to many different hash table implementation. Numbers shown below are for a hash<int64, int64> with 1 million entries. These numbers scale nicely (mostly in a linear fashion with some variation due to varying load factors) to smaller and larger tables. All numbers are in seconds, measured with gcc on Linux: Hash table random random random random reads full insertion insertion full full after iteration (reserved) deletes reads deletes ------------------------------------------------------------------------------ std::unordered_map 0,3842 0,1969 0,4511 0,1300 0,1169 0,0708 google::dense_hash_map 0,1091 0,0846 0,0550 0,0452 0,0754 0,0160 google::sparse_hash_map 0,2888 0,1582 0,0948 0,1020 0,1348 0,0112 tsl::sparse_map 0,1487 0,1013 0,0735 0,0448 0,0505 0,0042 old QHash 0,2886 0,1798 0,5065 0,0840 0,0717 0,1387 new QHash 0,0940 0,0714 0,1494 0,0579 0,0449 0,0146 Numbers for hash<std::string, int64>, with the string having 15 characters: Hash table random random random random reads insertion insertion full full after (reserved) deletes reads deletes -------------------------------------------------------------------- std::unordered_map 0,4993 0,2563 0,5515 0,2950 0,2153 google::dense_hash_map 0,2691 0,1870 0,1547 0,1125 0,1622 google::sparse_hash_map 0,6979 0,3304 0,1884 0,1822 0,2122 tsl::sparse_map 0,4066 0,2586 0,1929 0,1146 0,1095 old QHash 0,3236 0,2064 0,5986 0,2115 0,1666 new QHash 0,2119 0,1652 0,2390 0,1378 0,0965 Memory usage numbers (in MB for a table with 1M entries) also look very nice: Hash table Key int64 std::string (15 chars) Value int64 int64 --------------------------------------------------------- std::unordered_map 44.63 75.35 google::dense_hash_map 32.32 80,60 google::sparse_hash_map 18.08 44.21 tsl::sparse_map 20.44 45,93 old QHash 53.95 69,16 new QHash 23.23 51,32 Fixes: QTBUG-80311 Change-Id: I5679734144bc9bca2102acbe725fcc2fa89f0dff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Support multiple page ranges in QPrinterSzabolcs David2020-04-0911-103/+476
| | | | | | | | | | | | | | | | Add a new QRangeCollection type to store and manage multiple page ranges. This moves out the parser and validator logic from the platform dependent (UNIX) dialog and makes it publicly available from QPrinter. This improves the usability of QPrinter in those applications which doesn't use print dialog to configure printer. (e.g.: QTextDocument, QWebEnginePage) Change-Id: I0be5a8a64781c411f83b96a24f216605a84958e5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Don't set WindowContextHelpButtonHint by default for dialogs and sheetsVolker Hilsheimer2020-04-093-18/+5
| | | | | | | | | | | | This makes the Qt::AA_DisableWindowContextHelpButton flag obsolete. It is already documented as such in Qt 5, so we can remove it now. [ChangeLog][QtWidgets] Do not show 'What's this' button anymore in dialogs on Windows. To show the button again, you need to set Qt::WindowsContextHelpButtonHint explicitly the top level widget. Change-Id: I30017ca300441cb2ee37940ce97dfe18eb2b118b Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Resolve Qt6 TODO items, replace Median and BlockSizeManagerKarsten Heimrich2020-04-093-181/+14
| | | | | | | | | | | * Replaces the, only internaly used, implementation of template class Median with a fixed size none templated version. * Replaces BlockSizeManager with an updated BlockSizeManager V2, but keeping the original name. * adapt the auto-test to take the fixed size array into account Change-Id: If76cb944676c4a06a7566ad0bc37ded25b81c70c Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Remove some dead codeKarsten Heimrich2020-04-092-46/+0
| | | | | | | Change-Id: I526d9baee260f018cec6076595a28be8596b6395 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QApplication: remove obsolete keypadNavigationEnabled memberVolker Hilsheimer2020-04-092-52/+1
| | | | | | | | QApplicationPrivate::keypadNavigationEnabled remains, and is used in many places in QtWidgets. Change-Id: Id95239560c279850f340f65414acb92202d10367 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* QApplication: remove deprecated keyboardInputLocale/Direction membersVolker Hilsheimer2020-04-091-7/+0
| | | | | Change-Id: I87767cbf16aadb1ee36cfed958b5d6367a565915 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2020-04-08249-2007/+4616
|\
| * Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-08249-2007/+4616
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/doc/src/cube.qdoc src/corelib/global/qlibraryinfo.cpp src/corelib/text/qbytearray_p.h src/corelib/text/qlocale_data_p.h src/corelib/time/qhijricalendar_data_p.h src/corelib/time/qjalalicalendar_data_p.h src/corelib/time/qromancalendar_data_p.h src/network/ssl/qsslcertificate.h src/widgets/doc/src/graphicsview.qdoc src/widgets/widgets/qcombobox.cpp src/widgets/widgets/qcombobox.h tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro tests/manual/diaglib/debugproxystyle.cpp tests/manual/diaglib/qwidgetdump.cpp tests/manual/diaglib/qwindowdump.cpp tests/manual/diaglib/textdump.cpp util/locale_database/cldr2qlocalexml.py util/locale_database/qlocalexml.py util/locale_database/qlocalexml2cpp.py Resolution of util/locale_database/ are based on: https://codereview.qt-project.org/c/qt/qtbase/+/294250 and src/corelib/{text,time}/*_data_p.h were then regenerated by running those scripts. Updated CMakeLists.txt in each of tests/auto/corelib/serialization/qcborstreamreader/ tests/auto/corelib/serialization/qcborvalue/ tests/auto/gui/kernel/ and generated new ones in each of tests/auto/gui/kernel/qaddpostroutine/ tests/auto/gui/kernel/qhighdpiscaling/ tests/libfuzzer/corelib/text/qregularexpression/optimize/ tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/ tests/libfuzzer/gui/text/qtextdocument/sethtml/ tests/libfuzzer/gui/text/qtextdocument/setmarkdown/ tests/libfuzzer/gui/text/qtextlayout/beginlayout/ by running util/cmake/pro2cmake.py on their changed .pro files. Changed target name in tests/auto/gui/kernel/qaction/qaction.pro tests/auto/gui/kernel/qaction/qactiongroup.pro tests/auto/gui/kernel/qshortcut/qshortcut.pro to ensure unique target names for CMake Changed tst_QComboBox::currentIndex to not test the currentIndexChanged(QString), as that one does not exist in Qt 6 anymore. Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
| | * Revert "QCommonStyle::pixelMetric(): Silence warnings about deprecated enum ↵Fabian Kosmale2020-04-081-38/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | values" This reverts commit 82a39f12fa50424fe792b4ff7e7764d98ebabe3e. Reason for revert: Breaks the 5.15 -> dev merge. Failing tests appear in tst_qgridlayout. Change-Id: Ic251df6e06f5505de37376a6b15249762cba5307 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-04-085-28/+14
| | |\ | | | | | | | | | | | | Change-Id: I34a71ddbc6afb1f12a0a044d0d3876e1af58d60c
| | | * Fix build with macOS 10.15 and deployment 10.12André Klitzing2020-04-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | io/qfilesystemengine_unix.cpp:1420:9: error: 'futimens' is only available on macOS 10.13 or newer [-Werror,-Wunguarded-availability-new] if (futimens(fd, ts) == -1) { ^~~~~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/stat.h:396:9: note: 'futimens' has been marked as being introduced in macOS 10.13 here, but the deployment target is macOS 10.12.0 int futimens(int __fd, const struct timespec __times[2]) __API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0)); ^ io/qfilesystemengine_unix.cpp:1420:9: note: enclose 'futimens' in a __builtin_available check to silence this warning if (futimens(fd, ts) == -1) { ^~~~~~~~ Change-Id: Ib52adf7b1ec4f1057d8cb260a00da509429cfaed Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 2f030c2cf3fe368be217c0e0b157e050d1c27afc)
| | | * Purge two old time-zone lookup fallbacksEdward Welbourne2020-04-071-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to need to consult /etc/timezone for the zone name back when Debian, up to Jessie, used a copy of the zoneinfo file as /etc/localtime, instead of a symlink. Jessie's end of life is this May, but Thiago reports that its gcc can't build Qt 5.14, so we may as well remove this fall-back. Newer versions of Debian use a symlink. We used to need to consult /etc/sysconfig/clock for this information back when ancient Red Hat distros copied zoneinfo to /etc/localtime instead of symlinking, but Thiago believes that's now ancient history. So, again, remove this old fallback. Change-Id: I73cb40b926186b311dac6f00fe8743d37a9dfce5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | | * Ensure QTzTimeZonePrivate always tries a non-empty IANA IDEdward Welbourne2020-04-071-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTzTimeZonePrivate::init() was coping with empty and then saving the system ID if the ID it looked up was empty. Better to have its caller ensure it's passed the system ID in place of empty. The system ID is always non-empty, as it falls back to "UTC" if it would otherwise have been empty. Change-Id: I5c74e23f01ef578de0dc1f6d558e9c8c7e65ff53 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | | * QLibrary: fix deadlock caused by fix to QTBUG-39642Thiago Macieira2020-04-063-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit ae6f73e8566fa76470937aca737141183929a5ec inserted a mutex around the entire load_sys(). We had reasoed that deadlocks would only occur if the object creation in instance() recursed into its own instance(), which was already a bug. But we had forgotten that dlopen()/ LoadLibrary() executes initialization code from the module being loaded, which could cause a recursion back into the same QPluginLoader or QLibrary object. This recursion is benign because the module *is* loaded and dlopen()/LoadLibrary() returns the same handle. [ChangeLog][QtCore][QLibrary and QPluginLoader] Fixed a deadlock that would happen if the plugin or library being loaded has load-time initialization code (C++ global variables) that recursed back into the same QLibrary or QPluginLoader object. PS: QLibraryPrivate::loadPlugin() updates pluginState outside a mutex lock, so pluginState should be made an atomic variable. Once that is done, we'll only need locking the mutex to update errorString (no locking before loading). Fixes: QTBUG-83207 Task-number: QTBUG-39642 Change-Id: Ibdc95e9af7bd456a94ecfffd160209304e5ab2eb Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
| | * | H2C - make sure we send the client preface and settingsTimur Pocheptsov2020-04-073-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's required as a response to upgraded protocol and apparently some servers would wait for it, not sending any frames. Becomes a problem in case only one request was sent. Fixes: QTBUG-83312 Change-Id: I90dc5c04095f0b78baa404466625d329dc4c6e21 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * | Doc: Document QTestStream manipulators under the Qt namespaceTopi Reinio2020-04-073-26/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The global variants of the manipulators have been deprecated in favor of the ones in the Qt namespace. However, only one set was documented (the deprecated ones). Ensure documentation for both sets is generated, and link to the Qt:: manipulators in QTextStream documentation. Fixes: QTBUG-82532 Change-Id: I430d15f6d9a34411d1d7265031249e600f6874ef Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| | * | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2020-04-065-45/+64
| | |\ \
| | | * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-04-065-45/+64
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qeventdispatcher_win.cpp Change-Id: I32db3f755577aefc15f757041367d6144f5e5c66
| | | | * Doc: Fix QLineF::IntersectionType enum nameLeena Miettinen2020-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-82727 Change-Id: Iaffa3b0f61debf27a9fe55775362a3f016612217 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
| | | | * Doc: Clarify equivalence of two QDate instancesTopi Reinio2020-04-031-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-83212 Change-Id: I627716522a962a4c90c5833446dd62f6a18d7d86 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | | * QEventDispatcherWin32: fix posted events deliveringAlex Trotsenko2020-04-032-33/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid livelocks, posted events should be delivered when all pending messages have been processed, and the thread's message queue becomes empty. Although the logic of the previous patch is correct, it turned out that determining the moment when the message queue is really empty is not so simple. It is worth noting that the GetQueueStatus function sometimes reports unexpected results due to internal filtering and processing. Indeed, Windows docs say that "the return value from GetQueueStatus should be considered only a hint as to whether GetMessage or PeekMessage should be called". Thus, we cannot rely on GetQueueStatus in unambiguous logic inside the qt_GetMessageHook. To solve the problem, this patch introduces a guard timer which guarantees low priority processing for posted events in foreign loop. The wakeUps flag reset logic has also been changed to provide clearer synchronization of the Qt internal loop. Fixes: QTBUG-82701 Fixes: QTBUG-83151 Change-Id: I33d5001a40d2a4879ef4eb878c09bc1c0616e289 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | | | * QLibrary/Android: Correct improper mergingThiago Macieira2020-04-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I had originally developed ae6f73e8566fa76470937aca737141183929a5ec in 5.13, where this code for Android didn't exist. I didn't notice the use of pHnd there when I merged up for the push. Change-Id: Ibdc95e9af7bd456a94ecfffd160208dfaa596d95 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| | * | | Add missing endif() in a CMake fileJean-Michaël Celerier2020-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I545a91dafd26d0fc88c3b205aec9805629b9371e Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| | * | | Wasm: don’t deadlock on parallel image conversionsMorten Johan Sørvig2020-04-051-3/+8
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A special restriction of threads on WebAssembly is that you should not block the main thread, also not to wait for worker threads. For example, blocking the main thread may prevent the browser from starting a new web worker to service the pthread the main thread is waiting for. We may be able create an abstraction to support use cases like this (most likely using emscripten asyncify), but for disable use of threads to avoid deadlocking. Change-Id: I35edd5e1bb465e2549fa7cc4288b47dcd2e4244b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * | qpa: Remove references to lighthouseTor Arne Vestbø2020-04-0336-83/+9
| | | | | | | | | | | | | | | | | | | | Change-Id: I37646113f626c878883cff49f4e186ec71bcfa15 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * | Doc: Make Qt Test snippets compilableNico Vertriest2020-04-0312-201/+416
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-81498 Change-Id: I22f07cd539e5e317b6cf15eb369d59915146bd13 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2020-04-033-22/+60
| | |\ \
| | | * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-04-033-22/+60
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/benchmarks/corelib/text/qstringlist/qstringlist.pro Change-Id: Ie9b97bd83c2df00fd9b556b5f09d405f71970169
| | | | * Clean up QTzTimeZonePrivate::systemTimeZoneId()Edward Welbourne2020-04-021-20/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The special handling of ":/etc/localtime" should only apply if that's the exact value of $TZ; the old code would have treated "/etc/localtime" the same, due to stripping a leading ':' before checking for it. We can also test whether to do that stripping using startsWith(). When reading the content of files, avoid QTextStream's trip via QString and back to QByteArray by using the QFile's readLine() directly, or by using readAll(). Task-number: QTBUG-75585 Change-Id: I1524529a2c34d83a9fbd00d41c11f2d994dfc49d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | | | * ANGLE: d3d11: Do not register windows message hooks for d3d11 windowsOliver Wolff2020-04-022-2/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These message hooks are used to handle ALT+ENTER to enter/exit fullscreen mode and PRINTSCREEN to take screenshots. Qt is implementing these functionalities itself so we do not have to register these hooks. If too many of these hooks are registered, callbacks are no longer called and Qt's message queue is no longer handling messages. By saving these hooks we can make sure that more Qt windows at the same time are possible without getting unresponsive due to too many hooks being registered. Change-Id: I5354f91f08cbfeda5e8dc3ad7f824fbd5b3b2932 Reviewed-by: Dominik Holland <dominik.holland@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * | | macOS: Remove all use of deprecated Q_OS_OSX defineTor Arne Vestbø2020-04-0337-65/+65
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I49c285604694c93d37c9d1c7cd6d3b1509858319 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * | | CMake: Fix double inclusion of CMake plugin targetsKai Koehne2020-04-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After 99ace38d22c640e37bb1a41095ee3b126169816a, all plugin files are included automatically, not only the ones ending in Plugin.cmake. Thus the extra inclusion done by the QmlConfigExtras file should only be done if strict mode is set. Amends 99ace38d22c640e37bb1a41095ee3b126169816a Amends 2f2dd3b0c28db210ea1f00d569f6c1626894c5f4 Task-number: QTBUG-83282 Change-Id: I416cbad6c4788d605a9a74f21062543c9c98e968 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| | * | | No-thread: Don’t assert in ~QThreadData()Morten Johan Sørvig2020-04-031-0/+2
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | The no-thread build is not maintaining the QThreadData refcount. Change-Id: I80ce4151b8da9391764ed3d820943dcac0d70999 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
| | * | Purge a stray space from calendar locale dataEdward Welbourne2020-04-023-1779/+1779
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was causing all lines after the first, in each calendar's locale_data[], to be over-indented. This only changes spacing. Change-Id: Ibfc4986548eecbfdba2902cc18f44a2af669bc6d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * | Change QLocale to use CLDR's accounting formats for currenciesEdward Welbourne2020-04-021-433/+433
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular, this changed the US currency formats for negative amounts to be parenthesised versions of the positive amount forms, rather than having a minus sign after the $ sign. Test updated. [ChangeLog][QtCore][QLocale] Currency formats are now based on CLDR's accounting formats, where they were previously mostly based (more or less by accident) on standard formats. In particular, this now means negative currency formats are specified, where available, where they (mostly) were not previously. Task-number: QTBUG-79902 Change-Id: Ie0c07515ece8bd518a74a6956bf97ca85e9894eb Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| | * | Take CLDR's distinguished attributes into accountEdward Welbourne2020-04-021-146/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When doing XPATH searches, child nodes that have distinguished attributes that were not asked for should be skipped. This is part of the LDML spec and matters when resolving locale inheritance. Scan the LDML DTD (previously only scanned for the CLDR version) to find which attributes of which tags are ignorable - all others are distinguished - and take the result into account when performing XPATH searches. The XPath we were using for currency formats wasn't excluding currencyFormatLength elements with type="short" and patterns specific to thousands (and larger multiples); this is fixed by taking distinguished attributes into account. However, the XPATH also wasn't specifying the always distinguished attribute type="standard" that was, in practice, used for nearly all locales that weren't (wrongly) using short-forms for thousands; so type="standard" is now made explicit, so as to minimize the diff. This leaves only twenty-one locales with a negative currency formats. A later commit shall switch to using accounting by default (it falls back via an alias to standard, in any case), thereby restoring the two mentioned below that were using it by accident, but the present change gives the minimal diff here. Thousands-specific formats replaced with sensible ones: * zh_Hant_{HK,MO} (Traditional Mandarin, Hong Kong and Macau) * eo_001 (Esperanto) * fr_CA (Canadian French) * ha_* (Hausa, when not written in Arabic) * es_{GT,MX,US} (Spanish - Guatemala, Mexico, USA) * sw_KE (Swahili, Kenya) * yi_001 (Yiddish) * mfe_MU (Morisyen, Mauritius) * lag_TZ (Langi, Tanzania) * mgh_MZ (Makhuwa Meetto, Mozambique) * wae_CH (Walser, Switzerland) * kkj_CM (Kako, Cameroon) * lkt_US (Lakota, USA) * pa_Arab_PK (Punjabi, in Arabic script, as used in Pakistan; uses arabext number system, whose currency falls back to latn's, for which pa_Arab over-rides the thousands-format). Format changed from an over-ridden type="accounting" to standard (so these lost a negative-specific form) in: * en_SI (English, Slovenia) * es_DO (Spanish, Dominican Republic; same) For some locales we were picking up over-rides of narrow or short list formats, or formats for or-lists or unit-lists rather than and-lists, in place of the standard list format, that these locales don't over-ride, provided by a parent locale. This changed list formats for: * en_CA, en_IN (dropped "Oxford" comma before "and") * qu_* (Quechua; dropped "utaq", presumably meaning "and") * ur_IN (Urdu, India; was using unit-list formats) [ChangeLog][QtCore][QLocale] Data used for currency formats in several locales and list patterns in some locales have changed due to now parsing the CLDR data more faithfully. Fixes: QTBUG-81344 Change-Id: I6b95c6c37db92df167153767c1b103becfb0ac98 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| | * | Take number system into account in currency format look-upEdward Welbourne2020-04-021-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CLDR's currency formats do have number system variation, so take it into account. (The old xpathlite code clearly intended to do this, but failed at it due to looking for the wrong component of an XPATH to fix.) This changes the currency formats in use for * all Dutch locales (because nl.xml lists a currency format for arab before the one for latn, and they differ), * Punjabi, Urdu - specifically pa_Guru_IN, ur_Arab_PK (both like Dutch, arabext before latn; which is correct for pa_Arab_PK and ur_Arab_IN), * Sindi (whose over-ride of latn currency format we were using, where we should be using arab's format, supplied by root's default), * Tatar (which specifies a generic currency format, which we were using, before one specific to latn, which we now use), * Tongan (same as Dutch), * Konkani (like Dutch, deva before latn) and * several North African Arabic locales (whose default number system is latn, rather than arab, but previously used arab's formats). Task-number: QTBUG-79902 Change-Id: I18d8ec16bfd3a516d1bcd2f63bc7f7f15179a3f4 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| | * | Rework qlocalexml2cpp.py to use writers based on TranscriberEdward Welbourne2020-04-022-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This saves repetition of temporary-file manipulation code. In the process, ensure that we tidy away temporary files on failure. Moved a comment in qlocale.h to *outside* the re-written portion, to save having to rewrite it every time. Added blank lines to separate script data from country data in the generated output. Changed 0s in one comment to zeros, to match another comment. Isolated use of sys to the __main__ block. Isolated use of enumdata to the new LocaleHeaderWriter class. Modernised all the string-formatting I touched. Task-number: QTBUG-81344 Change-Id: I5768e45d9a8ea23facc303b3dd8af8b3ccbf7ff2 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| | * | Rework cldr2qtimezone.py into more maintainable formEdward Welbourne2020-04-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Broke out the updating of a source file to a ZoneIdWriter helper class, which enables tidying away the temporary file if we fail. Collected up the rest of the script into a main() that's now called from a __name__ == '__main__' block. Rationalized the imports. Eliminated an inefficient lookup function by constructing a suitable dict() before entering the loop that needed it. Separated the "data you might need to update" tables from the code that does the work, to make it easier for those adding support for new zones to see what they're doing. Removed the spurious $Revision$ from the output and reworded the premable of the generated file. (It would seem CLDR no longer uses an RCS-based version-control system.) Generated output is otherwise unchanged. Task-number: QTBUG-81344 Change-Id: I7d9de8357ebcb599d154de9f862e25f7ade00390 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| | * | Enable accessibility on Linux when org.a11y.Status IsEnable is trueSamuel Thibault2020-04-021-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise accessibility would only work when Orca is set to be started in the session preference, and it would not work when running Orca or compiz' zoom by hand. The existing comment said that it was always true since gnome 3.6, but at least in Debian 8's gnome 3.14, Debian 9's gnome 3.22, and Debian 10's 3.30 it is not always true, it is Orca which sets it on startup. Compiz's focuspoll module also does so for people with low vision using zoom with focus tracking. [ChangeLog][Accessibility][Linux] Enable accessibility on Linux when Orca is started by hand Change-Id: I36cfe1b45e442c0fcefe813e09a67a74205c3ecf Reviewed-by: Frederik Gladhorn <gladhorn@kde.org>
| | * | Warn that the EDITABLE flag for property declarations is deprecatedLars Knoll2020-04-023-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Additionally mark QMetaProperty::isEditable as deprecated. Change-Id: I1abe4c6f2d30c2f96380f9e5942be431dbfed38f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | Use correct deprecation macro, and add \since to new member functionVolker Hilsheimer2020-04-022-3/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: Ib9e88855c708f1fe2402d78c55ff08812d86e035 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * | QLineEdit: clarify the impact of using validatorsVolker Hilsheimer2020-04-012-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Values that are validated as Intermediate are possible to enter, but returnPressed and editingFinished signals are not emitted. Fixes: QTBUG-82915 Change-Id: I3e194cd6ee93b3402090117b67044cf3663a232e Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"v5.15.0-beta3Liang Qi2020-03-317-41/+91
| | |\ \
| | | * | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2020-03-317-41/+91
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp Change-Id: Ifaa56153f5f0d687a6b4d94f84fcfa1e1751afd2