summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Avoid crashing on embeddedLaszlo Agocs2014-11-261-1/+1
| | | | | | | | | tlw can be null. handleKeyEvent() is already fixed. Change-Id: I92ffca30841147aca4fa536b80736c799aae4ac0 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Prevent duplication of display name in window titles.Friedemann Kleint2014-11-261-1/+1
| | | | | | | | | | | | | | Do not append QGuiApplicationPrivate::displayName() to window title if the title already contains it. Fixes Qt Designer showing up with window title Qt Designer - Qt Designer after qttools:9a58492ce6b62c0fdab373337f39103f4072ad9d Change-Id: I5ac07a7f4be70372342324a175faf8c825867f50 Reviewed-by: David Faure <david.faure@kdab.com>
* Add missing QT_NO_REGEXP guard to search functionsSamuel Gaist2014-11-262-0/+5
| | | | | Change-Id: I651243ad5dcdd0dcef20f12f37769bf8c45ae3c5 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* QFontDatabase: Fall back to "Any" writing system if none matchesUlf Hermann2014-11-261-1/+4
| | | | | | | | | | | | | | The scriptForWritingSystem array has significantly fewer entries than QChar::Script. It can easily happen that we don't find a writing system for a given script. In that case, just assume any writing system can be used. This fixes an out-of-bounds array access resulting from the writing system index being one-past-end if std::find doesn't find a match. Change-Id: Ic277be1dad71af42d479e70e0b4bf29a7dc8d0a7 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Merge QFontEngineMultiBasicImpl and QFontEngineMultiKonstantin Ritt2014-11-265-135/+110
| | | | | | | Minor refactoring also improves the behavior and the code readability. Change-Id: Id89dd224f4132a4c0dfbc16f414ef42cc8d8a4da Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Add name for the Touchpad[Toggle|On|Off] keysAlbert Astals Cid2014-11-251-0/+3
| | | | | | | Change-Id: I22de911fa56165b36ca9a4c9d22673e11603a746 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-11-2430-114/+378
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice.cpp src/plugins/bearer/linux_common/qofonoservice_linux.cpp src/plugins/bearer/linux_common/qofonoservice_linux_p.h src/plugins/platforms/android/qandroidplatformtheme.cpp src/tools/bootstrap/bootstrap.pro src/widgets/styles/qmacstyle_mac.mm Change-Id: Ia02aab6c4598ce74e9c30bb4666d5e2ef000f99b
| * Fix failure to build QtQuick with LTOThiago Macieira2014-11-232-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The presence of the inline QTestFontEngine's constructor causes a linker failure because QFontEngineBox isn't exported. I'd say this is a compiler bug (GCC 4.9), but it's an easy workaround and a difficult testcase. typeinfo for QTestFontEngine: error: undefined reference to 'typeinfo for QFontEngineBox' vtable for QTestFontEngine: error: undefined reference to 'QFontEngineBox::glyphIndex(unsigned int) const' Change-Id: I84829d111616977d6f3fcbbb48509d1c7d4f5fa6 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * Merge remote-tracking branch 'origin/5.4.0' into 5.4Frederik Gladhorn2014-11-219-23/+15
| |\ | | | | | | | | | Change-Id: I95f235a66ce2e9b1fa435c0f911c6f7e811755f0
| | * Doc: Added brief statement to group definitionNico Vertriest2014-11-191-0/+1
| | | | | | | | | | | | | | | | | | | | | Groups: richtext and sharing. Task-number: QTBUG-42682 Change-Id: I46bd7e5bba0f665519ee4f3c033b971f0836e314 Reviewed-by: Martin Smith <martin.smith@digia.com>
| | * Correct the signature and access rights for the protected constructorLars Knoll2014-11-192-3/+3
| | | | | | | | | | | | | | | Change-Id: Ic43398a82777f3b1a95a36f60ebc4338d60c29ec Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| | * Fix hb_face leaking in QFontEngineFTKonstantin Ritt2014-11-153-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since HarfBuzz-old's HB_Face doesn't support ref-counting, it is impossible to keep the same behavior as for NG's ref-counted hb_face when we're going to reparent the data of unknown type in QFontEngineFT. We should either not release the object returned by harfbuzzFace(), or introduce ref-counting for HB-old's HB_Face. Stop referencing HB-NG's objects on access for now and thus avoid a need to release them manually. Task-number: QTBUG-42674 Change-Id: Ia21e7ba9c17185796b0dd98c2c27d02566f2a701 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| | * Make it possible to disable font embeddingEskil Abrahamsen Blomfeldt2014-11-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When font embedding is explicitly disabled, fall back to painter paths as we would if the font prohibits embedding. Note that this flag was never respected on any platform in any version of Qt, as far as I've been able to tell, because the handling of it in the X11 print engine was removed shortly after it was introduced in 2005. [ChangeLog][Printing] Disabling font embedding is now possible using the QPrinter::setFontEmbedding() function. Task-number: QTBUG-41943 Change-Id: Ice5e893f9893c5243310ae7892bec7497dd55c4a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Revert "Fix fallbacks for adapted common script"Eskil Abrahamsen Blomfeldt2014-11-133-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts 1dd9a0af4f577ccb5578cea562a98686c8e290e6. It was a band-aid for a change in the unicode itemizing algorithm which caused the script of a script item to become unreliable. This change has since been reverted, so the band-aid is no longer needed, and it also causes problems for WebKit on Windows when it ends up preferring Arial Unicode MS as the font for Uchen script, even though the font does not support this script. The autotest from the reverted commit is kept in place and still passes. [ChangeLog][Text] Fixed regression when rendering Uchen text in WebKit on Windows. Change-Id: I488c84703bb55a050d90092c6bf9e5c70a9e31c2 Task-number: QTBUG-41372 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| | * Windows: Remove font size hackEskil Abrahamsen Blomfeldt2014-11-111-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This hack was reintroduced in a4478b28966c5f630ba3d93b97bc91a3cec2fdbe, and hides scaling artifacts in fonts where there is heavy hinting, such as Arial, but introduces new bugs in other fonts, such as Vijaya. The bottom line is that we shouldn't arbitrarily override the pixel size of the font with the character height that we get from GDI. Due to hinting, there will be some artifacts when printing with screen resolution on Windows. The only way to make this look correct is to use high resolution printing, like the documentation says, or perhaps to force design metrics on the text layout. Task-number: QTBUG-40770 Change-Id: Id151eb0ede5f73efb2a401924ce379d4414ca2b1 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | Observe QLocale::RejectGroupSeparator in QInt/DoubleValidator.Friedemann Kleint2014-11-201-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | Pass it as additional boolean parameter to QLocaleData::validateChars(). Task-number: QTBUG-42522 Change-Id: I4b2367f4e2fdcbd17e343d215edad57e6687697a Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
| * | Allow empty string as intermediate matchPaul Olav Tvete2014-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QRegularExpressionValidator and QRegularExpression disagree on what a partial match means. [ChangeLog][QtGui][QRegularExpressionValidator] Allow empty string as intermediate match Change-Id: Ia6c55beb54870b1be5c88b6ef3eceebc8ca3f86b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| * | Enable transformations for Qt Quick in FT engineEskil Abrahamsen Blomfeldt2014-11-202-11/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt Quick (or in Qt Widgets when setting QT_NO_FT_CACHE to 1 or when using OpenGL engine), the alphaRGBMapForGlyph() will be used to get glyphs, because we need to keep our own cache. Transforms was not supported in this code path, instead it was turned off in supportsTransformations(). This patch enables transformations in the alphaRGBMapForGlyph() and alphaMapForGlyph() code paths as well, since this is needed for proper rendering with QT_DEVICE_PIXEL_RATIO. Change-Id: I7d6b79918f7c0bcc051a8343b16b315bfbba59cf Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | Android: Compile for MIPSEskil Abrahamsen Blomfeldt2014-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The qt_memfill32_asm_mips_dsp function is only declared if QT_COMPILER_SUPPORTS_MIPS_DSP is defined, so we can't reference it unless the same macro is defined. Change-Id: Ib959b4b969b699ca78804394206266469b4ebf64 Task-number: QTBUG-36017 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Add a note about group separators to numeric validators.Friedemann Kleint2014-11-191-2/+12
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-42522 Change-Id: I202cb98c51ba2332000772edfdc47d47c56e49c9 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
| * | Save a detach if QBrush::setColor does not change the brush colorAllan Sandfeld Jensen2014-11-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | We can save detaching a QBrush when setColor is called trying to set the current color. Change-Id: I8f4042325d0f9c2bda69d469d6861e3cc310f329 Reviewed-by: Samuel Rødal <srodal@gmail.com>
| * | Update fbo toImage() docs regarding premultiplied alphaLaszlo Agocs2014-11-171-3/+17
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-42510 Task-number: QTBUG-37261 Change-Id: Ic11bec0a25e66df9d022f640621686be867e84d2 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * | Fix for current_fbo getting out of sync in QtOpenGLSamuel Rødal2014-11-112-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using QGLWidget in combination with QOpenGLFramebufferObject from QtGui, instead of QGLFramebufferObject from QtOpenGL, the current_fbo variable doesn't get updated when framebuffer object bindings change. To ensure that the QGLWidget correctly releases the currently bound framebuffer object when using a QPainter, we keep track of whether QOpenGLFramebufferObject has modified the current FBO binding, and if that's the case we need to read the OpenGL state directly instead of relying on a cached value. Change-Id: If7e0bd936e202cad07365b5ce641ee01d2251930 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * | Make the -nograb and -dograb arguments actually work on xcbJørgen Lind2014-11-113-30/+0
| |/ | | | | | | | | Change-Id: Idc725443e4abe27db3e530f08173897bfcbe1278 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| * Fix loading 2x images in Rich Text DocumentsMihailNaydenov2014-11-071-26/+41
| | | | | | | | | | | | | | | | | | There are some issues preventing 2x images from loading, mainly incorrect testing for exist() by passing an url, which always reports ‘false’. Task-number: QTBUG-36383 Change-Id: I1e8e5a91b01f1a4ddd3559c2e860db5bc41908ce Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| * Skip unused function isCoreProfile() on non-ES2 platformsTor Arne Vestbø2014-11-051-0/+2
| | | | | | | | | | Change-Id: Ia84e74512e7001986c620253cdf0bc431ebc00dc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * docs: WindowType is important for dialogs to center themselvesShawn Rutledge2014-11-051-0/+4
| | | | | | | | | | | | | | Task-number: QTBUG-41844 Task-number: QTBUG-36185 Change-Id: I61605006048e81d2666eea34f4d041124a24199f Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Don't build or use qt_convert_rgb888_to_rgb32_neon on ARM64/AArch64Tor Arne Vestbø2014-11-033-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The assembly code doesn't build on that architecture yet: qimage_neon.cpp:78:17: error: vector register expected "vld3.8 { d0, d1, d2 }, [%[SRC]] !\n\t" ^ <inline asm>:1:15: note: instantiated into assembly here vld3.8 { d0, d1, d2 }, [x1] ! ^ qimage_neon.cpp:78:57: error: unrecognized instruction mnemonic "vld3.8 { d0, d1, d2 }, [%[SRC]] !\n\t" ^ <inline asm>:2:2: note: instantiated into assembly here vswp d0, d2 ^ qimage_neon.cpp:79:31: error: vector register expected "vswp d0, d2\n\t" ^ <inline asm>:3:15: note: instantiated into assembly here vst4.8 { d0, d1, d2, d3 }, [x8,:64] ! ^ Change-Id: I8fe93b3940d971c0aed5973fe6e1a5e2f362df3c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QShapedPixmapWindow: do not leak the backing storeGiuseppe D'Angelo2014-10-312-0/+7
| | | | | | | | | | | | Change-Id: Id7cc8cbbcd62c546055d525473f90d2bad0c144a Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * Fix a possible use after freeLars Knoll2014-10-301-1/+1
| | | | | | | | | | | | | | | | | | Found by coverity. The cachedIcon can be deleted when being inserted into the icon cache (in QCache::insert). So copy it to icon before trying to insert it into the cache. Change-Id: I5ed13c0c7ecb8f8f13285ca5d06237493dbea479 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Ignore alert on an active windowJohn Brooks2014-10-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When QWindow::alert() is called with a duration of 0, it calls QPlatformWindow::setAlertState(true), and expects the alert state to be reset when the window is next activated. Other calls to alert are ignored while alertState is still true. If alert was called for an active window, it would remain in the alert state until deactivated and activated again, and on some platforms calls to alert would be broken while deactivated. Alerting doesn't make sense for active windows, so we can simply ignore it, which was the behavior with Qt 4 on some platforms. Change-Id: Ia3324da4c89db711b63eb31cddf0bf742bb4e3b8 Found-By: Jan Noertemann <jan.noertemann@uni-dortmund.de> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Martin Gräßlin <mgraesslin@kde.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * Add qobject_cast template specialisation for QWindowJørgen Lind2014-10-291-0/+13
| | | | | | | | | | | | | | greatly improving the performance of qobject_cast<QWindow *> Change-Id: If5a1afa6e41f4676f4838ea3ff80f1d89e396dfc Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * Fix justification in multi fontengine glyphrunsAllan Sandfeld Jensen2014-10-281-2/+4
| | | | | | | | | | | | | | | | | | | | QTextLine::glyphRuns was not handling justification when splitting glyphRuns due to multiple font-engines. This patch adds the missing justification. Task-number: QTBUG-41901 Change-Id: I02d24218630506da21531a6499784dff2eecdf6f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| * Rotate images according to Exif orientationRainer Keller2014-10-271-1/+149
| | | | | | | | | | | | Task-number: QTBUG-37946 Change-Id: I181f88acdff0ef76aa02e968dc6afca1ed495f38 Reviewed-by: aavit <eirik.aavitsland@digia.com>
| * fix crash when dropping a file into an empty QTextEditJoerg Bornemann2014-10-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | Since commit be0bfe09ee4b99e9ab45c6898949b5d144e77a29 we return -1 in QTextEngine::findItem if the item cannot be found. Calling code must be prepared for this case. Otherwise we run into an out-of-bounds vector access later on. Task-number: QTBUG-42103 Change-Id: Ie338cd1fc3cf0ce1e8edfa59dead635669020a33 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | Use the static TexStorage2|3D funcs in es buildsLaszlo Agocs2014-11-191-0/+5
| | | | | | | | | | | | | | | | | | | | When building with -opengl es2 and having ES 3.0 or newer, TexStorage must resolve directly to the functions. Other paths (desktop, ES when using dynamic on Windows) are already covered below. Change-Id: If214578bf23547d6f66a17bc999e9fabf97ba770 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | Add debug output for QPlatformSurfaceEvent.Friedemann Kleint2014-11-171-0/+14
| | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtGui][QPlatformSurfaceEvent] Added event class QPlatformSurfaceEvent, which is sent to QWindow and QOffscreenSurface when native surface is created or about to be destroyed. Task-number: QTBUG-42476 Task-number: QTBUG-42483 Change-Id: If62e2c2a1f2a94fd310bbf7cf22b94c70125ba7a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Send events when platform surfaces are created/about to be destroyedSean Harmer2014-11-174-0/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | These synchronously delivered events allow applications to correctly and conveniently handle native platform surfaces being destroyed. This is particularly useful when doing rendering on a non-gui thread as it allows to shutdown rendering before the native surface gets destroyed from under us. Task-number: QTBUG-42476 Task-number: QTBUG-42483 Change-Id: I63f41bbdb32f281d0f3b8ec2537eb2b0361f3bb3 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | QOpenGLTexture: don't allocate immutable multisample storage if not supportedGiuseppe D'Angelo2014-11-141-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | Multisample textures may be supported without multisample texture storage (e.g. from GL 3.2 to 4.2). And, immutable storage may be present, but not supporting multisample textures (GL 4.3 - 4.4). Thus, we must properly check if we can allocate immutable multisample storage, falling back to mutable multisample storage if we're lacking the feature. Task-number: QTBUG-42643 Change-Id: I1f3d5a9b4296626e40b69a06710331e49c2d1a33 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QOpenGLTexture: be more strict with the pixel format/typesGiuseppe D'Angelo2014-11-141-3/+141
| | | | | | | | | | | | | | | | | | | | OpenGL ES may be way more pedantic than OpenGL desktop, in that it supports precise combinations of internal format, pixel format and pixel type. Fix the switches inside the code to reflect this. Task-number: QTBUG-41822 Change-Id: Ic0ed025f48a5903f334d56ce8a224dff44821c5c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QOpenGLTexture: move the Feature enum on top of the headerGiuseppe D'Angelo2014-11-141-22/+22
| | | | | | | | | | Change-Id: I08f5f3b2856edbdd8c88e65d5af75d760a39facb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QOpenGLTexture: Fix a commentGiuseppe D'Angelo2014-11-141-4/+4
| | | | | | | | | | | | | | The right function to call is allocateStorage(), not allocate(). Change-Id: Ia26817dbec710d49e511cab2ae3ca5c1fda20722 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QOpenGLTexture: introduce support for Ericsson compressed formatsGiuseppe D'Angelo2014-11-142-0/+68
| | | | | | | | | | | | | | | | | | | | OpenGL 4.3 and OpenGL ES 3.0 have support for these formats out of the box. See http://en.wikipedia.org/wiki/Ericsson_Texture_Compression Change-Id: I661f05b9872f3aa128e39cec64df094a79736555 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QSurface: added Q_DECLARE_METATYPEPaul Lemire2014-11-141-1/+3
| | | | | | | | | | | | | | | | | | In Qt3D we need to be able to send a QSurface * through a QVariant which would allow us to be as generic as possible. Change-Id: I2ca2760f9b985c8dc1db822048fa41e13774d52c Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | QOpenGLTexture: fix storage allocationGiuseppe D'Angelo2014-11-133-12/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Storage allocation was quite wrong in the general case. 1) We can't pass unsized texture formats to immutable storage allocations, so we need to check for that. 2) Second, when allocating mutable storage on GLES, apparently the driver is allowed to peek at the external pixel type. The texture can then only get data in the pixel type passed at storage allocation time. (I guess that, for the sake of simplicity, the drivers are allowed not to perform any pixel conversions.) I'm still not convinced about the wording in the GLES2/3 specifications, but apparently ANGLE behaves this way, so we need to fix this kind of allocation. Unfortunately the only way is to ask, at storage allocation time, what's the external pixel format/type, so we need to introduce an allocateStorage overload taking those as arguments and using them for the glTexImage* calls. Task-number: QTBUG-41822 Task-number: QTBUG-42623 Change-Id: Idf745d549f01c5db3e56e86cf9b1f53a77cfccc6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QOpenGLTexture: move all the enums at the beginning of the classGiuseppe D'Angelo2014-11-131-78/+78
| | | | | | | | | | | | | | | | It makes more sense to put them all together, and actually the next patches will require the enums to be moved anyhow. Change-Id: Ieb897e9ea2bfef66426c72f935504a92323e2a00 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QOpenGLTexture: revamp the feature listGiuseppe D'Angelo2014-11-131-12/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenGL ES 3 adds lots of useful stuff in there, so we should start using it. Since we're there, properly reorganize the other feature checks. Note that by starting using immutable storage on GLES2, we may work around the issue reported in QTBUG-41822 (we're still not 100% sure if it's an ANGLE bug or a Qt bug). Task-number: QTBUG-41822 Change-Id: Id8cdbaaf93bc263e663db06b6fd2fee012cb29ad Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Ensure that a leave event is sent to a popup that is being closedJørgen Lind2014-11-072-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a context menu contains a menu item which will open a dialog, the context menu will never get the leave event, which might leave the menu in an invalid state. Synthetic leave events are sent to windows, but not to popups that are blocked by modal dialogs. Hovever, a popup is removed from the popup stack in QApplication before it receives the leave event. Therefore always give popups events, even when they are not visible. Task-number: QTBUG-38021 Change-Id: I63f6febed44f1e7c8f29e7a09af07f32b4ddbc82 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Do not crash during global key presses.Jan Arve Saether2014-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This crashed because on Android we called QWindowSystemInterface::handleKeyEvent() with QWindow argument set to 0 This is a regression and started to crash after commit d7ca800a8 (it added the call to tryHandleShortcutEvent() without checking the window pointer). Change-Id: Iefd5fe782a0f7f1e1569580ed4fcb2ef60eed2d2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Insert #line statements in shader program.Florian Behrens2014-11-031-27/+125
| | | | | | | | | | | | | | | | | | | | This makes the GLSL compiler issue correct line numbers on errors even in the presence of the other preprocessor lines inserted by QOpenGLShaderProgram/QGLShaderProgram. Change-Id: Ief4fc1dd1e94bb2b3a1ad13fbaf62186910a4994 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>