summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Make unicode ranges in font take precedence over codepageEskil Abrahamsen Blomfeldt2014-02-191-51/+53
| | | | | | | | | | | | | | | | | Change 4b2c73b4767bcb512cbc17f65186eac5d004db07 triggered a regression on Android, because the DroidSansFallback.ttf font has codepage ranges that list Arabic as a supported codepage despite the fact that the font has no glyphs for Arabic. If a font has valid unicode ranges which does not specify support for e.g. Arabic, then the code page ranges for the same script should be ignored. [ChangeLog][Android][Fonts] Fixed support for Arabic text. Task-number: QTBUG-36789 Change-Id: I7c5a0e303fd9ed2733275814fe752ae0fb54a207 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Doc: Fix issues with QOpenGLTexture enumerationsTopi Reinio2014-02-111-4/+15
| | | | | | | | | Use correct parameters for \enum commands, and add documentation for QOpenGLTexture::Filter enumeration. Task-number: QTBUG-35576 Change-Id: If7099da0b2b570c28e683126f0ba3a885d80f741 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Minor optimization for QTextEngine::shapeText()Konstantin Ritt2014-02-111-43/+36
| | | | | | | | | | Remember the engine index for each sub-item and avoid moveGlyphData() where possible (ie. when there are no glyph indexes to care about). Also don't memmove data we didn't ever initialize. Change-Id: Ib8e5fd937a10e4e3c8c0e18961a2e2c1a4167924 Reviewed-by: Ahmed Saidi <justroftest@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix log_clusters calculation in HarfBuzz-NG code pathKonstantin Ritt2014-02-111-37/+16
| | | | | | | | | | | | The old code wasn't good enough to catch all the glyph (de)composition cases, thus leading to an assertion in QTextLayout's addNextCluster() helper. The new code catches all the corner cases and introduces somewhat better performance to the HB-NG shaper backend. Change-Id: I5b6c673395a4a039dc55b200abbf74b0ba5d0829 Reviewed-by: Ahmed Saidi <justroftest@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix drawing vertical gradients in RGBA8888 formatsAllan Sandfeld Jensen2014-02-101-7/+7
| | | | | | | | | | | | | The RGBA8888 formats was incorrectly using the qt_gradient_quint32 which is argb specific. This caused vertical gradients but only vertical gradients to be drawn incorrectly. This changes the RGBA8888 formats formats to use the generic gradient method and renames qt_gradient_quint32 to qt_gradient_argb32 to indicate its limitation. Change-Id: Ia1cd48ca7f4f78b64f31d6263e81cd8ac3b0954e Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Fix assert when converting RGBx8888 to ARGB32_PMAllan Sandfeld Jensen2014-02-101-1/+1
| | | | | | | | | | RGBx8888 to ARGB32_PM is incorrectly using the RGBA8888 to ARGB32_PM which asserts the input format is RGBA8888. Since the routine also performs an unnecessy premul, we should be using a the generic rgba2argb routine. Change-Id: I7b67328f804f5f2a9664a35c04836679e8c8b8e5 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Do not query max samples on glesLaszlo Agocs2014-02-051-0/+2
| | | | | | | | | | | | Querying GL_MAX_SAMPLES is not supported in GLES2. Avoiding the call also makes us play nice with Mesa in debug mode since it gets rid of the warnings about the failing glGetIntegerv call. Change-Id: I05e501cc11af41a54fefc34ab919c5191e4f3f0a Reviewed-by: Jørgen Lind <jorgen.lind@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* NPOT texture support in QOpenGLTextureCacheCedric Chedaleux2014-02-041-1/+28
| | | | | | | | | Enable non power of two texture support for non compatible NPOT GPU. If the context does not handle NPOTTexture feature, the image to bind is scaled to POT size. It works with OpenGL ES and Desktop version. It is actually almost the same code as the one in QGLContextPrivate::bindTexture. Change-Id: I6f0f511165c9e171a14f4ba6ba0b7a902e590cf6 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Doc: Fix broken linksSze Howe Koh2014-02-045-8/+5
| | | | | Change-Id: Ic275dfbf0b332fc34ea0fac1c31c4935ad961527 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Fix access after delete with Harfbuzz NG code path.Allan Sandfeld Jensen2014-02-031-1/+3
| | | | | | | | | Remove reference to released font-engine so we don't risk returning it later. Change-Id: I741a741567a079818c7f414ac1f9c0b5a9677322 Task-number: QTBUG-36522 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* CMake: don't require GL when build with -no-openglPeter Kümmel2014-02-011-1/+1
| | | | | | Task-number: QTBUG-36509 Change-Id: I03451527ab91754d87ff2a43985952c7c7641826 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Load all available pixmaps in an icon file.Bastiaan Veelo2014-01-301-26/+30
| | | | | | | | | | | Fixes the problem that only the first icon would be read from an .ico file with muliple icons of various sizes in it. Task-number: QTBUG-28267 Change-Id: I50daa89769054234e9ffc5246f59b46975948871 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
* Do not overwrite basePixmap of QIconLoader PixmapEntryAlbert Astals Cid2014-01-221-3/+4
| | | | | | Change-Id: I4799af1d9151ba4b0952369e9620d2fab2b002d9 Reviewed-by: David Sansome <me@davidsansome.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-01-224-18/+51
|\ | | | | | | Change-Id: I885821d93a41b0caad627bfc16aa8eed21d2f5b9
| * Fix crash due to a stale pointer dereferencingKonstantin Ritt2014-01-164-18/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HB face caching mechanism introduced in 227e9a40cfeb7e00658cd3 wasn't complete due that fact that HB-NG doesn't parse the entire font table at once but rather references a table on-demand. This incompleteness caused a crash in case the engine doesn't get cached or when it removed from the cache and then re-used. Task-number: QTBUG-36099 Change-Id: I7816836107655ce7cf6eb9683bb5dc7f892f9cd1 Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Michael Krasnyk <michael.krasnyk@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* | Initialize QGuiApplicationPrivate::lastCursorPosition to infFrederik Gladhorn2014-01-211-1/+2
| | | | | | | | | | | | | | | | | | | | This makes sure that we don't think a mouse area at position 0, 0 contains the mouse on startup. Task-number: QTBUG-36191 Change-Id: I68a8aed195531f506372ef465734661069b60f57 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Fix QPixmap and OpenGL threading warnings when paintingAleix Pol2014-01-181-1/+4
| | | | | | | | | | | | | | | | | | | | | | If the QPA supports threaded pixmaps, don't print out a message warning the user about painting a pixmap in the non-main thread. Likewise, if the QPA supports threaded OpenGL, don't print out a warning when the user is about to paint on OpenGL from a non-main thread. Change-Id: I5b4928ee49b1d6c1b638b036fade12dc794258df Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Fix unused-function warning in qdrawhelper.cppThiago Macieira2014-01-161-6/+0
| | | | | | | | | | | | | | | | | | | | | | storePixel<QPixelLayout::BPP32> would have been called by storePixels<QPixelLayout::BPP32> but that function has an overload that uses memcpy instead. So it's really unused. Found by Clang 3.4. Change-Id: I661804e273486d3469221fdd362a24cd77cfb8a7 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | MIPS DSP build system fix and additional optimizations.lpapuga2014-01-1410-9/+1628
|/ | | | | | | | | | | | | | | | | | | | | | | | Changed MIPS DSP portion of the mkspecs/features/simd.prf file in order to fix the corrupted build system for MIPS platforms. List of the additionally optimized functions from file src/gui/painting/qdrawhelper.cpp: - qt_blend_rgb16_on_rgb16 - qt_fetchUntransformed_888 - qt_fetchUntransformed_444 - qt_fetchUntransformed_argb8565 from file src/gui/image/qimage.cpp: - convert_ARGB_to_ARGB_PM_inplace from file src/corelib/qstring.cpp: - ucstrncmp - toLatin1_helper - fromLatin1_helper Change-Id: I5c47a69784917eee29a8dbd2718828a390b27c93 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make qtbase compile with QT_NO_GESTURESTasuku Suzuki2014-01-103-0/+9
| | | | | Change-Id: I90f173265e177ff37ce80da3983080651856259d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fix unused function warnings in qtriangulator.cppThiago Macieira2014-01-101-7/+2
| | | | | | | | | qIntersectionPoint with ints wasn't used, qDot was only used in debug mode. Found by Clang 3.4. Change-Id: I4b5699f75eb88331df54bf5a289133914d80b299 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* QPdfWriter - Fix setting of marginsJohn Layt2014-01-091-0/+2
| | | | | | | | The setting of margins wasn't being passed to the base class, so calling margins() wouldn't return the new values. Change-Id: I86c30f28fb0430f4b9d6e180a59cad354b489289 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* QPdfPaintEngine - Remove postscript flagJohn Layt2014-01-092-5/+2
| | | | | | | Remove a now unneeded postscript flag. Change-Id: I307e4a64aa7ba4eed396530ffbf3bca5ae73e9c2 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* QKeySequence: return Qt::Key_unknown with invalid modifiers on OS XLiang Qi2014-01-071-2/+1
| | | | | | | | | | | | This also fixes the auto test, tst_QKeySequence::parseString() with Win+A and Simon+G. [ChangeLog][QtGui][OS X][QKeySequence] return Qt::Key_unknown with invalid modifiers on OS X Task-number: QTBUG-24406 Change-Id: Ie90393c9691f443c7c359cb3a487609a9691bc44 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* QPagedPaintDevice - Fix size of ISO B9 pageJohn Layt2014-01-061-2/+2
| | | | | | | | The ISO B9 page size is 44 x 62 mm, not 33 x 62 mm. Task-number: QTBUG-35966 Change-Id: Ieb2dcd120c51bd7a8997151f2470775ea0b89e08 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Make texture glyph cache more robust against missing glyphsSimon Hausmann2014-01-031-1/+1
| | | | | | | | | | | | | | This fixes failing assertions in the CI system. All the callers of lockedAlphaMapForGlyph always check the return value for being null as well as the image itself, so we need to do the same here as well before calling unlockAlphaMapForGlyph. This is proposed to stable because commit f9399d69add411adf757e3390488ff57655833b7 also landed in stable. Change-Id: I0a4f4fbb1727e5b4ad497b08177d14c81abd2dd0 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* REG: Fix support for strings spanning multiple font enginesEskil Abrahamsen Blomfeldt2014-01-031-1/+1
| | | | | | | | | | | | | | | | E.g. in the case where the first char in a font got a font engine index != 0, and the second character got font engine index == 0, we would not count the second character as a separate glyph run. The result would be that its glyph indexes would refer to font #0, but the font used to render them would be the same as for the first character, i.e. random. Task-number: QTBUG-35740 [ChangeLog][Text][QTBUG-35740] Fixed regression when shaping some strings containing characters from multiple fonts. Change-Id: I668804045c8b276787c7b256bc87916c467f3f59 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Fix some typos in documentation.Jeff Tranter2014-01-022-2/+2
| | | | | | | | Fix some spelling and grammatical errors in comments that show up in Qt documentation. No changes to code. Change-Id: I2e946fda0bd9a2117f8e9b2fb300df9bf0a98a6c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Accessibility: Do not assert when a widget doesn't have a QAIFrederik Gladhorn2014-01-021-0/+2
| | | | | | | | | | [ChangeLog][QtGui] Fixed crash when sending accessibility updates when the corresponding widget does not have a corresponding QAccessibleInterface. This showed on Mac for example with QStatusBar. Task-number: QTBUG-35421 Change-Id: I94174e98e858b7a0122532ee5fcc8458a263bccd Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Doc: suppress documentation of methods users shouldn't useThiago Macieira2013-12-211-0/+2
| | | | | Change-Id: Ib905c9c54c236831f76a5c2925e7477cd7d6184c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Doc: corrected broken linksNico Vertriest2013-12-201-2/+2
| | | | | | | | | | | Task-number: QTBUG-34749 Corrected link to drag and drop example. Corrected link to {mandatory fields} Created target referring to macros for defining plugins Change-Id: I387a2d9bab428b2eacd8d371f08c72f42f7e2be2 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Fix writingSystems determination by code page range bitsKonstantin Ritt2013-12-191-2/+42
| | | | | | | | | | Do exactly what windows font database does to determine writingSystems in case of non-truetype fonts. Task-number: QTBUG-13585 Change-Id: I4a1a48d74c36e403c31f20847cf80295d89a34bc Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix build with HarfBuzz-NG older than 0.9.20Konstantin Ritt2013-12-171-1/+1
| | | | | | | | It is annoying that HB maintains binary compatibility but does not really care about source compatibility. Change-Id: Ife7b011919f28527b77858ad8398fe723c65b1b3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix build with -WerrorKonstantin Ritt2013-12-172-2/+2
| | | | | Change-Id: I2fe4b006dc0696e5491792846bdb8c99ac31af6e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Use #pragma warning(push) and pop to control our warningsThiago Macieira2013-12-161-1/+2
| | | | | | | | | | Using "default" means "reset to default compiler settings", not "revert to command-line settings". And even if it did, it's possible some other headers by the user toggled the settings. We shouldn't affect that. Task-number: QTBUG-35622 Change-Id: If7c4bd0cc8c210f88ee89e3fa2dd3b7194ad77bb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix strings in QImageWriter.ABBAPOH2013-12-161-9/+5
| | | | | | Change-Id: Id5ff5f05843a2feb92ff60fce20df699ed4a0476 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Check if device is opened before trying to create image handler.ABBAPOH2013-12-121-14/+35
| | | | | | Change-Id: I60f1f6890fdd73e489da4aab9928370163f55f58 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: aavit <eirik.aavitsland@digia.com>
* Move notification of layout change up from QApplication to QGuiApplication.Robin Burchell2013-12-101-0/+5
| | | | | | | | | | QGuiApplication-using things (like QtQuick) need to know about this, too -- this makes QGuiApplication::setLayoutDirection actually work. Task-number: QTBUG-21573 Change-Id: I2d2ac7dc07f11be5c7e501a3575b1d0978d8ac31 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Windows: Show context menu on mouse release.Friedemann Kleint2013-12-102-1/+5
| | | | | | | | | | Introduce a hint to QPlatformTheme to control the behavior. Task-number: QTBUG-35231 Change-Id: Ia28e153a8dd3f1931321a222d8906ca87166ed62 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Remove unused function "quadraticRoots"Thiago Macieira2013-12-091-31/+0
| | | | | | | | | qbezier.cpp(122): warning #177: function "quadraticRoots" was declared but never referenced Change-Id: I590f59ed6e41462d0a14a9239adb8bd0acbeeae4 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Simplify linking to different jpeg libs.Mitch Curtis2013-12-091-2/+4
| | | | | | | | | | This makes it slightly more obvious which compiler should be used with which. Task-number: QTBUG-23119 Change-Id: Ie3e5cf995d686bfa846902a040668716c8b5f526 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2013-12-051-0/+2
|\ | | | | | | refs/staging/stable
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-12-051-0/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-ios-clang/features/default_post.prf tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp Change-Id: Iaba97eed2272bccf54289640b8197d40e22f7bf5
| | * Use Q_QDOC for Qt namespace declaration in Qt GuiTopi Reinio2013-12-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a workaround for letting qdoc to successfully generate documentation for the Qt namespace. qdoc doesn't properly handle multiple declarations for the same namespace spread across multiple modules. Task-number: QTBUG-35230 Change-Id: I449b17e1171d1a4481b9cf07cd48c803feed5be9 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | Protect implementation of QNativeGestureEvent against QT_NO_GESTURESAndy Shaw2013-12-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The definition and usage of QNativeGestureEvent had already been protected against QT_NO_GESTURES but the implementation had been missed out before. Change-Id: Ie039e08257ad5eb7705342e4248b904f6ceca8df Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | | QTextEngine: fix layouting of inline objects in right-aligned tabs.David Faure2013-12-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (same thing for center- and delimiter-aligned tabs) The width of the inline object wasn't taken into account, the code in QTextEngine::calculateTabWidth only looked at glyph widths. Change-Id: I303a6561c67870ff2094a685698e642fc1b53b12 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* | | Fix radial gradient shader compilation for OpenGL ES 2.0.Carsten Munk2013-12-051-2/+2
|/ / | | | | | | | | | | | | | | | | Change highp to mediump. This qualifier is ignored on desktop, and mediump should be sufficient elsewhere. Task-number: QTBUG-35353 Change-Id: I79f0ed88717d45dada5dcb781e75b10e72db4bd0 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Merge remote-tracking branch 'origin/release' into stableSimon Hausmann2013-11-291-0/+15
|\| | | | | | | Change-Id: I2e2bf789b0fe8442ed623bc0c8aef591235cdabe
| * Docs: add important QWheelEvent::phase() related notesJ-P Nurmi2013-11-291-0/+15
| | | | | | | | | | | | | | Change-Id: I4901b96b44b7c1179e678689af5962cb4570d50d Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Streamline font match() function.Friedemann Kleint2013-11-281-10/+6
| | | | | | | | | | | | | | Determine writing system before executing the loop. Change-Id: I6c462bdef4d70860e76c7cc9d939e3e92983b173 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>