summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Make cache of opentype tables in Harfbuzz face lazyEskil Abrahamsen Blomfeldt2012-03-063-6/+12
| | | | | | | | | | | | | | | | | | | | The mechanism in fontconfig which determines if a certain character is available (FcCharSetHasChar()) may give false positives, in which case we would load and unload those fonts per every char for which FC gave us a false positive. This was a major performance regression. Specifically the false positives happened when looking at e.g. italic variants of certain multilingual fonts, since we only check the charset of the font family as a whole and not of the specific variant, which may only support a subset of the chars. To optimize this, we remove the deletion of the font engines after loading them, but also wait with loading the opentype tables until they are actually needed. This means that for the false positives, we will load the font, but the cached data for each unused font will be much smaller. Change-Id: Idfc794401a2080da5946bf65204eb947aeb635ed Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Cocoa: Implement widget palettes.Morten Johan Sorvig2012-03-061-0/+13
| | | | | | | | | | | | Add roles to QPLatformTheme::Palette, map QWidget subclasses to those. Port Qt4 widget palette creation code to use the QPLatformTheme::Palette roles. Palette entries are disabled in this commit, this will be fixed later. Change-Id: I07babe3d7c76d306efc4ea4813c7161fdf36227f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* qpa: Document a requirement of the backing store implementationHolger Hans Peter Freyther2012-03-061-0/+3
| | | | | | | | Docuent the requirement that the alpha channels need to be properly initialized by the implementation. Change-Id: I03db81b44b43ea75feb1b983fb0725c65a3bd9f4 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove AccessibilityPrepare event.Frederik Gladhorn2012-03-051-4/+0
| | | | | | | | | | | | | This event was completely unused. In addition it leads to crashes on linux when sending the Destroy accessibility update. The Destroy event on linux would still query an accessible interface. That in turn would trigger the event to be sent. Change-Id: I8915527de067b8b70ba41b1361e3ef5d12866d7d Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Update QTouchEvent docs with regards to raw positionsLaszlo Agocs2012-03-051-1/+6
| | | | | Change-Id: I2c955e42605c442793095d5ca27c34d7d87e08fb Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-03-0414-74/+40
|\ | | | | | | | | | | | | | | | | | | Conflicts: dist/changes-5.0.0 mkspecs/features/qt_module_config.prf qmake/project.cpp qmake/property.cpp Change-Id: I6e4af40743a9aeff8ed18533a48036e332acc296
| * QtGlobal: remove qIsDetached()Marc Mutz2012-03-011-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's not a single in-tree user of this function, and the concept is a broken one in MT programs: By the time qIsDetached() returns, the result can already be different due to another thread taking a copy, or a copy in another thread being destroyed (note that this doesn't require mutex use by the user, since we promise (implicitly, if not explicitly) that you can copy from const objects without holding a lock). QTBUG-10813 talks about a use in QCache::trim(), but 677cf76340f88e0fe51c1f75aa512b6d835414ca removed it, so there's no reason to keep it anymore. Change-Id: I20380c12bdf00ac764b89d84392f0f34727b1971 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * QInputMethodEvent::Attribute: mark as Q_MOVABLE_TYPEMarc Mutz2012-03-011-0/+1
| | | | | | | | | | Change-Id: Ifb41afdcf17fa8192f37b4900c59e81d4e0bf60f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QEvent (and subclasses): make ctors explicitMarc Mutz2012-03-011-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | Do this regardless of whether the event subclass is public API or only used in examples. Examples are examples, used by others as templates or even copied verbatim, so they should also follow sound engineering rules. Anyway, there's only one in examples/... Change-Id: I586ff16407a956c9e89288fdd4377eed73f45c0f Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| * Make qobject_p.h not need qvariant.h.Stephen Kelly2012-02-291-2/+0
| | | | | | | | | | | | | | | | | | | | Move definition of ExtraData to the implementation file. As a side effect, we need to include qhash.h in some other places. Change-Id: I8bb4ec0940ae51c7d6961c9a51adb80fd444e1e3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Merge master -> api_changesRohan McGovern2012-02-2939-532/+1740
| |\ | | | | | | | | | | | | | | | Includes fixes for tst_qfiledialog2, tst_qtextedit autotests on mac. Change-Id: I49cac26894d31291a8339ccc1eb80b6a940f0827
| * | QFontMetrics: make conversion from QFont to QFontMetrics explicitMarc Mutz2012-02-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is no user of this in qtbase, and I don't think this is a desireable feature anyway. Change-Id: Ifebba5872b0eadb0daba3c3cd5f8b19abeed5c12 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * | QFontEngine: remove unused and buggy grayPalette()Marc Mutz2012-02-272-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFontEngine::grayPalette() mistakenly returns an empty vector, so even if there's a user (the class it exported, after all), it cannot correctly use it. So, just remove it. Change-Id: Id5f70139e5f6ed9a2a3f28400cd0750d14cb7dc0 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
| * | Inline and mark as deprecated images's serialNumber()Olivier Goffart2012-02-268-27/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These function are marked as obsolete since Qt 4.3 The motivation here was too fix QPixmap::serialNumber which is marked as QT_DEPRECATED_SINCE but was not inlined. But then I took the oportunity to do the same with all the other functions. Change-Id: Ic50a7857461fc402b2f2b4528c83e53e8e28ea30 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | | Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-0239-676/+676
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I519bf9c29b14092e3ab6067612f42bf749eeedf5 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | | Mark overload of QAccessible::updateAccessibility as deprecated.Frederik Gladhorn2012-03-022-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | updateAccessibility(const QAccessibleEvent &event) should be used, updateAccessibility(QObject *object, int child, Event reason) is deprecated. Change-Id: I92b32579ff202681189e9581365d2891e5d1e994 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* | | Improve debugging in the windows accessibility bridge.Jan-Arve Saether2012-03-021-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | set QT_DEBUG_ACCESSIBILITY=(1|0) to turn logging on or off Change-Id: Ibd5b77699decf0cf02bc6b6cc656fa237de29124 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* | | Export QPaintEnginePrivate from QtGuiBradley T. Hughes2012-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This allows the QCoreGraphicsPaintEngine to use QPaintEnginePrivate members (e.g. pdev and drawBoxTextItem()). Change-Id: I5bed3cb007ae469816afce619edd55f155b04fa9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | | Revert "Don't render glyph with FT with fetchMetricsOnly"Jiang Jiang2012-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Report https://bugs.webkit.org/show_bug.cgi?id=79561 shows that this commit will cause significant slow down in text handling operations. Though the exact reason is unknown we should revert it first and find out the reason later. This reverts commit 692064bcfd116c2f3a2b30572e511ee68c6a0531. Change-Id: I16a56c3093bdfa2119ab6a6e9049ef2925468e29 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* | | Allow using multi fontengine in QTextLayout with QRawFont.Pierre Rossi2012-03-017-22/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change enables us to instantiate a QFontEngineMulti that takes the raw font's font engine as its primary engine but can use fallback engines based on the platform. Since this can be quite expensive, we defer the query for fallback families' names until it's needed and we cache the resulting multi font engine. Change-Id: I390dbc1cb2fe61d56867f29a03f313eb3eb49dc3 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* | | Add support for QRawFont in QTextLayout.Pierre Rossi2012-03-016-64/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of this change is to allow shaping complex text while using QRawFont. This is needed for WebKit so that we can switch to using QRawFont everywhere and be more in line with what other WebKit ports do. Since this change slightly bends the aim of QRawFont, let's reserve this for internal use for now. Change-Id: I5ec0881f50ce288350bd277570cb5f1fb70c355c Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* | | Set texture parameters before allocating the texture.Gunnar Sletta2012-03-011-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | Some drivers use this as a hint to decide on weither to preallocate mipmap memory or not. Change-Id: I2fd438a9625b658c7f30fe39a9d63ba5396f9679 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* | | Added QPlatformScreenBufferJørgen Lind2012-03-014-12/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | And moved the pageflipper into its own file Done with: Paul Change-Id: I0af34075ce8673a66025cb761c0fe4ff6c0ab0fe Reviewed-by: Jason Barron <jason.barron@nokia.com>
* | | Don't use deprecated QWheelEvent::delta()Morten Johan Sorvig2012-02-291-1/+3
| | | | | | | | | | | | | | | | | | | | | Replace with pixelDelta() and angleDelta(). Change-Id: Ie4b8b6fd39a5f8a28433554000940faef2f2542c Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | | Refactor the QPA dnd interface.Friedemann Kleint2012-02-2912-504/+399
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Give QPlatformDrag a synchronous drag() function returning the Qt::DropAction - Move the base functionality for asynchronous event handling to the platformsupport library as QBasicDrag (extendable base class handling drag icon and providing new virtuals) and QSimpleDrag (sample implementation for drag within the Qt application). - Change the Windows implementation accordingly. - Change XCB to be based on QBasicDrag. - Clean up QDragManager. Change-Id: I654f76f0e55a385ba189bd74f3ceaded6a8fe318 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* | | Remove internal class QVolatileImage.Laszlo Agocs2012-02-295-589/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This made sense only for Symbian where there was a special CFbsBitmap-based backend present and it was used from the Symbian-specific VG and GL pixmap implementations. The generic version is merely a useless wrapper over QImage and is not in use anywhere in the codebase. Change-Id: I1dabe22dfb8cbbc35dce8e22703a3aff810fb5f9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | | QPlatformTheme: Add virtual destructor.Morten Johan Sorvig2012-02-292-0/+7
| |/ |/| | | | | | | Change-Id: I78aab57cc16ef4542bfb88c81dd6a9d8b4c4d853 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* | Rename remaining references to QInputPanelPekka Vuorela2012-02-281-1/+1
| | | | | | | | | | Change-Id: I747d37d10c78af6ad00322d5bd8d29c6b343828c Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Make accessible interfaces private for Qt 5.0Jan-Arve Saether2012-02-286-1/+17
| | | | | | | | | | | | | | | | | | Since we're not yet confident if they serve their purpose well enough, we have decided to make them internal so that we are free to tune them later Change-Id: Id79d154e0537aca07303afea5d057cfcb0773384 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* | Fix divide by zero when glyphWidth is 0Jiang Jiang2012-02-281-0/+2
| | | | | | | | | | Change-Id: Ic0108b76b8d73cc977f8d64e036a65cb93db4684 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* | Prevent stack corruption when using OpenGL Core ProfileSean Harmer2012-02-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | When an OpenGL Core Profile context is requested the function glGetStringi() is used to query the supported extensions as glGetString(GL_EXTENSIONS) has been removed in the core profile. The signature for glGetStringi used in Qt missed off the APIENTRY calling convention. This results in stack corruption on windows each time glGetStringi() is called leading to a crash. Change-Id: Iff62c42e2bb5fc4a5c0561fae97ddc5a8ae3a45e Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | QClipboard: Fix autotest failsDebao Zhang2012-02-272-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tst_qclipboard.cpp still has Q_WS_WIN which must be clear away. After clean up, auto test will fail under windows: When setMimeData() is called, dataChanged() signal will be emited twice. The solution for QTBUG-24184 has partially solved the problem, but it still there. Make sure emitChanged() only called by QPlatformClipboard will give our more control for this. Task-number: QTBUG-24484 Change-Id: I23566c6d3b32828b6865234c311af3635fe9e299 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | Fix icon loading in style sheets.Friedemann Kleint2012-02-272-28/+33
| | | | | | | | | | | | | | | | | | QIcon was moved to QtWidgets, while the parser is still in QtGui. Introduce a QCss::IconValue struct that contains the icon data and convert to QIcon in widgets. Change-Id: I09ac8a12a4b02bdca91ee2e8fcc28c86b5a001e7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* | Remove deprecated usage of QKeySequence from qguivariantOlivier Goffart2012-02-271-2/+3
| | | | | | | | | | | | | | The implicit conversion operators are deprecated. Change-Id: I0e94c0671413da1ab58c6c7b8bb31614e2696409 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* | Cleanup usage of QVariant::Type.Jędrzej Nowacki2012-02-271-1/+1
| | | | | | | | | | | | | | | | | | QVariant::Type is marked as obsolete. It is not possible to get rid of it completely, in a source compatible way, but at least we can remove it safely from a method arguments list. Change-Id: I26b58099bfa6d32f3a583a8ae0047f0bb36bcd0d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QFixed: make constexprMarc Mutz2012-02-261-68/+68
| | | | | | | | | | | | | | | | Make most QFixed{,Size,Point} members constexpr. See f3141c58badbd2da9eb42021e9704742c3e52a9b for rationale. Change-Id: I0b44f59bb768e1f79c57e1c9a0dc67afb515e03f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | QFixed{,Size}: reformulate some functions in a constexpr-friendly wayMarc Mutz2012-02-261-23/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main change is the addition of a new constructor that passes its argument into 'val' verbatim. In order to disambiguate it from the existing QFixed(int) constructor, it takes a second 'int' argument. This is too ugly for public API, so it's private, and only used by static QFixed fromFixed(int), which is the existing named constructor with the same semantics. The rest of the changes simply reformulate their operations in terms of fromFixed(). This makes them ready to be constexpr'ed. Change-Id: I2a3813d62bd4124064755de6b00526a60fc82c1d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | QWheelEvent high-resolution delta support.Morten Johan Sorvig2012-02-246-21/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support pixel-based deltas as well as sending dx and dy values in the same event. Keep source and behavior compatibility with Qt 4. New API: QPoint pixelDelta() const QPoint angleDelta() const Deprecate delta() and orientation(). Both pixel-based deltas and combined updates are necessary for smooth trackpad-based scrolling on OS X. Qt 4 compatible behavior is achieved by sending an extra wheel event in cases where the initial event has a combined dx and dy update. This extra event sends dx in delta() and orientation(), with pixelDelta() and angleDelta() set to null. Modify the Cocoa implementation to provide pixel deltas. It is expected that not all platforms can provide these. Angle deltas will always be available. Change-Id: I20c10f0df338ddcd6a3f7a4d40949ed5ae3b4795 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* | Minor fixes for RelationFlag.Jan-Arve Saether2012-02-242-4/+6
| | | | | | | | | | | | | | | | | | * Document AllRelations * Assigned new values (starting from 1) for the remaining members of the enum. Change-Id: I55ec197f24ff7d43ff3c0d101edd33b9615f9287 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* | Use "OpenGL" instead of just "GL" in documentation.Samuel Rødal2012-02-245-38/+38
| | | | | | | | | | Change-Id: I81a0beebc0241b9699ce321174e13a93e76e45e8 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* | Added documentation for QOpenGLContext and QOpenGLContextGroup.Samuel Rødal2012-02-231-43/+233
| | | | | | | | | | | | Change-Id: I00e3e3b3fd37b27b31d4705de3c8c34be9211707 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* | QTextEngine - treat a fullstop (0x2E) as the same script as the preceeding ↵John Tapsell2012-02-231-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | text when dividing up strings Many languages use a fullstop to indicate an abbreviation, making the fullstop part of the word. For languages like thai, it is required to pass the fullstop along for correct word breaking. Change-Id: I5ad0ddbc66ea96e08913446dad8fd3c5d5dd0905 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* | Fleshed out the QWindow documentation to be less sparse.Samuel Rødal2012-02-231-53/+541
| | | | | | | | | | Change-Id: Ia3873687a2c3e0dd85c56e4f9e34d2e194e2ff50 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* | Added documentation for QSurfaceFormat.Samuel Rødal2012-02-231-15/+136
| | | | | | | | | | Change-Id: I3b42b09e6e42092c098e4fc20c5ba7dd7e354116 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* | Handle theme change in QApplication/QGuiApplication.Friedemann Kleint2012-02-232-12/+61
| | | | | | | | | | | | | | Re-initialize palette and fonts. Change-Id: Ib312747886a31e8370f8d99536d52cbcf8afe8a4 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* | Fix rounding error in QInputMethod::cursorRectangle().Andrew den Exter2012-02-231-2/+2
| | | | | | | | | | | | | | | | | | Use QRectF consistently to avoid the rounding done in the conversion to QRect. Task-number: QTBUG-24463 Change-Id: If9ea858ebabf8c449ea058b9d379d4a57cb6c82d Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* | Remove use of Q_BROKEN_DEBUG_STREAM.Stephen Kelly2012-02-227-44/+2
| | | | | | | | | | | | | | | | No supported compiler defines it, and it was not used consistently so it didn't work anyway. Change-Id: Icc9e911e22daaedaee3d9316c15d19be26cd2e72 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add further theme hints to QPlatformTheme.Friedemann Kleint2012-02-227-182/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add hints for QDialog/QDialogButtonBox. - Add hint for available popup-menu area. - Add keyboard scheme hint replacing QGuiApplicationPrivate::currentKeyPlatform() Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Task-number: QTBUG-24204 Task-number: QTBUG-24315 Change-Id: I6653786b0dcb49a6fc264d3b9891dbfee502bd3e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | Updated QApplication / QGuiApplication to match Qt 5 reality.Samuel Rødal2012-02-221-12/+224
| | | | | | | | | | | | | | | | Removed obsolete Q_WS_X11/WIN/MAC stuff as well. Change-Id: I8b65a0348a8cb170f3f060023fc6d9d982949b7e Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* | Fix typosPekka Vuorela2012-02-221-1/+1
|/ | | | | Change-Id: Ic0389d36bad001935376fb29d8c925b7ff908e4f Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>