summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * Merge remote-tracking branch 'origin/5.14.0' into 5.14Qt Forward Merge Bot2019-12-1312-1007/+2157
| |\ | | | | | | | | | Change-Id: I03927d2ef75514e4f2633839387806125d8954f1
| | * QCalendar: Optimize std::vector accessv5.14.0-rc2v5.14.0Ulf Hermann2019-12-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we assert on the size of the vector before accessing it, there is no point in using the checked at() method over operator[]. Besides, if at() throws, what are we going to do with the exception anyway. Incidentally, this also works around a compiler bug causing binary incompatibility in QtQml. Change-Id: I460e7514429daecabc304eb2c5f96ed715008b0a Fixes: QTBUG-80535 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * Make sure documentation for VulkanMemoryAllocator 3rdparty code shows upKai Koehne2019-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | There's no qt documentation module for 'qtrhi' - instead, it should be added to the qtgui documentation module. Fixes: QTBUG-80489 Change-Id: Iea61b907811cd2135c2f1258599d9868d2218679 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * Add changes file for Qt 5.14.0Antti Kokko2019-12-031-0/+542
| | | | | | | | | | | | | | | | | | Change-Id: I3af09ba121850547c55ddd9fcfb4e753a3fb61f0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * Initialize all variablesBogDan Vatra2019-12-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Set m_isFolder = false also in "close" method Fixes: QTBUG-80468 Change-Id: I5449692d61d4d340e83bdca337b86e054e8bf561 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * Fix configure after updating qt license filev5.14.0-rc1Jani Heikkinen2019-12-022-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | License file (LICENSE.QT-LICENSE-AGREEMENT-4.0) was recently updated to version 4.2 and that broke the configure. Remove qt license file version number from file name to avoid configure update need when license file is updated Change-Id: I77b4a4e7c6e590bbbce79d1c86cbcfb965841eae Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Fix assets iteratorBogDan Vatra2019-11-291-14/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - start from index -1 each time when we iterate. Each time when we add a FolderIterator to the stack we MUST reset the index (-1) otherwise it will continue from it's last position. To fix it we are cloning the FolderIterator to set the index to -1. The index must be -1 in order to set it to 0 when we first call next() method. - introduce "fileType" static method for a more reliable also much faster file type lookup. The old version of checking if a file exists, is a folder or a file was buggy that's why it skipped some file randomly. Fixes: QTBUG-80178 Change-Id: I4b28e4616399b1bff35d792b55ded1bf19b62dd9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * Set proper TARGET name for libsBogDan Vatra2019-11-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | When doing a multi ABI build in one go, if the TARGET is the same, we'll endup with only one library which is not okay. Task-number: QTBUG-80351 Change-Id: I0c5ff24480446d671e59dbd5a045f9889dff39e9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * macOS: Harden screen handling logic when reconfiguring displaysTor Arne Vestbø2019-11-292-68/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When connecting/disconnecting/reconfiguring screens Qt needs to know about the changes before they are propagated by the OS in other ways, so that we can reflect the changes in the list of QScreens as soon as they happen. Unfortunately the canonical notifications for this in AppKit, NSApplicationDidChangeScreenParametersNotification, is delivered after AppKit itself reacts to the change, which results in receiving NSWindowDidChangeScreenNotification, NSWindowWillMoveNotification, and others, while the list of QScreens is stale. To work around this we adopted the lower layer Quartz Display Services API in 3976df2805 to notify us when there are changes to the screen configuration. Unfortunately the window server on macOS is not consistent in how it orders events during screen reconfiguration, and we can't rely on the NSScreen list being up to date when we get our callbacks from Quartz. To work around this we still hook into Quartz, so that we get the callbacks as early as possible, but then track the state of the AppKit NSScreen list and update our own QScreens as soon as we see a change. We now also include sleeping displays in the list of QScreens, which matches the behavior of NSScreen.screens. Similarly we exclude displays that are mirroring another display. Task-number: QTBUG-80193 Change-Id: I6b1958d6ee61373b2861e05a0d971d2300596f3e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * Update Qt enterprise license agreement file to version 4.2Jani Heikkinen2019-11-292-913/+1285
| | | | | | | | | | | | | | | Change-Id: I4c42f92bda472aad5b0a0ebb92c6a982f1f64714 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
| | * Fix prefix determination for windeployqt'ed MinGW applicationsJoerg Bornemann2019-11-281-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We hard-coded the assumption the import lib naming scheme is always basename + ".lib" which is wrong for MinGW. This amends commit a131d610. Fixes: QTBUG-80366 Change-Id: Ibefb8a54483cc62743b8783530644b03e720262c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * Fix prefix determination for windeployqt'ed applicationsJoerg Bornemann2019-11-221-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt5Core.dll of windeployqt'ed applications is right next to the executable, and the prefix is considered the directory where the application is located. QLibraryInfo of a relocatable Qt5Core.dll would return a wrong prefix (by default <app dir>/..), because it determines the prefix with QT_CONFIGURE_LIBLOCATION_TO_PREFIX_PATH (by default ".."). We now detect whether the executable was windeployqt'ed by checking whether Qt5Core.dll is next to the executable. However, we must not do that for applications in QT_HOST_BINS, because they are not windeployqt'ed and must still use the standard prefix. We detect this case by checking whether for Qt5Core.dll exists a corresponding Qt5Core.lib in the libdir below the detected prefix. Fixes: QTBUG-79318 Change-Id: I1c9b971b282c6b9b19a93f1819ba8aee74be5be4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * Merge 5.14 into 5.14.0Frederik Gladhorn2019-11-2131-123/+341
| | |\ | | | | | | | | | | | | Change-Id: I64f2657cb7c4671cab1a20c8f4a7e4dc2b1cb83a
| | * | Fix passing FOO_LIBS variables to configureJoerg Bornemann2019-11-191-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This amends commit 9864d2c6. Some variables that are set in qtConfLibrary_inline were not exported. Fixes: QTBUG-78873 Change-Id: I10d766c1f41d2baa61967ee931a6631346cac2e9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | | Remove QApplicationPrivate::set_palTor Arne Vestbø2019-12-132-13/+6
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | Its purpose was to track the default palette set by the programmer, but after 8fb881900c this is tracked by the Qt::AA_SetPalette attribute. The palette itself is always reflected 1:1 in the palette tracked by QGuiApplicationPrivate::app_pal. Change-Id: If3e84c8b3ae6070b6c50be7a33adb38799b3f3a5 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | styles example: Set default style up front, and react to style changesTor Arne Vestbø2019-12-124-4/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | Allows running the example with -style foo or QT_STYLE_OVERRIDE. No changes to documentation needed. Change-Id: Id7cef450f13faabd118badde51afb7273439c9fc Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Explicitly polish palette instead of relying on QApplication::setPaletteTor Arne Vestbø2019-12-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The only effect calling QApplication::setPalette will have is the polish, so opt for doing it explicitly instead of the weirdly looking no-op assignment. Change-Id: Ia80b3f60e3e513b68c2993ea8417966f9ab6721e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Clean up QApplication::style default style constructionTor Arne Vestbø2019-12-121-25/+24
| | | | | | | | | | | | | | | Change-Id: I9f01e7cc5fa90fd9b1f5d12c7ce694c231158c32 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Ensure override style properly clears out previous style if setTor Arne Vestbø2019-12-121-18/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QApplication::setStyle has quite a bit of logic to clean up from the old style before setting a new one. If a style has been set before the application is created, it's not enough to just delete the existing style, we need to treat it like a normal style switch. Change-Id: I2bcc2eb75567bf1bc8a32ac31467b22315a70a0b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Update system palette on application init if neededTor Arne Vestbø2019-12-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A style may have been set before the application was created, which would have resulted in setting the system palette based on the style's palette. Once the application is initialized and we have a platform theme we need to reset the system palette. Change-Id: Ia48f57d3983535c8633741d8027f75bc0c214018 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Unify system palette initialization during style changeTor Arne Vestbø2019-12-121-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We let initSystemPalette() do all the work, instead of leaving the first time initialization of the system palette to the caller, which makes the logic harder to follow. This also means first time initialization of the system palette will pick up a platform theme if available and resolve the palette using that, which was missing from the original logic. Change-Id: I84da557caf8ecedf6d96d87ebee93168ea9d73ba Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Clarify call to initializeWidgetFontHash in QApplication::setStyleTor Arne Vestbø2019-12-121-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The call was added in c49c96fbb13912, "Reinitialize system palette when setting a new style", but adding it along with the palette code seems like a mistake. The potentially dirty widget font hash needs to be reset for all style changes. Change-Id: I411f56bb833819213c5485d7585fc5e3e9bd8983 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Xcode: Use output directory as SYMROOT when shadow-buildingTor Arne Vestbø2019-12-121-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting the CONFIGURATION_BUILD_DIR variable to tell Xcode where to place the final application bundle confuses Xcode when archiving a project, and the archive ends up without the dSYM files. Unfortunately we can't leave it up to Xcode to place the build artifacts wherever it wants, as Qt Creator's iOS support expects to find the artifacts in a well-defined place. Until we've taught Qt Creator to find the artifacts for deployment where Xcode placed them we need to keep this logic. We now avoid setting the CONFIGURATION_BUILD_DIR variable unless we really need to due to in-source builds. As long as we're dealing with a shadow-build it's okey to set SYMROOT. Change-Id: I9661c1c57725dc8ba5a21f8467b8b61834f2e64d Fixes: QTBUG-74841 Task-number: QTBUG-52474 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | Account for when qtquickcompiler is used when getting the resourcesAndy Shaw2019-12-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When passing the resources used to the android deployment setting json file it needs to check the variable generated by the qtquickcompiler feature so that it can still find the qrc files originally populated in the resources. This ensures that qmlimportscanner can still scan the original qrc files when determining which QML import plugins are needed. Fixes: QTBUG-80713 Change-Id: I695b289eaaa78cc6c355fa8abd22a8a1031a9f6c Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | | qSwap: suppress pedantic warning about noexcept being falseThiago Macieira2019-12-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This warning is not in -Wall or -Wextra, but it happens in a single place, so we can reasonably suppress it. Fixes: QTBUG-79138 Change-Id: Ib5d667bf77a740c28d2efffd15ccb3f62cf8f431 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Doc: Fix qdoc compilation errors qtbaseNico Vertriest2019-12-1212-83/+157
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-79824 Change-Id: I6557de598de1931fc30556951d35783d02b83abe Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | Support both qrc and qml files for qmlimportscannerMichael Dippold2019-12-111-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some projects can be configured to have both qrcFiles and qml-root-path included in the deployment settings file. The addition to qrc scanning prevented the qml root directory from being scanned. Change-Id: Idadb62f5572be45d0083294440bdb29740c2c47e Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | QVariant: introduce ShouldDeleteVariantData flagFabian Kosmale2019-12-113-20/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This flag is used in QSequentialIterable and QAssociativeIterable to indicate that the data pointer in VariantData should be deleted after the variant has been constructed. The use case for this is https://codereview.qt-project.org/c/qt/qtdeclarative/+/284151, where we have a proxy iterator and cannot easily return a pointer to already owned data, as it is hard to manage its lifetime in the iterator. In contrast, it is clear that we can release the memory in the QSequentialIterable functions, as it has already been copied into the QVariant there. Change-Id: I2b33497d991cd4f752153e0ebda767b82e4bb851 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Doc/SQL: update sql driver creation instructionsChristian Ehrlicher2019-12-113-24/+95
| | | | | | | | | | | | | | | | | | | | | | | | Update the instructions on how to build and distribute the mysql and postgresql drivers on windows. Change-Id: Ie4d50c1c34820680d7496b9544eb00fcee17f8e7 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Fix CVE-2019-19244 in SQLiteAndy Shaw2019-12-112-0/+27
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-80635 Change-Id: I718349e28ec76ea164dd50f2a985f2074dd6bdbd Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
* | | Doc: remove the claim that zero timers execute after GUI eventsThiago Macieira2019-12-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This ties our hands on what we can do in our implementations. I don't care if you've depended on this in your code. It was wrong. Fixes: QTBUG-80600 Change-Id: I568dea4813b448fe9ba6fffd15de8865a27f0a35 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | QTest::toString(QBitArray): fix Mismatched free() / delete / delete []Thiago Macieira2019-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ==8015== Mismatched free() / delete / delete [] ==8015== at 0x483958B: operator delete[](void*) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==8015== by 0x48752D6: QTestResult::compare(bool, char const*, char*, char*, char const*, char const*, char const*, int) (qtestresult.cpp:356) ==8015== Address 0x602eb30 is 0 bytes inside a block of size 12 alloc'd ==8015== at 0x483777F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==8015== by 0x44AAE2: char* QTest::toString<QBitArray>(QBitArray const&) (qtest.h:98) ==8015== by 0x44D212: bool QTest::qCompare<QBitArray>(QBitArray const&, QBitArray const&, char const*, char const*, char const*, int) (qtestcase.h:352) Change-Id: Ia2aa807ffa8a4c798425fffd15dabfebfd63fdbd Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | PSQL: Optimize QPSQLResult::data() function for date and time typesRobert Szefner2019-12-101-25/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Minor performance optimalizations: - No need to check if the date and time are correct because the QDate, QTime and QDateTime parsing functions already perform these checks - No need to add minute part to the UTC offset before parsing the date, because the QDateTime class can parse time zone offset both in form ±hh:mm and ±hh Change-Id: Id74b7ae075135c5c8cf420247c49b5f12fe88899 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | wasm: fix getOpenFileContent docLorn Potter2019-12-111-2/+2
| | | | | | | | | | | | | | | | | | | | | The callback should be named the same as the function expects Change-Id: I4ca73958313c93c0d68e7205d8641c4104247e0c Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | wasm: enforce emscripten versionLorn Potter2019-12-114-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This creates a define in the binary, as well as writing emscripten version for qmake. It also enforces app builder to use a certain known version. Task-number: QTBUG-77745 Change-Id: I37691512171635cec66aa3ffa16258081f3f1e1b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Fix more mis-handling of spaces in ISO date format stringsEdward Welbourne2019-12-102-35/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ISO date format doesn't allow spaces within a date, although 3339 does allow a space to replace the T between date and time. Sixteen tests added to check this all failed. So clean up the handling of spaces in the parsing of ISO date-time strings. [ChangeLog][QtCore][QDateTime] ISO 8601: parsing of dates now requires a punctuator as separator (it previously allowed any non-digit; officially only a dash should be allowed) and parsing of date-times no longer tolerates spaces in the numeric fields: an internal space is only allowed in an ISO 8601 date-time as replacement for the T between date and time. Change-Id: I24d110e71d416ecef74e196d5ee270b59d1bd813 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Fix calls to qtFlattenResources from outside resources.prfJoerg Bornemann2019-12-102-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The xml_escape function must be part of resources_functions.prf, and the qmake_immediate resource must not be created multiple times. Instead, create another qmake_immediate resource with a number suffix. This commit amends 577b6554. Task-number: QTBUG-79672 Change-Id: Ibbe20c0fd1940f1fe7733cd1e5b0891f65689782 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | | rcc: Fix namespace handling for initializerSamuel Gaist2019-12-101-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rcc currently always writes the namespace mangling macros in both the initializer constructor and destructor. This patch add the missing handling of the --namespace option for that part of the generated code. [ChangeLog][Tools][rcc] rcc now generates correct code when using the --namespace option. Change-Id: I7e5e608eb0ad267d11d601fc69c1a87d3f655a6e Fixes: QTBUG-80649 Reviewed-by: hjk <hjk@qt.io>
* | | tst_QSqlQuery: fix some testsChristian Ehrlicher2019-12-101-39/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix some tests in tst_QSqlQuery: - make sure to use QSql::HighPrecision in tst_QSqlQuery::precision() (needed for psql) - remove outdated stuff for mysql 3.x - psql_bindWithDoubleColonCastOperator: the placeholder are stored as named placeholders in psql - avoid some useless old-style casts Change-Id: I54d29a7e24f17d853cce6baa09a67d9278098810 Reviewed-by: Robert Szefner <robertsz27@interia.pl> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Windows QPA: Export "checkable" info for menu items through UI AutomationAndre de la Rocha2019-12-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to allow screen readers to say checked/unchecked for checkable menu items, this information has to be provided through UI Automation. Checkable menu items should implement the "Toggle" UI Automation pattern. The "checkable" state must also be supported by QAccessibleMenuItem, which is being added by a separated change. Task-number: QTBUG-80551 Change-Id: I661668310d1b6b4701d0c0efdb1dcfd15d0db729 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Add "checkable" state to accessible menu itemAndre de la Rocha2019-12-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The information about whether a menu item may be checked is necessary to allow the platform code (in particular, Windows UI Automation layer) to make this information available to screen readers. Task-number: QTBUG-80551 Change-Id: Ibfcc4f2da1ebc68e7dc5df2cd46bbfc0a177da12 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | wasm: Fix clamp modeLorn Potter2019-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Clamp mode was being obliterated by not appending to EMCC_COMMON_LFLAGS This fixes crashes of integer overflow Change-Id: Icae757a7189de25db5ed41df6d41d86304c39830 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | Don't wrap feature detection macros with QT_HAS_FOO() variantsTor Arne Vestbø2019-12-1034-105/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using wrappers for these macros is problematic when for example passing the -frewrite-includes flag to preprocess sources before shipping off to distcc or Icecream. It will also start producing warnings when compilers implement http://eel.is/c++draft/cpp.cond#7.sentence-2. See for example https://reviews.llvm.org/D49091 Both https://clang.llvm.org/docs/LanguageExtensions.html and the SD-6 document at https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations recommend defining '__has_foo(x) 0' as a fallback for compilers without the macros, so that's what we go for. Change-Id: I0298cd3b4a6ff6618821e34642a5ddd6728be767 Reviewed-by: Alex Richardson <arichardson.kde@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Modernize shapedclock exampleEirik Aavitsland2019-12-102-18/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Relying on the hard clipping of QRegion widget masks to create non-rectangular windows is a solution from a bygone era. The result looks horrible with today's eyes, particularly on a high-dpi screen. Update the example to create smooth anti-aliased edges using translucent window bacground. Task-number: QTBUG-64229 Change-Id: I8859d61177d2a2dc446632c23f27f42050e0d7c7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | | Fix QPushButton style sheet style for overlay (content) imageEirik Aavitsland2019-12-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike comparable widgets like QLabel or QFrame, QPushButton would not render a content image specified in the stylesheet, unless a border style was also specified. Fix by explicitly rendering the content image, if set, in the native-border codepath also. Although the doc warns about the QPushButton border style having to be set in order for the background styling to take effect (since the native border painting otherwise hides it), the previous behavior does seem unexpected. Fixes: QTBUG-72029 Change-Id: I8b979b010515dab4dcf2f00344a187c87eeec096 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | | Convert some uses of QStringRef to QStringViewEdward Welbourne2019-12-091-25/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | There remain QStringRef uses where QString::splitRef() is used. Requires converting some .count()s to .size()s, as QStringView lacks count(); and some .toInt()s need to be handled by QLocale::c(). Change-Id: If9a49e063d217671ea9335a82e4bf977b7b48be0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Prefer QDate::startOfDay() over QDateTime(const QDate &)Edward Welbourne2019-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | The latter can be invalid if midnight is skipped by a spring-forward. Change-Id: Ibf98d165557229f19622774ebf9a27bb0911c7a7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QAbstractItemView: add a note about ToolTipRole in dataChanged()Christian Ehrlicher2019-12-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt::ToolTipRole is not honored by dataChanged() which may be a little bit surprising. Therefore add a small note about this behavior. Fixes: QTBUG-78726 Change-Id: Ic4361f55e55ab59d5bae2fdb98907a62055604c5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | QPushButton: fix icon + text layouting in RTL modeChristian Ehrlicher2019-12-092-64/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fusion style did not properly handle the text layouting for a QPushButton in RTL mode. Also the menu indicator was not adjusted in this case. Fix it by calling the base class implementation as QCommonStyle does it mostly right. Since Fusion does not handle State_On or State_Sunken but QCommonStyle does, explicitly mask them out. Fixes: QTBUG-80083 Change-Id: Ide7bf997b4f4a5b61fcb8ea4a1a152122daef1e2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | WebAssembly: Do not use sed directly for wasm_shell.html deploymentJoerg Bornemann2019-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use $$QMAKE_STREAM_EDITOR, instead, which will on Windows expand to "qmake -install sed" (triggering qmake's own sed implementation) and otherwise expand to "sed". Change-Id: I57da5fb3a4f6e5a09ae25c947caa0a10d279b480 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>