summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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>
* Add qt_pixmapFromWinHICON again for Windows CE.Andreas Holzammer2012-02-101-0/+179
| | | | | | | | | | qt_pixmapFromWinHICON is used by qfileiconprovider and qwindowsstyle. So use this one from Qt 4.8. Also put functions of qguifunctions_wince in here, because this was splitted. Change-Id: I00ffb9d66a84884f7338648982e516ca016b9bd6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Update docs for QAccessibleEvent.Frederik Gladhorn2012-02-101-46/+10
| | | | | | | | This class completely changed, the old docs were still around. Change-Id: Ice7b106b33ffc60f45f7af1b4f44dc01462ee0da Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Improvement to font database cleanupjian liang2012-02-103-21/+38
| | | | | | | | | | | | | | | | | | This patch do the following things: 1) Call QFontDatabasePrivate::free() to clean up font database before destroying the platform integration object. This is to prevent object leak which is allocated by platform plugin. 2) Allocate FontFile structure for each font registered in windows platform to prevent double free of FontFile structure. 3) qt_registerFont() will release the old handle of the registered font and replace it with the new handle. This is to prevent FontFont structure leak. Change-Id: Ib5ca20c695e1e365689fd8554f7caff6ee77a0b1 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Introduce QScreen::grabWindow(), deprecate QPixmap::grabWindow().Friedemann Kleint2012-02-095-54/+64
| | | | | | | WId can be local to a screen. Change-Id: I09ca71313836a34dbf33289b254c80207a956bb1 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add event type for TouchCancel.Laszlo Agocs2012-02-091-3/+9
| | | | | | Change-Id: Id8b68e5cb19a2a325139e3241647cc36581cf6f8 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Preserve weight and style request for multi font enginesJiang Jiang2012-02-092-5/+7
| | | | | | | | So that fallback fonts can pickup the weight/style requested instead of using the weight and style of the primary font. Change-Id: Ia592e079cad61334f21e0453412b198a900bb6b6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Eliminate a warningJiang Jiang2012-02-091-2/+2
| | | | | Change-Id: I984821d90df272b85d02c6ee0db5a89174d80873 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix compile with QT_NO_OPENGL.Andreas Holzammer2012-02-092-0/+6
| | | | | | Change-Id: Icade54a6e3b43fdc9c151efbc25adcef6b7e41d6 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Fixed CustomDashLine drawing bug.Samuel Rødal2012-02-081-1/+3
| | | | | | | | | | | The bug was caused by attempting to stroke an empty subpath. If there have been no line-to's emitted we should not try to join the start and end of that line segment. Task-number: QTBUG-23248 Change-Id: I38b7e955ed6683f8fc25f9551e93b4f472c022bf Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com> (cherry picked from commit 593947ba70188df3d33efe031fab2fd255faa8b9)
* QTextEdit cursor position fix when moving left/right with selectionPasi Matilainen2012-02-081-6/+20
| | | | | | | | | | | | When text has been selected in a QTextEdit and the left or right arrow key is pressed, the cursor moves one character beyond the start or end of the selection, when it shouldn't move past the selection. Fixed by moving the cursor to the right place when a selection is active. Task-number: QTBUG-22853 Change-Id: I9ea1863436db98627a6fd041ce554cf10be26493 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> (cherry picked from commit 1b031759ddfdab9703dfecac13f1ed318da3dafe)
* Fixed source composition with opacity in the raster paint engine.Kim Motoyoshi Kalland2012-02-081-0/+2
| | | | | | | Task-number: QTBUG-24075 Change-Id: I2b9263364bf30fb8c914823e80e7ea4a8af26035 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>