summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Regenerate projects one last time before mergewip/cmakeAlexandru Croitor2020-02-12303-792/+482
| | | | | | Change-Id: Ia24cf56b79ca6dacd370a7e397024e9b663e0167 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix metatypes source dependencies for non-prefix buildLeander Beernaert2020-02-121-0/+4
| | | | | Change-Id: I0b262929f74c8da10f42d9ddbc7c119dc21619cf Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge "Merge remote-tracking branch 'origin/dev' into wip/cmake" into wip/cmakeThe Qt Project2020-02-12213-12783/+12050
|\
| * Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2020-02-11213-12783/+12050
| |\ | | | | | | | | | Change-Id: Ia0f7f0f1511f9f593c6d4585c859d1bf1353540d
| | * CMake: Regenenerate projects where recent changes happenedAlexandru Croitor2020-02-1122-59/+135
| | | | | | | | | | | | | | | Change-Id: If86e49d73a45b7cfc494fa48bdc6cb1ba503b112 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * Merge "Merge remote-tracking branch 'origin/wip/cmake' into dev"Alexandru Croitor2020-02-11417-1578/+6634
| | |\
| | | * Merge remote-tracking branch 'origin/wip/cmake' into devAlexandru Croitor2020-02-10417-1578/+6634
| | | |\ | | | | | | | | | | | | | | | Change-Id: If75ae006db6eb977cf66af4c3d36cb5c8098a1f1
| | * | | QOpenGLContext: Remove QGL helpersJohan Klokkhammer Helsing2020-02-113-51/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They were all private, and used only by QGL* (which have been removed) so should be safe to remove. Task-number: QTBUG-74408 Change-Id: Ia7fdff8f0bb963449470dbd8296cbdd8652c50e2 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * | | Remove comments about destructors needing to be emptyJan Arve Sæther2020-02-115-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not important, but removes some ### Qt6 comments from my radar Change-Id: Ifd1bf44c44ece8fa1314d3c7e0e95d1bd37ae0ea Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| | * | | Fix compilation with -no-directwriteEskil Abrahamsen Blomfeldt2020-02-102-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The refactoring for adding the DirectWrite font database broke disabling this feature, which in turn broke compilation with CMake, since the configure test isn't added there yet. Change-Id: I7727145112df7f1009a09f09bf3368645fb1b5da Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| | * | | Remove dead codeLars Knoll2020-02-101-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't support unsharable containers anymore. Change-Id: Ifafa1c9b4eb43d16b3866be3dd74dda1c592f084 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * | | don't limit QCryptographicHash to 2^31 bytes of inputLars Knoll2020-02-102-44/+58
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Icd43d3b387af9ef9e9b8adb9a6388c741949c9e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | | QTextBrowser: remove deprecated signal highlighted(const QString&)Vitaly Fanaskov2020-02-102-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-81845 Change-Id: Ibdb0fe40557b901596cc8ef37c9707f99b4df403 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
| | * | | QSpinBox: remove deprecated signal valueChanged(const QString &)Vitaly Fanaskov2020-02-1022-78/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-81845 Change-Id: I91148cac553f63b44968337ccc121e7376ee4465 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
| | * | | QComboBox: remove deprecated signalsVitaly Fanaskov2020-02-1023-77/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following signals have been removed: - void activated(const QString &); - void highlighted(const QString &); Task-number: QTBUG-81845 Change-Id: I61b552d9258987d4252202953aaf4909f9bd718e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
| | * | | QVector: implement methods for adding new elements constructed in placeVitaly Fanaskov2020-02-105-51/+328
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-80293 Change-Id: I687dc05a9ad2bad7bab3dc2b1173edf75550d57e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | Fix typos in the documentation for Q_REVISIONUlf Hermann2020-02-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic55ab0dfca0f62e8d29a4e7d41384bed6fb1da62 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * | Don't rely on iterators being stable while modifying the hashLars Knoll2020-02-092-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Mapping struct referred to where it got inserted into the source_index mapping table by a const iterator to the table. That is rather fragile, as changing the table invalidates the iterator. It happened to work with QHash in Qt 5, but will break with the new implementation in Qt 6. Instead simply store the key in the Mapping struct so that it can be quickly found in the hash. Also fix one place, where we unconditionally call erase on an iterator returned by constFind(). Turns out constFind() did sometimes not find the item in question and returns end(). Change-Id: I0420a06d496f640a3150478e8c644d4cc669ceff Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * | Blacklist tst_QGuiApplication::quitOnLastWindowClosedMulti on macOS in CITor Arne Vestbø2020-02-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I55cb9a6b3aebac68fb1b20127ba7aa501b4a3f2b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | Use C++17 for qmake and force the build of everything with C++17Olivier Goffart2020-02-086-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We will want to use C++17 code in our headers soon. (including the one in the bootstrap libraries) This patch is quick and dirty, I guess it will be cleaner once we move to cmake Updated QMAKE_MACOSX_DEPLOYMENT_TARGET because 10.13 runtime does not support C++17 stdlib features Change-Id: I75ac171436945dddd1bb953a9c8d323ac20da7ac Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | Introduce a configure-time check for C++17 filesystemMårten Nordheim2020-02-074-7/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various compilers have various fun ways of failing to compile when it is used so let's check if they will work properly during configure rather than much later. Change-Id: Ia93d4b91b3d269b4cab2a5f677c3c89e06b44ce3 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * | moc: Extend revision markers to allow for major and minor versionUlf Hermann2020-02-078-54/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we want Qt's own revisions to follow the Qt versioning scheme, we need to allow for the minor version to reset to 0 now. In order to facilitate this, we interpret the argument passed the current Q_REVISION macro as major version and allow for an optional minor version. Both are encoded it into the resulting revision number. Change-Id: I3519fe20233d473f34a24ec9589d045cdd162a12 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | * | QtSql: remove deprecated signal 'notification(QString)'Christian Ehrlicher2020-02-072-22/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was deprecated in Qt5 and the replacement signal with three arguments can be used instead. Change-Id: I6d0db8d9fa9bea2039c548e32bc39a8173403c3a Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | * | QtSQL: remove SQLite2 and TDS driver for Qt6Christian Ehrlicher2020-02-0720-2112/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They were deprecated in Qt4 (TDS) and 5.14 (SQLITE2) so they can be removed now in Qt6 [ChangeLog][QtSql] Removed obsolete TDS and Sqlite2 drivers Change-Id: I55118fb03106564d519a99ab55f9b5cf528179f3 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | * | Replace the QMatrix field of QTransform with qreal[3][3]Jarek Kobus2020-02-076-391/+336
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove temporarily the reference returned by QTransform::toAffine() since we don't keep the QMatrix object internally anymore. This is done in order to compile the rest of the code. The follow-up patch is going to remove that method completely. Task-number: QTBUG-81628 Change-Id: If7140eedb7582d81ac8da529017cf792174e86ab Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | Merge "Merge remote-tracking branch 'origin/wip/cmake' into dev"Alexandru Croitor2020-02-071825-1095/+72459
| | |\ \
| | | * \ Merge remote-tracking branch 'origin/wip/cmake' into devAlexandru Croitor2020-02-031825-1095/+72459
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This pulls the CMake port, which not only adds CMake files but also modifies existing code. A brief summary of "seemingly unrelated" changes: * configure.json was re-formatted to not use multi-line strings. That is an extension of the Qt JSON parser but not JSON compliant, which is needed for the configure.json-to-cmake conversion script (python). * Some moc inclusions were added due to CMake's slightly different way of handling moc. With the changes the files build with qmake and cmake. * Since CMake just grep's for the Q_OBJECT macro to determine whether to call moc (instead of doing pre-processing like qmake), the existing use of "Q_OBJECT" in our documentation was changed to \Q_OBJECT, which cmake doesn't see and which is now a qdoc macro. * QTestLib's qFindTestData was extended to also search in the source directory known at build time. What this change also brings is a new way of building modules in Coin by using YAML configuration files that describe the steps of building and testing in Coin specific terms. The platform configuration files in qt5 are instructed to use the old Coin built-in way of testing ("UseLegacyInstructions" feature) but for any configurations that do not have this, these yaml files in the coin/ sub-directory are used and shared across repositories. Change-Id: I1d832c3400e8d6945ad787024ba60e7440225c08
| | * | | | Core: Provide comparison functions for QTypeRevisionUlf Hermann2020-02-072-6/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unspecified segment is between 0 and 1. This is because QTypeRevision::zero(), as the default revisision needs to be smaller than any other. At the same time we want explicitly specified non-zero revisions to be larger than unspecified ones. Breaking this down on a per segment level gives us the order shown here. Change-Id: I1cca12f1180eb6f77563fb5b22c3400e118dc5e9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | | | Make text decorations consistent between ways of drawing textEskil Abrahamsen Blomfeldt2020-02-072-81/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The drawGlyphRun() and drawStaticText() functions would calculate the horizontal origin of the decorations based on the left-most edge of the left-most glyph, in practice including the left bearing of that glyph in the position. But in drawText()/QTextLayout it will always be drawn from the position given as input by the user of the function. The inconsistency was detected in an upgrade of Harfbuzz NG, where the tests on macOS would get a -0.05 left bearing, and as a result the decorations would be painted one pixel to the left in drawGlyphRun()/drawStaticText() compared to QTextLayout. It is not a big deal in practice, but in order to get the Harfbuzz update in, we fix the inconsistency now, by passing the user-input position into the decoration function. This was also an opportunity to consolidate the two code paths, and to unexport the qt_draw_decoration_for_glyphs() symbol, which was exported in Qt 4 only to be usable by Qt Quick 1. Change-Id: I243404b2710ae378e84d7587efae719da3879944 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | | | DirectWrite font db: Fix unstretched font selectionEskil Abrahamsen Blomfeldt2020-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A typo in the conversion between DirectWrite stretch and Qt stretch caused all unstretched fonts to be registered as ultra-condensed. Change-Id: I2ec64fcef44cc6259946b761a7bfac0ce191971e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * | | | Skip test cases that is failing on macOS >= 10.14Timur Pocheptsov2020-02-072-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bind on port 1/82 is now success, in QTcpSocket's test things are more broken: changing the test row makes the test flaky with port not available due to the previous test case. Task-number: QTBUG-81905 Change-Id: Iaf1b5457fa3961a4f6bc92b79aa4668a8359136e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * | | | Move QOpenGLTextureBlitter from QtGui to QtOpenGLJohan Klokkhammer Helsing2020-02-0411-20/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-74409 Change-Id: Ie4a3dfd01ba44715de6da71c4420fe9a95a0c242 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * | | | Experimental DirectWrite font databaseEskil Abrahamsen Blomfeldt2020-02-0412-827/+1656
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds an opt-in experimental DirectWrite-based font database. This cannot be the 100% replacement for GDI unfortunately, since quite a few font formats used on Windows are still unsupported. But it would be good to have it as an opt-in experimental feature since it should make it easier to solve multiple font selection issues we have on Windows. In order to still share the DirectWrite-specific code between the old and new database, this introduces a common base class. Note that the feature depends on DirectWrite 3 support (Windows 10). Fixes: QTBUG-74917 Change-Id: Ida08ec7ef4fda9fc78622ca4297909a727390a64 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * | | | Move backing store OpenGL support to the platformcompositor moduleJohan Klokkhammer Helsing2020-02-0320-424/+672
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPlatformBackingStore had a dependency on the QOpenGLTextureBlitter, which is a problem because we want to get rid of all the public QOpenGL* classes in the gui module. This splits the heavily QOpenGL dependent parts of the backing store implementation into a separate class and moves it to the platformcompositor module. qplatformbackingstore.cpp is now mostly free from OpenGL implementation details. Platform integrations now have to explicitly request backing store OpenGL support. This has been done for: - xcb - windows - cocoa - winrt - android - wasm - ios QPlatformGraphicsBufferHelper::lockAndBindToTexture is now exported so it can be used from other modules. Task-number: QTBUG-74409 Change-Id: I42ad9250e5a424939cf751a8ad880c7381ede2ae Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| | * | | | Cleanup code where we mixed QHash and QMultiHash iterator codeLars Knoll2020-02-035-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib229cad13ca21d6288e009c6ee1c39fa974f80b8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | | | Don't compile qmake in c++11 modeLars Knoll2020-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia43dd67f3b83263b4be16e468b8c22598db9ac78 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | | | Cleanup QDBusArgument marshalling for containersLars Knoll2020-02-032-77/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need to specialize the marshalling for QList, QHash and QMap when we can simply have generic code here that works for all containers Change-Id: I442ac6009953d2bd8e5a7012262cffeb8e912034 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | | | Separate streaming of QHash and QMultiHash/QMap and QMultiMapLars Knoll2020-02-032-24/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Those classes will not have relations anymore in Qt6, so they need separate streaming operators. Writing of multi maps/hashes requires some additional care so that restoring keeps the order of how iteme have been inserted. Change-Id: If41d0c5c24962764a2cb81bd2de9e2fadf1a2b63 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | | | Use a QMap instead of a QHash for the ProValueMapLars Knoll2020-02-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qmake relies heavily on stable references to nodes stored within the container. QHash in Qt6 doesn't offer that guarantee, so use a QMap instead, that supports this. Change-Id: Ifcf3d67098585ea26f4e02f4570d407a56e33c9c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| | * | | | QVariantHash/Map can't hold multiple entries for the same key in Qt 6Lars Knoll2020-02-032-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a consequence of QHash being separated from QMultiHash. Change-Id: Id3bb585c9882ecbaa02691c8ba6553748dd21a24 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | | | QButtonGroup: remove deprecated signalsVitaly Fanaskov2020-02-027-132/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-80906 Change-Id: I6f697b0a070ba4c401117fe7cdf02429b47d9a11 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
| | * | | | qversionnumber.h: Stay compatible with C++11Ulf Hermann2020-01-311-9/+9
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoiding relaxed constexpr support is a small change that doesn't hurt and it allows us to progress in qtdeclarative without waiting for general C++17 support in qtbase. Change-Id: I234276036292346d60d6da3a75bcabbdec9ddde8 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | * | | Add missing #else for a zero entry in an index mappingEdward Welbourne2020-01-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up to commit dff3843d98d52e2c32fea07371f91117de0667e9. Noticed during branch-merge conflict resolution. Change-Id: I9a0ed11853c00f0d260d2fbd5f909ea2a65fd346 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | | Separate offsets from sizes in QLocale's dataEdward Welbourne2020-01-3010-7221/+7114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables us to make the sizes quint8 and benefit from the resulting packing, making the locale data smaller. The sizes for long month-name lists (which concatenate twelve names with semicolon as separator) can overflow an 8-bit member, so use quint16 where needed. Re-ordered the data in QLocaleData and QCalendarLocale. Now all long-short(-narrow) families arise in that order; and any standalone is grouped with the one of the same length. (This cost 20 bytes in the date-format table, which optimises out more duplication if short is before long, but the saving in the (smaller) time-format table more than make up for it; and 20 bytes isn't worth the confusion that being inconsistent in ordering might cause.) At the same time, drop trailing semicolons from list entries (which join various names with semicolon) as they're not needed: we know where the end of the list is, because we know the size of the string that results from concatenation. The code that parses such lists can even correctly handle empty entries at the end. Saves 26 kB of data in the compiled binaries. Task-number: QTBUG-81053 Change-Id: If6ccc96a6910828817aa605d10fd814f567ae1e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | | Refactor QLocale's data access to be less verboseEdward Welbourne2020-01-303-162/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add QLocaleData::DataRange and methods returning it, to package each of the m_*_idx, m_*_size pairs of data members, to simplify access to these data. This extends the experiment started in QCalendarLocale, which is now adapted to use the new DataRange also. Two static functions of qlocale.cpp are replaced by methods of DataRange, saving considerable duplication of long member names in callers. Change-Id: Iad9899ba72f00522594b55a0402baec47491999c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | | Deduplicate locale data tablesEdward Welbourne2020-01-305-5464/+5458
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some entries in tables were sub-strings (e.g. prefixes) of others. Since we store start-index and length (with no need for terminators), any entry that appears as a sub-string of an earlier entry can be recorded without making a separate copy of its content, just by recording where it appeared as a sub-string of an earlier entry. (Sadly this doesn't apply to month- or day-names and their short-forms: for those, we store ';'-joined lists. Thus, although each short-form is a prefix of its long-form, the short-form is stored in a list with other short-forms; and this is not a prefix of the list of matching long-forms.) The savings are modest (780 bytes at present), but cost us nothing except when running the python script that generates the data files (it takes a little longer now), which usually only happens at a CLDR update. Change-Id: I05bdaa9283365707bac0190ae983b31f074dd6ed Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | | Move old tst_QLocale::negativeZero() to tst_QString::number()Edward Welbourne2020-01-302-12/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was more complex than it needed to be and was a test of QString, not of QLocale. This leaves tst_QLocale::negativeZero() available to now test how QLocale handles negative zero. Change-Id: Ic9aae250c29f579e6d60fba8404b38673a3b489f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | | Minor tidy-up in qlocalexml2cpp.pyEdward Welbourne2020-01-306-1791/+1791
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split a long line. Use pythonic chained comparison to save some repetition. Comment on a field not currently in actual use. Say "zeros" rather than "0s" in one comment to match another. Added a .h suffix to the main locale data tempfile to match the naming of the tempfiles used for calendar data. Simplify generation of the blank line between Language and Script; and include a matching blank between Script and Country. This adds one blank line to qlocale.h Removed a stray space that misaligned locale data lines. This produces a space-only change in the generated *_data_p.h files. Change-Id: I974a9e8923c3dfd2178855d2cf1d6a5074e130b3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | | Preserve the case of the exponent separator CLDR suppliesEdward Welbourne2020-01-306-554/+554
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have long (since 4.5.1) coerced it to lower-case, for no readily apparent, much less documented, reason. CLDR says most locales use an upper-case E for this - let's actually use what CLDR says we should use. The code that matches the exponent separator was doing so case-insensitively in any case; that needed adaptation now that the separator's case isn't pre-determined; and, in any case, should have been done using case-folding rather than upper-casing. In the process, removed some spurious checks for "'e' or 'E'" in the result, since the exponent separator is always represented by 'e' (and an 'e' might also be present for the separate reason of its use as a beyond-decimal digit representing fourteen). [ChangeLog][QtCore][QLocale] QLocale::exponential() now preserves the case of the CLDR source, where previously it was lower-cased. Change-Id: Ic9ac02136cff79cb9f136d72141b5dbf54d9e0a6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * | | Core: Add a QTypeRevision classUlf Hermann2020-01-303-1/+425
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTypeRevision is needed to encode the value of the new two-argument Q_REVISION(major, minor) macros. Those, in turn are necessary because the minor version resets to 0, and we need to take the major version into account when stating revisions for Qt classes. Task-number: QTBUG-71278 Change-Id: I63eff6eab7d6e4f8f32b359a216767c98947a106 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>