summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Use QStringRef() more, exploiting its new ::chop()Anton Kudryavtsev2016-08-163-13/+19
| | | | | | Change-Id: Id2201639be604b9a32b2dc5d21e675a961bee477 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-1623-60/+78
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/global/qglobal.cpp src/corelib/tools/qstring.cpp src/network/socket/qabstractsocket.cpp src/network/socket/qnativesocketengine_unix.cpp src/plugins/platforms/eglfs/api/qeglfsglobal.h Change-Id: Id5dfdbd30fa996f9b4b66a0b030b7d3b8c0ef288
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-1320-58/+68
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/io/qsettings.cpp src/corelib/itemmodels/qstringlistmodel.cpp tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp Change-Id: I1c6c306ef42c3c0234b19907914b19da706b4a03
| | * Fix typo in QKeySequence docLiang Qi2016-08-121-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-55181 Change-Id: I70615a2b4b026a83f506df928a79c9e60543e655 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| | * Doc: Change instances of '(Mac) OS X' to 'macOS'Topi Reinio2016-08-1218-56/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of version 10.12 (Sierra), the name of Apple's desktop operating system will be macOS. Change the occurrences where the Mac platform is discussed to use a macro \macos, which expands to 'macOS'. This helps with adapting to future renaming. Update the instructions on mac-specific Q_OS_* macro usage. Add a \target for the old 'Qt for OS X' topic to keep links working for other documentation modules that try to link with the old name. Change-Id: Id33fb0cd985df702a4ae4efb4c5fd428e77d9b85 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| | * Cache the current QOpenGLFramebufferObjectSérgio Martins2016-08-112-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't cover FBOs bound directly with glBindFramebuffer(), but it's perfect to create a fast path for code we know uses QOGLFBO, thus avoiding expensive glGetIntegerv() driver calls. The use case is to use this in QSG24BitTextMaskShader::activate(), where we need to check if the current FBO is sRGB capable. Change-Id: I434eeeb7e6a3d16be9327315536ad7280245085d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-104-2/+10
| |\| | | | | | | | | | Change-Id: I1a63523de158757964b6fb5ea026cf69a6c5ddcf
| | * evdevtouch: Avoid crashing on exitLaszlo Agocs2016-08-102-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 26238aca8c442736f380eb523ef48468f892bdb7 causes double deletion of the QTouchDevice in case the post routine already cleaned up the list by the time the touch handler gets to do it. Just check the list of devices to see if the one we hold is still there. If not, the pointer is likely to be a dangling one so do nothing. This will avoid dying with bus error or similar on application exit. Task-number: QTBUG-51562 Change-Id: I50c1edee7405aad308274538219698388c2cc9f9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * Added pointer check in QFontDatabase::loadJesus Fernandez2016-08-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | CID 11131 (#1 of 1): Dereference after null check (FORWARD_NULL)46. var_deref_op: Dereferencing null pointer fe. Change-Id: Ifc0cd0b208db511516db93c3d0e0367299df6d80 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| | * Improve performance of QColor::name, now more than 4 times fasterDavid Faure2016-08-051-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: HexRgb: 0.00230 ms per iteration, HexArgb: 0.00290 ms per iteration After: HexRgb: 0.00051 ms per iteration, HexArgb: 0.00061 ms per iteration This showed up as a relevant optimization when profiling KIconLoader which uses QColor::name() as part of the key -- thanks to Mark Gaiser for the investigation and first suggestion of a solution. I have also seen customer code writing a replacement for QColor::name() because it was too slow to be used as a hash key. Change-Id: I009ccdd712ea0d869d466e2c9894e0cea58f0e68 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Remove last uses of Java-style (non-mutable) iterators from QtBaseMarc Mutz2016-08-131-4/+2
| | | | | | | | | | | | | | | Change-Id: I7531ffd4f2d5b2193bb6231c743ff0a074618b99 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Improve vectorized bound calculationsAllan Sandfeld Jensen2016-08-121-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a proper bound calculation to vectorized rotated sampling to avoid checking inside the loop, and fixes the existing bounds check to use the incrementor fdx instead the float value it was calculated from which may cause different rounding. Change-Id: I5226926a142573c026db5504414204b6ee8dd8a7 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | QRegion: mark as sharedMarc Mutz2016-08-121-0/+1
| | | | | | | | | | | | | | | | | | | | | For BC reasons, it can only be NOT_MOVABLE_UNTIL_QT6. Change-Id: I09e158e0f6ce24f47ad4d19ea78832dbd2352db3 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Add list of 3rd party code attributions to Qt Core, Qt GUI, Qt SQLKai Koehne2016-08-121-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also document the current license the modules are available from, since this is not consistent anymore across Qt. Task-number: QTBUG-55139 Change-Id: I117fdb0cda7bd7ff92aa825e29c28f22a8a2f96d Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* | | Darwin: Add QImage::toCGImage() conversion functionMorten Johan Sørvig2016-08-113-0/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Move QT_FORWARD_DECLARE_CG to qglobal.h) This function converts to CGImage for supported formats. This is done by creating a CGImageRef that reuses the QImage data. The CGImage and QImage ref counting systems are bridged, implemented by using CGDataProvider that holds a copy of the QImage. Unlike the previous internal implementation this public version does not implicitly convert unsupported formats to ARGB32_Premultiplied. See included documentation for the complete description. Change-Id: Ie3984a7a8331e02a6f1c42943caaf76854e93538 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-0915-32/+205
|\| | | | | | | | | | | Change-Id: I36e6b890b65d12bf6931757540bcc9c553b5eb8f
| * | Doc: Fix saturation graphic for HSV color modelRainer Keller2016-08-084-0/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The text is correctly describing the gradient from gray to blue but the picture shows white to blue. Additionally including the SVG sources for creating the pictures. Change-Id: I608a239f4de9c2d3761196c44db024cc31ce441a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| * | Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7Liang Qi2016-08-0511-30/+46
| |\ \
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-0511-30/+46
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: I6f3878b204464313aa2f9d988d3b35121d4d9867
| | | * Remove unneeded ';' after some macrosKai Pastor2016-08-045-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unneeded ';' triggered warnings in pedantic compilation mode. Change-Id: Id2324823e138560bb25234306601253d7bbd713e Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | | * Fix 64-bit bilinear scaled image samplingAllan Sandfeld Jensen2016-08-041-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A constraint ensuring we do not sample beyond the current scan-line was missing in the SSE2 optimized sampling. Discovered with lancelot. Change-Id: Ib0ece8f8bfaa034733873dc5b8baaaad5d4c0380 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| | | * Doc: Fix references to Control, Meta key enumsKai Koehne2016-08-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also make use of qdoc's \note command. Change-Id: I276300cfcfde06e82b04793dbf25df8ec73e9838 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
| | | * QColor: remove 158 avoidable relocationsMarc Mutz2016-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of storing a pointer to a string, store the string in the RGBData struct. It's not as efficient as in other such cases, because one string is particularly long, but it's still more than acceptable. Text size increases slightly, but data size decreases a lot (can't say by how much, exactly, as I'm on a UBSan build). Change-Id: I1df2985fd1ebfccd84b48315d8d319dd9e25c8e7 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| | | * REG: Fix unwanted cache flush in Freetype engineEskil Abrahamsen Blomfeldt2016-08-011-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Freetype cache was almost completely disabled by 134c6db8587a8ce156d4fa31ffa62605821851b2 because after that change, the lockedAlphaMapForGlyph() function would no longer cut off early for empty glyphs like spaces, but rather go through all alpha map functions before it realized that there was nothing to render. This would in turn invalidate the cache for every empty glyph, causing all glyphs to be rerendered for every isolated word. This change adds back a cut off. This is only needed in the lockedAlphaMapForGlyph() function, since the superclass implementation of the other alpha map functions already contains a cut off for width/height == 0. [ChangeLog][Qt Gui][Text] Fixed a performance regression in Freetype engine that was introduced in Qt 5.5. Change-Id: I381285939909e99cc5fb5f3497fecf9fa871f29a Task-number: QTBUG-49452 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | | * QColor: Fix UB (left shift of negative number)Marc Mutz2016-07-311-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If hex2int(const char*) is called with invalid input, it is expected to return a negative value. However, it didn't check the return value of h2i() before attempting a left-shift on it, leading to UB when the first digit was already invalid. UBSan agrees: qcolor_p.cpp:55:23: runtime error: left shift of negative value -1 This is particularly worrisome as the function can be called with unsanitized input. Fix by checking each value for non-negativity, returning -1 early when errors are detected. Also port to QtMiscUtils::fromHex() and add some docs. Change-Id: I33dbc157ffb4fbfba27113a0a008eef35c1055f7 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | | * QRasterizer: fix UBs involving << with a negative LHSMarc Mutz2016-07-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Left-shifts of negative values are undefined in C++. In particular, they don't behave arithmetically. Reported by UBSan: qrasterizer.cpp:609:48: runtime error: left shift of negative value -640/-2240 qrasterizer.cpp:982:38: runtime error: left shift of negative value -2 Fix by using ordinary multiplication instead, because negative left-hand-side values don't look like they are an error. No errors were actually reported for a.y << 10, but I changed it nonetheless, since all a missing error means is that the test data didn't excercise this code path with negative Y values. Change-Id: I1fa9deca263f12206a3f7eab6ad875fc3242269d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | | * qgrayraster: fix UBs involving << with a negative LHSMarc Mutz2016-07-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Left-shifts of negative values are undefined in C++. In particular, they don't behave arithmetically. Reported by UBSan: qgrayraster.c:510:19: runtime error: left shift of negative value -1/-42 qgrayraster.c:537:26: runtime error: left shift of negative value -1/-4/-128 qgrayraster.c:538:26: runtime error: left shift of negative value -1/-4/-128 qgrayraster.c:641:28: runtime error: left shift of negative value -1/-42 qgrayraster.c:676:44: runtime error: left shift of negative value -1/-4/-5/-14/-129 qgrayraster.c:807:19: runtime error: left shift of negative value -1/-42 qgrayraster.c:1101:9: runtime error: left shift of negative value -32/-46/-224/-8160 qgrayraster.c:1102:9: runtime error: left shift of negative value -32/-2626 qgrayraster.c:1454:36: runtime error: left shift of negative value -32/-96/-224/-466/-2626/-8160 qgrayraster.c:1535:30: runtime error: left shift of negative value -32/-46/-224/-2626/-8160 Fix by using ordinary multiplication instead, because negative left-hand-side values don't look like they are an error. Change-Id: I2e96de51adb4a030de8a49869ddd98a31dab31b3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | | Re-add the space character as a document terminatorAndy Shaw2016-08-051-4/+5
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With change 208496091d994c2ffe44ea41368fb659978c1581 the space character was replaced with a visual document terminator character. However this meant that if the whitespace was visualized without the document terminator character visualized then clicking after the text would cause it to be positioned off by one. By bringing back the space character when the terminator is not being visualized then it will correctly place the cursor at the end of the text. Change-Id: I335c1773a37a654f3196bd350562e8f92ffd5369 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | QColor: mark as movable (except for QList)Marc Mutz2016-08-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Unbelievable that this has survived for so long... Change-Id: Icff6ecc56de773fa6054d5b96e421299a48bdbde Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | QtPlatformSupport: Add QAbstractFileIconEngineFriedemann Kleint2016-08-052-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the code from QtWidgets/QFileIconEngine into a new class with virtuals in QtPlatformSupport so that platforms can reuse it. Prototypically use the class in the Windows and macOS QPA plugins. Remove QPlatformTheme::fileIconPixmap() and change the type of the hint QPlatformTheme::IconPixmapSizes from QList<int> to QList<QSize> so that it fits better with the icon code. Change-Id: I580e936f3507218757565ca099272cd575b3a779 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Add QPlatformTheme::fileIcon()Friedemann Kleint2016-08-042-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a way to return an icon instead of a pixmap of a specific size for a file for usage by QFileIconProvider, etc. Fall back to fileIconPixmap() if fileIcon() returns a null icon. This allows for supporting XDG theme icons and Qt Quick applications accessing file icons. Change-Id: I9ffbd6602e1a6a490c0046d950636447c5127474 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | QPolygon: prepare boundingRect() to be extracted as an algorithmMarc Mutz2016-08-041-7/+8
| | | | | | | | | | | | | | | | | | | | | That basically involves reformatting the loop to use iterators. Change-Id: Ie8e80e7f32b386eae50ab4520c62219e18d2a1bd Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | Fix grayscale painting regression in 64-bit raster engineAllan Sandfeld Jensen2016-08-031-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A new define for better vectorized compositioning had a mistake that caused some sources to be converted to grayscale when composited. Added two 10 bit per channel formats to the lancelot test to catch regressions in the future. Change-Id: I1c468e6b93d68185e517fc0d44c6c927f9f7135f Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | Save QFont's style name if presentKonstantin Shegunov2016-08-031-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Font style names are quite irregular and the simplistic matching implemented in QFontDatabase::styleString(const QFont &) is unable to properly resolve the style name when font is recreated from a string. This causes the fonts before and after serialization to be considered different, even though they are not. The from/toString methods were made to write and respect the exact font style. [ChangeLog][QtGui][Important Behavior Changes] QFont::toString() and QFont::key() were modified to save the font's style name if one is set, invalidating any stored font identifiers. QFont::fromString() was also adjusted to accommodate the change. Task-number: QTBUG-54936 Change-Id: Ibc7c54119acdd8f0950d6049cc89f859bf981504 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/devLiang Qi2016-08-0211-53/+129
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-08-0111-53/+129
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure 5.7 now supports clang on android; but dev re-worked configure src/gui/kernel/qevent.h One side renamed a parameter of a constructor; the other added an alternate constructor on the next line. Applied the rename to both for consistency. tests/auto/tools/moc/tst_moc.cpp Each side added a new test at the end. .qmake.conf Ignored 5.7's change to MODULE_VERSION. configure.json No conflict noticed by git; but changes in 5.7 were needed for the re-worked configure to accommodate 5.7's stricter handling of C++11. Change-Id: I9cda53836a32d7bf83828212c7ea00b1de3e09d2
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-015-32/+76
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/itemviews/qabstractitemview.cpp src/widgets/itemviews/qabstractitemview_p.h Change-Id: I54589b1365103cb1749186af92aab03a49c94b64
| | | * Backwards compatibility fix: No default colormap for Mono QImagesEirik Aavitsland2016-07-271-22/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a partial revert of a4e2f2e687ca7aec88ecf82f72d42ac61e17a5b9. That fix tried to avoid the risk of a crash in pixel() by ensuring Mono QImages created with external data also got a default color table. However, that broke usable behavior in existing code that was painting in Mono QImages using color0/color1. This commit reverts to the old behavior, and instead expands on the checking in pixel() so that lacking color table is handled gracefully for all indexed formats. Task-number: QTBUG-54827 Change-Id: I9164198bed9d20c4b12cdba40a31c141bef3128d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | | * Fontengine: Avoid invalid alpha maps when antialiasing is offEirik Aavitsland2016-07-271-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When font antialising is disabled, the created alpha maps will be Mono format. Make sure that the created QImage is valid by ensuring that it has a color table of the right size. Issue was earlier handled by a4e2f2e687ca7aec88ecf82f72d42ac61e17a5b9, but that will be partially reverted because of compatibility break. Task-number: QTBUG-50745 Change-Id: I7c521288469ae94805a3326644771270d97ab979 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | | * HighDPI: Disable scrolling for non-integer deltasMorten Johan Sørvig2016-07-271-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable the scrolling optimization in QBackingStore and fall back to repainting for non-integer deltas. The existing rendered pixels are not re-usable in this case. The test is made on the delta, and not on the scale factor. This means that user code can cooperate and generate (logical delta, scale factor) combinations that result in integer pixel deltas (which _can_ be scrolled). Change-Id: I36eb5d9e00449428bc9095edd8732782b996db16 Task-number: QTBUG-52452 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | | * QOpenGLDebugLogger: strengthen the code path in case of GL context destructionGiuseppe D'Angelo2016-07-271-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trying to move closer to GL semantics: it is allowed to destroy a GL context at any time and that must free all of its resources. Change-Id: I3daa81d721cf26baf86a1a6435b77e3c28feb1a2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | | * Update documentation regarding QPixmap HICON conversionsSérgio Martins2016-07-271-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QPixmap methods are gone in Qt5. QtWinExtras should be used instead. Task-Id: QTBUG-54838 Change-Id: Ia52ab9786f57d92caf4c44142a3131dbf973a193 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | | * QOpenGLDebugLogger: do not crash if deleted with the wrong GL context currentGiuseppe D'Angelo2016-07-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-54799 Change-Id: Ifee3183e7944fbe266fe644628d33d0667be99a8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * | QWindow::fromWinId(): Return 0 when foreign window cannot be wrappedFriedemann Kleint2016-07-281-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change window creation code in QWindow to not assert should platform window creation fail for foreign windows. Prototypically add check to the Windows QPA plugin. [ChangeLog][Windows][Important Behavioral Changes] QWindow::fromWinId() may return 0 when passing invalid window handles. Task-number: QTBUG-41186 Change-Id: I936112607ec6e0838d36ac2a72aa88b869df5c23 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-266-18/+45
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qtemporarydir.cpp One side encapsulated a repeated piece of #if-ery in a local define; the other added to the #if-ery. Made its addition to the other's. src/corelib/kernel/qeventdispatcher_unix_p.h One side moved some members into a struct; this collided with a #undef check that neither side now has. Discarded the #undef part. src/gui/opengl/qopengltexturehelper_p.h 5.7 deleted a bunch of methods; not clear why merge got confused. src/tools/moc/moc.cpp One added a name to the copyright header; another changed its URL. Change-Id: I9e9032b819f030d67f1915445acf2793e98713fa
| | | * QPlatformWindow::initialGeometry(): Do not touch child window positionsFriedemann Kleint2016-07-251-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Child window positions should not be mapped back and forth by High DPI scaling as this can cause them to change screens or be moved to invalid locations. Introduce a separate branch for child windows applying only size constraints. Task-number: QTBUG-54420 Change-Id: I4f86666952a49ed6fa03234a04031bc406281c45 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | | * Work around ICC bug about shadowing declarations that aren't shadowingThiago Macieira2016-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Known ICC bug, still present in version 17 beta. qdatetime.h(126): error #3280: declaration hides member "QDate::jd" (declared at line 136) Obviously a parameter to static function or to a function in a nested class can't shadow an NSDM. Intel issue IDs: 0000698329 / DPD200245740 Change-Id: I149e0540c00745fe8119fffd1463c679a3a9c8c3 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | | * QImage::setAlphaChannel(): Check result of image conversionFriedemann Kleint2016-07-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | alphaChannel.convertToFormat() may fail due to OOM. Check the obtained image. Task-number: QTBUG-54873 Change-Id: I778b7de7de611105fe23c1c24cbd69bd8f7c72d9 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | | * Fix performance regression when changing fontsEskil Abrahamsen Blomfeldt2016-07-221-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change e109b8a0f3c89c595f0da689e7ee847130e2ee47 introduced a performance regression when rapidly switching fonts as long as the number of different fonts is over a relatively small number, since the cost of fonts can be high compared to the limits set on the cache. Since the original patch was intended to avoid exceeding the open file limit when using Freetype on Windows, we add an additional check on the number of engines in the cache as well for the added, synchronous cache flush. The limit is set to 256 to make it unlikely that it is exceeded during a single paint event, but it can also be configured when building Qt if a higher limit is needed. [ChangeLog][QtGui][Text] Fixed performance regression when rapidly switching between a large set of fonts. Task-number: QTBUG-54180 Change-Id: I92b9fbe14fca4f11c9c6dfdcdbec6d19a61b86a7 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| | | * Workaround clang function export bugBogDan Vatra2016-07-201-17/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Should be reverted when https://github.com/android-ndk/ndk/issues/142 is fixed. Change-Id: Ie68807062247bee4969bc9aa00b0221c8147fed7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>