summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* High-DPI: Remove usages of Qt::AA_UseHighDpiPixmapsMorten Johan Sørvig2020-03-3011-29/+0
| | | | | | | | | | Remove usages of Qt::AA_UseHighDpiPixmaps from examples/. This flag is now on by default, and can't be disabled. Task-number: QTBUG-83092 Change-Id: Ie28622f816da2fe28d4ab272d45ea20bd051d5f3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix deprecation warnings in QCocoaCursorVolker Hilsheimer2020-03-302-9/+9
| | | | | | | | | Explicitly use the Qt APIs that return QPixmap and QBitmap by value, and fix the API taking those to use const references rather than pointers or const values. Change-Id: I2bb7ad1edb3b65f806f0475fca383e5b9bdb61f3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QtConcurrent: add fluent interface to configure a task before runVitaly Fanaskov2020-03-2916-12/+808
| | | | | | | | Task-number: QTBUG-82950 Change-Id: I449da938b6b501a7646b3425edde5c880d6ca87e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Mikhail Svetkin <mikhail.svetkin@gmail.com>
* Merge QGuiShortcut and QShortcut again in QtGuiVolker Hilsheimer2020-03-2918-700/+597
| | | | | | | | | | | | | | | | QShortcut has only one widget specific feature, which is whatsThis; that is just a QString, so the setters and getters can just as well be in QtGui. The widgets specific implementation of shortcut matching and of showing the whatsThis balloon stays in QtWidgets, in the private implementation. Using virtual functions in the private we can override the empty default in QtGui, and by adding a virtual factory function in QGuiApplication, the correct private is instantiated depending on the kind of application running. Change-Id: I09ae4a5482f9fb70940c5e2bfe76d3d7fd710afc Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove QGuiAction again and split QAction implementation up insteadVolker Hilsheimer2020-03-2972-1217/+858
| | | | | | | | | | | | | | | | | | | | | | Duplicating the number of classes is a high price to pay to be able to have some QAction functionality behave differently, or be only available in widgets applications. Instead, declare the entire API in QtGui in QAction* classes, and delegate the implementation of QtWidgets specific functionality to the private. The creation of the private is then delegated to the Q(Gui)ApplicationPrivate instance through a virtual factory function. Change some public APIs that are primarily useful for specialized tools such as Designer to operate on QObject* rather than QWidget*. APIs that depend on QtWidgets types have been turned into inline template functions, so that they are instantiated only at the caller side, where we can expect the respective types to be fully defined. This way, we only need to forward declare a few classes in the header, and don't need to generate any additional code for e.g. language bindings. Change-Id: Id0b27f9187652ec531a2e8b1b9837e82dc81625c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Follow bundled Harfbuzz updateKonstantin Ritt2020-03-283-62/+33
| | | | | | | | | | | as we raised the minimum requirement for harfbuzz to version 2.6.0: * use new HB_SCRIPT values instead of tags * get rid of deprecated (and no-more-used) callbacks * replace deprecated hb_ot_tags_from_script() usage with a more flexible and up-to-date hb_ot_tags_from_script_and_language() Change-Id: I0eafdd2d2028c353fa3a93f5868efceccd364a70 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QAbstractItemView::dataChanged(): optimize call to QWidget::update()Christian Ehrlicher2020-03-2811-4/+436
| | | | | | | | | | | | | When topLeft and bottomRight are different in QAIV::dataChanged(), the current implementation simply calls QWidget::update() without checking if the affected cells are visible. This results in a big performance hit when cells are updated frequently. Now try to compute the exact update rect by iterating through the modified indexes. Fixes: QTBUG-58580 Change-Id: I97de567d494e40ed8cdb1ea1f5b3cf3a2f60455e Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* HB-to-Qt bridge: get rid of stale/dubious safety checksKonstantin Ritt2020-03-281-18/+6
| | | | | | | these aren't needed for quite a long time already Change-Id: I3a5ce3199cee467d7dfba3c68256d214fee4d83c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Revert "QMetaType: support manual unregistration"Simon Hausmann2020-03-273-17/+0
| | | | | | | | | This reverts commit cf000d080c61cde44bd84e53ee018f36e33b7257. Reason for revert: This API is not needed (anymore) by qtdeclarative. Change-Id: I8af604c2babe3afc11f183ddb3ce3a9038a456ad Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Make QPropertyBindingPrivate accessible to QtQmlSimon Hausmann2020-03-277-43/+64
| | | | | | | | | | | | | | | | | | QtQml needs the private just for one detail which nobody else should need it for: Tracking additional dependencies and marking the binding as dirty. Exporting the private requires hiding some variables and providing accessors, to compile with MSVC - including the removal of QVarLengthArray usage. Upside: The binding structure shrinks by 8 bytes and the encapsulation makes it a little easier to change things without breaking declarative, ... in the unlikely event ;-) Also remove setDirty() from the public API as it's not needed by QtQml and using it is dangerous, because it means that there's a risk of somebody keeping a reference (count) to the untyped binding from within the binding closure, which introduces a memory leak. Change-Id: I43bd56f4bdf218efb54fa23e2d627ad3acfafeb5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add QProperty tests to the cmake buildSimon Hausmann2020-03-272-0/+15
| | | | | Change-Id: I043ea1db316618871b387213ee379075d756d0b5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* macOS: Fix or ignore deprecated API in 10.14Tor Arne Vestbø2020-03-279-52/+58
| | | | | | | Fixes: QTBUG-82128 Change-Id: I11abfcf7f245a7a25733625b50e207b07abba289 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* qmake: Silence GL deprecations on macOSTor Arne Vestbø2020-03-271-0/+2
| | | | | Change-Id: I5a33cbe30a9368ee35afb230c7a6c17d4d99f201 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Speed up QSortFilterProxyModel filteringChristian Ehrlicher2020-03-273-8/+113
| | | | | | | | | | Speed up the QSortFilterProxyModel filtering by only updating the source_to_proxy entries which are really changed - When proxy intervals are added or removed, it is not needed to update the proxy_to_source indexes which were not touched. Change-Id: I35459ff1b04f4610ec74f4b01d58a71832a9ae22 Reviewed-by: David Faure <david.faure@kdab.com>
* CMake: Fix pkgconfig calls when cross-compilingLeander Beernaert2020-03-262-0/+20
| | | | | | | | | | | | | | When cross-compiling with CMake, before this patch pkgconfig calls would find libraries which are part of the host system and not the target system. The current approach used is based of the discussion present in https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4478, and should be considered a temporary solution until the issue is properly addressed in upstream CMake. Change-Id: I535d4d48c2a5d34689082b80501b3b6ae30d7845 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add a public qsimd.h headerLars Knoll2020-03-265-22/+161
| | | | | | | | This header only covers a part of what qsimd_p.h does, namely the compile time detection of simd extensions. Change-Id: I05f1d987f194a5bec335f2405cc2846fbaa88b66 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move qsimd* from corelib/tools to corelib/globalLars Knoll2020-03-269-9/+165
| | | | | | | | | | | It's not used in tools at all and fits a lot better in global. Also fix the qsimd_x86* files to have a proper copyright header. Change-Id: Id3d8e7cfcd7769a1ca9f3d8cf6d357a31a99ba40 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Revert "Android: Fix compile on arm64"BogDan Vatra2020-03-263-13/+0
| | | | | | | | | This reverts commit 81d6906ad9fa8ad3f73b151a1e8564ffaeccc3cf. Fixed upstream. \sa https://github.com/harfbuzz/harfbuzz/issues/1308 Change-Id: I7759e2bb199ffd11d42239be59704c4e1f7ddb9f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make QCborValue::toCbor() constLars Knoll2020-03-252-4/+4
| | | | | | | | Those methods don't modify the CBOR value, they should be const. Change-Id: I213984ed82e43429413344999a22ad1c4c3beac8 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMetaType: Do copy constuctible check at compile timeFabian Kosmale2020-03-251-1/+1
| | | | | Change-Id: I2f6a9bbaa0153fa33fc6a0b68bcedfbe3b9b1a7c Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QMetaType::fromType: support classes with inaccessible dtorsFabian Kosmale2020-03-252-1/+20
| | | | | Change-Id: I60a1b2496d48651a8166173b420da37f59d7a395 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake: Fix exception in pro2cmake about missing v1 apiLeander Beernaert2020-03-251-0/+1
| | | | | | | | This patch silences the exception about missing v1 api entry for the qt_add_3rdparty_library() function. Change-Id: I74a473ed1c063b13f0a9ca64dcb568b8f8b27235 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QHttpNetworkReplyPrivate: Remove unused variableMårten Nordheim2020-03-253-1306/+0
| | | | | | | Oh, and re-remove the spdy protocol handler. Change-Id: I9ca3517b14ac202eac19ae75d481cfd78d431abb Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* CMake: Add support for bundled SQLite libraryLeander Beernaert2020-03-257-11/+98
| | | | | Change-Id: I4d3f6e3bf04eb2fcf337e2c5dbc04b6e6f8ebe0b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Avoid recreating QRegularExpression for every text blockJoni Poikelin2020-03-251-9/+9
| | | | | | | | With very complex regular expressions this makes a significant difference in performance. Change-Id: I5267bf71cae98dffb58ec7a1fc982dae639ff312 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Don't call QSet::erase() on an end iteratorLars Knoll2020-03-252-2/+4
| | | | | | | | hash.erase(hash.constFind()) is bound to crash if the hash doesn't contain the item we're looking for. Change-Id: Icbefca87b0258970373ec55d5dc113e6ab39c5f0 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* CMake: Fix the re-computed value of INSTALL_*DIR variablesJoerg Bornemann2020-03-251-1/+4
| | | | | | | | | | | | | | | For INSTALL_*DIR variables that have the the same value as CMAKE_INSTALL_PREFIX, a second cmake run cleared the value. This is because file(RELATIVE_PATH) returns the empty string if we pass the same absolute paths. Fix this by checking the return value of file(RELATIVE_PATH) for the empty string and setting it to ".". It's a limitation of qmake that empty strings are not handled as ".". Change-Id: I8fc4d1eabcc9d5634be2f3741b0002a347dd17e6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix configuration of FEATURE_JPEGLeander Beernaert2020-03-252-2/+1
| | | | | | | | Without this patch JPEG support is always disabled, even though we can build it from 3rdparty sources. Change-Id: I9e619f0ca8ec3ca3e7c58981bb6af9b33426a029 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix auto-detection of precompiled header supportAlexandru Croitor2020-03-253-3/+21
| | | | | | | | | | | | PCH files were only used while building qtbase. Make sure the value is exported to the BuildInternalsConfig file, so the value is re-used when building other repositories. Also disable PCH when building simulator_and_device iOS builds, because CMake doesn't currently generate separate PCH files per architecture. Change-Id: I79955ebc557b800bc3c704deac519fe80012c229 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove QSignalMapper::mappedWidget()Lars Knoll2020-03-252-43/+2
| | | | | | | | | | | | | | mappedObject() can do exactly the same thing, there's no need for a mappedWidget() signal as well This removes a reverse dependency between Qt Widgets and Qt Core where QWidget pointers are being used inside Qt Core. [ChangeLog][QtCore] Removed QSignalMapper::mappedWidget. Connect to mappedObject instead, and use qobject_cast<QWidget *> to handle Widgets. Change-Id: I60618a34dd94575e993bd6d8a2cead95cfd71d55 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Get rid of QRegExp usage in rccLars Knoll2020-03-253-3/+78
| | | | | | | | As a drive-by, enable testing of rcc in the cmake build. Change-Id: I4150ff3ffe7404bab0cbc72f80b23b47a60cf33d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* Remove QRegExp usage from the XBM handlerLars Knoll2020-03-251-23/+28
| | | | | Change-Id: Ie7141c2a04c233bc1298195aebfc0437e43df0d1 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Remove qt6_use_modulesKai Koehne2020-03-255-153/+0
| | | | | | | | | | | qt5_use_modules has been deprecated in 2013 (commit d9ea4bb144153) and removed for the first time in 2018, but then brought back - see discussion in https://lists.qt-project.org/pipermail/development/2018-June/032837.html . Anyhow, I think we can finally put it to a rest in Qt 6. Change-Id: I770f7e93406ad68535d1d90e4a3bacfb920e2d5a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* HB-to-Qt: stop propagating helpers and types not used outside QtGuiKonstantin Ritt2020-03-252-12/+16
| | | | | Change-Id: I039efaeabc83bc0367bb3ab949057d2cbc6c2742 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Restructure testlib selftest projectTor Arne Vestbø2020-03-247-143/+84
| | | | | | | | | The use of a single subdirectory only for the test binary, but not the actual source file, just made things harder to discover when looking for the test code. Now all subdirectories are actual sub-tests. Change-Id: Ia3e308ba8d231cc8ead1491b10a34801f76669b0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Q{File,FileInfo,Dir}: add std::filesystem::path overloadsMårten Nordheim2020-03-2413-5/+573
| | | | | | | | | | | | | | | | | | | | Add some overloads where (I thought) it makes sense for QDir and QFile to accept std::filesystem::path objects. Currently my thinking is to not add overloads for static functions where std::filesystem can already do the same job, e.g. create directory or file. Template and enable_if is needed due to both QString and std::filesystem::path being able to be constructed from string literals. The common shared code is currently in QFile because QDir had an implicit include of QFile, made explicit in this patch, and QFileInfo has an include to QFile as well. The QT_HAS_STD_FILESYSTEM macro is visible in user-code which I currently take advantage of in the tests, and users could too. Change-Id: I8d05d3c34c6c17e20972a6a2053862b8891d6c3c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Expect failure in QLabel test for certain conditionEskil Abrahamsen Blomfeldt2020-03-241-1/+11
| | | | | | | | | | | | | | | While investigating QTBUG-80554, it was discovered that a small mismatch in how heights are calculated in QTextDocument and QPainter will cause the tst_QLabel::sizeHint() autotest to fail if ceil(ascent+descent+leading) is higher than ceil(ascent+descent). This is currently blocking the fix for QTBUG-80554, because this exposes the bug by detecting the correct leading for a font where we previously ignored it. Task-number: QTBUG-82954 Change-Id: I99323c8e1a0fa281aa8d754ba71432468fcb2d4c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Darwin: get rid of Harfbuzz/CoreText specific codeKonstantin Ritt2020-03-242-58/+7
| | | | | | | | | | once CoreText shaper in Harfbuzz has been disabled, we do not need the hack-ish enablers to support it Follows-up 21c242f9fd27523d0016b821d0a962231c4bafa6 Change-Id: I40d598b2c9b57ca7953716a56e4e119b2fc06a9b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Harfbuzz: get rid of Qt-specific patch in CoreText shaper codeKonstantin Ritt2020-03-242-96/+0
| | | | | | | | this code isn't used as of 21c242f9fd27523d0016b821d0a962231c4bafa6 and thus we do not need to keep the patch around Change-Id: Ic3b836c6a68f40b8e450542a39db968ef3b09101 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QTextEngine: stop guessing the same language in a loopKonstantin Ritt2020-03-241-2/+2
| | | | | | Change-Id: I155b9380a4ff412d59c7939c377d20f4783e4730 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix deprecation warnings from NSColor(Space) with macOS 10.14 SDKVolker Hilsheimer2020-03-232-41/+31
| | | | | | | | | | | | | | | | The support for handling color spaces by names is deprecated in recent AppKit versions, and should be replaced by using NSColor.type, and operations on the type-specific properties of the color. Merge the two implementations from qcoregraphics.mm and qcocoacolordialoghelper.mm, which also fixes the inconsistent interpretation of color components as device dependent (in qcoregraphics) or generic (in qcocoacolordialoghelper). We now always populate the QColor with device independent components. Change-Id: Id79c609736ff1962bebe4bd7158781a6d1b4475e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Make QFuture::d privateSona Kurazyan2020-03-231-2/+10
| | | | | | Change-Id: I5820fa1d6d0f003a7cb95db115ef90b32f380a79 Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Clean-up the duplicate code in QFuture and QFutureWatcherSona Kurazyan2020-03-233-135/+69
| | | | | | | | | | | | QFuture<void> and QFutureWatcher<void> are specialized to not contain any of result fetching methods, but otherwise they share almost the same implementation with QFuture<T> and QFutureWatcher<T> respectively. This change unifies their implementations to get rid of unnecessary code duplication. Change-Id: I9494ddc58c6db192c66edb988105927da6d61a3b Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
* Fix memory leakGiulio Camuffo2020-03-231-0/+3
| | | | | | | | | When creating a new QColorSpacePrivate it must be reffed otherwise in the destructor the deref() will bring the count to -1 which is true and will not delete the d_ptr. Change-Id: Id569bae22134b56bf6ad37158d7079b495599fd7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* CMake: "Port" the c89, c99 and c11 featuresJoerg Bornemann2020-03-232-3/+11
| | | | | | | | We can ignore the tests for those features and directly ask CMake whether the compiler supports the respective language version. Change-Id: I31cd35493443fea0c6d0b0a5e641768c3bcbe736 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Make sure to install Qt3rdPartyLibraryConfig.cmake.inAlexandru Croitor2020-03-231-0/+1
| | | | | | | | | | Repos like qtshadertools need it when configuring their own bundled libraries. Amends 572c03eb7a583baf1f48e5144d2868e5588d292a Change-Id: I540e99d5bd2938299a10220a1a5e0d97091077b3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* tst_sqlquery: Skip datetime test if no database drivers are availableLeander Beernaert2020-03-231-0/+3
| | | | | Change-Id: I4a4619f2edc3c82fc37605d54e9bedc36abd7388 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: pro2cmake: Consider system-assimp for conditionsAlexandru Croitor2020-03-231-0/+1
| | | | | | Change-Id: Idee55dfdd88b04792dc1485a818ab41218fa2707 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* CMake: Fix creation of forwarding headers to be at configure timeAlexandru Croitor2020-03-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | qt_add_module checks for the existence of the following directory include/QtFoo/6.0.0/Foo when deciding whether a private module target should contain that path in its INTERFACE_INCLUDE_DIRECTORIES. There are 2 cases when it's created, when running syncqt, and inside qt_install_injections. If syncqt doesn't create it because there are no private headers (like in qttools/src/global), qt_install_injections created it at generation time (for injected configure headers like qttools-config_p.h) Unfortunately that caused the existence check mentioned above to fail, not exporting the path in the QtToolsPrivate's include directories, and failing the qttools build. To fix that, create the injection files (and directories) at configure time, using qt_configure_file instead of file(GENERATE). Change-Id: Idd9b6ec36e986c4de95d11557170e1c70927211c Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Introduce qt_configure_fileAlexandru Croitor2020-03-233-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It has the same kind of signature as file(GENERATE) but creates the files at configure time rather than generation time. CMake provides a few ways to generate files file(WRITE) -> always overrides content configure_file() -> only overrides if content changes, creates file at configure time, can only take a file as input file(GENERATE) -> only overrides if content changes, creats file at generation time, can take a string or file as input Because dealing with an input file is a hassle (need to create one, make sure it's installed, make sure it's used correctly in the various build types like super-build, non-prefix-build, etc) people tend to use file(GENERATE) instead, which can take a string argument, and is thus easier to use. Unfortunately that introduces subtle bugs because the file is created at generation time, but there are existence checks which are done at configuration time. Thus qt_configure_file allows creation of files at configure time, without having to provide an input file. Underneath it uses configure_file(). Once CMake 3.18 is released, the implementation can be switched to use file(CONFIGURE). Change-Id: Ic8f8d88541ef0b25d01af143352c8c9ba390ad5f Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>