summaryrefslogtreecommitdiffstats
path: root/src/gui/util
Commit message (Collapse)AuthorAgeFilesLines
* Fix off-by-one for "typically" lowest value INT_MINClemens Werther2022-03-031-2/+2
| | | | | | Pick-to: 6.3 6.2 5.15 Change-Id: I0e1115dc21e700dc79fb54be953573c75b41e70f Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Make sure all qtbase private headers include at least one otherThiago Macieira2022-02-243-1/+5
| | | | | | | | | | See script in qtbase/util/includeprivate for the rules. Since these files are being touched anyway, I also ran the updatecopyright.pl script too. Change-Id: Ib056b47dde3341ef9a52ffff13ef677e471674b6 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QDesktopServices: make QOpenUrlHandlerRegistry a non-QObjectMarc Mutz2022-02-181-7/+5
| | | | | | | | | | | | | | | | | | It seems to have been a QObject solely for its single slot. But since Qt 5, slots need no longer be defined on QObjects, so we can remove the inheritance from QObject now. We still need a QObject as the context object in connect(), but that can be just be an aggregated naked QObject. Saves 26 relocations, ~1.5KiB in TEXT and ~0.3KiB in DATA on optimized GCC 11.2 Linux AMD64 C++20 builds. Pick-to: 6.3 6.2 Change-Id: Ic45a8e892ec2bd5de5de8fbd32ec7a167c501803 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDesktopServices: deprecate destroying URL handlers w/o explicit ↵Marc Mutz2022-02-151-0/+18
| | | | | | | | | | | | | | | | | | | unsetUrlHandler() [ChangeLog][QtGui][QDesktopServices] URL handlers that have been passed to setUrlHandler() must now be removed by calling unsetUrlHandler() before they are destroyed. Relying on the handler's destructor to implicitly unset it is now deprecated, because it may already be in use by concurrent openUrl() calls. Support for implicit unsetting will be removed in 6.6 and, until then, a qWarning() is raised if it is exercised. Fixes: QTBUG-100775 Fixes: QTBUG-100779 Pick-to: 6.3 6.2 5.15 Change-Id: I0c4f91b78f847b135fdeb38766babc892bdc1379 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* QPkmHandler: make const what it never modifiedMarc Mutz2022-02-121-1/+1
| | | | | | Pick-to: 6.3 6.2 5.15 Change-Id: I0bda0d93ebe60d4923f3e9eb059cddb61192b1b5 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QDesktopServices: fix ABA problem in QOpenUrlHandlerRegistryMarc Mutz2022-02-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The registry is designed to be thread-safe, as is openUrl(), and handlers are required to be thread-safe, too: "the handler will always be called from within the same thread that calls QDesktopServices::openUrl()". The handlerDestroyed() slot was invoked using AutoConnection semantics, which, if the registry and the handler happen to not be on the same thread, is QueuedConnection, which means there's a window in which the handler is destroyed, but it's still listed in the registry, and a call to openUrl() may make a call to the (deleted) handler. Worse, if a handler is deleted and new one registered they may end up on the same address (ABA, or rather, AA problem), and then the delayed call to handlerDestroyed() may remove the entries to the new handler, as well as those to the old. Fix by using Qt::DirectConnection. This fixes the ABA problem, but doesn't completely fix the partially-destroyed problem, since QObject::destroyed() is simply too late. We need to require explicit unsetUrlHandler() calls, which should happen before destruction of the handler object starts. [ChangeLog][QtGui][QDesktopServices] Fixed a bug where destroying and re-creating a handler object in quick succession could cause the registration for the handler to be lost. Fixes: QTBUG-100778 Pick-to: 6.3 6.2 5.15 Change-Id: I76fd81724504cc7f38ac262b43e3e9539fe5ebca Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDesktopServices: fix UB (data race on handlers)Marc Mutz2022-02-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | The handlerDestroyed() function is connected to the handler QObject's destroyed() signal and removes all entries from the registry for which the destroyed object was listed as the handler. While handlerDestroyed() is always executed in the context of the thread owning QOpenUrlHandlerRegistry-as-a-QObject, the documentation explicitly states that "the handler will always be called from within the same thread that calls QDesktopServices::openUrl()", implying that calling openUrl() from a non-GUI thread is supported. The presence of the mutex also indicates that this should work. But then the unprotected access to the handlers variable in handlerDestroyed() is a data race, because nothing prevents a handler object from being destroyed concurrent to an openUrl() call. Fix by locking the mutex. Fixes: QTBUG-100777 Pick-to: 6.3 6.2 5.15 Change-Id: I9ef857efa609b4d16ee21063ccccd316e119576b Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Doc: Use \inmodule for all classes and headersTopi Reinio2022-01-171-0/+1
| | | | | | | | | | | | | | | QDoc made some assumptions about the module a class/header belongs to, based on the source file path. This feature is rather error-prone and unnecessarily complex and will be removed from QDoc. Define modules explicitly to avoid documentation warnings when this removal happens. Pick-to: 6.2 6.3 Change-Id: I7947d197db5ac36c12e816caa19bb2f74eda8849 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* QLayoutPolicy: fix annoying -Wdeprecated-enum-enum-conversionMarc Mutz2021-12-031-10/+10
| | | | | | | | | | | | | | | | | | | | Says GCC -std=c++20: src/gui/util/qlayoutpolicy_p.h:127:30: warning: bitwise operation between different enumeration types ‘QLayoutPolicy::Policy’ and ‘QLayoutPolicy::PolicyFlag’ is deprecated [-Wdeprecated-enum-enum-conversion] 127 | if (verticalPolicy() & ExpandFlag) | ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ Fix by making Policy a QFlags<PolicyFlag>, which we can do because the class is private. In QSizePolicy, this would break BC. Since a QFlags cannot be opened for constants like an enum, we need to define the ex-Policy-enumerators as static inline constexpr objects instead. Pick-to: 6.2 Change-Id: I29bc938f86508deed3f99ad9d1c1892547206c05 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QLayoutPolicy: un-export the classMarc Mutz2021-11-271-5/+5
| | | | | | | | | | | | The class is almost completely inline. Don't export it wholesale, only export the few out-of-line members. Also acts as a test-case for the new Q_GADGET_EXPORT feature. Task-number: QTBUG-55458 Change-Id: I699a774614183960d7ac4e0afcdb57cfef76db15 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* gui: Fix typos in source code commentsJonas Kvinge2021-10-121-1/+1
| | | | | | Pick-to: 5.15 6.2 Change-Id: Ie53e5542a8f93856470982939ecd8ec90b323d69 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Remove qshadergraph filesJuan Casafranca2021-10-0516-2840/+0
| | | | | | | | | | | | - Those files were moved as part of Qt3D as its the sole user of these - Also removed associated unit tests Pick-to: 6.2 5.15 Change-Id: I302bc219218a58071c86d2447cb4449601fca32c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Introduce QDoubleValidator::setRange overload with two parametersIvan Solovev2021-09-202-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QDoubleValidator::setRange() used to have 3 parameters, with the third one (the number of decimals) having a default value of 0. Such default value does not make much sense for a *double* validator. Also, since a default value was used, omitting the decimals was silently overwriting the previous decimals value, discarding the value that could be previously explicitly specified by user. [ChangeLog][QtCore][QDoubleValidator][Important Behavior Changes] The QDoubleValidator::setRange() method now has two overloads. The first overload takes 3 parameters, but does not support a default value for decimals. The second overload takes only two parameters, not changing the number of decimals at all. Hence, the number of decimals will only be changed if the user explicitly specifies it. To maintain the old behavior of setRange(), pass 0 as the 3rd argument explicitly. Note that it is a source-incompatible change. But it should be fine, because using QDoubleValidator with 0 digits after decimal point does not make much sense and so, hopefully, is not that common. At the same time, change the default-constructed QDoubleValidator to use -1 for decimals, which allows arbitrarily many digits in the fractional part. The value was previously 1000, which allowed more than anyone would reasonably use, so this should make no practical difference. Some more unit tests to cover the behavior of the setRange() overloads are also added. As a dirve-by: remove unnecessary QValidator::State to int conversions in the unit tests. QCOMPARE is capable of comparing these enums and provides a better output in case of failure for enums. Task-number: QTBUG-90719 Change-Id: I523d6086231912e4c07555a89cacd45854136978 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Introduce QDoubleValidator::fixup()Ivan Solovev2021-09-172-2/+89
| | | | | | | | | | | | | The provided implementation tries to fix positions for the group separator. In case of scientific notation it can also converts the value to normalized form. It uses QLocale::FloatingPointShortest internally to convert the double value back to string, so the number of decimals may change after calling this method. Change-Id: I963bc5f97b653e2bb912f4b95b09a4d1ee201e7f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Android: Enable QDesktopServiceLars Schmertmann2021-09-101-11/+40
| | | | | | | | | | | | QDesktopServices::openUrl(const QUrl &url) is already implemented on Android. But even if it is possible to set an URL handler, the mechanism to invoke it is missing. With this commit the URL handler will work on Android like it is already working on iOS. Task-number: QTBUG-84382 Pick-to: 6.2 Change-Id: Ic560bd380f1cc59586861aa1a6a3ea064276a39e Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* QDoubleValidator: fix NaN check in validateWithLocaleIvan Solovev2021-09-011-2/+1
| | | | | | | | We can't really compare two NaN's. Should use qIsNaN() for that. Pick-to: 6.2 Change-Id: Ia514cabe65cfcdeafb39cab91ecdb66f8fae725c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Rework QLocalePrivate::bytearrayToU?LongLong()Edward Welbourne2021-08-301-3/+3
| | | | | | | | | | | | Change it to take a QByteArrayView instead of a plain char *; all its callers do know the size and propagating it enables the implementation to call strntou?ll() rather than strtou?ll(), thereby escaping the need for '\0'-termination. Fixes: QTBUG-74286 Change-Id: Ie9394786e9fcf25c1d1be2421805f47c018d13bb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Correct examples for int validation in QValidator documentationVolker Hilsheimer2021-06-081-2/+2
| | | | | | | | | | | | QIntValidator::validate documents correctly that any input with "at most as many digits as the top of the range" returns Intermediate. This is needed to avoid input deadlocks where one can't go from 9 to 15 if the range is 8 to 16. Fixes: QTBUG-94269 Pick-to: 6.1 5.15 Change-Id: I6776e09fc231249fe78f9e6106492f8454b70a03 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Edid parser: fix performance issuesGiuseppe D'Angelo2021-05-052-34/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A) When a QEdidParser gets built, the code populates a QMap by parsing the system's pnp ids file. With > 2000 entries in the file, that's 2000+ allocations for the QMap, plus 4000+ allocations for key/value (QStrings), plus a bunch of temporaries created for processing. What's more, on XCB and EGLFS, a QEdidParser gets built *per screen*; the map is not shared and gets rebuilt for each screen. It's however completely unnecessary to keep this map in memory. The lookup is required only once per monitor change event, which, apart from application startup, is an extremely rare event. When such an event happens, and we have to lookup a vendor id, we can just process the pnp database "on the fly", therefore removing the constant memory usage from the application run. In order to also avoid an allocation spike, just don't build a map at all: simply process the file, using no memory allocations, one line at a time while searching for the vendor id. I was unable to find information about the file format, so I am not sure if it's guaranteed that it's kept sorted by id (this could allow for a faster fail path). B) In case of a cache miss, a hardcoded vendor table is used to try and identify the manufacturer. Look up in the hardcoded table using binary search, rather than a linear scan, and don't allocate memory for each element processed in the list (!). The size of the list (2000+) is big enough to completely justify binary search. C) Drive-by, remove a TOCTOU bug when opening the system file. D) Drive-by, fix the includes in the header to IWYU. Change-Id: I57c7cbd09a145c6efe3023c227ed36b24bed96f9 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Edid vendor table generator (3/N): regenerate the tableGiuseppe D'Angelo2021-04-211-37/+271
| | | | | | | Use an updated output from the script. Change-Id: I85c4706c637bd5ceda6667257e48c16943637f9b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Edid vendor table generator (2/N): use idiomatic C++Giuseppe D'Angelo2021-04-211-2/+2
| | | | | | | | In C++ we can give names to classes, so just use that, without C-isms (typedef struct). Change-Id: I27239d8d5c28864b3f4f7bd4013cc47c045b4b04 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix compiler warnings in 32-bit buildsRobert Löhning2021-03-171-2/+2
| | | | | | | | | comparison of integers of different signs: 'unsigned int' and 'qsizetype' (aka 'int') [-Wsign-compare] Pick-to: 6.1 Change-Id: Ia27f79ab4abca8b757b65ef5f1d30151842088fe Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QTextureFileData: support key value metadataJonas Karlsson2021-02-094-3/+56
| | | | | | | Task-Id: QTBUG-76970 Pick-to: 6.1 Change-Id: I9dba1b373250cea4d0c806997290a7afcdc900d7 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Support cubemap ktx filesJonas Karlsson2021-02-011-16/+36
| | | | | | Change-Id: I6905c393647d31fab958cdd9471bb0a6ffe83596 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add QPlatformScreen::colorSpace()Allan Sandfeld Jensen2021-01-252-1/+94
| | | | | | | | Added for macOS and X11 screens Task-number: QTBUG-90535 Change-Id: Ifafe7a07ee2abc3c42cd12785db2d7329878375b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add face support to texture fileJonas Karlsson2021-01-215-39/+85
| | | | | | Task-Id: QTBUG-76970 Change-Id: I3bbd43357c7fcce8949522b089a4572b948f08f4 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-071-64/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Add getDataView() method to QTextureFileDataJonas Karlsson2020-12-292-0/+13
| | | | | | | | | | This method will return a QByteArrayView of the data range corresponding to the level. This avoids a leaky abstraction by moving the needed data pointer arithmetic from the caller to the method. It will also make it easier adding cubemap support in the future. Change-Id: I2415bd88365d8d69ba14aefc77f5f1117f9e0033 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Replace discouraged Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPEAndreas Buhr2020-11-309-12/+12
| | | | | | | | | | | | | | Q_MOVABLE_TYPE was conceived before C++ had move semantics. Now, with move semantics, its name is misleading. Q_RELOCATABLE_TYPE was introduced as a synonym to Q_MOVABLE_TYPE. Usage of Q_MOVABLE_TYPE is discouraged now. This patch replaces all usages of Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPE in QtBase. As the two are synonymous, this patch should have no impact on users. Pick-to: 6.0 Change-Id: Ie653984363198c1aeb1f70f8e0fa189aae38eb5c Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Remove some code checker issues (L218 & L243)Jan Arve Sæther2020-11-131-36/+7
| | | | | | | An addition, avoid code duplication. Change-Id: I26d1d8d65ba330a2024eb5c17c3bceb21e014200 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: fix \inmodule for classes moved to QtGuiv6.0.0-beta4Volker Hilsheimer2020-11-092-3/+3
| | | | | Change-Id: If7a42dde8c728356e0e5646743a1425b08fccbcb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix Clang compiler warnings (-Wrange-loop-analysis)David Skoland2020-10-172-7/+7
| | | | | | | | | | | | | | | In a macOS environment, Clang throws a number of compiler warnings about loop variables when building qtbase. See task for more info about the environment. This changes a handful of loop variables, like QJsonValue references into QJsonValueRefs. Task-number: QTBUG-87216 Pick-to: 5.15 Change-Id: I26006efd7c75c2d56ebc7f7efb4c9bdcabe92e8b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make QStringList an alias to QList<QString>Lars Knoll2020-09-121-1/+0
| | | | | | | | | | | | | | | | | | Fix our API, so that QStringList and QList<QString> are the same thing. This required a bit of refactoring in QList and moving the indexOf(), lastIndexOf() and contains() method into QListSpecialMethods. In addition, we need to ensure that the QStringList(const QString&) constructor is still available for compatibility with Qt 5. Once those two are done, all methods in QStringList can be moved into QListSpecialMethods<QString>. Change-Id: Ib8afbf5b6d9df4d0d47051252233506f62335fa3 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Compile GUI util snippetsPaul Wicking2020-09-011-0/+1
| | | | | | | | | Fix minor issues (e.g. whitespace, missing semi-colon) in passing. Change-Id: Ieec8deb8aaf4358ffc35502fae6ea7c043d34672 Done-with: Nico Vertriest <nico.vertriest@qt.io> Task-number: QTBUG-81486 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Use QMetaType in QMetaCallEventLars Knoll2020-08-241-5/+5
| | | | | | | And don't use int based type mapping anymore. Change-Id: I456e76d1933ef646a7bd39ce565886b89e938a44 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Clean up int based convert() APILars Knoll2020-08-241-5/+5
| | | | | | | Pass QMetaType instances instead. Change-Id: I07366cea566fdebf5bb793aa8087f8109216ec0c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Deprecate the static int based API in QMetaTypeLars Knoll2020-08-242-6/+6
| | | | | | | | | | | | | And remove one of the type id to name mapping that still existed in QMetaType. QMetaTypeInterface can provide that, so there's no need to have a second copy of the data. qMetaTypeTypeInternal() can still map all the names of all builtin types to ids. That functionality is for now still required by moc and can't be removed yet. Change-Id: Ib4f8e9c71e1e7d99d52da9e44477c9a1f1805e57 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Disentangle QIODevice dependenciesLars Knoll2020-08-151-0/+1
| | | | | | | | | | | | | | | | | Move the QIODevice::OpenMode enum into a base class, so that we can remove the full QIODevice (and thus QObject) dependency from qdatastream.h and qtextstream.h. This is required so that we can include QDataStream in qmetatype.h without getting circular dependencies. As a nice side effect, QDataStream and QTextStream can now inherit QIODeviceBase and provide the OpenMode enum directly in their class scope. Change-Id: Ifa68b7b1d8d95687ed032f6c9206f92e63bfacdf Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Another round of using noexcept instead of pre-C++11 definesAllan Sandfeld Jensen2020-08-132-4/+4
| | | | | | | A few new files were added with old-school defines. Change-Id: Ieb2c71e094e55102f3f39fb9551823f36863f5f4 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Another round of 0->nullptr cleanupAllan Sandfeld Jensen2020-07-311-2/+2
| | | | | Change-Id: Ic8db7dc252f8fea46eb5a4f334726d6c7f4645a6 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Use QList instead of QVector in gui implementationJarek Kobus2020-07-075-52/+52
| | | | | | | Task-number: QTBUG-84469 Change-Id: I366e845249203d80d640355a7780ac2f91a762f1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-07-074-4/+4
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Move the EDID parser into QtGuiFriedemann Kleint2020-07-014-0/+2568
| | | | | | | | | As a drive by, fix recursive inclusion in qxcbscreen.h. Task-number: QTBUG-83255 Change-Id: Ia008921b559ef450c07aa17ca554c6b35e0a88bd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Use QList instead of QVector in guiJarek Kobus2020-06-293-30/+32
| | | | | | | | Applied to headers only. Source file to be changed separately. Task-number: QTBUG-84469 Change-Id: Ic08a899321eaffc46b8461aaee3dbaa4d2c727a9 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Port Q_STATIC_ASSERT(_X) to static_assertGiuseppe D'Angelo2020-06-191-2/+2
| | | | | | | | | | | | | | | | | There is no reason for keep using our macro now that we have C++17. The macro itself is left in for the moment being, as well as its detection logic, because it's needed for C code (not everything supports C11 yet). A few more cleanups will arrive in the next few patches. Note that this is a mere search/replace; some places were using double braces to work around the presence of commas in a macro, no attempt has been done to fix those. tst_qglobal had just some minor changes to keep testing the macro. Change-Id: I1c1c397d9f3e63db3338842bf350c9069ea57639 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Enable Universal Links on iOSLars Schmertmann2020-05-191-0/+17
| | | | | | Pick-to: 5.15 Change-Id: I05b5bede49f619576dd9ab37444f7cb5fe0f15f0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove deprecated QDesktopServices APIsVolker Hilsheimer2020-05-132-114/+1
| | | | | Change-Id: Ic21ad2938b20c1aa3ae499a921c9cff92f615816 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QGridLayoutEngine: remove now-unused enumMarc Mutz2020-05-061-7/+0
| | | | | | | This enum has since been replaced by Qt::Orientation by way of QHVContainer. Change-Id: I177409652c5de0c5f7b6117f94e26a05c3d609d4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix Clang 10 warning about LLONG_MAX being inexact in doubleThiago Macieira2020-05-051-2/+3
| | | | | | | | | | | validator.cpp:707:19: error: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,- Wimplicit-int-float-conversion] Task-number: QTBUG-83666 Pick-To: 5.15 Change-Id: I99ab0f318b1c43b89888fffd160b4a95a258423b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* QGridLayoutEngine: port to QHVContainerMarc Mutz2020-05-052-82/+84
| | | | | | Change-Id: Iadb069ecdf67d72fa1b3be9198e90eeda8e98d54 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>