summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Move QTriangulator and QTriangulatingStroker classes to paintingAndy Nichols2016-08-157-8/+13
| | | | | | | | | | | | | | Previously the private APIs for QTriangulator and QTriangulatingStroker were located in src/gui/opengl because they were used by the OpenGL paint engine. These API's are not actually specific to OpenGL however, and were not being built when QT_NO_OPENGL was defined. It makes more sense for these classes to belong in the painting subgroup. Aside from the OpenGL paint engine, these private APIs are used by QtLocation to triangulate polylines to be rendered by QtQuick. Change-Id: Idb4d1e5b2a51394d4c6bcdf9ab1ece99de23d4de Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Avoid synthesizing stretch on condensed font familiesAllan Sandfeld Jensen2016-08-154-13/+21
| | | | | | | | | | | | | | | | | | If an entire font family is condensed or stretched and we match by family name, the default stretch factor of 100 will make the font engine try to synthesize it back to medium stretched font. The existing code is already made to deal with a stretch of 0 that is no longer used. This patch reintroduces 0 stretch to indicate no specific stretch has been requested. Specifically setting stretch to 100 on a QFont will introduce the old behavior. [ChangeLog][QtGui][QFont] The default value of QFont::stretch() is now 0 to indicate any default stretch is acceptable. Task-number: QTBUG-48043 Change-Id: I574747f980fd4f9893df828818aae99a07b41623 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* 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>
| | | * 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>
* | | | QBrush: optimize detach()Marc Mutz2016-08-011-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, detach() would detach on every style change. But there are only three QBrushData classes, thus many styles use the same. So instead of checking for style identity, check for style equivalence, where equivalence is defined in terms of use_same_brushdata(). Change-Id: I7548c6022a45e542ca0d3ea00d837cd4ff93df34 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | | Export QTextDocumentPrivate with Q_GUI_EXPORTAndy Shaw2016-08-011-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | QTextDocument is used from several different Qt modules so it needs to be possible to access its privates from outside of Qt Gui. Change-Id: I8087f8312e0db46bd457a6119d974caa27660d57 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | Add helper function to reset QMouseEvent localPosFrederik Gladhorn2016-08-012-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt Quick there are many places which copy mouse events repeatedly, with the only goal of adjusting the local position. Instead it's much more sensible to re-use the same event. Change-Id: I2c6f2b73ee3a7a6df489f813cf2f60b48a6e48df Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Make QOpenGLTextureBlitter publicLaszlo Agocs2016-07-295-27/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change QOpenGLTextureBlitter to be a public API, as it was originally intended. There are now significant external uses outside qtbase (C++ compositor examples in QtWayland), and the API is considered proven enough. [ChangeLog][QtGui] QOpenGLTextureBlitter, a utility class to draw textured quads, has been made public. Change-Id: If7a2c94e1494195e2aa375d214932fa7b4c78321 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | Handle indirect sibling selectorAllan Sandfeld Jensen2016-07-273-371/+390
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds parsing and handling of the indirect sibling selector, this should mean we can at least parse all CSS3 selectors even if we do not yet support all of them. Also adds tests for previously added CSS3 selectors. Change-Id: I1ce9afb9466044a38bdec167affc21a87837e4a4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Fix regression in rotated bilinear samplingAllan Sandfeld Jensen2016-07-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Fix a mistake introduced recently and revealed by lancelot. Adds an auto-test for rotations to catch similar errors faster in the future. Change-Id: I028a160107d98899e723481b6201ef776f20c721 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Revert "Emit updateBlock signal in QTextDocumentLayout"Eskil Abrahamsen Blomfeldt2016-07-271-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 13040043b2f2274de74c296ede7dd3e6ffb67dcb. It introduced a bad regression, noticeable for longer documents, as it would cause the documentChanged(0, length) to trigger a layout of the entire document. The bug report for the commit (or the commit itself) does not contain a test case, but it is regardless the wrong approach. Note that QQuickTextEdit already listens to the contentsChange signal and invalidates the changed parts of the document as a reaction to this, so it should already work as expected. [ChangeLog][Qt Gui][Text] Fixed performance hit from showing large QTextDocuments in a QTextEdit or QTextBrowser. (Regression introduced in Qt 5.3.0) Task-number: QTBUG-51411 Change-Id: I6e7fbf8f62a1d68779eef5da3781de14d9fdcad8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Update qcssscanner so it can parse our normal offline documentation CSSAllan Sandfeld Jensen2016-07-263-427/+484
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the three CSS3 attribute selectors. During this the internal naming of the existing attribute-selectors have been changed to be more clear, and the dash-matching has been fixed to not just be beginsWith. A non-breaking space have also been removed from the CSS. Change-Id: Ia4db4a5a19e3ceee8c3c8a4b744149edd1d32bdc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Improve accuracy in fast path bilinear samplingAllan Sandfeld Jensen2016-07-231-13/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | Adds rounding before using the optimized low accuracy interpolation, this reduces the magnitude of error in the scaled result from ~4 bits to just 2 bits. Change-Id: Ie4e618bf5b1f4a74367aa419ebbd534cc6a846b3 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/devEdward Welbourne2016-07-2214-65/+79
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-07-1914-65/+79
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakebuiltins.cpp qmake/library/qmakeevaluator.cpp qmake/library/qmakeevaluator.h qmake/project.h QMakeEvaluator: * evaluateConditional(): one side changed return type, the other changed a parameter type. * split_value_list(): one side changed a parameter adjacent to where ... * expandVariableReferences(): ... the other killed one overload and changed the survivor src/corelib/io/qlockfile_unix.cpp One side changed a #if condition, the other moved NETBSD's part of what it controlled. src/corelib/tools/qdatetime.cpp One side fixed a reachable Q_UNREACHABLE in toMSecsSinceEpoch(), the other moved it from the private class to the public one, in the midst of the "short date-time" optimization, which confused diff entirely. One side changed a QStringLiteral to QLatin1String, the other rewrote adjoining code. src/network/kernel/qauthenticator.cpp Both rewrote a line, equivalently; kept the dev version. src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h One side changed #if-ery that the other removed. tools/configure/configureapp.cpp One side added a check to -target parsing; the other killed -target. tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml tests/auto/testlib/selftests/expected_cmptest.xunitxml Regenerated using generate_expected_output.py I note that quite a few other expected_* come out changed, now. There was no git-conflict in src/widgets/kernel/qformlayout.cpp but it didn't compile; one side removed some unused methods; the other found uses for one of them. Put FixedColumnMatrix<>::removeRow(int) back for its new user. Change-Id: I8cc2a71add48c0a848e13cfc47b5a7754e8ca584
| | * | 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>
* | | | Add QStyleHints::useHoverEffectsJ-P Nurmi2016-07-206-2/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The delivery of hover events creates unnecessary overhead on touch platforms. This allows Qt Quick Controls 2 to determine whether the underlying platform wants hover effects. The hover effects are enabled by default for the classic desktop platforms: Linux, Windows & macOS. Change-Id: Ia4e7b5c0fcb7af8f1c47e06fb28086cffdf35976 Task-number: QTBUG-50003 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | make QFontDatabase().writingSystemSample for Arabic usefulFahad Al-Saidi2016-07-201-2/+10
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current QFontDatabase().writingSystemSample for Arabic is an arbitrary text and meaningless. This suggested text is used in LibreOffice and it makes sense for Arabic people. Task-number: QTBUG-53390 Change-Id: I7456d2741fbc07b4cfffd6151b421cb4427dd3e9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>