summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Vulkan: Add platform hooks before presentingJohan Klokkhammer Helsing2019-10-086-0/+29
| | | | | | | | | | This allows the Wayland plugin to circumvent the frame callback handling of the driver (which blocks until the frame is presented, potentially forever, if the window is minimized). Task-number: QTBUG-78000 Change-Id: Ia7d347019dfeae3bfcfad3d0cca3f4fffdc8c7a9 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Drop unused codeGiuseppe D'Angelo2019-10-071-16/+0
| | | | | | | | These defines are never used; maybe a remnant from Qt 4? Change-Id: Ieb12e629493e5483ca5ab84577569610eceb9417 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-0533-112/+201
|\ | | | | | | Change-Id: I554a2762890391b3b6013c8b82211a8386a4ced8
| * QSysInfo::prettyProductName(): Fix up dc042c6deea7e90b4a9dfcffdc33cbe61df421bdFriedemann Kleint2019-10-041-6/+5
| | | | | | | | | | | | | | | | | | - Fix indentation - Fix empty name returned for WinRT. - Remove duplicated string "Version" for Windows 10 Change-Id: Ia093006a6f8d8c88257d6b4e31afa37510dc6037 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Fix build with QT_NO_CSSPARSER / -no-feature-cssparserNils Jeisecke2019-10-042-0/+30
| | | | | | | | | | | | | | | | | | Some parts of the new QTextDocument table border logic depend on the QCss namespace which is not available with -no-feature-cssparser. Change-Id: Ib8396894dc35872f22c634e1d6c38968d3dd4756 Reviewed-by: Timo Aarnipuro <timo.aarnipuro@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Include likely-adjusted uiLanguages for the system localeEdward Welbourne2019-10-043-16/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QLocale::uiLanguages() on the system locale uses whatever the system locale's query(QSystemLocale::UILanguages,...) returns. On Android, this is just a list of locales. However, for non-system locales, we also include some results of removing likely sub-tags from the locale name, where equivalent. Thus zh-CN would also get zh and zh-Hans-CN added to it; however, if the system locale is zh-Hans-CN, the shorter forms are omitted. So post-process the system locale list in the same way, albeit tweaked to avoid duplicates and rearranged so that we can insert likely-adjusted entries between what they adjust and what followed it. Added QLocalePrivate::rawName() in the process, since it looks likely to be useful in other contexts (and I needed its value): it just joins such tags as are non-Any. This, however, uses QByteArrayList, so added that (it's small) to the bootstrap library and qmake. This follows up on commit 8796e3016fae1672e727e2fa4e48f671a0c667ba. [ChangeLog][QtCore][QLocale] The system locale's UI languages list now includes, as for that of an ordinary locale, the results of adding likely sub-tags from each locale name, and of removing some, where this doesn't change which locale is specified. This gives searches for translation files a better chance of finding a suitable file. Fixes: QTBUG-75413 Change-Id: Iaafd79aac6a0fdd5f44aed16e445e84a2267c9da Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * CoreText: Use categorized loggingTor Arne Vestbø2019-10-041-4/+4
| | | | | | | | | | | | Change-Id: I4cfa6b0ef15adb7e600d66f4fe5b3dc17470f1c3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * Simplify creating QCFTypes from CFTypeRefsTor Arne Vestbø2019-10-041-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of forcing the user to cast: QCFType<CFFooRef> foo = (CFFooRef)CFFunctionReturningCFTypeRef()); We can do it for them, since we already know the expected type: auto foo = QCFType<CFFooRef>(CFFunctionReturningCFTypeRef)); Change-Id: I994d5d6530f220288b4bfd6ab16eae9f159ce3ef Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * Add explicit QDebug stream operator for QCFStringTor Arne Vestbø2019-10-042-0/+7
| | | | | | | | | | | | | | Disambiguates between the QString and CFStringRef overloads. Change-Id: I55a7121cd7449b4adc081f6bb7e29736e7af4442 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * macOS: Add missing export of QDebug stream operator for QMacAutoReleasePoolTor Arne Vestbø2019-10-041-1/+1
| | | | | | | | | | | | Change-Id: Id3e140bd91dcbf2683a41cd9ac36ff79b8f365b4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * Fix unused function warning for prefixFromQtCoreLibraryHelperTor Arne Vestbø2019-10-041-0/+3
| | | | | | | | | | | | Change-Id: Iedbe0e9363b6bd97071b38aa1d4546777b34139d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * CMake: generate moc files for headers using Q_NAMESPACE_EXPORT tooDavid Faure2019-10-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit f66c1db16c050c introduced Q_NAMESPACE_EXPORT and cmake automoc needs to be told to trigger moc creation for headers using that. The default value for this variable, from cmake's Modules/CMakeGenericSystem.cmake is set(CMAKE_AUTOMOC_MACRO_NAMES "Q_OBJECT" "Q_GADGET" "Q_NAMESPACE") But it makes more sense to set this here than in upstream cmake, anyway, given that changes to this list happen here in qtbase. Change-Id: I07c85fd0bb5e03e98df7687a8663e28620e1fdb6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Modernize QWindowSystemInterface::handleCloseEventTor Arne Vestbø2019-10-046-24/+15
| | | | | | | | | | | | | | The base WindowSystemEvent has had an eventAccepted flag since 2014. Change-Id: Ia0aa795083cd98ece83a4c1cc010d3a25e2489fd Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * docs: Mark QPair and QLatin1Char as reentrantKavindra Palaraja2019-10-042-0/+2
| | | | | | | | | | | | Change-Id: I7d37eb13809a6fa4d1c2c74fd8aea35bdf235996 Fixes: QTBUG-78552 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * Convert a few sizeof(array)/sizeof(element0) fors to range forsAlbert Astals Cid2019-10-047-45/+37
| | | | | | | | | | | | | | | | Increases readability Change-Id: I81ea915517fd2cd6bc2780f37ba8d8097c63f44b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Merge "Merge remote-tracking branch 'origin/5.13' into 5.14"Qt Forward Merge Bot2019-10-045-8/+16
| |\
| | * Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-045-8/+16
| | |\ | | | | | | | | | | | | Change-Id: I31c1c469c00016f1bd21ecfab39794df372e56f2
| | | * Fix crash when running QtCore: Stack is misaligned on x86-64Thiago Macieira2019-10-031-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When our ELF entry point function is started by the kernel, the stack is aligned at 16 bytes. However, the stack is expected to be off by 8, due to a preceding CALL instruction which didn't exist. This cauases a crash further down as the compiler may generate aligned stack access. Change-Id: I1496b069cc534f1a838dfffd15c9dc4ef9e3869e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | | * QTreeWidget: Don't assume the selected indexes include the first columnAndy Shaw2019-10-031-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the first column is hidden in a QTreeWidget then when doing a drag then the selected indexes will not include any that have a column of 0. Therefore it has to account for this use std::unique to ensure that there is only one instance of the selected items represented by the selected indexes. Fixes: QTBUG-35511 Change-Id: I39dff596959f30db7378ff946735ee2866778524 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | * Remove the unregistered recognizer from the main listAndy Shaw2019-10-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This amends 1320b2f64412f0d86bd09c66c22df845e13a94a1 to keep the behavior of removing from the main list but without re-introducing the memory leak. Fixes: QTBUG-77770 Change-Id: I91fa6cb71fab8d60baa35417fdb34322af11dbbb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | | * Always update the pressed position when pressing on an itemAndy Shaw2019-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there is an item already selected then the pressed position needs to be updated regardless when selecting a new one even if it is not made current as this will be used to determine the drag distance. Otherwise it will start a drag within one pixel of moving due to the fact it is doing it relative to the first item to be pressed rather than the last. Fixes: QTBUG-78797 Change-Id: I853041b278b2e92ccf20660f7ced945fef72527a Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
| | | * QList: make cast from ptrdiff_t to int explicitEdward Welbourne2019-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends ffc2d5722317fcab86865b11491d7bf7fef3e16d. Fixes: QTBUG-78235 Change-Id: Ie91d8d71c92bb62e3268847407b7b252c382d700 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | | Stop using QTime as a timer in QIBaseDriver::close()Shawn Rutledge2019-10-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is probably still the wrong thing to do here, though. Change-Id: I4ff76393dde0b9ad9eb4a5e0d35fb6125d141901 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | | Correct handling of -qfloat16(0)Edward Welbourne2019-10-032-3/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | It is finite and normal; it classifies as a zero; and it should not be > qfloat16(0). Added tests to match. Change-Id: I7874fb54f622b4cdf28b0894050ad3e75cf5d77c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add support for machine-readable JSON output to the MOCSimon Hausmann2019-10-046-6/+399
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The --output-json parameter will make moc produce a .json file next to the regular output file. With --collect-json the .json files for a module can be merged into a single one. Task-number: QTBUG-68796 Change-Id: I0e8fb802d47bd22da219701a8df947973d4bd7b5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | qhighdpiscaling: Add missing parameter to logicalDpi()Timo Aarnipuro2019-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | Fixes build with -no-feature-highdpiscaling. Change-Id: Ie3208992f739ac1a2ddea54bcca067666e9367e8 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-0436-823/+649
|\| | | | | | | | | | | Change-Id: I43393cf47675fd6c14972df1221986335c6f493c
| * | PSQL: don't recreate QSqlField in loop in QPSQLResult::record()Christian Ehrlicher2019-10-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move out the QSqlField variable out of the loop to avoid useless (de)allocations of QSqlField. Change-Id: I2c9e4c84f75e994d5eb1438839d502f6da531841 Reviewed-by: Robert Szefner <robertsz27@interia.pl> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * | QPainter: don't print deprecated warnings for HighQualityAntialiasingChristian Ehrlicher2019-10-034-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Add pragmas to not print warnings about the usage of the deprecated warnings inside QtCore. Change-Id: I2cd9f111cdf13cddff527ab3bac7fa80417d1445 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | Export lcEventDispatcher in private namespaceTor Arne Vestbø2019-10-033-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | The category is used outside of QtCore, and needs to be exported for shared library builds. Change-Id: I9bba477d37b823146eaec4e1e53197651f09c013 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | Add TriangleFan pipeline topologyPaul Olav Tvete2019-10-036-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Triangle fan drawing is only supported on some platforms. The feature flag QRhi::TriangleFanTopology is set accordingly. In general, TriangleStrip topology will be more efficient on most GPUs. However, if polygon data is already stored as triangle fans, the CPU savings may be more significant. Change-Id: I9704fad751d2119eac8791074f58942dd9315601 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * | rhi: vulkan: Disable vkmemalloc's own synchronizationLaszlo Agocs2019-10-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | No need for those mutexes. Task-number: QTBUG-78908 Change-Id: I60c32df1f8729098f1894eff7c71e7fbcbd23ecf Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| * | rhi: Remove QVectors from the data description structs as wellLaszlo Agocs2019-10-039-200/+254
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As usual, keep some QVector overloads around to allow Qt Quick to compile. Color attachments and vertex input bindings get an at(index) type of accessor, unlike any other of similar lists. This is because there the index is significant, and sequential iteration is not the only type of operation that is performed. Sometimes a lookup based on an index will be needed as well. Task-number: QTBUG-78883 Change-Id: I3882941f09e94ee2f179e0e9b8161551f0d5dae7 Reviewed-by: Christian Strømme <christian.stromme@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | GSSAPI: strengthen configure test and make it a libraryMårten Nordheim2019-10-032-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way we can actually filter out times in sitatuations where it proved to not be available and as a library we can simply "use" it. Added in the pkgConfig source as well to make sure we can pick it up on systems where it has a different name. Fixes: QTBUG-78765 Change-Id: I4754923ddafd9274105e4f93d66a4039872e310c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: André Klitzing <aklitzing@gmail.com>
| * | Quiet several more warnings about QWheelEvent deprecationsShawn Rutledge2019-10-023-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to ensure that the qt4D and qt4O members are still initialized the same way whenever deprecated constructors are used; and we want to be able to verify it using qDebug. So we merely suppress these warnings. Change-Id: Ic2e5f0dd6feeabe81f06f9c31693c550ac0781e3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Android: Do not extract QML assets dataBogDan Vatra2019-10-026-398/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead to extract the assets QML file, we create a .rcc bundle file which is register by android qpa plugin before the it invokes the main function. Thsi way we avoid extracting the QML files from assets as they can be accessed directly from resources. [ChangeLog][Android] Instead of bundling QML resources in assets and extracting them on first start, Qt now creates an .rcc file and register it before invoking the main function. Change-Id: Icb2fda79d82c5af102cc9a0276ff26bb0d1599e8 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * | Android: rework assets supportBogDan Vatra2019-10-025-192/+203
| | | | | | | | | | | | | | | | | | | | | The new version fix QDirIterators and it lists all the files and dirs. Change-Id: I5a30eedb61ab2397a84365d00f308cda0c194de2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * | tslib plugin: remove debug print on old tslib versionsv5.14.0-beta1Rolf Eike Beer2019-10-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces a dependency on ts_get_eventpath(), which is only available in tslib 1.15 and newer. This raises the required version to an unneeded level, so just drop the debug message if the API is not available. Change-Id: I4a1cd7abec8d139e70555506d9d21edacf0f4d71 Fixes: QTBUG-78867 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Fabian Vogt <fabian@ritter-vogt.de>
| * | Android: Fix plugins namingBogDan Vatra2019-10-014-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android 5 doesn't extract the files from libs folder unless they are prefixed with "lib". This patch sets a proper name for the plugin which will make gdb happy and it will also avoid any name clashes. If we rename the plugins when we copy them, gdb won't find them, therefore it can't load their symbols. On Android all the libs are in a single folder, so to make sure we don't have any name clashes, we are prefixing the plugin name with it's relative path to qt folder (we replace / with _). Fixes: QTBUG-78616 Change-Id: I7e0e67d65448532769d69f46b1856c029e2cf5cb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | QTableWidget: Fix -Wdeprecated-copy warningAlbert Astals Cid2019-10-032-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In file included from ../../include/QtCore/qlist.h:1, from ../../include/QtCore/../../../qtbase_dev_de_verdad/src/corelib/kernel/qobject.h:49, from ../../include/QtCore/qobject.h:1, from ../../include/QtCore/../../../qtbase_dev_de_verdad/src/corelib/kernel/qcoreapplication.h:46, from ../../include/QtCore/qcoreapplication.h:1, from /src/widgets/kernel/../../gui/kernel/../../corelib/global/qt_pch.h:66, from /src/widgets/kernel/../../gui/kernel/qt_gui_pch.h:48, from /src/widgets/kernel/qt_widgets_pch.h:48: ../../include/QtCore/../../../qtbase_dev_de_verdad/src/corelib/tools/qlist.h: In instantiation of ‘void QList<T>::node_construct(QList<T>::Node*, const T&) [with T = QTableWidgetSelectionRange]’: ../../include/QtCore/../../../qtbase_dev_de_verdad/src/corelib/tools/qlist.h:614:13: required from ‘void QList<T>::append(const T&) [with T = QTableWidgetSelectionRange]’ /src/widgets/itemviews/qtablewidget.cpp:2416:71: required from here ../../include/QtCore/../../../qtbase_dev_de_verdad/src/corelib/tools/qlist.h:471:35: warning: implicitly-declared ‘constexpr QTableWidgetSelectionRange& QTableWidgetSelectionRange::operator=(const QTableWidgetSelectionRange&)’ is deprecated [-Wdeprecated-copy] 471 | else *reinterpret_cast<T*>(n) = t; | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~ In file included from /src/widgets/itemviews/qtablewidget.cpp:40: /src/widgets/itemviews/qtablewidget.h:52:24: note: because ‘QTableWidgetSelectionRange’ has user-provided ‘QTableWidgetSelectionRange::QTableWidgetSelectionRange(const QTableWidgetSelectionRange&)’ 52 | class Q_WIDGETS_EXPORT QTableWidgetSelectionRange | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: I72ca2dbf1d46a0f51a6fc7b7df80c79f937657de Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | QItemViews: hide ToolTip/What's this when cell has no data for itChristian Ehrlicher2019-10-031-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A QToolTip/QWhatsThis was not hidden when the cursor moved to a cell which does not return valid data for Qt::ToolTip/WhatsThisRole or when the index is not valid. Therefore a wrong information was shown e.g. when the cursor moved from a cell with a tooltip to one without. Fix it by passing an empty string to QToolTip/QWhatsThis::showText(). This syncs the behavior with QGraphicsScene::helpEvent(). Fixes: QTBUG-78722 Change-Id: Ie99fe3b1d35d2f5be41dd65e2fe3173b0cc551b2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Move away from recently deprecated HTTP2 attributesMårten Nordheim2019-10-013-6/+6
| | | | | | | | | | | | | | | | | | | | | Amends f59f67287fa17e8d4edf6a231c010f768d1b76e8 Change-Id: I74045c558e9d20f9f45f150a91f181a04e9b8c69 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2019-10-0145-3839/+5170
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-0145-3839/+5170
| |\| | | | | | | | | | | | | | Change-Id: I77ba01f09b3dbcaf13cb265a70d9da661c32a61f
| | * | rhi: Speed up buffer and texture trackingLaszlo Agocs2019-09-304-32/+30
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-78862 Change-Id: If278bd55530081cbbdbab8dd6e14d86e28da558e Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * | Remove QVector in the API of QRhiResource subclassesLaszlo Agocs2019-09-308-27/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Forcing users to go through a QVector, when in practice they almost always want to source the data from an initializer list, a QVarLengthArray, or a plain C array, is not ideal. Especially since we can reason about the maximum number of elements in the vast majority of use cases for all the affected lists. QRhiResource is also not copyable so we do not need the usual machinery offered by containers. So switch to a QVarLengthArray. Note that a resource is not a container. The only operations we are interested in is to be able to source data either via an initializer list or by iterating on something, and to be able to extract the data, in case a user wishes to set up another resource based on the existing one. In some cases a QVector overload is kept for source compatibility with other modules (Qt Quick). These may be removed in the future. Also do a similar QVector->QVarLengthArray change in the srb-related data in the backends. Change-Id: I6f5b2ebd8e75416ce0cca0817bb529446a4cb664 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * | De-d-pointer QRhiShaderResourceBindingLaszlo Agocs2019-09-307-190/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sad to see this go since the d pointer pattern with implicit sharing would have been perfect for this class, had this been a public API. However, as binary compatibility will not be a concern for QRhi classes, it is wasteful to allocate memory on every QRhiShaderResourceBinding. This allows users, such as Qt Quick, to use QRhiShaderResourceBinding as a cheap, simple, value class, without having to invent their own alternatives in performance critical places. The change brings a not insignficant improvement in certain qmlbench scenes (the ones with thousands of unbatched geometry nodes). Change-Id: I6d1dced6498d9ad625f90ead78bc0a417ea99ed8 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * | Share and enable shader disk cache in QRhi OpenGL backendLaszlo Agocs2019-09-305-120/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The expectation for it is to function identically to what we get with QOpenGLShaderProgram. (same environment variables, same logging categories, etc.). QOpenGLProgramBinaryCache is now shared between the QOpenGL convenience classes (like QOpenGLShaderProgram) and QRhi. To achieve more modularity and to prepare for QOpenGLShaderProgram and friends moving out of QtGui, this class cannot depend on QOpenGLShader* anymore. This involves adding some minor conversions between QRhi and QOpenGL enums for example. Change-Id: I2f4664e074823ea536281aea8006a6db159a7381 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * | Merge "Merge remote-tracking branch 'origin/5.13' into 5.14"Liang Qi2019-09-3022-3329/+4425
| | |\ \
| | | * | Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-3022-3329/+4425
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qrandom.cpp src/corelib/io/qfileinfo.cpp src/corelib/kernel/qeventdispatcher_win.cpp src/corelib/kernel/qeventdispatcher_win_p.h src/gui/text/qfontdatabase.cpp src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm src/plugins/platforms/windows/qwindowsglcontext.cpp src/testlib/qtestcase.cpp Done-With: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-With: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4893212471aa24be804c989a581810e2f714545c