summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Do not pull in egl for QtGui and QtOpenGLLaszlo Agocs2014-03-251-1/+0
| | | | | | | | This must be some leftover: there are no winsys interface dependencies outside the platform plugins. Change-Id: Idde64699a5335155bdda745e78d6edbc68a8711b Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Remove non-existent function from headerLaszlo Agocs2014-03-211-2/+0
| | | | | | | | This is a leftover from the QGL->QOpenGL migration, the function never existed in the QOpenGL variant of the class. Change-Id: I47bdfb7f65ffc6cdd39b353e3a69900ccf10e4fc Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2014-03-1363-6352/+3199
|\ | | | | | | Change-Id: Idec54e19963e8d88c711cb179cffc81596323899
| * Ensure that QGuiApplication is inited before using QFontDatabaseTor Arne Vestbø2014-03-131-0/+3
| | | | | | | | | | | | Change-Id: I494c4fdfa49139316efac0f68f8d463c02056372 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * Fix custom font substitution list supportKonstantin Ritt2014-03-112-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the QPA refactoring, the custom font substitution list support was lost by ignoring the font request's fallbackFamilies member when the multi font engine gets created/initialized. If fallbackFamilies is not empty, it should be prepended to the font database default fallback families list. Also respect the custom fallback families list in the cache key to avoid picking a multi font engine with wrong fallbacks list. Task-number: QTBUG-36628 Change-Id: Ie2b84b3a397bee4816f421cddf76a5375829f13a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Guarantee QPFDB::fontEngine() always return non-multi font engineKonstantin Ritt2014-03-111-5/+4
| | | | | | | | | | | | | | | | | | | | After QPA refactoring, QWindowsFontDatabase::fontEngine() was returning a multi font engine w/o any particular reason. This makes the code more obvious and opens the road to further improvements. Change-Id: I4858026ddf774d3159c89357b1c905f5112b1c51 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Fix CJK languages support with HarfBuzz-NGKonstantin Ritt2014-03-101-14/+17
| | | | | | | | | | | | | | | | | | By some reason, mapping to Han script doesn't work for some (most?) fonts. Until the issue is really fixed, pretend the HB-old behavior and simply map to Common script. Change-Id: I4c146f5ff2a42f64b971b2f5ebd7f65e2513fdf0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Revert some previously added constexpr in QVector?d classesAlex Blasche2014-03-106-43/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit partly reverts cd91d8ad0281c984a01b8091696a6fdfdfa69514. The revert is required as the used ifdef relied on undefined compiler behavior. Especially Windows has had trouble. The revert reduces the risk of breaks by future compilers. The proper inline and constexpr has to wait until Qt 6. Task-number: QTBUG-37122 Change-Id: I881fffb95fa46d9c170c9420a578f15640e18aea Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Doc: correction link, example and parameter issues qtbaseNico Vertriest2014-03-103-39/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | Moved codecs folder to qtbase/examples Corrected quote in dropsite.qdoc Replaced snippet statement by include statement Added doc for undocumented parameters Task-number: QTBUG-34749 Change-Id: If4de95b8d39e5680fd0f63f8d2b6685a4b0a8052 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Avoid using direct OpenGL calls in gui and widgetsLaszlo Agocs2014-03-1017-334/+438
| | | | | | | | | | Change-Id: I5d88a2e204ca23e178a4e3044b9cb13392c3e763 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * Use QStringIterator instead of homebrewKonstantin Ritt2014-03-104-44/+24
| | | | | | | | | | | | | | Task-number: QTBUG-15664 Change-Id: I1ed3eb04ddd822e57a4d993af656dfe283f3af1a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Android: Support double click eventEskil Abrahamsen Blomfeldt2014-03-103-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's impossible to get the distance between two touch events down to 5 pixels on e.g. my Nexus 5. This patch makes it possible to tweak the distance through the platform theme, and sets the distance to 15% of an inch on Android. Also provides a way to override the default minimum of 5 pixels by using an environment variable. [ChangeLog][Android] Fixed double click events Task-number: QTBUG-36974 Change-Id: I23d94020c531747d6638b645133611614a2a0703 Reviewed-by: BogDan Vatra <bogdan@kde.org>
| * QFontEngineQPA: Get rid of unused externalCMapKonstantin Ritt2014-03-082-17/+6
| | | | | | | | | | | | | | It seems to be a leftover after dropping the QPF1 font engine. Change-Id: If8d3e1447fab9d042a85195d7bdb4d9811c37c6e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Make QFontEngineQPA report the TT 'cmap' table supportKonstantin Ritt2014-03-081-4/+8
| | | | | | | | | | | | | | The QPF2 CMap is identical to the TrueType CMap table format. Change-Id: I8c34d7c6a5942375538f3b8cb71d5a808b4fb400 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Fix description of how themes are created (code comments)Fabian Bumberger2014-03-081-4/+5
| | | | | | | | | | | | Change-Id: I3b8ed0af5208687a9ab75e916b477f5e24b4d1e2 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
| * Make QVector* compile on Win/staticAlex Blasche2014-03-086-3/+11
| | | | | | | | | | | | Task-number: QTBUG-37122 Change-Id: Ib2283e8c27da7af2bdc08eee3b7cc542fbe55d71 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Improve code readabilityKonstantin Ritt2014-03-081-4/+3
| | | | | | | | | | | | | | | | Since we were requesting a multi font engine, the returned font engine must be a multi one or nothing at all. Change-Id: I1ee4e1b7c68f54c83a8c7292082d015ebfa0a8cb Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
| * Clarify QOpenGLContext::format() docsLaszlo Agocs2014-03-071-0/+14
| | | | | | | | | | | | | | | | Avoid unrealistic expectations where applications would assume that requestedFormat() == format(). Change-Id: I12dcfda3d86ce26f1cae9771b1fe2203291864db Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Clarify QWindow::format() docsLaszlo Agocs2014-03-071-3/+11
| | | | | | | | | | Change-Id: I35c5f9e7a235afc75c0051b3958875371f182b29 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Doc fixPaul Olav Tvete2014-03-061-6/+4
| | | | | | | | | | | | | | | | QOpenGLContext::destroy() is private. The recommended way to free resources temporarily is simply to delete the context. Change-Id: I0d59b55afb209d56405f3584e4645bd4718790af Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| * Add optimize_full qmake config optionAllan Sandfeld Jensen2014-03-063-27/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new config option to qmake to enable full optimization where it makes sense. This currently is supported on all gcc like compilers by exchanging -O2 for -O3. In qtbase it is used to enable full optimizations on qtcore and qtgui and in a later patch can be used to replace similar existing logic in QtWebKit's WTF and JavaScriptCore modules. This fixes a performance regression from gcc 4.7 to 4.8 in the software renderer. An aliasing error in qregion.cpp which was exposed by more aggresive optimization has been solved as well. Change-Id: Ic2c6c41b79cb3846212b40e7bcc11ff492beb27f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * Clean up proxy leftovers in gui/openglLaszlo Agocs2014-03-063-16/+0
| | | | | | | | | | | | Change-Id: I24d10dab121c23b0683fa99bd309cf557c3ddffb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * Fix win32 mkspecsOswald Buddenhagen2014-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | Instead of checking for dynamicgl in QT_CONFIG, which is apparently not possible, revert them and do it in opengl.prf instead. Dynamic GL is Windows-only for the time being so this should be sufficient. Change-Id: If293ea4c9b024df52257086c8b6250602a44724d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Make QOpenGLFunctions able to resolve everythingLaszlo Agocs2014-03-063-49/+347
| | | | | | | | | | | | | | | | | | | | | | | | | | At least if the platform plugin's QPlatformOpenGLContext implementation supports it. This completes the QOpenGLFunction changes necessary for dynamic loading of the OpenGL implementation. Everything else is up to the platform plugin. Change-Id: I710e6fbee3005360ecf02bc6ef976e1beb513819 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * Dynamic GL: Query gl handle and type via the native interfaceLaszlo Agocs2014-03-063-1/+45
| | | | | | | | | | | | Change-Id: I7ca5beaeb57ee2e4e9c175f53ac32371d1f6b5ed Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * Prevent repeated and unnecessary font population QCoreTextFontDatabaseTor Arne Vestbø2014-03-053-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The platform font database is populated from QFontDatabase, through the static initializeDb() function, whenever the font database determines that the platform database has not been initialized (by checking if the font database is empty). There are other clients of QPlatformFontDatabase though, such as QFont, which uses the platform font database to check for the default family. The CoreText implementation of determining the default family relies on data that is computed during font population, and hence does an internal (self-triggered) populate. To prevent repeated populates as a result of calling QFont::defaultFamily() we guard the populate by a similar isEmpty() check as QFontDatabase does, but to ensure that this check works in the case of an invalidated font database, we need to propagate the font database invalidation down to the platform font database. Change-Id: I8d06c6f6fc5da6353c087335859eaca008c2f6a6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * Make QFontEngine::type() non-virtualKonstantin Ritt2014-03-056-37/+27
| | | | | | | | | | Change-Id: I24ece90d6d8f96dad0c41a474a491b4ea96d97c3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Get rid of QFontEngine::name()Konstantin Ritt2014-03-055-20/+4
| | | | | | | | | | | | | | | | It was only used in QFontCache debug output, and some engines weren't even report a name. Change-Id: I6cec4b75f105f5a4e1405f50188bebb3a3f04e33 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Optimize QFontEngineMulti::stringToCMap() in case of missing glyphsKonstantin Ritt2014-03-051-15/+7
| | | | | | | | | | | | | | | | | | Use recently introduced glyphIndex() method and only recalc advances if the glyph is present in the font. This allows to avoid restoring the old advance when the glyph was not found in the fallback fonts. Change-Id: I3e0aa549961767e5448816327328101cf6a78873 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Optimize glyph lookups with QFontEngine::glyphIndex(uint)Konstantin Ritt2014-03-058-264/+62
| | | | | | | | | | | | Change-Id: I56c7e727f3d9b08195f38939106620c744c6eaf0 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>
| * Merge qfontdatabase_qpa.cpp with qfontdatabase.cppTor Arne Vestbø2014-03-042-475/+416
| | | | | | | | | | | | | | | | | | There's no point in separating them anymore, and it just makes editing and reasoning about the QFontDatabase code harder. Change-Id: I6bc8cb5e5daac26293e75553639e4a4d34eba3bd Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * Extend QOpenGLFunctions with GL1 functionsLaszlo Agocs2014-03-042-98/+1286
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces the ability to indirectly invoke all common GL1-GLES2 functions via QOpenGLFunctions. The GL1 functions are not yet resolved, since this would not work anyway when linking to an OpenGL implementation directly. However this may change later but that will be a completely internal change without affecting any public APIs. Also migrate some of the opengl examples to use QOpenGLFunctions for everything. Once dynamic GL loading becomes available on some platforms, these examples should continue to function without any changes since they do not anymore invoke any OpenGL functions directly. Task-number: QTBUG-36483 Change-Id: Ie630029651e5a4863a480aac5306edd67ee36813 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * Don't assume a QBasicDrag will start and end over a QWindowTor Arne Vestbø2014-03-041-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | A QBasicDrag is started from QBasicDrag::drag() through the drag manager, which may happen from e.g a widget. The event filter needs to look at events to more than just QWindows, otherwise the filter will miss eg. mouse release events that are sent to QWidget and not to the QWindow handle, and the drag goes on forever, causing invalid internal state when a new drag is then started. Change-Id: I5cee250e2c7552817bda0895d4c5794e12d26592 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * Dynamic GL: remove exporting symbolsLaszlo Agocs2014-03-0418-4750/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the opengl proxy for now. Later it will either be moved into a separate library or replaced by a QOpenGLFunctions-based approach. This means that the -opengl dynamic configuration is not usable for the time being. The rest of the enablers remain in place. The convenience function QOpenGLFunctions::isES() is now moved to QOpenGLContext and is changed to check the renderable type. This is extremely useful since besides supporting dynamic GL it solves also the problem of GL_ARB_ES2_compatibility (i.e. it triggers the real ES path when creating an ES-compatible context with a desktop OpenGL implementation). Task-number: QTBUG-36483 Task-number: QTBUG-37172 Change-Id: I045be3fc16e9043e1528cf48e6bf0903da4fa7ca Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * Fix crash in QSimpleDrag if drag wasn't started over a QWindowTor Arne Vestbø2014-03-041-2/+3
| | | | | | | | | | | | | | | | | | The code in QSimpleDrag::startDrag() checks for the validity of the current window before passing it on to QWindowSystemInterface::handleDrag(), and so should QSimpleDrag::cancel(). Change-Id: I2228d86ede2a0b8379a55000a5c1d830cab44d45 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * QTouchDevice Documentation grammar correction.David Fries2014-03-041-1/+1
| | | | | | | | | | | | Change-Id: I3b378f1c3df7210029cf82208c23b67b75c47021 Signed-off-by: David Fries <David@Fries.net> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Disable 'gsub' table check for AAT fonts on MacKonstantin Ritt2014-03-041-0/+9
| | | | | | | | | | | | | | In AAT fonts, 'gsub' table is effectively replaced by 'mort'/'morx' table. Change-Id: Ifa044c8e28c3f2aab0f57ba5e3e6b99ada84d37c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Fix some typosSergio Ahumada2014-03-033-3/+3
| | | | | | | | | | | | Change-Id: I7dbe938bff5ac3ab50a0197f94bdb2f6c22fbd16 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
| * Introduce a generic QFontEngine::canRender() implementationKonstantin Ritt2014-03-036-56/+17
| | | | | | | | | | | | | | | | ...which uses the recently introduced glyphIndex() method; get rid of re-implementations that did almost the same. Change-Id: I6d32d2cee6a31f57de6aee05ed8d120d4a1f4e9c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Introduce QFontEngine::glyphIndex(uint)Konstantin Ritt2014-03-036-0/+83
| | | | | | | | | | | | | | | | | | ...an optimized drop-in replacement for the code like this: `stringToCMap(&uc, 1, &g, &numGlyphs, QFontEngine::GlyphIndicesOnly)` (aka "get the glyph index for exactly one Unicode character"). Change-Id: I22babf49f7cf28892d27533a5ac51ad449779f75 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Unify QFontEngine*::stringToCMap() behaviorKonstantin Ritt2014-03-033-0/+3
| | | | | | | | | | | | | | | | Ensure the params are valid and make QCoreTextFontEngine::stringToCMap() handle the unsufficient buffer case exactly like the other engines does. Change-Id: I078af37da917cf2bac709b12aa827ed4128e5f30 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Fix QFontEngineQPA::recalcAdvances() in case of missing glyphKonstantin Ritt2014-03-031-3/+1
| | | | | | | | | | | | | | | | Modifying the glyph indexes array in recalcAdvances() could lead to undefined behavior. Change-Id: Ibbb6642f381a5fe01b285dc8d2001c167dc66f46 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Make QGlyphLayout consume one byte less per glyphKonstantin Ritt2014-03-032-18/+23
| | | | | | | | | | Change-Id: Iddcc2e1f284dcf13ae98b57ea2d5854e57c83530 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Hide the justification algorithm implementation detailsKonstantin Ritt2014-03-032-43/+45
| | | | | | | | | | | | | | | | | | | | The justification "classes" stored in the glyph attributes are actually a justification priorities suitable for a particular language (script). The external API only uses the justification metrics array calculated on top of these priorities. Change-Id: I5b0a39e35954084c63a798b632fd6108f9ae7608 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Fix retreiving the 'head' table in QPAGeneratorKonstantin Ritt2014-03-021-5/+3
| | | | | | | | | | | | | | | | | | The 'head' table is usually of 54 bytes length. Passing the buffer of 4 bytes capacity for the 'head' table is expected to return false, thus skipping the FontRevision tag in QPAGenerator::writeHeader(). Change-Id: I02c0b13f3cbf13579a845fe78fcbc8a437ae22bf Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Unify QFontEngine::getSfntTableData() behavior on all platformsKonstantin Ritt2014-03-024-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | Being a most significant method in the font API, getSfntTableData() must behave in exactly the same way on all platforms. Briefly, it must return true if the table exists in the font, despite the other params, and always stores the table data length in 'length' param, thus reporting the amount of bytes actually needed to store the table data in a buffer. Change-Id: I7a15465020c1ea818ea46a05ea3b9b7e1cd60d14 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Add source to debug output of QMouseEvent.Friedemann Kleint2014-02-281-3/+6
| | | | | | | | | | Change-Id: Ibf55a2697ca0ac85624097299be92c1055dcb8aa Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * Add core profile versions of the glyph cache shadersLaszlo Agocs2014-02-282-4/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | The last step to make QOpenGLTextureGlyphCache working with OpenGL core profiles. [ChangeLog] Native (that is, not distance field based) text rendering is now functional on OpenGL 3.2+ core profiles too. Task-number: QTBUG-36993 Change-Id: Ic6c0db4806cea623ca7a19ab77b0329155824877 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * QPalette: optimize move assignment operatorMarc Mutz2014-02-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Instead of assigning the various bit-fields manually, use the quint32 union field, which is already present to avoid slow bit-field operations in the member-swap function. Verifed that the generated assembly for move-assignment is significantly better than before on GCC. Change-Id: If4e0ef678bf3a496c6eb369ad3f639f5a9bc79fc Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | MIPS: Fast path for rgb888 to rgb32 conversionAdrian Perez de Castro2014-03-064-1/+121
| | | | | | | | | | | | | | | | | | | | Add a hand-coded MIPS assembler function to convert a stream of rgb888 bytes to an array of 32-bit ARGB values. This is used in QImage for image conversion, and also in QJpegHandler for decoding JPEG image scanlines. Change-Id: Ia74a5ff799b29fad3d4acbfcafe790cd60586d72 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>