summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Optimize quaternion to rotation matrix convertionKonstantin Ritt2015-02-262-38/+47
| | | | | | | | Rearrange operands to get rid of 50% of multiplications (i.e. `2 * (x * x + z * z)` -> `(x + x) * x + (z + z) * z`). Change-Id: Ib5279425ead999fc571b4964ac1681b6e22f9a7e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* [QQuaternion] Add operator* that rotates a vector with a quaternionKonstantin Ritt2015-02-262-0/+17
| | | | | | | | Same as quaternion.rotatedVector(vec). Expression like `vec = quat * vec` quite common in the 3D world. Change-Id: I0edd5a5f80537bd149f03f682b3de15c54463e23 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* [QQuaternion] Fix naming of the new methodsKonstantin Ritt2015-02-262-12/+12
| | | | | | | | | | | According to the Qt naming policy, methods that return value(s) via the mutable parameter(s) should have "get" prefix to mention that. [ChangeLog][QtGui][QQuaternion] Added methods to convert a quaternion to/from Euler angles and to/from rotation matrix. Change-Id: I95704e1f4623dc4ca54cd237ea203539fb60d452 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Minor optimization in SSE4 unpremultiplyAllan Sandfeld Jensen2015-02-261-2/+1
| | | | | | | Use a more direct conversion to desired unpacked format. Change-Id: I47e4a31c580f294c4e717850c4a420e16214e0a9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove PREMUL and INV_PREMUL macrosAllan Sandfeld Jensen2015-02-251-5/+0
| | | | | | | | These macros have been deprecated since 5.3 and have always been private. Change-Id: I8c80b059a4c026c037f55279a3dfc0dca58c5d5c Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix various qdoc-warnings.Friedemann Kleint2015-02-251-1/+1
| | | | | | | | | | qtbase/src/corelib/itemmodels/qitemselectionmodel.cpp:1199: warning: Undocumented parameter 'model' in QItemSelectionModel::modelChanged() qtbase/src/corelib/plugin/qpluginloader.cpp:420: warning: Can't link to 'staticPlugin()' qtbase/src/gui/text/qtextdocument.cpp:1452: warning: No such parameter 'from' in QTextDocument::find() qtbase/src/testlib/qtestcase.cpp:2770: warning: No documentation for 'QTest::qExtractTestData()' Change-Id: I76758dbdf3ad7b0ae1f14de0407a6fde523827d0 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Improve setDefaultFormat docs regarding AA_ShareOpenGLContextsLaszlo Agocs2015-02-251-0/+6
| | | | | | | | | | | When using core profile contexts, sharing with the global share context may not work if the global one is a non-core context. This can happen when setDefaultFormat() is called only after Q(Gui)Application is constructed. This is a typical issue on OS X, so document it. Change-Id: I6a8dca442ffeb884faedb9c6346351bb6eef3cff Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Fix underline for centered textEskil Abrahamsen Blomfeldt2015-02-251-1/+1
| | | | | | | | | | | | | | | The position of the text itself is always floored, since the glyph contains the subpixel antialiasing. Since no antialiasing is applied to the underline, its position also has to be floored, otherwise it will sometimes appear one pixel to the right of the text it's underlining. [ChangeLog][Text] Fixed position of underline on centered text when the text layout's width is an even number. Task-number: QTBUG-39286 Change-Id: Ib1704ac5b09289f5b3f5a6580443f234d6d868fc Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Allow QDistanceField to be directly constructed from a QPainterPath.Michael Brasser2015-02-252-0/+12
| | | | | | | | | | Enables optimization in the case of an already existing QPainterPath. Change-Id: I7f038673ce245ea19e400e6d2c728f07cb55e366 Task-number: QTBUG-42853 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix crash when accessing QStyleHints before QGuiApplication is constructed.Friedemann Kleint2015-02-253-7/+13
| | | | | | | | | | | Make styleHints a static member variable of QGuiApplicationPrivate and fix accessor accordingly. Extend tst_QApplication::settableStyleHints() to run without QApplication instance as well and add a similar test to QGuiApplication. Task-number: QTBUG-44499 Change-Id: I42b92ef38f7dd512d08d70accfa7dd4f09a22f01 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix invocations of static methods of QGuiApplication/QApplication.Friedemann Kleint2015-02-253-10/+10
| | | | | | Change-Id: I99ba58763f6063fa2a6f511adbea0163cce7ea32 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Decide whether to synthesize mouse events on a per device basisAlexander Volkov2015-02-256-15/+8
| | | | | | | | | | | | | | | | | | | | | Currently Qt uses the QPlatformIntegration::StyleHint SynthesizeMouseFromTouchEvents to check whether to synthesize mouse events from touch events. But not only platform plugins can produce touch events, they can be created by e.g. QTest::touchEvent() and in this case we almost definitely need synthesizing regardless of the platform. This commit introduces a QTouchDevice::MouseEmulation capability which replaces use of the QPlatformIntegration::SynthesizeMouseFromTouchEvents. So it's possible to pass QTouchDevice without this capability to QTest::touchEvent() and be sure that mouse events will be synthesized. Notice that touch pads always emulate mouse events. As a result we can activate some tests which were disabled for specific platform configurations by commits 6c1670d8c273819435867c42725c0db0eee597dc and e9760f1559361c39f269fb89f1ebd01f6ee8378d. Change-Id: Idc82fa4007a095fc1cb5934979361b0023d2b793 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Ensure QGuiApplicationPrivate::screen_list is correctly populatedSandro Mani2015-02-252-3/+7
| | | | | | | | | | Ensure QGuiApplicationPrivate::screen_list always contains at least one screen, and that the first item (returned by QGuiApplication::primaryScreen) is always the current primary screen Task-number: QTBUG-42985 Change-Id: I08b880b3e94387f28230ed5fc738bceea943bad3 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* QtGui: Fix some qdoc-warnings.Friedemann Kleint2015-02-253-6/+6
| | | | | | | | | | | | | | qtbase/src/gui/math3d/qquaternion.cpp:466: warning: Undocumented parameter 'eulerAngles' in QQuaternion::fromEulerAngles() qtbase/src/gui/math3d/qquaternion.cpp:466: warning: No such parameter 'eulerAngles.y()' in QQuaternion::fromEulerAngles() qtbase/src/gui/math3d/qquaternion.cpp:466: warning: No such parameter 'eulerAngles.x()' in QQuaternion::fromEulerAngles() qtbase/src/gui/math3d/qquaternion.cpp:466: warning: No such parameter 'eulerAngles.z()' in QQuaternion::fromEulerAngles() qtbase/src/gui/math3d/qquaternion.cpp:455: warning: No such parameter 'pitch' in QQuaternion::toEulerAngles() qtbase/src/gui/math3d/qquaternion.cpp:455: warning: No such parameter 'roll' in QQuaternion::toEulerAngles() qtbase/src/gui/math3d/qquaternion.cpp:455: warning: No such parameter 'yaw' in QQuaternion::toEulerAngles() qtbase/src/gui/opengl/qopenglshaderprogram.cpp:2757: warning: No such parameter 'value' in QOpenGLShaderProgram::setUniformValueArray() Change-Id: Ib825ecb0db798380d97414ca3c3eba8bee3ab6ea Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-248-25/+35
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/xml/htmlinfo/simpleexample.html examples/xml/rsslisting/rsslisting.cpp qmake/generators/win32/msbuild_objectmodel.cpp src/3rdparty/harfbuzz-ng/src/hb-private.hh src/corelib/global/qlogging.cpp src/corelib/io/qstorageinfo_unix.cpp src/corelib/thread/qwaitcondition_unix.cpp src/gui/kernel/qguiapplication.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp src/testlib/doc/src/qt-webpages.qdoc tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: Ib272ff0bc30a1a5d51275eb3cd2f201dc82c11ff
| * Fix crash in QPainter::drawGlyphRun() when painter is not activeOlivier Blin2015-02-241-0/+5
| | | | | | | | | | Change-Id: I24f52cf1db300b8a6d0a4cb19fc6c74c41e00dbc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * Fix a division by zero when processing malformed BMP files.Richard J. Moore2015-02-241-0/+8
| | | | | | | | | | | | | | | | | | | | This fixes a division by 0 when processing a maliciously crafted BMP file. No impact beyond DoS. Task-number: QTBUG-44547 Change-Id: Ifcded2c0aa712e90d23e6b3969af0ec3add53973 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Correct pixel type for depth textures on ESLaszlo Agocs2015-02-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | Byte is definitely wrong. GL_OES_depth_texture states that short or int are the only options, GL_UNSIGNED_BYTE is thus rejected. Let's ask for the highest (32 bits). There's no guarantee that the implementation honors this, but at least we tried. Change-Id: I14dd9d4ab56b0b69cdab341f95f47499786d174e Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| * QGuiApplication: revert b8d0fac5a9 (mouse event handling)Richard Moe Gustavsen2015-02-151-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current attempt to fix the problem described in b8d0fac5a9 has shown to have unforeseen issues. The assert in the patch has been triggered in user code (see bug report), which, when looking more closely, shows that the assert cannot be guaranteed for all cases. E.g if user code (or Qt drag'n'drop code) starts a new event loop upon receiving the move event, this can deliver new mouse events before the move returns, which will trigger the assert. So it seems like the most correct solution is to *post* the second button event after all (directly trailing the move event), to at least make sure mouse events are being delivered in the correct order. The crash that caused the original change will need to be fixed by other means. Task-number: QTBUG-38597 Change-Id: I47633d1ea310b7c16e937ef0404d9954281452c3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * Fix regression in opacity handling of pdf path strokePeter Niekamp2015-02-111-3/+8
| | | | | | | | | | | | | | | | | | | | | | Specifically when rendering svg to a pdf, when painter opacity is set, path strokes were transformed incorrectly due to missed setting of dirtyTransform flag. Task-number: QTBUG-38675 Change-Id: I861353822ccddd394910b8612687a244d195a41e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Merge remote-tracking branch 'origin/5.4.1' into 5.4Frederik Gladhorn2015-02-102-4/+5
| |\ | | | | | | | | | Change-Id: I9d668a655b548feab43e9d4b03e2437bdff76437
| | * REG: Fix misplaced outline drawn text with native renderingEskil Abrahamsen Blomfeldt2015-02-052-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change c238d34137ffe80d30933733a12aa2893b9631c2 was a refactoring which slightly changed behavior. In the case of fetching the alpha map's bounding box, before we would call loadGlyph() even for the case of outline drawing, as the correct bounding rect is still needed for this case. In loadGlyphFor() however, 0 was always returned for this case, as it was only used for populating the cache. The simple fix for this is to add a bool to loadGlyphFor() which adapts the original behavior when set, similar to the fetchMetricsOnly bool in the loadGlyph() functions. Change-Id: I76296c8aaeddbdae9e4c27ed2b30b7d59ff0843b Task-number: QTBUG-44273 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * | Qt 5 to-do in qpainterengineex_p.hSamuel Gaist2015-02-071-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | This patch apply the recommended cleanup in qpainterengineex_p.h Task-number: QTBUG-25069 Change-Id: Ice2c3298c88ba6a7141642470aeeefa782af7f3a Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | Merge dev into 5.5Oswald Buddenhagen2015-02-238-77/+301
|\ \ \ | | | | | | | | | | | | Change-Id: Id6dbbbfc542c214fe695c6795c6aaf23aedc1cd1
| * | | Restore binary compatibility in versioned OpenGL function classesDavid Morgan2015-02-212-71/+295
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a partial revert of commit 18aae36a90c0753f1b1e615ba8437d8ebd1bd2fb that restores the removed *Backend classes and restores the ordering of members in other *Backend classes. This restores binary compatibility for QtGui. tst_bic now reports only that some of the *Backend classes have changed size. This is a false positive as all such cases have added new members at the end of the respective classes. Offsets to pre-existing members are still consistent with earlier versions. Change-Id: Ia7f651870c2dea7f1a8d3611e667151387506dc8 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | | Fixed license headersJani Heikkinen2015-02-176-6/+6
| | | | | | | | | | | | | | | | | | | | Change-Id: Ibebe1318d1c2de97601aa07269705c87737083ee Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | | Add explanatory text to translated strings in font database.Friedemann Kleint2015-02-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Notify the translator that those are substrings used for searching. Change-Id: I242f701ff23929fe84099c40a696acfca3388f7b Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | | | [QFreetypeFace::addBitmapToPath] Get rid of unused paramKonstantin Ritt2015-02-202-3/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: I09bd94c1c82ce198406dd71e96311e56cbfe0ab5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | | Use QPlatformWindow::mapToGlobal()/mapFromGlobal() for Qt::ForeignWindow.Friedemann Kleint2015-02-181-6/+10
|/ / / | | | | | | | | | | | | | | | | | | Task-number: QTBUG-43252 Task-number: QTBUG-41186 Change-Id: I91654b6591585dec9748982a0686becf3f5e2718 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | | Use C++ <cmath> instead of <math.h>Allan Sandfeld Jensen2015-02-1615-83/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Including math.h can pollute the default namespace, and break some compilers if cmath versions of the method are declared as using. Switching to C++ math functions also greatly simplifies handling of float qreal as C++ automatically chooses the right method. [ChangeLog][QtCore][QtMath] qmath.h no longer includes math.h, so any sources depending on that indirect inclusion may fail to build. Change-Id: I4d0e331dafba354ec05dc5052e61ef4ff8d387fe Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | | Add widget support for requestUpdate() and improve its docs and testsLaszlo Agocs2015-02-161-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We must do something when requestUpdate() is called on a QWidgetWindow. The semantics of UpdateRequest for QWindow and QWidget are unfortunately different: for widgets an UpdateRequest means "sync the backing store". For QWindow it also involves marking as dirty. Change-Id: Idf40b3fc0873652dc081edeb12c96b3007a126ef Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | | Remove support for some very old compilersAllan Sandfeld Jensen2015-02-151-11/+0
| | | | | | | | | | | | | | | | | | | | | Remove code supporting gcc 4.0 and earlier, and MSVC 2005 and earlier. Change-Id: I3304e11bb38c101f113c124e8e533c5578badf34 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Updated BSD licensed file headersJani Heikkinen2015-02-15124-372/+372
| | | | | | | | | | | | | | | Change-Id: I6441ff931dbd33b698d762e6f6784898f3f60fe7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | QTextLayout: Reserve space ahead of time.Robin Burchell2015-02-151-0/+2
| | | | | | | | | | | | | | | | | | | | | We know the size, so use it instead of allowing QVector to reallocate. Change-Id: I2d18c30ef0d050326bb03c54da61459c40eb7af6 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | | QFontDatabase: Move style key near usage to avoid heap allocsRobin Burchell2015-02-151-8/+4
| | | | | | | | | | | | | | | | | | | | | Raises delegates_text.qml to 233 ops/frame Change-Id: I88a26d2a9e4dc12ebbbc07329141976c194555ec Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | | QFontDatabase: Optimize QtFontStyle::Key::Key().Robin Burchell2015-02-151-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to 46b2c74eaf95fc607518988c7958574c7f70f5ae, skip the translations at all costs. They allocate, and are very expensive. To ensure we try harder to skip them, also avoid checking styles at all unless one has been provided. This increases delegates_text from 209 items to 221 items for me. Change-Id: Ia18b07de7b48cee356e9506a0c5d7129621d79d2 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | | Add support for GPU bug list reading.Friedemann Kleint2015-02-142-0/+395
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add support for reading out feature lists from GPU bug lists in Chromium format (supporting OS + version, exceptions lists, device ids and vendor ids). Add a overloads allowing for passing file name, data or JSON documents. - Test reading in tst_qopenglconfig - Prototypically have the Windows plugin read the file from the environment variable "QT_OPENGL_BUGLIST" and turn off renderers depending on the standard keyword "disable_d3d11" and newly introduced keywords "disable_d3d9", "disable_desktopgl". - QT_OPENGL_BUGLIST can point to an absolute or relative path, in which case it is resolved via QLibraryInfo::SettingsPath and QStandardPaths::ConfigLocation. [ChangeLog][QtGui][Windows] Introduce experimental feature allowing the user to specify a GPU driver buglist with some additional keywords to chooose the GL renderer backend depending on GPU. Task-number: QTBUG-43263 Change-Id: I8c20b0e8ee3cf575b91d0672bf405c42d3e9fb64 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | QScreen: add devicePixelRatio propertyShawn Rutledge2015-02-142-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | It has been only an accessor until now. [ChangeLog][QtGui][QScreen] added devicePixelRatio property Change-Id: I3b9d0aed437cc11a8ddb5b601dd8db6ed5ca9748 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | | [QQuaternion] Introduce to/from euler angles conversion routinesKonstantin Ritt2015-02-142-0/+144
| | | | | | | | | | | | | | | Change-Id: I26c0a9d1ce9258048cf44eed5b5238920c2317b1 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | [QQuaternion] Introduce toAxisAndAngle()Konstantin Ritt2015-02-142-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | This operation is the exact opposite to QQuaternion::fromAxisAndAngle() (so that it is a way to extract the axis and angle values suitable to create the same quaternion via QQuaternion::fromAxisAndAngle()). Change-Id: I41fda58f5fb2b867cccd6b2faf58ab671fa070da Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | FreeType: Support RGB rendering when not using FontConfigSérgio Martins2015-02-145-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows+FreeType, Linux with -no-fontconfig and the forthcoming OSX FreeType engine can now use sub pixel rendering. The function to get the subpixel type is in QPlatformScreen because we're moving to per screen font settings in the future. This patch is safe, as no functionality is changed for existing users, if one wants sub pixel rendering they'll still have to pass -DFT_CONFIG_OPTION_SUBPIXEL_RENDERING to configure. Task-number: QTBUG-44269 Change-Id: Ib6c22d48a1b7c7b85ee316d5d9e3b6eae0c1ecc0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | | Improve readability of QFlags testSérgio Martins2015-02-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | It's moot to compare something with boolean semantics against 0. Furthermore, it might even fail to compile, as seen in change request 105258 Change-Id: I8e491a67080b2d5a666858e8655e9f549fa6be4d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Pass params of shareable type by const-ref rather than by valueKonstantin Ritt2015-02-132-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of leaving a note for Qt6 and then forget to do the actual change once again, change APIs now inside QT_VERSION >= QT_VERSION_CHECK(6,0,0) blocks. Change-Id: Ifa769904e304358a9c2accfd6c9f86eeb342f9dc Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Pass params of shareable type by const-ref rather than by valueKonstantin Ritt2015-02-132-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | ...where passing them by value was not intentional. Change-Id: Ifd5036d57b41fddeeacfbd3f5890881605b80647 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Optimize generic conversion and remove now obsolete direct conversionsAllan Sandfeld Jensen2015-02-134-423/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are many direct QImage conversions that doesn't need to be direct but only are because they are faster than the generic conversion. This patch optimizes the generic conversions and then removes all the direct conversions that are now no faster than the generic. Change-Id: I3dc5f44cc7f6358fd66420e9974eebaf2c7ca59c Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | QOpenGLContext: expose the shared global contextGiuseppe D'Angelo2015-02-122-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're documenting that this context exists, therefore applications are allowed to assume that it exists. For the same reason, we should expose it as public API -- an application should be allowed to upload GL objects before creating or showing QOpenGLWidgets that use them. Change-Id: Iedbba7cd393018d93833fd2a6b02cce0639a89b4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | Make the QPlatformTheme::keyBindings() search deterministicMorten Johan Sørvig2015-02-121-50/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPlatformTheme::keyBindings() performs a binary search into an ordered list of StandardKey -> Key Sequence mappings where each StandardKey can have multiple key sequences. Previously the order of the Key Sequences in the returned list would be indeterministic and, except for the designated pri-1 key sequence, would not necessarily correspond to the list order. (The ordering was dependent on where the binary search "hits", which again depends on the size of the list.) This caused trouble when adding mappings, since it would change the order in the returned key sequence list for existing mappings and confusingly cause (apparently) unrelated test failures. Fix this by replacing the manually coded binary search with std::equal_range. One test case needed to be fixed up because it had the result in the wrong order (verified by looking at QPlatformTheme::keyBindings). Change-Id: I555ca2736b1a8e6454dc79645a8246f80119cfc2 Done-with: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | | QtGui: assorted migrations to QString::asprintfMarc Mutz2015-02-122-13/+10
| | | | | | | | | | | | | | | Change-Id: Ibb177b22064efcad56ace60935e9c8759a87a3c9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | QOpenGLTexture: enable build on Windows CEGiuseppe D'Angelo2015-02-121-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | The various refactorings to this code allow it compile and work on Windows CE, so we can enable the build there. Change-Id: I8ac56e87dca13790a76f125330a5400e4b4f5d46 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
* | | Expose TabFocusBehavior in QStyleHintsLiang Qi2015-02-126-5/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TabAllWidgets in QPlatformTheme is replaced by TabFocusBehavior. [ChangeLog][QtGui] Expose TabFocusBehavior in QStyleHints Change-Id: Iafaad7c6a5c6bc888d1e124e6ddcdbdc46f37b1c Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>