summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup QMetaClassInfoLars Knoll2020-06-112-5/+14
| | | | | Change-Id: I0b4fa4568f8479106053e0fae72fc802fca74a65 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Cleanups in QMetaPropertyFabian Kosmale2020-06-1110-258/+128
| | | | | | | | | This changes the layout of the meta object data, so also bump the meta object revision. Original-patch-by: Lars Knoll <lars.knoll@qt.io> Change-Id: I176fb16c207e8ebe59e358e69554be813406232f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Qt6: remove support for property flags being functionsLars Knoll2020-06-117-195/+30
| | | | | | | | | | | | | | | Property flags should be compile time booleans, not something to be determined at runtime. We've been using this to dynamically disable some properties in QWidget based classes dependent on the state of a different property, but this should better get implemented on top of our widgets. Change-Id: I6296e8761303ecdf24d9e842142e8596304c015d Reviewed-by: Simon Hausmann <hausmann@gmail.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Clean up QMetaEnum codeLars Knoll2020-06-114-61/+55
| | | | | | Change-Id: I9c1fcfd72890fb3d69d2d9caed7f3cff931c3ff6 Reviewed-by: Simon Hausmann <hausmann@gmail.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QMetaMethod: clean up offset handlingLars Knoll2020-06-115-47/+86
| | | | | | | | | | | | Centralize the offset handling in one place and avoid lots of magic numbers in various places. Expose the number of ints per method in QMetaObjectPrivate as a constant, so that code in other places can access it via private API. Change-Id: I59790287a17ea47e6160ec65d9c8d0aaee748947 Reviewed-by: Simon Hausmann <hausmann@gmail.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move windows font databases into QtGuiFriedemann Kleint2020-06-1139-244/+228
| | | | | | | | | | Requires adapting a few config checks since cmake currently does not detect directwrite. Task-number: QTBUG-83255 Task-number: QTBUG-83931 Change-Id: I521f1924f701260b41dccbcecf87b19f08df5ccc Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Remove more QStringRef overloads that aren't requiredLars Knoll2020-06-118-273/+0
| | | | | | | | The QStringView versions will do the job just fine :) Task-number: QTBUG-84319 Change-Id: I376b310deb27683fd98bbcc55e0f56014cacecc3 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Remove most overloads taking a QStringRef from the QString APILars Knoll2020-06-112-141/+22
| | | | | | | | | | Add QStringView overloads where they were missing. This keeps things almost 100% source compatible. Task-number: QTBUG-84319 Change-Id: Ica8ee773b2ce655e9597097786117959e34b236e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QString: remove remnants of old multiArg()Marc Mutz2020-06-112-63/+0
| | | | | Change-Id: I3bc5bab491ce74daa37f320ea5d4324f9827e870 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix breakage of QPushButton on macOS when a style sheet was setVolker Hilsheimer2020-06-112-8/+7
| | | | | | | | | | | | | | | | | | | | | Amends comment 6e1d70ae12baae4610356ec7b69635ad75a97b4e, which introduced SE_PushButtonBevel so that QPushButton could ignore clicks outside of the button's bevel. In the macOS style, make sure that the framerect we pass to NSButton::alignmentRectForFrame is the rect we receive from QPushButton in the style options. The frame property of the shared NSButton* object might not be initialized. In the style sheet style, handle SE_PushButtonBevel the same ways as Contents and FocusRect, as it is not a separately styleable property. Change-Id: I12eb1b046c864a02b34d276e6352e2e16d44231e Fixes: QTBUG-84852 Fixes: QTBUG-84879 Task-number: QTBUG-81452 Pick-to: 5.15 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Android: fix behovior of right click to not interfere with other clicksAssam Boudjelthia2020-06-111-10/+10
| | | | | | | | | | | | To allow treating long press as right click on Android, set the environment variable QT_ANDROID_ENABLE_RIGHT_MOUSE_FROM_LONG_PRESS to 1. Pick-to: 5.15 Fixes: QTBUG-73416 Task-number: QTBUG-84179 Change-Id: Ibe1d6af6ab9965112f1418638a088717798b554c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add more LTTNG tracing pointsJosé Dapena Paz2020-06-119-1/+68
| | | | | | | | | | | | * QImage and QPixmap copy and transform operations. * OpenGL paint engine texture cache texture upload * OpenGL paint engine draw texture Task-number: QTBUG-83347 Pick-to: 5.15 Change-Id: I03150d6ff80cbbcd787133d75854715cb81b5571 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Make it possible to avoid loading comments from JPEG and PNG filesElvis Lee2020-06-114-0/+17
| | | | | | | | | | | | Skip reading JPEG and PNG comments information from the header to save the memory. This can now be configured through the feature system. Change-Id: I3744312f69aa3201d5188776cbd99fe690b75d32 Task-number: QTBUG-83123 Pick-to: 5.15 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Windows: Fix registry string read failuresFriedemann Kleint2020-06-111-11/+9
| | | | | | | | | | | | On Windows 7, it has been observed that the time zone registry key is a string of size 256 padded with 0. Use QString::fromWCharArray(), relying on 0-termination to cope with it. Pick-to: 5.15 Fixes: QTBUG-84455 Change-Id: I5d242e2de73c1ea09344aee8de8eea941bc52bab Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Port QtPrintSupport to QStringViewLars Knoll2020-06-112-2/+2
| | | | | | Task-number: QTBUG-84319 Change-Id: I4a2407dcf1c2979cd109e7cb3dd7d6395c56b927 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port testlib from QStringRef to QStringViewLars Knoll2020-06-112-2/+2
| | | | | | Task-number: QTBUG-84319 Change-Id: I780945c8923c0a03e9c0a32d039da0c793f650fd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port QtSql from QStringRef to QStringViewLars Knoll2020-06-112-5/+5
| | | | | | Task-number: QTBUG-84319 Change-Id: Icc9b955dae1aa13b16c01e26192cb82f828903b1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port QtGui from QStringRef to QStringViewLars Knoll2020-06-1115-45/+45
| | | | | | Task-number: QTBUG-84319 Change-Id: I1761096fbcc9421a013cf73f831a2a2ba0c18006 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Port mimetypes away from QStringRefLars Knoll2020-06-117-8/+8
| | | | | | Task-number: QTBUG-84319 Change-Id: I2bed1149df7f11495fd9dc3577828c0790b17dab Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Port QLocale::quoteString from QStringRef to QStringViewLars Knoll2020-06-116-17/+16
| | | | | | | Task-number: QTBUG-84319 Change-Id: I29726ebfda7a5f51a0a6ee29e905b0b904256c8d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* wasm: fix network POST data corruptionLorn Potter2020-06-112-5/+5
| | | | | | | | | | Emscripten does not like when the post data gets deleted in the local scope. Fixes: QTBUG-84685 Pick-to: 5.15 Change-Id: I17f9d5cc3253c26b42253daa68e2fbaccc48eaf6 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Fix QToolButton menus showing on primary screens in multiscreen setupsFriedemann Kleint2020-06-101-1/+2
| | | | | | | | | | | | | | Calculate an initial position based on the current size hint and pass it to QMenuPrivate::exec(), which does screen checks based on it. Amends a78d66743171557d79b16c08be775e3ac15bb4ef. Pick-to: 5.15 Fixes: QTBUG-84462 Task-number: QTBUG-78966 Change-Id: Icae8d2bc0fb50c4c853cfebaa2b2250fc06542e3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Merge QToolTip::showText overloads as per ### Qt 6 commentsVolker Hilsheimer2020-06-102-28/+6
| | | | | Change-Id: Ic156fed27bd535daf828e5d95049591833614307 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Clean up special functions for QTextFrame::iteratorVolker Hilsheimer2020-06-102-53/+8
| | | | | | | | | Member initialization syntax allows declaring now inline default constructor as default. Remove copy/move/assignment operators, which had already been disabled. Change-Id: Ie407e65aa39c72f5e6436a6beaf9323663f78cfc Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Restore default role names in QStandardItemModel::roleNames()Shawn Rutledge2020-06-101-0/+1
| | | | | | | | | | | | | | Amends 32b586864e3a4398da38c045f4ac0823c3dc3c57, which added an override of QStandardItemModel::roleNames(). It's good for it to have its own QHash so that roles can be added, and because QStandardItemModel::setItemRoleNames() remains un-deprecated; but before that change, they were the roles that QAbstractItemModel had initialized from QAbstractItemModelPrivate::defaultRoleNames(). In particular, we need "display" to map to Qt::DisplayRole by default; several tests in qtdeclarative depend on that. Change-Id: I58b2d6aa6b6c78b1d618335ddc4ecb834af57274 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Move the UNIX event dispatchers into QtGuiFriedemann Kleint2020-06-1060-185/+85
| | | | | | Task-number: QTBUG-83255 Change-Id: I7d32eb1ec01784c9ed6bf5fc4913ffc5b3a34a49 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Doc: Improve documentation for QLocale::FormatTypeKai Koehne2020-06-102-21/+33
| | | | | | | | | | | | | | | | LongFormat and ShortFormat are not limited to day and month names. Different locales might also use numbers for months instead of strings, so the example is a bit misleading. Instead of extending the enum description even more there's now examples in the dateFormat(), timeFormat(), dateTimeFormat() functions. Task-number: QTBUG-83841 Pick-to: 5.15 Change-Id: Icea2cbce7e9505d706a2171e7d1f4486abdb20be Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Long live std::pair!Giuseppe D'Angelo2020-06-1017-474/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make QPair an alias for std::pair, and qMakePair just a forwarder towards std::make_pair. Why? Fundamentally to ditch a bunch of NIH code; gain for free structured bindings, std::tuple and std::reference_wrapper compatibility, and so on. Breakages: * Some that code manually forward declares QPair. We don't care about it (<QContainerFwd> is the proper way). * Some code that overloads on std::pair and QPair. Luckily it's mostly centralized: debug, metatypes, testing macros. Just remove the QPair overload. * Usages of qMakePair forcing the template type parameters. There are a handful of these in qtbase, but only one was actually broken. * std::pair is NOT (and will never likely be) trivially copiable. This is agreed to be a mistake done by practically all implementations in C++11, can can't be fixed without breaking ABI. Some code using QPair assuming it's trivially copiable may break; exactly one occurrence was in qtbase. * QMetaType logic extracts the type names in two different ways, one by looking at the source code string (e.g. extracted by moc) and one via some ad-hoc reflection in C++. We need to make "QPair" (as spelled in the source code) be the same as "std::pair" (gathered via reflection, which will see through the alias) when compared. The way it's already done e.g. for QList is by actually replacing the moc-extracted name with the name of the actual type used in C++; do the same here. On libc++, std::pair is actually in an inline namespace -- i.e. std::__1::pair; the reflection will extract and store "std::__1::pair" so we need an ad-hoc fix to QMetaType. [ChangeLog][QtCore][QPair] QPair is now an alias to std::pair, and does not exist as a class in Qt any more. This may break code such as functions overloaded for both QPair and std::pair. Usually, the overload taking a QPair can be safely discarded, leaving only the one taking a std::pair. QPair API has not changed, and qMakePair is still available for compatibility (although new code is encouraged to use std::pair and std::make_pair directly instead). Change-Id: I7725c751bf23946cde577b1406e86a336c0a3dcf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QLatin1String: add toString()Marc Mutz2020-06-102-0/+18
| | | | | | | | | For symmetry with other views. [ChangeLog][QtCore][QLatin1String] Added toString(). Change-Id: I4a0677e2dbd009e8da097f4cb0dbb27a6baf5469 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove the openglextensions moduleEirik Aavitsland2020-06-106-27260/+0
| | | | | | | | | | | | | [ChangeLog][General] The QtOpenglExtensions module has been discontinued. It provided only convenience functionality for certain direct OpenGL usage. With the new RHI graphics API abstraction, that is no longer a primary use case. Applications that still need to access that API have a number of alternative options, including QOpenGLExtraFunctions. Fixes: QTBUG-84085 Change-Id: I272af61c69ebcec207b576d67d08b59623d485ec Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Port QtNetwork from QStringRef to QStringViewLars Knoll2020-06-1010-34/+34
| | | | | | | | Task-number: QTBUG-84319 Change-Id: I0f4e83c282b58ab4cc5e397b21981978f79d92cf Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Port QUrl away from QStringRefLars Knoll2020-06-101-9/+9
| | | | | | | Task-number: QTBUG-84319 Change-Id: I6167599ac86f17d37fbb6ea90d302641969b0f72 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Port QMetaObject away from QStringRefLars Knoll2020-06-101-3/+3
| | | | | | Task-number: QTBUG-84319 Change-Id: I905c2e1780a2ec42b1d189494bd5399e124df354 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port QLibraryInfo from QStringRef to QStringViewLars Knoll2020-06-101-1/+1
| | | | | | Task-number: QTBUG-84319 Change-Id: I500e43e1918b22d636f11c915967e75223be9ef2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port QtWidgets from QStringRef to QStringViewLars Knoll2020-06-1012-20/+20
| | | | | Change-Id: Ibe348e7aea838ab8c2d628bb43709c867a506637 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove accidental leftover debug printoutMårten Nordheim2020-06-101-1/+0
| | | | | Change-Id: I1de2f1dfd8ba4a19049ef96d85cf15206510410d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc snippets: Use nullptr instead of 0 literalPaul Wicking2020-06-1011-11/+11
| | | | | | | | | Also mark constructors explicit, where applicable. Pick-to: 5.15 Fixes: QTBUG-84859 Change-Id: I145d366d854fd6b4373bcc23d0b880d6361d9014 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* qGetPtrHelper: make it work with null d-pointersGiuseppe D'Angelo2020-06-101-1/+1
| | | | | | | | | operator-> comes with the precondition that the smart pointer is not null. Having null d-pointers is a valid use case, so enable it by using get() instead of operator->(). Change-Id: I78d77ca8c44e92a65ca98b15d0620bc3a1917ad2 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Q(E)SDP: add get()Giuseppe D'Angelo2020-06-102-0/+21
| | | | | | | | | | [ChangeLog][QtCore][QSharedDataPointer] Added get() for STL compatibility. [ChangeLog][QtCore][QExplicitlySharedDataPointer] Added get() for STL compatibility. Change-Id: I1acb3b4f4bd70842ed53f6437be10404b67d9909 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* CMake: Fix libraries in qt_lib_XXX_private.pri files for NMCJoerg Bornemann2020-06-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | qmake_use.prf understands the _DEBUG and _RELEASE suffixes for QMAKE_LIBS_XXX entries. The CMake configuration "Debug" is considered for the _DEBUG entries, "Release" and "RelWithDebInfo" for _RELEASE. The qt_lib_XXX_private.pri files are now generated in multiple steps: 1. The QT_LIBS_XXX information is generated per $<CONFIG> and written to .cmake files. 2. A preliminary qt_lib_XXX_private.pri file is generated, containing only configuration-independent data. 3. A custom command runs the QtGenerateLibPri.cmake script that combines the files from step 1 and 2 into the final qt_lib_XXX_private.pri file. The same is done for mkspecs/qmodule.pri. To be able to trigger custom commands from header modules, which are interface libraries, we introduce one XXX_timestamp ALL target per header module that creates a timestamp file. To that XXX_timestamp target we add the pri file generation target as dependency. Fixes: QTBUG-84348 Change-Id: I610f279e37feeb7eceb9ef20b3ddfecff8cfbf81 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Ensure left/right/mid behave in a compatible wayLars Knoll2020-06-098-101/+135
| | | | | | | | | | | | | | | | | | | | QString and QStringRef did bounds checking for left/right/mid, whereas QStringView was asserting on out of bounds. Relax the behavior for QStringView and do bounds checking on pos/n as well. This removes a source of potentially hidden errors when porting from QStringRef (or QString) to QStringView. Unfortunately, one difference remains, where QByteArray::left/right() behaves differently (and somewhat more sane) than QString and QStringRef. We're keeping the difference here, as it has been around for many years. Mark left/right/mid as obsolete and to be replaced with the new first/last/slice methods. Change-Id: I18c203799ba78c928a4610a6038089f27696c22e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Make QLayout::spacing/setSpacing virtual, remove qobject_cast hackVolker Hilsheimer2020-06-095-39/+16
| | | | | Change-Id: If256609a1f561b957378010d88120f5aaf94a45e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Add QPromise implementationAndrei Golubev2020-06-095-1/+179
| | | | | | | | | | | | | | | | | | | | | | QPromise and QFuture created from it share the same internal state (namely, QFutureInterface object). QPromise provides high-level management of the shared resource, ensuring thread-safe behavior on construction and destruction (also taking into account QFuture::waitForFinished() semantics). QFuture acts as a primary controller of QPromise via action initiating methods such as suspend() or cancel(). QPromise is equipped with methods to check the status, but the actual handling of QFuture action "requests" is user-defined. [ChangeLog][QtCore][QPromise] Added QPromise class to accompany QFuture. It allows one to communicate computation results and progress to the QFuture via a shared state. Task-number: QTBUG-81586 Change-Id: Ibab9681d35fe63754bf394ad0e7923e2683e2457 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Add since markers for the Qt::endl, etc.Albert Astals Cid2020-06-091-24/+72
| | | | | | | | | | | The Qt namespace was introduced in 461e89ee1a53f7669e0215f9015380c4a9d62371 which is only since 5.14 Also remove QTextStreamFunctions:: from the documentation of the deprecated functions since the QTextStreamFunctions namespace is a syntaxic workaround. Pick-to: 5.15 Change-Id: I9c15bcc49984bf5f5099c2f7df6b8adb3d2c61fb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Pass QVariant by reference, address ### Qt 6 commentVolker Hilsheimer2020-06-092-2/+2
| | | | | Change-Id: I0a3fab84e699c73299e2c72a6739ecf4ed856177 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* metatype: Do not try analyze T in Q*Pointer<T> if T is incompleteFabian Kosmale2020-06-091-1/+19
| | | | | Change-Id: I41737ce470f6d2b071ad5e85f8cad1da3869241c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Move the Windows Event Dispatcher into QtGuiFriedemann Kleint2020-06-0923-88/+87
| | | | | | Task-number: QTBUG-83255 Change-Id: Ida86f27d7f52b9be48fbea909979320866ff8dae Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* macOS: Add a few more local autorelease pools to QCocoaGLContextTor Arne Vestbø2020-06-091-0/+6
| | | | | | | | | | Prevents buildup of autoreleased NSViews (drawables) in the outer pool of the main runloop, which may not drain as often as we wish. Change-Id: Ifcf7317c50ec243e0d957bf4a19aab8bf34d5dd6 Fixes: QTBUG-84762 Pick-to: 5.15 5.12 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Remove deprecated methods and address some ### Qt 6 comments in gui/textVolker Hilsheimer2020-06-095-86/+2
| | | | | Change-Id: If1ed58ecbb13df88bdb1d72caccfd01c14d42eac Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QPointer: add get()Giuseppe D'Angelo2020-06-092-0/+9
| | | | | | | | [ChangeLog][QtCore][QPointer] Added get() for STL compatibility. Change-Id: I84bf9d58cd92e1bc74f731c3e9002031045f8f5c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>