summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of QT_OPENGL_ES*Eskil Abrahamsen Blomfeldt2020-04-1710-180/+168
| | | | | | | | | | | The QT_OPENGL_ES* macros are leftovers from an earlier, ad hoc configuration system, which has since been replaced by QT_CONFIG. To clean things up in Qt 6, we use the new way instead. Task-number: QTBUG-83467 Change-Id: I578dc7695bff9d5ee303b22e44f60fee22fe0c28 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move versioned OpenGL functions from QtGui to QtOpenGLJohan Klokkhammer Helsing2020-04-1667-105571/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The context—which lives in QtGui—now knows nothing about versioned functions. This changes the public API for getting version functions for a context. [ChangeLog][QtGui][OpenGL] QOpenGLContext::versionFunctions() has been removed. QOpenGLVersionFunctionsFactory::get() from the QtOpenGL module should be used instead. Previously one would call context->versionFunctions<QOpenGLFunctions_4_0_Core>(); Which now becomes QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_4_0_Core>(context); The rest of the API should be identical. Since glgen no longer compiles, and the links to its input (gl.spec and gl.tm) are dead, I've edited the previously generated files manually. If glgen is fixed, it should be quite easy to make it generate the new way. Task-number: QTBUG-74409 Change-Id: I800527e0af16a79005b276eeb74417770193c62f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Compile fixes for clang10Lars Knoll2020-04-154-15/+15
| | | | | | | Fix some warnings that are flagged as errors on clang10. Change-Id: I906634c8b2bd94db42d74a7f3d10efb086e373cc Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-112-8/+10
|\ | | | | | | | | | | | | Conflicts: tests/auto/network/socket/platformsocketengine/platformsocketengine.pri Change-Id: I22daf269a8f28f80630b5f521b91637531156404
| * Remove more calls to deprecated TouchPoint functionsShawn Rutledge2020-04-091-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Followup to ed3ed0b9db97a8fab0c03add23228b6b0a96f171 68916fede41d1eca5d07eb6b1db518d41a007616 and 3c159957f863cf8d367a9261e7016e52cd0348c1. In QWindowSystemInterfacePrivate::fromNativeTouchPoints() and QWindowSystemInterfacePrivate::toNativeTouchPoints() we continue using struct TouchPoint's QRectF area as storage for the screen position + ellipse diameters; as the comment says, this is _unrotated_, meaning that rotation is stored separately, and area should not be construed as the bounding box of the rotated ellipse. (In Qt 6 we can make the QPA touchpoint look the same as the QTouchEvent::TouchPoint to eliminate the need to calculate the center of the rect.) In QGraphicsScenePrivate::updateTouchPointsForItem(), setRect() sets the position and the ellipse diameters, but the latter is redundant because the purpose of this function is to localize a touchpoint to the coordinate system of a particular QGraphicsItem. Ellipse diameters should stay the same. In QApplicationPrivate::updateTouchPointsForWidget(), as in QGraphicsScene, we are localizing touchpoints to a widget and to the screen that the widget is shown on, so only the position needs to be set, while preserving the sub-pixel resolution that mapFromGlobal(QPoint) loses. Fixes: QTBUG-83403 Change-Id: I61d29e14cbe38567767b164af6ae895082c5e1a1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * MinGW: Fix debug only angle buildsKai Koehne2020-04-091-4/+5
| | | | | | | | | | | | | | Fixes: QTBUG-83397 Change-Id: I89e21cc8101a17dcdb232ff5df1a76cc08842434 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: André Klitzing <aklitzing@gmail.com>
* | Fix a few size_t / int conversion warningsFriedemann Kleint2020-04-102-2/+2
| | | | | | | | | | | | | | | | Change the hash function of QTypeRevision and QtFontFallbacksCacheKey to use size_t and add a few casts. Change-Id: I89a8fc617abbe8b0c67529ec41795691c99b0574 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Change qHash() to work with size_t instead of uintLars Knoll2020-04-0927-51/+51
| | | | | | | | | | | | | | | | | | | | | | This is required, so that QHash and QSet can hold more than 2^32 items on 64 bit platforms. The actual hashing functions for strings are still 32bit, this will be changed in a follow-up commit. Change-Id: I4372125252486075ff3a0b45ecfa818359fe103b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Support multiple page ranges in QPrinterSzabolcs David2020-04-098-7/+448
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new QRangeCollection type to store and manage multiple page ranges. This moves out the parser and validator logic from the platform dependent (UNIX) dialog and makes it publicly available from QPrinter. This improves the usability of QPrinter in those applications which doesn't use print dialog to configure printer. (e.g.: QTextDocument, QWebEnginePage) Change-Id: I0be5a8a64781c411f83b96a24f216605a84958e5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2020-04-0824-158/+418
|\ \
| * | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-0824-158/+418
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/doc/src/cube.qdoc src/corelib/global/qlibraryinfo.cpp src/corelib/text/qbytearray_p.h src/corelib/text/qlocale_data_p.h src/corelib/time/qhijricalendar_data_p.h src/corelib/time/qjalalicalendar_data_p.h src/corelib/time/qromancalendar_data_p.h src/network/ssl/qsslcertificate.h src/widgets/doc/src/graphicsview.qdoc src/widgets/widgets/qcombobox.cpp src/widgets/widgets/qcombobox.h tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro tests/manual/diaglib/debugproxystyle.cpp tests/manual/diaglib/qwidgetdump.cpp tests/manual/diaglib/qwindowdump.cpp tests/manual/diaglib/textdump.cpp util/locale_database/cldr2qlocalexml.py util/locale_database/qlocalexml.py util/locale_database/qlocalexml2cpp.py Resolution of util/locale_database/ are based on: https://codereview.qt-project.org/c/qt/qtbase/+/294250 and src/corelib/{text,time}/*_data_p.h were then regenerated by running those scripts. Updated CMakeLists.txt in each of tests/auto/corelib/serialization/qcborstreamreader/ tests/auto/corelib/serialization/qcborvalue/ tests/auto/gui/kernel/ and generated new ones in each of tests/auto/gui/kernel/qaddpostroutine/ tests/auto/gui/kernel/qhighdpiscaling/ tests/libfuzzer/corelib/text/qregularexpression/optimize/ tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/ tests/libfuzzer/gui/text/qtextdocument/sethtml/ tests/libfuzzer/gui/text/qtextdocument/setmarkdown/ tests/libfuzzer/gui/text/qtextlayout/beginlayout/ by running util/cmake/pro2cmake.py on their changed .pro files. Changed target name in tests/auto/gui/kernel/qaction/qaction.pro tests/auto/gui/kernel/qaction/qactiongroup.pro tests/auto/gui/kernel/qshortcut/qshortcut.pro to ensure unique target names for CMake Changed tst_QComboBox::currentIndex to not test the currentIndexChanged(QString), as that one does not exist in Qt 6 anymore. Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
| | * Wasm: don’t deadlock on parallel image conversionsMorten Johan Sørvig2020-04-051-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A special restriction of threads on WebAssembly is that you should not block the main thread, also not to wait for worker threads. For example, blocking the main thread may prevent the browser from starting a new web worker to service the pthread the main thread is waiting for. We may be able create an abstraction to support use cases like this (most likely using emscripten asyncify), but for disable use of threads to avoid deadlocking. Change-Id: I35edd5e1bb465e2549fa7cc4288b47dcd2e4244b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * qpa: Remove references to lighthouseTor Arne Vestbø2020-04-033-3/+3
| | | | | | | | | | | | | | | Change-Id: I37646113f626c878883cff49f4e186ec71bcfa15 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * macOS: Remove all use of deprecated Q_OS_OSX defineTor Arne Vestbø2020-04-035-6/+6
| | | | | | | | | | | | | | | Change-Id: I49c285604694c93d37c9d1c7cd6d3b1509858319 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * QLineEdit: clarify the impact of using validatorsVolker Hilsheimer2020-04-011-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Values that are validated as Intermediate are possible to enter, but returnPressed and editingFinished signals are not emitted. Fixes: QTBUG-82915 Change-Id: I3e194cd6ee93b3402090117b67044cf3663a232e Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * Fix 1 pixel wide imagesAllan Sandfeld Jensen2020-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Images are rounded up to 4 bytes per line minimum, so one pixel wide images might not shrink when resizing. Fixes: QTBUG-83179 Change-Id: If72c94409e4c899c5ad05b2867f5f53a94d0580f Reviewed-by: Christian Kamm <mail@ckamm.de>
| | * Finish deprecating TouchPoint::rect, sceneRect and screenRect accessorsShawn Rutledge2020-03-302-26/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | All 6 getters and setters were deprecated by doc comment \obsolete in 3c159957f863cf8d367a9261e7016e52cd0348c1 (Qt 5.9). Now we will generate compiler warnings too. Change-Id: I94c6da607fa5758072af1287c9286b6c52179cfb Reviewed-by: Frederik Gladhorn <gladhorn@kde.org>
| | * Raster painting: fix dashing for separate linesEirik Aavitsland2020-03-271-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When drawing multiple distinct (unconnected) lines (e.g. from QPainter::drawLines() or a QPainterPath with alternating movetos/linetos), the dash pattern should not continue from one to the next, as it should when drawing a connected line (e.g. polyline). Both the cosmetic stroker and the full stroker does it right, but the fast rasterizing codepath got it wrong. Fixes: QTBUG-83048 Change-Id: I3d090f7121726755a0e53cb66b99a5563ac0e1c0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Doc: Mark gamma-related functions deprecated in QImageReader/WriterTopi Reinio2020-03-262-9/+14
| | | | | | | | | | | | | | | | | | Change-Id: I0a9fbcca7a10a6555f5879cc4955f046eaa56602 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * Doc: Don't mention deprecated functions in QTabletEvent overviewTopi Reinio2020-03-261-8/+8
| | | | | | | | | | | | | | | | | | Change-Id: I5d41d6061403f2923d673376be7cf1250d0f0e82 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * Call post routines from ~QGuiApplicationMichal Klocek2020-03-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently depending if user uses QApplication or QGuiApplication we end up in different behavior when running post routines. For example QApplication destructor calls post routines before stopping event dispatcher, In case of QGuiApplication post routines are called from QCoreApplication destructor, so no more event dispatcher. This behavior is not consistent and creates troubles when releasing resources of web engine. Attached test will hang on windows with QGuiApplication, however works fine with QApplication. Task-number: QTBUG-79864 Change-Id: Ice05e66a467feaf3ad6addfbc14973649da8065e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * Fix memory leakGiulio Camuffo2020-03-251-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> (cherry picked from commit 20eabb72de94ddcef3c36b5cad0ce88944d42f8c)
| | * Extend tiled optimization in 64-bit painting to 64-bit sourcesAllan Sandfeld Jensen2020-03-241-4/+10
| | | | | | | | | | | | | | | Change-Id: I74b88781d631ee68822cd08f9cb0aca03f7b688e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2020-03-241-4/+4
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbdrag.cpp Change-Id: I0b47324b70b0b4894e54b21aa3e7a5041f9bd5e3
| | | * Doc: fix copy paste errors in border-*-style documentationJoni Poikelin2020-03-211-4/+4
| | | | | | | | | | | | | | | | | | | | Change-Id: I442513ec87e25610898c2102170a5f2bfec5ee77 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * | rhi: gles2: fix uniform gathering after struct-type member in UBOsJean-Michaël Celerier2020-03-231-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given: struct Light { vec4 foo; }; layout(std140, binding = 2) uniform material { Light light; int lightCount; }; the previous code would keep "light" appended for the prefix and look for `light.lightCount`. Change-Id: Ia8deacd0cb4833f45151e922fa7b5970169332eb Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * | Doc: replace deprecated references to QGLWidgetChristian Ehrlicher2020-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove references to the deprecated QGLWidget and replace it with QOpenGLWidget. Change-Id: Ia31df42ab61c25e9ce46f4491267d2c64910f55c Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * | Add SSE2 optimized solid source compositionAllan Sandfeld Jensen2020-03-202-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Very similar to source-over, but have traditionally been inlined. Change-Id: I211f0b1c91c1a00c4769fbbfe2e3d0c7b22d7048 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * | rhi: gl: Reduce state changesLaszlo Agocs2020-03-202-74/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...between setGraphicsPipeline() calls with different QRhiGraphicsPipeline instances within the same pass. Also adds similar logic for the GL_ARRAY_BUFFER (vertex buffers) as that is a hotspot as well. This is not intended to be a 100% avoiding any redundant call solution, but rather to take care of the most common hotspots, so that bad OpenGL implementations with a larger API call overhead will not cause us to regress compared to the direct OpenGL rendering path in Quick and Quick3D. What we have here reduces the number of GL calls in the view3d example by ~200 within one frame, which is a pretty good start. Task-number: QTBUG-78603 Change-Id: I6aeab9c1c43b148ea6ef05d0284990a996c7ba28 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | * | QDrawHelper cleanupsAllan Sandfeld Jensen2020-03-193-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need to handle solid SourceOver logic directly, this was already handled by getOperator and changed composition to Source. Also removes some dead code and changes an assert in unreachable code to Q_UNREACHABLE. Change-Id: I66a6c1248bd34e31096023f1acb20385099932c9 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-181-2/+6
| | |\| | | | | | | | | | | | | Change-Id: Iaab37b633a8286c2c21425aaac34d30529a3ea82
| | | * Fix double scaling of SVG icons on high DPI screensTor Arne Vestbø2020-03-131-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a high-dpi screen and AA_UseHighDpiPixmaps set, QIcon will ask its engine for a scaled-up pixmap. When the icon has been created from a theme, the engine is a QIconLoaderEngine. For a SVG icon, that engine would recursively use QIcon to load the scaled-up pixmap, leading to double scale-up. Fix by bypassing the QIcon API in the SVG case, loading the SVG icon directly from the SVG icon engine. Done-with: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Fixes: QTBUG-73587 Fixes: QTBUG-75039 Change-Id: I7fba02b6454decb5fcbca9c5a092e75954261dfd Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | CMake: Add 'opengl' to QT.gui.CONFIG if OpenGL is ONJoerg Bornemann2020-04-081-0/+6
|/ / / | | | | | | | | | | | | | | | | | | ...like we do in the qmake build. Change-Id: I1fed28f3294c8556e115c3a86589c98f85554bf8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | rhi: d3d11: Disable DXGI message queue monitoringLaszlo Agocs2020-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do not benefit from it (don't need Alt+Enter and such). Switching to DXGI_MWA_NO_WINDOW_CHANGES is also in line with the qtbase/5.14 patch 1430b29 that does the same for ANGLE. Change-Id: Ie6384aeb2e97130ff439f761a7c166086f04526c Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | CMake: Regenerate projects after .pro files were modifiedAlexandru Croitor2020-04-032-10/+30
| | | | | | | | | | | | | | | | | | Change-Id: If6aec596bf68b209b42e0728dd6857eec8c261be Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Make setRange methods in QValidator subclasses non-virtualVolker Hilsheimer2020-04-032-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per the FIXME comment. These functions are not called by Qt, so no reason to have them virtual. As a drive-by, remove redundant virtual keyword from overrides. [ChangeLog][QtGui][QValidator] QIntValidator::setRange and QDoubleValidator::setRange are no longer declared as virtual. Change-Id: I640646fb18ed50554e384ed67ac85b3f408ea8cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Remove QTabletEvent::PointerType::XFreeEraserShawn Rutledge2020-04-022-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is an artifact of pre-Qt 5 Wacom driver implementation, hasn't been in use during the Qt 5 series, but was kept for source compatibility with very old sources. Let's hope the usages are all gone by now. Change-Id: I39dc36699510ea5e51cacd369470264fd8a27b37 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | CMake: Regenerate configure.cmake filesAlexandru Croitor2020-04-021-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes syntax warning for c++ filesystem check. Amends 907652e1ed3c95e3fdb1620cec4d5a1034153398 Change-Id: Ieafee3610b3eea0e6c13df4d78f21ab333f3d3c0 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Remove QRegExp based API and QRegExp usage from QTextDocumentLars Knoll2020-04-012-134/+8
| | | | | | | | | | | | | | | Change-Id: Ib5cc2d747f215a483585b703f9b4f6415e0d59f7 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* | | RHI: Fix running with Vulkan on WaylandEskil Abrahamsen Blomfeldt2020-03-302-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the Wayland client plugin is in use, the capabilities for the surface may report a minimum image count of 4. The internal "maximum minimum count" of 3, was arbitrary and only used for sizing buffers. To be more friendly to different setups, we remove the restriction and use QVarLengthArrays instead. We also set the initial size of the buffers to 4 so that we can run with Wayland without any resizing, but now the arrays will also grow to be safe for cases where 4 is not sufficient. Change-Id: Iba5434e84417d36b70f2655b152e816f04650ce4 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Move undo framework out of Qt WidgetsMitch Curtis2020-03-309-0/+2328
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Moves QUndo* classes (except QUndoView) from src/widgets/utils to src/gui/utils - Moves related auto tests from widgets to gui - Replaces QUndoAction with lambdas that do text prefixing [ChangeLog][Undo Framework] QUndo* classes (except QUndoView) were moved from Qt Widgets to Qt GUI. Done-with: volker.hilsheimer@qt.io Fixes: QTBUG-40040 Change-Id: I3bd8d4d32c64f8dee548f62159a1df2126da89d8 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Merge QGuiShortcut and QShortcut again in QtGuiVolker Hilsheimer2020-03-298-464/+670
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2911-332/+583
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | 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>
* | | 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-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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 configuration of FEATURE_JPEGLeander Beernaert2020-03-251-1/+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>
* | | Remove QRegExp usage from the XBM handlerLars Knoll2020-03-251-23/+28
| | | | | | | | | | | | | | | Change-Id: Ie7141c2a04c233bc1298195aebfc0437e43df0d1 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@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>