summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Move Q_REQUIRED_RESULT to its correct positionThiago Macieira2017-04-2011-50/+50
| | | | | | | | | | | That's before the return type or static, inline, constexpr or such keywords (if any). Perl Script: s/^(\s+)(.*) Q_REQUIRED_RESULT(;)?(\s*\/\/.*)?$/\1Q_REQUIRED_RESULT \2\3\4/ Change-Id: I7814054a102a407d876ffffd14b6a16182f159e2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* qgrayraster: use a cast to void to mark a variable as unusedGiuseppe D'Angelo2017-04-201-5/+1
| | | | | | | | | | | | | | Do not use a self-assignment, as that may trigger compiler warnings. Casting to void is also what Q_UNUSED is doing these days, but we can't use it here because qgrayraster.c does not include qglobal.h. Remove a 15-years old comment related to the self assignment. Found by clazy. Change-Id: I8cc92b7a1b0b5fb13824959740243e17606ec753 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix link errorsNico Vertriest2017-04-192-3/+3
| | | | | | | | qimage.cpp:2127: warning: Can't link to 'isDetached()' qmatrix4x4.cpp:1933: warning: Can't link to 'operator()()' Change-Id: I93a2ead9650faf139040173f8d3b24cfa1e730ae Reviewed-by: Martin Smith <martin.smith@qt.io>
* Fix PNGs saved from QImage transform of 8-bit imagesAllan Sandfeld Jensen2017-04-192-2/+2
| | | | | | | | | | | Fixes two separate errors. QImage::transform was incorrectly adding colors to the color-table of the returned image when the converted image would not be indexed, and qpnghandler was looking at non-empty color- table instead of color format. Task-number: QTBUG-43708 Change-Id: Ife14b6428ca65ac7d3a0b36a89a73e56d64586b4 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Doc: Hide QPA classesFriedemann Kleint2017-04-192-6/+3
| | | | | | | Mark QPlatformGraphicsBuffer and QSystemTrayIcon as internal. Change-Id: I39e5b4f635fca21ab0544cd840a113514b6b1e99 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add debug output for QScrollPrepareEvent and QScrollEventFriedemann Kleint2017-04-191-0/+14
| | | | | Change-Id: If283cecbefdf20c80ce00f689003f6a0ed9fe42b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Doc: Remove broken link to QWindowSystemInterface::registerTouchDevice()Leena Miettinen2017-04-182-2/+6
| | | | | | | | | | | | Mention that it is a private function. Also mention using QTest::createTouchDevice() for adding simulated touch screens to autotests. Task-number: QTBUG-26647 Change-Id: I08c12225768e76b1b9e3fc0fda00af86d44ca766 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Bo Thorsen <bo@vikingsoft.eu> Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
* Doc: add missing specs about parametersNico Vertriest2017-04-182-1/+7
| | | | | | | | | qopengltexture.cpp:3476: warning: Undocumented parameter 'layerCount' in QOpenGLTexture::setCompressedData() and QOpenGLTexture::setData() qimage.cpp:2127: warning: Undocumented parameter 'format' in QImage::reinterpretAsFormat() Change-Id: I17feb2256a29f3bb722d2de3a83b390abff85a35 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add debug operators for font database structs for easier debuggingTor Arne Vestbø2017-04-182-0/+28
| | | | | Change-Id: Ice1b27ff93de2d369dc6b66c72a64eb05da5639c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-182-2/+3
|\ | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp Change-Id: I375fa4afa662fa411a15f212ebd5f2f0dffdba7f
| * QMatrix4x4: fix aliasing problem in operator*=Marc Mutz2017-04-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | When multiplying a QMatrix4x4 by itself, we were clobbering the very matrix we read from. Employ read-caching to avoid this aliasing problem. [ChangeLog][QtGui][QMatrix4x4] operator*=() now calculates the correct result even if the RHS and LHS are the same object. Change-Id: I8534d56cfdd62c336577125127f05173fcec2873 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Doc: updated QSyntaxHighlighter documentation and use QRegularExpressionSamuel Gaist2017-04-121-1/+1
| | | | | | | | | | | | | | | | | | The documentation of QSyntaxHighlighter still uses the deprecated QRegExp class. This patch updates the code samples as well as cleanup some typos. Change-Id: I87b525fddb560b7c5bb38f96d9aaceadb594f76c Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* | Be more explicit about the supported platforms for OpenGL ES 2Jake Petroules2017-04-131-3/+3
| | | | | | | | | | | | | | | | The OpenGLES framework is only supported on iOS and tvOS, and does not exist on macOS and watchOS. Change-Id: I643d3bdac522b67a8d945648dfcc8f1780ab0d7f Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-122-13/+17
|\| | | | | | | Change-Id: I3bd83a839b16822035ed56a5cffe77bd6bc3f08d
| * configure: fix detection of xcb extensionsGatis Paeglis2017-04-111-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Properly detect xcb-render and xkb features. a) when -qt-xcb, use bundled versions b) when -system-xcb, detect from system - Be consistent with other features (jpeg, png) in "enable"/"disable" field handling. - And move the "xkb" feature higer up in configure.json. It is an X11 extension, so keep them all together (instead of grouping it with libxkbcommon). Task-number: QTBUG-59064 Change-Id: I60f95fb37060b8abde4c611cdef178ba3795982c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Fix hidpi support for opengl window grabbingFilipe Azevedo2017-04-091-1/+3
| | | | | | | | | | | | | | | | | | | | Now set the QImage devicePixelRatio so the content is correct on all screens. Task-number: QTBUG-53795 Change-Id: Ic92eee98f691ebb1e0212498c1ae13ede74bca93 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Prevent QWindow transient parent loopTor Arne Vestbø2017-04-121-0/+4
| | | | | | | | | | | | | | | | Clients may wrongly set the transient parent to the window itself, causing endless loop when e.g. looking for the top level parent. Change-Id: Ib23cae3a5576320435ae9b76dd618d1e5ae08b5d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | QTextDocument: improve import of DIV tagsDavid Faure2017-04-101-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | <div>1<br/></div>2 was inserting two newlines between 1 and 2, while all tested web browsers only insert one newline - as long as there is nothing between the <br/> and the </div>. This was the cause for extra newlines being inserted in KMail when replying to HTML emails, such as those generated by gmail. Change-Id: I5145d977701e68913264357bba22780e7cdd3f7d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Android: fix Menu and Back key handlingJ-P Nurmi2017-04-071-3/+11
| | | | | | | | | | | | | | | | | | | | Don't quit on Back key release when Back shortcut was accepted and likewise for the Menu key, don't trigger the platform menubar if Menu shortcut was accepted. Change-Id: Ifde87cbc2d95be1beb90ca59f55889b83a90ff02 Task-number: QTBUG-59670 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-069-39/+86
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp src/platformsupport/fontdatabases/freetype/qfreetypefontdatabase.cpp src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp src/widgets/widgets/qtabbar.cpp Change-Id: Iaa9daee5f7a6490d56257a3824730a35751ceb05
| * Copy stretch to multifont fontDefAllan Sandfeld Jensen2017-04-051-0/+2
| | | | | | | | | | | | | | | | If we do not the fontDef of the multifont will be the default 0. Task-number: QTBUG-59443 Change-Id: Ib223517975b2a57b2371e309d12cd8f918d30825 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * Environment variable enabling the workaround FBO readback bugMarco Martin2017-04-051-0/+34
| | | | | | | | | | | | | | | | | | | | On some ARM devices the font glyph generation is broken Add an environment variable to enable workaround_brokenFBOReadBack in QOpenGLContext, to fix font rendering on such devices as Mali and Adreno Change-Id: I9cc99ecb8b71a35bc369ec9dd11b877016b1179e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * qbmphandler fix: use qint64 for caching QIODevice file positionHendrick Melo2017-04-042-4/+4
| | | | | | | | | | | | | | | | | | | | | | Changed the file position and offset types so they can properly handle files larger than the 32bit limit Task-number: QTBUG-59493 Change-Id: I00e1741c7682c4c79f35fef808fe1ea26e67c8b5 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Hendrick Melo
| * GCC 7: fix -Werror=implicit-fallthroughGiuseppe D'Angelo2017-04-045-35/+46
| | | | | | | | | | | | | | | | More fallthrough-are-errors fixed. Change-Id: I9a6cb6efe988400ed3f9cb95d1e426dac317e6c4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Fix warnings for -no-feature-settingsStephan Binner2017-04-041-0/+2
| | | | | | | | | | | | Change-Id: I79ce0b9c5eb931e238394519ba80bf35e4ff3bf7 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Fix warning for -no-feature-texthtmlparserStephan Binner2017-04-041-2/+2
| | | | | | | | | | | | Change-Id: I6dd6e80a546a76ce3717855ebacb188254fe70d6 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Fix warning for -no-feature-wheeleventStephan Binner2017-04-041-0/+2
| | | | | | | | | | | | Change-Id: Ibf240228100bbc7cd8a85e49abc9dbff026e5433 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Delete QRasterWindow backingstore while window is still aliveTor Arne Vestbø2017-04-042-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The platform backingstore might need access to the window that the backingstore was created for, e.g. for makingCurrent to release OpenGL resources. In that case leaving it to the QRasterWindowPrivate destructor would be too late, as the QWindow was gone. This was seen on iOS, where the backingstore inherits QRasterBackingStore, and uses composeAndFlush to composit via GL. The raster backingstore cleans up these GL resources in its destructor, so the QIOSBackingStore destructor makes sure that the GL context is current for the window, resulting in a crash since the window is long gone by then. Change-Id: I5a22597842819f0fe3b580856b9e75e4fab32ae5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Share FreeType font engine creation code between platformsTor Arne Vestbø2017-04-042-11/+0
| | | | | | | | | | | | | | | | | | | | The FreeType font engine setup is spread out between factory functions, constructors, and init() functions, so let's at least try to share as much as possible of it to make it easier to reason about and possibly refactor in the future. Change-Id: Ic39353d2b3111024e0589a70211bac80feb8498e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | No divide by zero if all imageformat features are disabledStephan Binner2017-04-041-1/+2
| | | | | | | | | | | | Change-Id: Ib3e8a4b62ae627bc3dc8541767dafff4e493d2f8 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | CMAKE: Fix EGL link extensionsAndreas Holzammer2017-04-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Targets were always exported as .lib, for all windows compilers which is correct for msvc, but not for mingw. Hence use QMAKE_EXTENSION_STATICLIB to switch between .lib and .a Task-number: QTBUG-59906 Change-Id: I948f5dd96e0fb46d679c474b7beececc379ad436 Reviewed-by: Volker Krause <volker.krause@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Fix warnings for -no-feature-cssparserNikita Krupenko2017-03-292-1/+3
| | | | | | | | | | | | Change-Id: Ib0eae1858880e3fe2b6c6abd94c7ea0bbc2649a2 Reviewed-by: Stephan Binner <stephan.binner@basyskom.com> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Use case-insensitive compare moreAnton Kudryavtsev2017-03-291-1/+1
| | | | | | | | | | | | | | | | ... to avoid allocations. Change-Id: I5993633d1509495ff6ce3a11274a53504aac7c5e Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Switch to RGB(A|X)8888[_Premultiplied] for QOpenGLFBO readbacks on GLESLaszlo Agocs2017-03-281-34/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of the never-ending blacklisting of "broken" drivers, simply switch to always choosing a byte ordered QImage format with OpenGL ES, and keep on using the (one and only) spec-mandated GL_RGBA/GL_UNSIGNED_BYTE combo. There is nothing broken with not supporting BGRA for glReadPixels even when GL_EXT_read_format_bgra (an out of date, pre-2.0 extension that got folded into the spec to begin with) is present. We do not have a good way to tell if BGRA_EXT is supported for glReadPixels or not, so just skip the whole problem altogether. Task-number: QTBUG-59283 Task-number: QTBUG-59303 Change-Id: I9f0605380923bd3b3ffdeb80f5c172d3e4cc7927 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9Liang Qi2017-03-283-21/+22
|\ \
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-283-21/+22
| |\| | | | | | | | | | Change-Id: I4788bc037c55c48563ffd4ba9633a22aa1d12f22
| | * Fix generation of gradient shader function in PDFTobias Koenig2017-03-281-1/+2
| | | | | | | | | | | | | | | | | | | | | Add the missing endobj tag for the shader function object. Change-Id: Ieb3cfa5a5d0e27d04164a80b028d41371507fb94 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Annotate more implicit fallthroughsAllan Sandfeld Jensen2017-03-272-20/+20
| | | | | | | | | | | | | | | | | | | | | Reduces our number of gcc 7 warnings Change-Id: I792d658cbc11cad15cf45da3a36fc93fcdcc67ea Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Prefer rvalue versions of toLower() and toUpper()Anton Kudryavtsev2017-03-284-8/+8
|/ / | | | | | | | | | | | | ... to re-use existing buffers. Change-Id: Ib2bc938f1cf0451c1dbc012b3db022b878e987cb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Introduce QInputControl::isCommonTextEditShortcutJoerg Bornemann2017-03-272-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | For handling ShortcutOverride events in text-edit-like controls one must know if a key event matches a common text edit short cut. The code that was formerly in QWidgetTextControl is now moved into QInputControl::isCommonTextEditShortcut to remove duplicated code in QtQuick and to avoid adding adding a third duplicate in QtWebEngine. Task-number: QTBUG-59053 Change-Id: I18723bb0224acd33c8ea4a8d0a601bb5e274a7a9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-272-1/+5
|\| | | | | | | Change-Id: Icdd71e9713725bda9c305e338f5c8b41a92ed8e8
| * don't try to use system zlib if it's not enabledOswald Buddenhagen2017-03-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... as that would error out unhelpfully. but hypothetically, there could be dynamic builds of system libpng and sqlite3 against a static zlib, so allow it. however, it's a tad unlikely, so default to -qt-libpng when using -qt-zlib (and -qt-sqlite3 is the default anyway). amends dab013804. Change-Id: I74c41e8d8a7ee1ba5add395842383d176e23f142 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * QGuiVariant: fix unintended fall-throughMarc Mutz2017-03-221-0/+1
| | | | | | | | | | | | | | Found by GCC 7. Change-Id: I8a9cca5236f077335031afc90b2683a2846d3b79 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | xbm image format: avoid uninitialized pixels for truncated dataEirik Aavitsland2017-03-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | xbm bitmaps are conventionally accepted as valid even if there is not enough data to fill the declared bitmap size: both ImageMagick and GIMP do this. Qt did too, but the uncovered areas would be uninitialized, and thus contain random junk bits. This commit adds clearing of the full QImage data. Task-number: QTBUG-54169 Change-Id: I84150d54d07dbd546a4947e7ec332f83f2d7ca41 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-212-8/+11
|\| | | | | | | | | | | | | Conflicts: src/plugins/platforms/eglfs/eglfs-plugin.pro Change-Id: Id76cdbb41b7758572a3b8ea4dcb40d49bac968db
| * Fix crash in QWindowPrivate::applyCursor when screen is nullOlivier Goffart2017-03-162-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | QWindow::setVisible calls QWindowPrivate::applyCursor without checking if screen() returns null. This patch adds a check in QWindowPrivate::applyCursor that the screen is not null. Now that it is tested there, no need to test it from the other caller (setCursor) This patch should not change behavior of setCursor at all, it should only fix the crash when coming from setVisible Task-number: QTBUG-59528 Change-Id: I06bbdb4e04c02ac840ba637242d1f2cfde5bdd62 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9Liang Qi2017-03-1314-42/+47
|\ \
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-1314-42/+47
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
| | * Add -Wfloat-equal to Qt's header clean checkThiago Macieira2017-03-076-6/+32
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-57649 Change-Id: I15b62e0f9cec482fbb40fffd1490d802c54bf0fe Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Don't call releaseKey a second time if the insertion failsAndy Shaw2017-03-071-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the insertion into the cache fails then it will delete the entry for us which already calls releaseKey(). So we should not call it a second time. Task-number: QTBUG-58259 Change-Id: I816c6f29ef97fe3a245f145c4faf1e0649f72dc5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>