summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | 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>
* | 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>
| * QOpenGLVertexArrayObject: clean up the destructorGiuseppe D'Angelo2016-07-201-1/+3
| | | | | | | | | | | | | | | | | | Calling QOpenGLContext::surface() on a non-current context will likely return NULL, so the code path that tried to reset the old context as current would actually fail. Change-Id: Ibbc8da877740a596aa7dd0af8ccffb9a1877290a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7Edward Welbourne2016-07-195-27/+40
|\ \
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-155-27/+40
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakeevaluator.cpp One side changed the iterator to use ranged-for, the other changed its body; they only conflicted because the latter had to add braces around the body, intruding on the for-line. Trivial resolution. Change-Id: Ib487bc3bd6e3c5225db15f94b9a8f6caaa33456b
| | * [iOS] Blacklist iOS with regards to bgra supportAndy Shaw2016-07-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A number of devices are indicating that there is a problem with using bgra so instead of blacklisting all of them individually it is best to blacklist them all on the iOS platform. This ensures QQuickItem::grabToImage() will work then. Task-number: QTBUG-45902 Change-Id: I900857cfa996924469aaaeeee8037dc84a4fd575 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * Improve lookup speed for QAccessible::uniqueIdAlexandru Croitor2016-07-073-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When QAccessible::uniqueId was called, it would call QHash::key(), which has linear time performance. This can cause application slowdown if a big number of QAccessibleInterface Ids have to be found. The patch adds an additional QHash to keep track of the inverse relationship from QAccessibleInterface pointers to their Ids. Change-Id: I975e3dc0e6c628e2ea701323d8b87184ad133cfb Task-number: QTBUG-54491 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| | * Fix defining QGuiApplication::sync() when QT_NO_SESSIONMANAGER is setOlivier Blin2016-07-061-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sync() is unconditionally declared in the QGuiApplication header, but the definition was under QT_NO_SESSIONMANAGER guards. This commit moves the definition of sync() outside of the QT_NO_SESSIONMANAGER guards, since the sync code has nothing to do with session management. [ChangeLog][QtGui][QGuiApplication] Fixed a bug that would cause QGuiApplication::sync() to be left undefined for Qt builds without session management support. Change-Id: Ieb46f7c90c9193e89469126170117d9df672f4cb Task-number: QTBUG-51703 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Windows: Handle theme switching correctly if a palette is setAndy Shaw2016-07-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a palette is set on the application object and the user does something to trigger a theme change, i.e. connects via remote desktop or logs out and in again, then it will cause Qt to render incorrectly. Therefore we should only update the palette from the new theme if we don't have our own already set. Task-number: QTBUG-52962 Change-Id: I4e2288efd82ad98b698cc09f26ad188064ec7b2a Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Preserve the scale of fonts when caching the font engineMichael Sheldon2016-07-192-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Associates the scalableBitmapFactor with the freetype QFontEngine so that it is preserved when caching the engine Task-number: QTBUG-53652 Change-Id: I010f9d235ccf30679b112e0c05e01bc247a3693f Reviewed-by: jian liang <jianliang79@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | QStandardItem: enable NRVO for gccAnton Kudryavtsev2016-07-181-4/+5
| | | | | | | | | | | | | | | Change-Id: I5a5ad039e1df8f040b77ff783a4f0e1213a0f286 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | QStandardItem: use reserve() to optimize memory allocationAnton Kudryavtsev2016-07-181-1/+3
|/ / | | | | | | | | Change-Id: I09df41f6beaaeecc818f11a01206e9e4583fd93f Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Optimize string usageAnton Kudryavtsev2016-07-152-4/+2
| | | | | | | | | | | | | | | | Use QStringBuilder more. Use QL1S directly, without QString construction. Change-Id: Iad844391367681fc1013b9725403d009e7c346e6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Doc: added doc for parameter isMaskNico Vertriest2016-07-111-2/+2
| | | | | | | | | | | | | | Error message: Undocumented parameter 'isMask' in QIcon::setIsMask() Change-Id: If16d232b6856ff6d5104ac7c32d3b8c0ac4081f9 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Use QStringLiteral more judiciouslyAnton Kudryavtsev2016-07-083-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace it with QL1S in QStringBuilder expressions and in overloaded functions. Replace patterns 'QString::number() + QStringLiteral' and 'QStringLiteral + QString::number()' with QString::asprintf. Saves some text size. Change-Id: Ib39b2332264dfc3df04e77f2c101b47a1030cef4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Replace QString::trimmed() with QStringRef::trimmed()Anton Kudryavtsev2016-07-061-4/+4
| | | | | | | | | | | | | | ... where it's possible. Reduce allocations. Change-Id: I023adfd316f94948fe50749f60bf55748dca56e2 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-232-2/+3
|\| | | | | | | | | | | | | | | Conflicts: src/angle/src/libGLESv2/libGLESv2.pro src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp Change-Id: If8da4cfe8f57fea9f78e7239f378a6302c01674e
| * Fix regression in simple RGB16->RGB16 scalingAllan Sandfeld Jensen2016-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | The fix for QTBUG-35927 introduced a too strict check when scaling from a 16-bit source to a 16-bit destination. This patch changes the limit to adjust to source type. Task-number: QTBUG-54281 Change-Id: I6dd2bb8308f77520c00fa3ef6643a42462c5d351 Reviewed-by: Lars Knoll <lars.knoll@qt.io>