summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Add GL_BGR to the list of defined GL constants, right next to GL_BGRASimon Hausmann2012-02-211-0/+3
| | | | | | | | We use this one in WebKit's OpenGL texture mapper and it would be convenient to have it here if it's not defined by the platform. Change-Id: Idae33e49773e21c6290b164bccd4f209cf9820a2 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* replace 'const QChar &' with 'QChar ' where appropriateKonstantin Ritt2012-02-218-13/+13
| | | | | | | | | as QChar is actually an ushort and there is no point in taking its address. Merge-request: 69 Change-Id: Idcc9d621e5627514ade006aa12a789a88929d48b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Streamline QPalette initialization code.Friedemann Kleint2012-02-211-26/+32
| | | | | | | Share the brushes to reduce memory usage by QBrushData. Change-Id: I04044b4c54b1f6a35a73d8bb4d299661ec0136a5 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove QPlatformIntegration/QPlatformTheme from QGuiAppPrivate.Friedemann Kleint2012-02-2017-2/+18
| | | | | | | Forward-declare instead. Change-Id: I3851994e8bc05b389e94e948478339ba33d521c1 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove QAccessibleInterface::relationTo().Jan-Arve Saether2012-02-202-43/+4
| | | | | | | | QAccessibleInterface::relations() replaces both relatedTo() and some of the RelationFlags that navigate() handled before. Change-Id: I4b9d2c28ba3d753efe7cc9bfa0ad68bed3ee02fd Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Added note in QPlatformWindow::setGeometry() docs about position policy.Samuel Rødal2012-02-201-0/+4
| | | | | Change-Id: I0ac76b7aac1aa717592c34f414b1dd8fbee92be2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove QAccessibleInterface::navigate()Jan-Arve Saether2012-02-202-59/+4
| | | | | | | This is replaced by parent(), child() and relations() Change-Id: Iabff6ec56176a1ca8465d6480860f6e0174fd134 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* qpa: Verify that the platform returns a WId that is not WId(0)Holger Hans Peter Freyther2012-02-201-1/+5
| | | | | | | | | | | This is motivated by visiting a customer that re-implemented the ::winId method and returned WId(0) that resulted in a crash. Currently there is only a comment inside the implementation of the ::winId default implementation. Add a note to the API documentation, add a Q_ASSERT to check if our assumption holds true. Change-Id: I8607a4efc4f561f7849c976cd2454f6fbcb20eaa Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove dead method.Richard Moore2012-02-202-9/+0
| | | | | | | Fix Qt 5 TODO Change-Id: I9a12cc07ebc7c039bbeb53922b0539f177b226f8 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove unnecessary image height adjustments from layout.Andrew den Exter2012-02-201-3/+3
| | | | | | | | | cb8445f0323b0eefbb04f1d8adad81a00b53abd8 removes an implied +1 from document line height so we need to remove the compensating -1 from image ascent/descent for image heights to be correct.. Change-Id: I310c06bcf1ce2eefef42c2828faa0eb435ad71cf Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Introduced QWindow::isExposed().Gunnar Sletta2012-02-184-0/+51
| | | | | | | | | | | The visible property along with show/hideEvent tracks the windows visibility from the application perspective and is really a request. The exposeEvent() along with the isExposed() accessor is used to notify the application of the actual state of the window in the windowing system. Change-Id: I7f5b7ed74a168e34aaa21ce0ae9042ddfb0bf6d8 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Ensure that Qt public headers compile with strict flagsDavid Faure2012-02-171-3/+3
| | | | | | | | | | Those from http://wiki.qt-project.org/Coding_Conventions#Conventions_for_public_header_files (unfortunatey -Wold-style-cast cannot be used due to the glibc macro bswap_16) and many Qt defines that disable casts. Change-Id: I97ac707a101df9819e8c031fa75a31b30e20247f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fixed API in QWindow: visible() -> isVisible().Samuel Rødal2012-02-174-6/+14
| | | | | | Change-Id: I14706abb8441c153f738563cb1a46205fdb2dae6 QWindow::visible() did not follow the API guidelines. Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Add palette() and further hints to QtGui/QPlatformTheme.Friedemann Kleint2012-02-174-31/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | - Move palette() from deprecated QtWidgets/QGuiPlatformPlugin to QtGui/QPlatformTheme, Make it return a const * since QPalette does not have isNull(). - Initialize QGuiApplication::palette() and QApplication::systemPalette() from it. - Do not initialize QPalette from QGuiApplication::palette() unless app_pal is non-null (default to Qt::black if it is 0). This avoids initialization order crashes/recursions in the QPA plugin. Streamline initialization function. - Remove styleName(), systemIconThemeName() and iconSearchPaths() from QGuiPlatformPlugin and re-add them as QPlatformTheme::themeHint(). - Remove styleHint() from QGuiPlatformPlugin, add it to QPlatformTheme::themeHint(). - Add UNIX themes with factory function (Generic, KDE, Gnome), taking it from Qt 4.8 code (stripping the KDE 3 code). - Implement Windows palettes. Task-number: QTBUG-24204 Change-Id: Ie27ec035df4f84c42deaffc4816b2e53ce705462 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fix naming of plugins for QPA plugins and use new plugin system.Friedemann Kleint2012-02-172-2/+2
| | | | | | | | | - Fix naming "com.nokia" -> "org.qt-project" in platform integration & platform theme. - Adapt Windows, XCB, Cocoa, Minimal. Change-Id: I7834f5c3d94473b6f06c1bffee074a70ee25f426 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Don't render glyph with FT with fetchMetricsOnlyJiang Jiang2012-02-171-1/+1
| | | | | | | | | Neither rendering with outline nor fetchMetricsOnly requires the rendering from FreeType so we don't need to render them or cache it. It should speed up recalcAdvances() quite a lot. Change-Id: I0f623cb4f79da2edf6e9c9634a2f22fb0c66823c Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove historical +1 from font height calculationEskil Abrahamsen Blomfeldt2012-02-176-14/+13
| | | | | | | | | | | Historically, we've calculated font height as ascent+descent+1. In Qt 4, a patch was added to work around this by subtracting 1 from the descent of the font engines. We now remove the +1 and the work arounds. Change-Id: I7e25d49b97ac892015d3328f32d70eb9a7c2d88f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Avoid loading and keeping unused fallback font enginesEskil Abrahamsen Blomfeldt2012-02-179-4/+74
| | | | | | | | | | | | | | | | | | | | | | | | | When we request glyphs from fallback fonts, we would potentially load all fonts on the system into memory. This is especially true for glyphs that are not supported by any font (or by the last in the list) in any "Common" script (which e.g. includes CJK). This would make any application which tried to display unsupported glyphs use huge amounts of memory for keeping unused fonts cached, only limited by the number of fonts on the system. The patch contains two solutions: First, before loading the font, the multi font engine will be asked whether it needs to be tried for the given character. By default, this will always be true, so all fonts will be tried, but with the new font config multi engine in the platform plugin, it will ask FontConfig whether the font contains a glyph for the character. Should the font be loaded and still fail to resolve the character (which could be the case for other platforms), we will simply delete it again immediately instead keeping it cached. Change-Id: I92dfb39289a359f49caa02c2caf8baf66098fb59 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add support for querying an elided sub-string from QTextEngine.Andrew den Exter2012-02-162-20/+24
| | | | | | | | | | | The QML Text element attempts to layout text first without eliding and only builds an elided string for the last visible line. This allows it to re-use the already generated layout information to build the elided string rather than doing a second layout of the relevant text. Change-Id: Ieee45902d0c129853abe822c465eece4d634a028 Reviewed-by: Martin Jones <martin.jones@nokia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Use english name to match font in windows platformjian liang2012-02-162-3/+37
| | | | | | | | | | | | | | In windows platform, simplified chinese envrionment, the default font family name is "SimSun" which is not in the font list generated by EnumFontFamiliesEx(), this will cause chinese font can't be displayed. This patch will generate font's english name during font enumeration in windows platform, and take font's english name into consideration in font matching. The english name generation code is taken from Qt4.8 Change-Id: Ie939ec0c8c08c628a835c7a53fb22d0545626d9c Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Redirect libjpeg messages via qWarningDonald Carr2012-02-161-0/+9
| | | | | | | | | | This allows us to catch spurious libjpeg warnings via the installation of a message handler Change-Id: I82f3257118b5fbdf66550be80e72f75e9a24d3c1 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix ref counted window close handling.Stephen Kelly2012-02-163-19/+18
| | | | | | | | | | Instead of refcounting QWindow visibility, we ask the Application subclass whether quitting is appropriate. Task-Id: QTBUG-24120 Change-Id: Idd19cc1a3e5742fddded89c7638aaaa5e47c568d Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Add a ThemeChange event.Friedemann Kleint2012-02-165-0/+29
| | | | | | | | | - Pass it from QWindowSystemInterface via QWindow to the widgets. - Add handler code from 4.8 / qapplication_win.cpp to qwidget.cpp. Change-Id: Ic759563aa00cb93fe014c1bf41020446c1927dec Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Move the removal of the Quit event to QWindow.Stephen Kelly2012-02-151-0/+3
| | | | | Change-Id: If524127ba9dab9ef065aaf4079294295eef8e49b Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Corrected the size of mipmaps in framebuffer objects.Kim Motoyoshi Kalland2012-02-151-2/+2
| | | | | Change-Id: Ia3c0daefc6537b12be7f9072e7defc0631794690 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove a couple of QtGui/QtGui header entriesAndy Shaw2012-02-152-2/+2
| | | | | | | | | | Removed a couple of header entries since they were causing build problems on Mac. Additionally it is a bit much to include QtGui/QtGui in a private header file. Added in an include to QCache and QGradient which was necessary afterwards. Change-Id: I442efc799a4c81b50ec30d58f1aedfb08e686fcb Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Added support for resetting QOpenGLFramebufferObject attachments.Samuel Rødal2012-02-153-27/+82
| | | | | | | | | | As the documentation says, this can be useful to free or recreate attachments when needed. For example, it might be useful to free stencil and depth attachments to free up resources when not rendering to the framebuffer object. Change-Id: Ib267024fdd380a788c256eb8fb86e0f8832329e0 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Produce unimplemented warning for QOpenGLBuffer::map only onceAlex Wilson2012-02-151-2/+10
| | | | | Change-Id: Ia4f136e964e4e0ca326f462b0996ef3d1b843cf6 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Move desktopSettingsAware to QGuiApplication.Friedemann Kleint2012-02-153-0/+31
| | | | | | | | | | | | For use by the QPA plugins. Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Morten Sørvig <morten.sorvig@nokia.com> Task-number: QTBUG-24204 Change-Id: I7f35274eedb55fcb60ad289768234bc302286d01 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Added static keyword to blend_transformed_tiled_argb/rgb565().Kim Motoyoshi Kalland2012-02-141-2/+2
| | | | | Change-Id: I43745c672d5d31ef89901234c04bf2433269462c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Removed unused qStorePixel[] array.Kim Motoyoshi Kalland2012-02-141-12/+0
| | | | | Change-Id: I9c9df19fcf06b127aaebb7ab093221e1b254ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use newly-added QFileInfo::isNativePathJoão Abecasis2012-02-142-7/+8
| | | | | | | | | | | | Don't indirect over internal API. With QAbstractFileEngine and friends on the way out, QFile is losing its (marked internal) virtual fileEngine() function and the file engine can't be queried for LocalDiskFlag. That information is now available through QFileInfo, instead. Change-Id: I48827a96fd8cd748055ad5f075912fc8e1c5ef7f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Compile without OpenGL.Samuel Rødal2012-02-122-0/+4
| | | | | | | | | Since a GLuint returning virtual was added to QPlatformOpenGLContext we need to make sure it's protected by #ifndef QT_NO_OPENGL. Change-Id: Id2f56ccdccc3863986250ee1b3aa7efccf88ba5c Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Add QPlatformServices class.Friedemann Kleint2012-02-109-460/+114
| | | | | | | | | | | | | | | - Add QPlatformServices as back-end for QDesktopServices. - Bring back UNIX/Linux desktop detection in platformsupport as a generic implementation. - Add Windows implementation. Reviewed-by: Morten Johan Sorvig <morten.sorvig@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Anselmo Lacerda S. de Melo <anselmo.melo@openbossa.org> Change-Id: If94bb65755df4f849edd83c57143ee2c73002137 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Avoid crash when windows with active mouse synthesization are deletedLaszlo Agocs2012-02-102-3/+7
| | | | | | | | | Some QtQuick autotests, that apparently generate incomplete touch sequences and delete windows without finishing them, triggered a crash when handling the TouchCancel event in QGuiApplication. Change-Id: Ie725d5a16f55acc40bdc8e2c38f93daac9477f2a Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Move all usages of Relation enum values to QAccessible::relations()Jan-Arve Saether2012-02-102-5/+6
| | | | | | | | Next step is to remove navigate(), but that has to be done in qtdeclarative first. Change-Id: I01ea1386c092446be04cc19d0f70adf53f094adc Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Handle TouchCancel in gui and widgetsLaszlo Agocs2012-02-105-2/+79
| | | | | Change-Id: I31739840348d88ae408ac1aae2399f6328ccdd43 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>