summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | | | QtGui: use Q_ENUM instead of Q_ENUMSOlivier Goffart2015-02-0814-17/+23
| | | | | | | | | | | | | | | | | | | | Change-Id: I92ac2ea218e9134aa36ecb179b8ae790a2dba56a Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | | QOpenGLVertexArrayObject: remove a now unnecessary initialize callGiuseppe D'Angelo2015-02-081-2/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: I03a14c52dd5a02de0c1cc1c2df5d4529acff9acd Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | | Avoid the initializeOpenGLFunctions() call after versionFunctions()Laszlo Agocs2015-02-071-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Try making it compatible with QOpenGLContext::functions() which returns an already initialized QOpenGLFunctions. Unfortunately we cannot make them 100% compatible because functions() conveniently requires that the context (or a sharing context) is current. versionFunctions() has no such requirement and we cannot safely introduce it anymore. What we can do is to state that as long as the context is the current one, the initializeOpenGLFunctions() call can be omitted. If another context (or no context) is current, the call will still be needed, like it is today. Also, we require that the exact same context is current. Sharing does not count since the exact behavior of sharing contexts with different versions is unknown. [ChangeLog][QtGui] initializeOpenGLFunctions() no longer needs to be called when querying a versioned function wrapper object via QOpenGLContext::versionFunctions(). Change-Id: I0b4d1ae1f780da3f5dec9fc8dc67255c13faab6e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | | Make mipmap levels and texture comparison work with GLES 3.0+Laszlo Agocs2015-02-073-51/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In ES-only builds (-opengl es2) we hit the QT_OPENGL_ES_2 path which disables all this. Not ideal since all the support is present in GLES 3.0. Therefore, stop relying on the ifdef and do runtime checks. This also needs defining the constants manually since they are not available in gl2.h and our own ES2 extension headers provide some of these with silly silly suffixes. Change-Id: I8ad7f5091a371bad1e3c6dc4898342a175016274 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | | QOpenGLWidget/Window: improve docs for the dtorGiuseppe D'Angelo2015-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove a typo and add the standard sentence about a dtor. Change-Id: Ie21ad6d2e83977705ea43fdc872d08f496a32376 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | | | Handle gracefully the removal and re-attachment of all QScreensShawn Rutledge2015-02-075-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't crash; restore windows when all screens are removed and re-added. xcb: on configure notify, check for screen change: it may be that a window belonging to a screen which was removed has now gotten mapped to the new screen. On screen change, send a synthetic expose event, because the real expose events already happened. Task-number: QTBUG-38326 Task-number: QTBUG-32973 Task-number: QTBUG-42985 Change-Id: If334f55c248468ad3c95e7066bb14eca377d2050 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | | | [QQuaternion] Introduce to/from rotation matrix conversion routinesKonstantin Ritt2015-02-062-0/+89
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic19824e7e135f53a9ce3f2ea7ecd078a589e7425 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | | Revert "Introducing QPlatformHardwareCompositor."Gunnar Sletta2015-02-065-188/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm having seconds thoughts about this api. Better to not commit to it just yet. This reverts commit ebdd4a0ba7daf74b11f716d291a97f7cd28c2aca. Change-Id: I9725e3172b0166b56364a34db246eabb685e855d Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | | | Don't replace IntersectClip with ReplaceClip on a QPictureAllan Sandfeld Jensen2015-02-051-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPainter should not try to be smart and optimize IntersectClip with ReplaceClip when working on a QPicture paint device. Doing so will change the end result as the actually state when replayed might be different from the one it was recorded in. [ChangeLog][QtGui][QPainter] QPainter will no longer try to replace IntersectClip with ReplaceClip if the paint engine is a QPicture. Task-number: QTBUG-35830 Change-Id: I0693d932f037336b960c34bb8fe840e8afe04fe6 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | | Fix regression from Qt4 with layout directionJan Arve Saether2015-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt4, if the result of the translation QApplication::translate("QT_LAYOUT_DIRECTION") returned "RTL", Qt usually called QApplication::setLayoutDirection(Qt::RightToLeft) in order for a translation file to specify if the UI should be left-to-right or right-to-left. However, due to modularization, we could no longer call QApplication::translate(), so the code was wrongly changed to call QCoreApplication::translate(....) instead. This was wrong, and in addition the translation files was never updated with the new context. This patch fixes it to only translate it with the QGuiApplication context. This is the only sensible context, since QApplication would lack QtQuick support, and QCoreApplication would not know how to change layout direction. [ChangeLog][QtGui][i18n] Fixed bug where layout direction did not switch according to the instruction in the translation file. Task-number: QTBUG-43447 Change-Id: Id0409a42d41b3b9ff1cd53d090c4d9c9802f5659 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | | Avoid creating a QPixmap on QBrush comparisonsAllan Sandfeld Jensen2015-02-041-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We shouldn't create QPixmaps when comparing QBrushes that do not contain a QPixmap. This patch extends the comparison logic to comparing QImage cachekeys if the brushes are QImage based. Note the comparison still produces false negatives on equal content on different pixmaps and images, but this is preserving existing behavior. Task-number: QTBUG-43766 Change-Id: I001b4032172c1e568aad311f7df2eaae6aee8dc6 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | | Correct QPainter's is_brush_transparentAllan Sandfeld Jensen2015-02-041-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1-bit QImage's should not be considered transparent unless they have use transparent colors in the color table or have no color table. By using hasAlphaChannel we also catch other transparent brush textures. The method is only used in determining emulation specifiers. Change-Id: I120ee1de4dc2df666c3e2acb1e40b53a8de40754 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | | Generate SSE4.1 versions of premultiplying methods where convenientAllan Sandfeld Jensen2015-02-042-7/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The autovectorized versions of premultiplying conversions are almost twice as fast with SSE4.1 as with SSE2. Therefore this patch lets compilers that can make those versions convenient without duplicating code do that and lets us use them when available. Change-Id: I699035963abe55a38b9ef8ba7b4a8c961c8dfcdd Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | | a11y: Fix warning about instance method '-invalidate' not foundTor Arne Vestbø2015-02-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The interface declaration of QMacAccessibilityElement lives in the Cocoa platform plugin. We replicate the needed parts in QtGui to silence the compiler. Change-Id: I2d1984c988777d3c7af82df90390624c93fd85b5 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | | | Remove unused qdrawhelper_sse_p.h headerAllan Sandfeld Jensen2015-02-041-172/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This header has not compiled since the MMX header it includes was removed in 2011. It appears to be completely unused. Change-Id: I48dbade1af186cf113cbd50eb7bedf3a32b97883 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | | Remove unnecessary math.h and limits.h includesAllan Sandfeld Jensen2015-02-046-10/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: I28c898f869ed3f03b08ff55f2972a38667c755ad Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | | | [QFontDatabase] Speed-up is(Bitmap|Smoothly)ScalableKonstantin Ritt2015-02-041-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...with hints provided by platform font database. Namely, if database reports fontsAlwaysScalable(), then we could simply return true in QFontDatabase::is(Bitmap|Smoothly)Scalable. Change-Id: I7af082718e007dfdaf430d3c4852005f62efa41a Reviewed-by: Miikka Heikkinen <miikka.heikkinen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | | Check for the proper extension for anisotropic filteringLaszlo Agocs2015-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I881fccea3af74ead14f523c7c54a405a15ea29ab Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | | [QMath3D] Add public c-tors that do not initialize the contentsKonstantin Ritt2015-02-0412-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1a28766451e6750986a239c989e7f30c14479057 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | | | Fix 1700 override warnings [-Winconsistent-missing-override]Sérgio Martins2015-02-032-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Classes should either use or not use override, otherwise it hurts code readability. Some inline keywords were removed because of an error with MSVC2010: error C2216: 'override' cannot be used with 'inline' Change-Id: I7276d5525a92281bd0d743beb11d0dc73441443b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | | WGL: support reset notifications via GL_ARB_robustnessLaszlo Agocs2015-02-032-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handling context losses is unavoidable with ANGLE. Introduce some level of support for desktop GL too by making it possible to opt in via a new flag. Support is added for Windows (WGL, opengl32) only for now. In case of Windows with ANGLE setting the flag is not necessary, context losses will be reported regardless. Change-Id: Ic354c1382e876566538c52a4381f7ff328b7477e Reviewed-by: Gunnar Sletta <gunnar@sletta.org>