summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Fixed license headersJani Heikkinen2015-02-176-6/+6
| | | | | Change-Id: Ibebe1318d1c2de97601aa07269705c87737083ee Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@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>
* Prevent crashing on ES2 SDK - ES3 device scenarios with AndroidLaszlo Agocs2015-02-123-8/+17
| | | | | | | | | | | | | | Making a build with an older NDK having only gl2.h results in crashing QOpenGLTexture on devices that provide ES 3.0 or 3.1. This is because immutable storage is supported (based on runtime checks) but the function pointers are not there (due to ifdef checks). Fix this like we did in other places: get rid of the ifdef and dlsym the ES3-only symbols. Task-number: QTBUG-44397 Change-Id: Ief518ec8c7d532aeea0075ba166baf8d22e66ec5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Update copyright headersJani Heikkinen2015-02-11667-4467/+4395
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/devLaszlo Agocs2015-02-1020-114/+225
|\
| * Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-1020-114/+225
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro src/gui/image/qimage_conversions.cpp src/gui/opengl/qopenglextensions_p.h src/gui/text/qtextengine.cpp src/network/ssl/qsslsocket_openssl.cpp src/plugins/platforms/eglfs/qeglfshooks_stub.cpp src/plugins/platforms/eglfs/qeglfsscreen.cpp src/plugins/platforms/eglfs/qeglfswindow.cpp src/plugins/platforms/windows/qwindowsfontdatabase.cpp src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp src/plugins/platforms/windows/qwindowsnativeinterface.cpp src/plugins/platforms/windows/qwindowsscreen.cpp src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/windows/qwindowswindow.h src/plugins/platforms/xcb/qxcbdrag.h src/widgets/itemviews/qabstractitemview.cpp src/widgets/kernel/qwidget.cpp src/widgets/util/qsystemtrayicon_p.h tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp Thanks to Friedemann Kleint for resolving the qwindowsfontdatabase.cpp conflicts. Change-Id: I937232c30523d5121c195d947d92aec6f129b03e
| | * Don't crash with invalid QModelIndex or when QTreeWidgetItem is NULL in ↵Maks Naumov2015-02-061-12/+11
| | | | | | | | | | | | | | | | | | | | | mimeData() Change-Id: I0a9abaa05cf136eadf222d3e7d102930719b84ff Reviewed-by: David Faure <david.faure@kdab.com>
| | * QIcon: Fix that HiDPI image was not found with QRC aliasEike Ziller2015-02-061-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using images in QRC and giving the 1x and 2x image files respective aliases but without any file extension (for example 'myimage' and 'myimage@2x'), then QIcon would fail to find the 2x variant. Task-number: QTBUG-44049 Change-Id: I400bf6d22aeefe0aa351c68e473bf24ac2a36471 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| | * Improve QTextDocument::setPlainText/Html doc related to undo stackSamuel Gaist2015-02-051-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch aims to improve the documentation of setPlainText/setHtml to let the user know that the undo stack is cleared when both these function are called. Change-Id: I079f9f1dd407387941777ebbc7b5a7bc6dc005ec Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| | * Correct inplace conversion methods from RGBA8888 formatsAllan Sandfeld Jensen2015-02-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | The methods for inplace conversion from RGBA to ARGB was misplaced by one step causing conversion to RGB16 to get an invalid method. Change-Id: I3b2b4cffe993705c48613eec7d9b7c6213f57fc2 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| | * Partially revert "QFixed: fix undefined behavior"Marc Mutz2015-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partially reverts commit 1755038134cfe16d3d52ec2aea543955462e2951, which did not only fix undefined (signed left-shift), but also implementation-defined (signed right-shift) behavior. It turned out that code depends on a particular implementation behavior (logical instead of arithmetic right-shift), and needs to be fixed first. Change-Id: I9ba32d06f127d17d05e0c6f6eac3d26268587bca Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
| | * Add some punctuation to QTextCursor's detailed description.Mitch Curtis2015-02-021-5/+5
| | | | | | | | | | | | | | | Change-Id: I3b3eab74888f283a9890321fadcae67c09c24b61 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| | * Merge remote-tracking branch 'origin/5.4.1' into 5.4Frederik Gladhorn2015-01-299-60/+153
| | |\ | | | | | | | | | | | | Change-Id: Idadb5639da6e55e7ac8cc30eedf76d147d8d5d23
| | | * Make harfbuzz-old fallback available at run-timeEskil Abrahamsen Blomfeldt2015-01-192-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old harfbuzz code path is included as a fail safe for any possible use case where the Harfbuzz-NG regresses, but because the variable was checked statically, it was not actually possible to build a releasable executable which employed the work-around. Instead we use the regular global static pattern where the variable is queried the first time it's needed. Task-number: QTBUG-43850 Change-Id: I9ade76bf0825bbfefebdbdc4e6ee5571f1a3deec Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | | * Fix drag and drop regressionGatis Paeglis2015-01-193-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix regression introduced by e4becdc3d310a0dd1a6d34d0796a52b21dedeb2d Add QPlatformDrag::ownsDragObject() function, QDragManager can use the return value of this function to decide if it should take care of deleting QDrag object or platform plugin will take care of deleting QDrag. XCB platform plugins uses async dnd data delivery mechanism. It allows user to drop something and then continue working with the assurance that the target will get the data regardless of how slow the network connections are, which means that a source window should preserve QDrag data until dnd has finished. Change-Id: I1fbad7380cddec98b756698993dd397409833150 Task-number: QTBUG-43436 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| | | * Merge 5.4 into 5.4.1Oswald Buddenhagen2015-01-163-22/+22
| | | |\ | | | | | | | | | | | | | | | Change-Id: I78d848c0bb396584a205a8066d253f2bcac8da56
| | | * | Resolve GLES3 functions from the shared libLaszlo Agocs2015-01-104-51/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately the few functions that are part of the OpenGL ES 3.0 standard and are used by QtGui have to have special handling after all. Just directly calling the functions causes issues when building on a GLES3 capable system and deploying somewhere where only GLES2 is available. Using eglGetProcAddress and such is not an option because the ES spec does not guarantee that standard functions are resolvable via that mechanism. Task-number: QTBUG-43318 Change-Id: I72f985d75ca669835839016573cbb8e4a3fb41db Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| | * | | src/gui/painting/painting.pri: add missing qfixed_p.hMarc Mutz2015-01-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iba176345ec9448c936cd89b06ea24272df94fc1f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | | QTextCharFormat: fix word spacing setupMaks Naumov2015-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Properly check QFont::WordSpacingResolved when use setFont() with QTextCharFormat::FontPropertiesSpecifiedOnly Change-Id: I72f1641ef7587cbaf8fcf5fef2f3c44393b0ebfc Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| | * | | Doc: fix copy/paste error in QTextCharFormat::setFont documentationDavid Faure2015-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2190975762c6283daa004b754da607829d263b0a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| | * | | OS X/iOS: Fix stretched font renderingEskil Abrahamsen Blomfeldt2015-01-221-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting the stretch of a QFont did not work correctly on OS X or iOS. Two things are needed to make it work: First of all, we need to properly set the transform when creating the CTFont. In addition, we need to manually scale the advances, as CTRunGetPositions() does not do this for us. On OS X 10.6, however, there was a regression and CTRunGetPositions() would return scaled positions, so we exclude the step to scale the advances on this particular version. This is an adaptation of bc25cfdd65452efa226cbd544c9ae9803eb6748a in Qt 4. [ChangeLog][QtGui][OS X/iOS] Fixed a bug when rendering fonts that were set to be stretched. Task-number: QTBUG-43801 Change-Id: I4902a9f5e29299761e3c2c5c6d6d80ee1dea1a25 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| | * | | QFontDatabase: Make assert about failed delayed font population more verbose.Friedemann Kleint2015-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-43774 Change-Id: Ie55de75e31e1e569f4b4e336900a8f96f7c1b9c0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| | * | | QFixed: fix undefined behaviorMarc Mutz2015-01-211-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Left-shifting of negative values is undefined ([expr.shift]/2). Use multiplication with 64 instead. There are probably more instances in this class, but this patch already gets rid of vast amounts of ubsan errors in tests/auto/gui/text. Found by UBSan. Change-Id: I89b8bb61e4decba605fe4fb3efea68b1f1eacf1a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | | Safeguard QScreen::refreshRate against buggy platform behaviorGunnar Sletta2015-01-212-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I891bd5272db76e8562f6722b633cc0fdaac5f7a2 Task-number: QTBUG-43853 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | | | Add support for snapping to pixel gridJan Arve Saether2015-02-092-21/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables us to do more intelligent distribution than simply doing the rounding on each individual items geometry (which often leads to larger spacings than specified). Instead of doing the rounding on the output geometries, we now do the snapping inside the layout engine. This allows us to do more intelligent distribution of items, and spacings should always be respected. There are some cases where items with fractional size hints might overlap with less than a pixel. This was also the case before this patch. Those cases are impossible to fix properly, since fractional size hints conflicts with the snapping in some cases. (Fractional size hints is normal for Text items.) Task-number: QTBUG-41216 Change-Id: I01a8bc3529f0b8b028d6eb0a530c751b67ac6f4e Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* | | | | OpenGL: Add versioned functions support for opengl 4.4 and 4.5David Morgan2015-02-0942-1278/+23484
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous errors in versioned function classes for OpenGL versions prior to 4.4 have also been fixed to comply with the new OpenGL xml specification. Such mistakes were due to either bugs in the old plain text specification files or problems due to the difficulty in parsing the old spec files. In some cases this has meant adding in missing functions that were absent previously. The other class of problem was when functions were erroneously included in the versioned function classes when they should not have been present. That is, some core profile classes incorrectly had member functions for deprecated functions that should only be present in the compatibility profile classes. In these cases these incorrect functions will now trigger a qFatal if called. This is fine as any applications that called these by mistake in the past would have been dereferencing a null pointer as the function pointer resolution would have failed for these functions. [ChangeLog][QtGui] Add version function classes for OpenGL 4.4 and 4.5 and deprecate some erroneously classified functions. Task-Id: QTBUG-33671 Task-Id: QTBUG-44364 Change-Id: I224108dcaf4f8b4933bc121827511841e2a41590 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | | | | Optimize unpremultiply on SSE4.1Allan Sandfeld Jensen2015-02-092-1/+63
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds an SSE4.1 optimized version of qUnpremultiply and uses it in the most drawing conversions methods. This gives a speed-up of little over 2x. Change-Id: Ieb858a94ada1eb86d7af715ac1a100f1587f360d Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | | remove stray QGuiApplicationPrivate::wheelEventSource declarationShawn Rutledge2015-02-081-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is unimplemented and probably unnecessary. Unintentionally included in commit 74443d7bbb319e949928dd081fde04bccb5f7845. Change-Id: I3a1afb20e673fa0611b602a11ceca1953231ac14 Reviewed-by: Andrew Knight <qt@panimo.net>
* | | | Add more notes regarding the uniform settersLaszlo Agocs2015-02-081-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having overloads for GLuint that call glUniformNi was a mistake to begin with, and it has only been made worse when later OpenGL versions introduced unsigned int support and glUniformNui. Note this in the docs. Task-number: QTBUG-37012 Change-Id: Icc867221d0fbced8c4ff769deee66effa022f1b5 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | | Use prefix instead of postfix for iteratorsMaks Naumov2015-02-083-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The postfix increment(decrement) creates a temp copy of *this before the modification and then returns that copy. It's needed only when using the old iterator and then incrementing it. Change-Id: I7f6702de78f5f987cec3556047e76049b4ee063a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>