summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* QList docs: lexicographical -> lexicalIvan Solovev2020-12-111-4/+4
| | | | | | | | | | | | | | | Lexicographical is not the right word for the comparison description. Other classes use the term "lexical", so QList is updated in that way too. The link to cppreference is left, because QList actually uses std::lexicographical_compare, so it's completely valid here. Pick-to: 6.0 Task-number: QTBUG-87962 Change-Id: I37bd3a92c5a3f857266e9c483d14e64eb90ce2c7 Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove already-set option style feature for QCommandLinkButtonDoris Verria2020-12-111-2/+0
| | | | | | | | | The QStyleOptionButton::CommandLinkButton feature is already set in the QComnandLinkButton's initStyleOption() so remove its setting in the paintEvent. Change-Id: Ic1d723c0671d6d478825d7ba2173db72a8b39c36 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix event() chaining in QSocketNotifierAlex Trotsenko2020-12-111-11/+15
| | | | | | | | | We should return the result of the call of the base implementation for all events that we did not handle. Also, QObject::event() does not actually activate any filters, so the comment was inaccurate as well. Change-Id: Iff6644b7b1621229f8351c83569ee72594e47197 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Don't show focus rect for QCommandLinkButtonDoris Verria2020-12-111-0/+1
| | | | | | | | | | | Since QPushButton sets WA_MacShowFocusRect attribute upon init, this will be set for QCommandLinkButton too. However, we do not want to draw the Mac focus frame for QCommandLink buttons so remove this attribute for them. Pick-to: 5.15 6.0 Change-Id: Ida7a437a54be078caaebc2c0744243d50e14a87f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Override initStyleOption() for QCommandLinkButtonDoris Verria2020-12-112-0/+7
| | | | | | | | | | | | | In QPushButton::initStyleOption() there is no style option feature set to distinguish QCommandLinkButtons. The QStyleOptionButton::CommandLink Button feature is only set during the paintEvent, but in some cases we need to check for this feature before painting. To fix, override initStyleOption for QCommandLinkButton and set the fea ture there. Pick-to: 5.15 6.0 Change-Id: I8831a6be7da642dcf8830812d99681213e7515dc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add support of invoking QFuture continuations in a given contextSona Kurazyan2020-12-114-20/+242
| | | | | | | | | | | | Added overloads of .then()/.onFailed()/.onCanceled() which take a pointer of a context object, and invoke the continuations in the object's thread. Task-number: QTBUG-86794 Change-Id: I0f3cbb0500695673fc4087af5d4b96b416e3e1ce Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* macOS: Remove setObjectName call from moveWidgetToPlatformItemTor Arne Vestbø2020-12-101-1/+0
| | | | | | | | It wasn't strictly necessary, and was causing a warning due to the use of a character literal. Change-Id: I3552ab06189b3a3f1a635b75bd6c4d8a5bce03f8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QTableView: honor spans when calculating height/width hintChristian Ehrlicher2020-12-101-0/+17
| | | | | | | | | | QTableViewPrivate::heightHintForIndex()/widthHintForIndex() did not honor spans and therefore returned too big values. Fixes: QTBUG-89116 Change-Id: I52948902b7eaaa27c092ed39da68950c3840e8e4 Pick-to: 5.15 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QHeaderView: respect the font role while calculating the elided textChristian Ehrlicher2020-12-103-11/+14
| | | | | | | | | | | | | Amends 4d943846128118e1b9932a17ce6f977a0f4127a5: - The macOS style must now elide the text by it's own since it is no longer done by QHeaderView - Add documentation of QStyleOptionHeader::textElideMode - Remove unused variables from QHeaderView::initStyleOptionForIndex() Task-number: QTBUG-86426 Change-Id: I98fc6771c0cd56d6002390125ffbab1269f6dd39 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Check date validity in calendar methods taking a QDateEdward Welbourne2020-12-101-2/+2
| | | | | | | | | Previously neglected, in dateFromParts() and dayOfWeek(), which only make sense for valid dates. Pick-to: 6.0 5.15 Change-Id: I44879bb441dbf51b96c8fd4d45e8f07423e63047 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* macOS: Disable WA_QuitOnClose on menu item widget containerTor Arne Vestbø2020-12-101-0/+2
| | | | | | | | | Otherwise it will prevent quitting of the application when the last window is closed, on account of (seemingly) being a top level window. Pick-to: 5.15 6.0 Change-Id: Ib79615dd1e9394c96d39c8f9851005b4c073c165 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Avoid overflowing QFixed in text layoutEirik Aavitsland2020-12-101-0/+3
| | | | | | | Pick-to: 6.0 5.15 5.12 Fixes: QTBUG-89172 Change-Id: Icb78c8eeb1dbe4c5d4c6476beebafc0115a91e8c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* CMake: Regenerate projects using pro2cmake one last timeAlexandru Croitor2020-12-103-1/+3
| | | | | | | | | And fix up some wrong qmake project files Pick-to: 6.0 Change-Id: I66cb82aeb9c1419a74df1a650fa78a511ade7443 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Support deferred finalization for qt6_add_executable()Craig Scott2020-12-101-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some parts of qt6_add_executable() need to take into account certain target properties, but the target is created within the function. The caller doesn't get the opportunity to modify those properties before they are used. This change provides a way to defer those property-using steps until either the project explicitly calls a function to finalize the target or the end of the current directory scope is reached. Automatic deferral to end of scope is only supported for CMake 3.19+. With CMake 3.18 or earlier, deferring the finalization step has to be explicitly requested with the new MANUAL_FINALIZATION keyword. The caller is then responsible for also calling qt6_finalize_executable() later. When the keyword is given, automatic finalization is disabled even when using CMake 3.19+. Note that while this could be implemented without CMake 3.19 features, other work relating to qt6_import_qml_plugins() will require it so we may as well use this method now. Fixes: QTBUG-88840 Task-number: QTBUG-86669 Pick-to: 6.0 Change-Id: Ic3854672ba18cff5af2ffd7f63596aa3ac492f33 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add colorspace transfer functions based on tables of inputsAllan Sandfeld Jensen2020-12-104-23/+144
| | | | | | | | This is the most basic way to represent custom transfer functions. Change-Id: I529fb647ece82c03e85ef77b056d9daf13fe5a61 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Clean up qtconcurrent.qdocconf fileKai Koehne2020-12-101-2/+1
| | | | | | | | Remove unused parent directory for exampledirs. Also fix content of excludedirs. Change-Id: Iac15ec3eb12121c0384e36c31299034624257db4 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Workaround bogus compiler warningFabian Kosmale2020-12-101-1/+10
| | | | | | | | | gcc 9.x (but not 10.x) issues a bogus warning when strlen is used on a string literal; disable the warning for those versions. Upstream bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91490 Change-Id: I7a2a4d0f6ddafcafcd9fcc62fc41ad5d78e61627 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QStringView: add some QRegularExpression-related overloadsGiuseppe D'Angelo2020-12-104-0/+176
| | | | | | | | | [ChangeLog][QtCore][QStringView] Added the indexOf(), contains(), lastIndexOf() and count() methods taking a QRegularExpression. Fixes: QTBUG-89050 Change-Id: Ic726754f67e06b3764302d2fad252e0378a77afc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QString::lastIndexOf: fix off-by-one for zero length matchesGiuseppe D'Angelo2020-12-101-2/+2
| | | | | | | | | | | Otherwise, it would report that lastIndexOf of an empty pattern in an empty string doesn't exist. Next commit adds extensive autotests; for now, disable a broken autotest (which already features a comment about why it's broken). Change-Id: I9a0e5c0142007f81f5cf93e356c8bd82f00066f7 Pick-to: 5.15 6.0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Fix FEATURE_static_runtime buildJoerg Bornemann2020-12-091-0/+1
| | | | | | | | | | | We must call qt_set_common_target_properties on Bootstrap too, because that's were FEATURE_static_runtime is handled. Change-Id: Ie54f7d599d0c3a54b761e6c679983b475e77c17d Pick-to: 6.0 Fixes: QTBUG-89201 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Eric Lemanissier <eric.lemanissier@gmail.com>
* QUrl: fix parsing of empty IPv6 addressesThiago Macieira2020-12-091-0/+6
| | | | | | | | There's an assertion. Found by Google fuzz scan of CBOR data. Pick-to: 6.0 5.15 Change-Id: I55083c2909f64a1f8868fffd164f1ff3af71605b Reviewed-by: David Faure <david.faure@kdab.com>
* QCborStreamReader: move helper function to the only place it's usedThiago Macieira2020-12-091-25/+17
| | | | | | | | Simplifies the code a little bit Pick-to: 5.15 6.0 Change-Id: I7b9b97ae9b32412abdc6fffd164545632be4590a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Revert "Android: print tailored warning if qml dependency path is a dir"Assam Boudjelthia2020-12-091-8/+2
| | | | | | | | | | | | | | | This reverts commit c730a29260eda298683803bfd5306926696eedb0. Reason for revert: The original change was wrong and caused androiddeployqt to skip valid QML resource paths.  Additionally, change log output from "file" to "path" when skipping an import path. Pick-to: 6.0 5.15 Fixes: QTBUG-89281 Change-Id: Ic338d147a04a03bb1d7acbede11b647ff036922a Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* QStringConverter: add comments marking the BOM checks and emissionsThiago Macieira2020-12-091-0/+5
| | | | | | | | Because obscure cultural references never go out of style. https://twitter.com/steveklabnik/status/1327745325688365056?s=21 Change-Id: Idbe0d2174d4943d1865cfffd1647dd3a18af1801 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use QDeadlineTimer in qlogging.cppThiago Macieira2020-12-091-3/+2
| | | | | | | No change, just shorter code. Change-Id: I25d85d86649448d5b2b3fffd1450f95b0ec66927 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QDeadlineTimer: optimize when std::chrono::steady_clock is the sameThiago Macieira2020-12-091-0/+28
| | | | | | Change-Id: Ib57b52598e2f452985e9fffd14583173716343b0 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Simplify the detection for the monotonic clock in qelapsedtimer_unix.cppThiago Macieira2020-12-091-35/+29
| | | | | | | | | | | | | Unlike the previous code, we now entrust the compiler to properly implement thread-safe statics for this code. That was the main reason why the old code was confusing, trying to determine if the clock IDs were positive or negative. Instead, simply make a call to clock_getres(CLOCK_MONOTONIC) and that will tell us if the monotonic clock is supported. Change-Id: I0031aa609e714ae983c3fffd1469522a68fa3b66 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QString: fix count(QRegularExpression)Giuseppe D'Angelo2020-12-091-3/+9
| | | | | | | | | | | | | | | | | There is an off by one in the implementation of count(): a match must be attempted even at the very end of the string, because a 0-length match can happen there. While at it, improve the documentation on the counter-intuitive behavior of count(), which doesn't merely count how many times a regexp matches into a string using ordinary global matching. [ChangeLog][QtCore][QString] Fixed a corner case when using QString::count(QRegularExpression), causing an empty in the last position not to be accounted for in the returned result. Change-Id: I064497839a96979abfbac2d0a96546ce160bbc46 Pick-to: 5.15 6.0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* macOS: Fix crash when showing parent-less platform menusTor Arne Vestbø2020-12-091-2/+2
| | | | | | | Pick-to: 6.0 Pick-to: 5.15 Change-Id: I80f02da1621e4088eb040bb16a4db3867b6ad4d7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* macOS: Remove warning about KVO observers on QNSWindow/QNSPanelTor Arne Vestbø2020-12-091-5/+0
| | | | | | | | | | | | | | | | | | NSTitleBarView in Big Sur will observe the window it is in, but makes sure to remove these observers in viewWillMoveToWindow, as it should. To avoid spamming user logs with this warning we remove it. It was dubious what cases it would have caught anyways, as anyone trying to KVO observe properties Z of a child object Y of X.Y would need to track whether X changes its Y between adding and removing the observer. There are no guarantees that Y is stable, and this applies to an NSView's window property as well. Pick-to: 6.0 Pick-to: 5.15 Pick-to: 5.12 Change-Id: I27a0d04625f96c4c5d382c39ac068721ce1e8f9d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QWidget: mark obsolete function isTopLevel() as deprecatedChristian Ehrlicher2020-12-095-6/+9
| | | | | | | | QWidget::isTopLevel() is deprecated and can be replaced 1:1 with isWindow(). Sadly it's was not marked with Q_DECL_DEPRECATED in 5.15 Change-Id: I4508fbde41927f3b82e47a75011179548325029d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QProcess: remove outdated references to QProcessManagerAlex Trotsenko2020-12-092-3/+0
| | | | | | | No such thing exists since Qt 5.5. Change-Id: Ib3f83dbb1087db1880ef37438669430e0f076301 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Don't refer to "this" in QToolTip documentationVolker Hilsheimer2020-12-091-1/+1
| | | | | | | | | All APIs are static, so there is no "this" pointer. Pick-to: 6.0 Task-number: QTBUG-89082 Change-Id: I4bfe6c14304d311b903878acd5b4c8169f4065c7 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QMetaObjectBuilder: use constexpr ifFabian Kosmale2020-12-091-37/+43
| | | | | Change-Id: I23319c263447714b280e9ba9da72162e19fe4e1b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QProcess/Unix: unify waiting in 'Starting' stateAlex Trotsenko2020-12-092-22/+11
| | | | | | | | | | | It makes no sense to poll the I/O pipes if we didn't get a start-up notification yet. And in fact, all waitFor...() functions except waitForReadyRead() did already explicitly wait for process startup completion. So fix that one up, and remove the handling of 'Starting' state from the I/O loops. Change-Id: Ibb7eb7c768bef3f9b6c54009c73b91775570102c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QProperty: Handle eager binding calling setBindingFabian Kosmale2020-12-092-0/+9
| | | | | | | | | | | | | | | | | When an eager binding triggers a setBinding call, we end up with a special kind of binding loop: setBinding() -> evaluate -> notifyObserver ^ | | / ---------------------------- We now catch set condition, and set the binding status to BindingLoop (with a distinct description). Task-number: QTBUG-87153 Task-number: QTBUG-87733 Pick-to: 6.0 Change-Id: I9f9915797d82eab820fc279baceaf89d7e5a3f4a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QProcess: migrate to QDeadlineTimerAlex Trotsenko2020-12-094-55/+41
| | | | | | | | | Replacing QElapsedTimer with QDeadlineTimer simplifies the code in waiting functions, which also improves readability. Change-Id: I56aedd356b547b6735ed0985dc81be706e292437 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QString: improve lastIndexOf(QRegularExpression) docsGiuseppe D'Angelo2020-12-091-0/+4
| | | | | | | | | | | Due to how regex matching works, lastIndexOf has to be implemented by matching from the string's beginning until the from position is reached. This might not be obvious for users, so document that. Task-number: QTBUG-89050 Pick-to: 5.15 6.0 Change-Id: I4b69ea753e7d417d980031926f1e01d77e58720d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Get rid of QPenPrivate::defaultWidthAllan Sandfeld Jensen2020-12-082-16/+8
| | | | | | | It is no longer used. Change-Id: I834e0cbd6ef4fefb52d0864053e95e7dea19b389 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Remove the deprecated m_logicalDpi declarationWeng Xuetian2020-12-081-1/+0
| | | | | Change-Id: I8d9d59f010874e5a45084afcf55640078d5eba24 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QSplashScreen: draw pixmap with SmoothTransfromMorten Johan Sørvig2020-12-081-0/+1
| | | | | | | | | | | Use high-quality scaling to improve rendering in cases where the pixmap has to be scaled down, such as when drawing a @2x pixmap at 150%. Change-Id: I216b03b61dfa2cc2cc8c573e24a576424f6f5d17 Fixes: QTBUG-88982 Pick-to: 6.0 5.15 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Add missing QT_MANGLE_NAMESPACEMorten Johan Sørvig2020-12-082-2/+2
| | | | | | | | | | | KeyValueObserver and RunLoopModeTracker were causing “Class is implemented in both...” messages when loading multiple namespaced Qt versions into the same process. Change-Id: Idbd2229c61cde6fba2c12b35d045390a371dee68 Fixes: QTBUG-89059 Pick-to: 6.0 5.15 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QList: update docsIvan Solovev2020-12-081-40/+48
| | | | | | | | | | | Update some wording to align with QString and QByteArray documentation Pick-to: 6.0 Task-number: QTBUG-87962 Change-Id: I8162769c1a5fc94fc8920ad0d4d91e95fe74825f Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Fix qdoc warning from incorrectly named method parameterVolker Hilsheimer2020-12-081-2/+2
| | | | | | | | | | | Amends 2eb7d6073d5132a8bf269f5c6fc9f89fde446ab5. Pick-to: 6.0 Task-number: QTBUG-87962 Change-Id: I55c9e8cf7db9e1e1644a76f29a9dc61b161ae551 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Restore pass-by-ref to QRect QCalendarWidget::paintCell()Edward Welbourne2020-12-082-2/+2
| | | | | | | | | | | Accidentally changed to pass-by-value while doing that to QDate, in commit af837734b2259201f126b206bd5299497e080f7b Task-number: QTBUG-86400 Change-Id: I8d2db532f537e5f82a5f3b36e72fcf7fefdd2ee5 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 8db0d701e8b1fe00cdd5d71c18afff84de606013) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix links to OpenGL documentationAndreas Buhr2020-12-081-199/+199
| | | | | | | | | | | Some links were broken. Some stated to be pointing to OpenGL ES 2.0 documentation but pointed to OpenGL ES 3.2 documentation. Task-number: QTBUG-88533 Pick-to: 6.0 Change-Id: Iad25d8f709b8fa9421039d5cb51cee21093e3191 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix MSVC warning C4267 in qstring.cppKai Koehne2020-12-081-2/+4
| | | | | | | | | | | | | | | | Fix warnings qstring.cpp(9650): warning C4267: 'argument': conversion from 'size_t' to 'uint', possible loss of data qstring.cpp(9654): warning C4267: 'argument': conversion from 'size_t' to 'uint', possible loss of data QDataStream::writeBytes expects an uint as second parameter, not size_t. This reverts parts of 744e55b85a96b37a, where the explicit cast to size_t was introduced. Pick-to: 6.0 Change-Id: I2750a6f48fc09730aa9fa21dcc31f82e33b48b8b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove qlalr documentation stubKai Koehne2020-12-084-261/+0
| | | | | | | | | The documentation is only a stub, and hasn't been built since Qt 4 times. qlalr is also first and foremost an internal tool nowadays, so it's very unlikely we will fully document it. Change-Id: I68821bf1f9ca3811ec8adda583f0c7326421c6b6 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QHeaderView: respect the font role while calculating the elided textChristian Ehrlicher2020-12-084-12/+18
| | | | | | | | | | | | | | | | | The font role in the header view was not taken into account when the text for an item should be elided. This leads to a wrongly elided text esp. visible when the font size is different to the font of QHeaderView. Fix it by passing the elide mode to the style since only the style knows the used font (e.g. bold or not bold) and available rect. This is now in sync with CE_ItemViewItem where the eliding is also done by the style and not by the item view. [ChangeLog][QtWidgets][QHeaderView] QStyleOptionHeader got a new member textElideMode. Fixes: QTBUG-86426 Change-Id: If6914fe5aaa5d285e6da55d2129f9249d90da3d7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QSystemSemaphorePrivate: Fix a call to tr() to translate()Tuomas Vaarala2020-12-081-1/+1
| | | | | | | | | | Calling QCoreApplication::tr() without #if QT_CONFIG(translation) can cause the build to fail if configured without translation. Changing the call to QCoreApplication::translate() fixes that. Pick-to: 5.15 6.0 Change-Id: I48f0e1be14fc81360b8268620afc2f6c8f255819 Reviewed-by: Andy Shaw <andy.shaw@qt.io>