summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
...
* Android: handle keyPress event for Key_BackPaul Olav Tvete2013-10-291-23/+18
| | | | | | | | | | | | | | | Added logic so that accepting either the press or the release will keep the app running. This makes it possible to use the onBackPressed functionality in QML. This functionality is only intended for running in a complete Android environment, so make sure that we don't terminate the application in the NO_SDK case. Task-number: QTBUG-30803 Change-Id: I2546eea73bf6a6ee8b196125b7556479b9b10a9c Reviewed-by: BogDan Vatra <bogdan@kde.org>
* remove some vestiges of QFontEngineQPFOswald Buddenhagen2013-10-283-73/+0
| | | | | | | | | | amends d7e424ee66. Change-Id: I9aaef14f8ecba78685ce5f7e908a0b42e554434f Reviewed-by: thiago Reviewed-by: paulot Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* CMake: Fix quoting issue with quoted paths in strings.Stephen Kelly2013-10-251-2/+4
| | | | | | | | | | | | Create a local CMake variable instead and use that in the search paths argument and in the message string. Resolves a warning that can appear with CMake 2.8.12. Task-number: QTBUG-34115 Change-Id: I04c67668586a9ad6584b7f6e91ee65351c86389c Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Do not byteswap RGBA8888 formatsAllan Sandfeld Jensen2013-10-252-30/+3
| | | | | | | | | | | | | The three RGBA8888 formats was introduced to make it possible to have QImages and QPixmaps in native OpenGL formats, but uploaded textures of these types are still converted to ARGB first and then swapped back. This patch detects the formats and ensures the unneeded back-and-forth conversion does not take place. It also replaces a seemingly unused private API meant for the same goal. Change-Id: Id69d6973bb9c13d1052f2a1b0c516183f63421c2 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Accessibility: Make it possible to send events with no QObjectFrederik Gladhorn2013-10-252-6/+107
| | | | | Change-Id: Icbb9d15ec52ff5f7718eaf3600cab140971274aa Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* QImageWriter: add a forgotten #ifndef QT_NO_IMAGEFORMAT_BPMMarc Mutz2013-10-251-0/+2
| | | | | | | The equivalent code in qimagereader.cpp has this, so add here, too. Change-Id: I0313727f009db5cb00ee9ce0540ba2674da49ccd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Remove doc references to non-existing functions in QSurfaceFormatSean Harmer2013-10-241-2/+2
| | | | | | Change-Id: I5a9de5b719e111e47a1ea7334609695f1db6149a Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fix misaligned selection region with text when centeredJonathan Liu2013-10-231-5/+14
| | | | | | | | | | | | | If the text is centered, the x/y position in the selection QRectF may be a multiple of 0.5 which is rounded up. This rounding causes misalignment of the selection region with the text. The alignment is fixed by using qFloor on the x and y components. Task-number: QTBUG-34218 Task-number: QTBUG-34234 Change-Id: I4f2fadeb38602f62a93773c6e5faecf03b28069f Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* QTextHtmlParser: restore the default link color from app paletteJ-P Nurmi2013-10-231-2/+2
| | | | | | | | | | The default link color used to be resolved to the link color of the application palette, but got lost during the Qt 5 modularization (see commits 7351a43 and 3f9a7f9). Task-number: QTBUG-28998 Change-Id: I7f07427f6c03f83c557100938ad9f7a39349d303 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Use QByteArrayLiteral throughout in QOpenGLVertexArrayObjectSean Harmer2013-10-201-8/+8
| | | | | Change-Id: Ia362ead0ffdc077bd0db5d980c80464838c934ea Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Make it possible to clear glyph caches from the font engine.Gunnar Sletta2013-10-182-0/+11
| | | | | Change-Id: Iea62bc1727269ed3893d8b4dbcefa583f1b85d7f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* When creating QVariant(QPolygonF()) this should be a null variantAndy Shaw2013-10-181-1/+2
| | | | | | | | | | | | | The handling of the null QPolygonF case was not correct as it would always be seen as valid. This ensures it is treated in the same way as QPolygon when it is in fact null. [ChangeLog][QtGui][QPolygonF] When a QVariant holds a QPolygonF() then it will be correctly seen as a null QVariant. Change-Id: Icae34f513c3a8e1dd3f50cb64a3d13ae7c636cc4 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Implement native gestures on OS X.Morten Johan Sørvig2013-10-177-0/+211
| | | | | | | | | | | | | | | Add QWindowSystemInterface::GestureEvent and QNativeGestureEvent to QtGui. These events are copies of Qt4's QNativeGestureEvent, where it was an implementation detail of QGestureManager. Add gesture message handlers to QNSView and bring back the Mac gesture recognizers for QGestureManager. Task-number: QTBUG-28126 Change-Id: I1304e09e776fa7c44d133d54ca8b895ca2f544c5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Clear QGuiApplicationPrivate::tabletPressTarget in ~QWindow.Friedemann Kleint2013-10-171-0/+2
| | | | | | | Task-number: QTBUG-34007 Change-Id: I81b8496746f425f58a21b18ffaf96dfdbbe2a815 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Support APPLE VAO extension on Mac.James Turner2013-10-161-13/+27
| | | | | | | | | | Since Mac lacks a compatibility profile, we often use the highest supported compatible version, 2.1; this lacks vertex-array-object (VAO) support in the API, but Apple provide a compatible extension. Extend the helper object to detect this case and make VAO support work. Change-Id: I75a74e048a0d188cec76bc5a4a9eafa4c9143740 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Restore handling of bullets for lists with a font size of > 36 pixelsAndy Shaw2013-10-161-13/+0
| | | | | | | | | | | | | | This patch partially reverts ad443dfb1d8e9096c4913686aa2ed0bc9b3f5de7, the test that was added is still there as it can be used to compare against Chrome and to check that indenting works correctly. The original behavior of clipping the bullets is correct because the specified indent is where the text itself should be positioned, the bullet uses the available space to the side of it. This is how other web browsers handle the same situation. Change-Id: I63440e037d8efec356459c09228ef4817ccb9cb6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Change return type of imagePosition to QPointJan Arve Saether2013-10-151-1/+1
| | | | | | | | | | | | | | QAccessibleImageInterface already has an API to return the size of the image. This function ensures that their API's are not overlapping. Alternatively, we could merge both functions into QAccessibleImageInterface::imageRect(), but the assumption is that images change position more often than their size. Change-Id: I55c25cdff187b9f497828f04cfd5f969cfbc451f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Fixed narrowing conversion compile error with SwizzleValue cast.Harri Porten2013-10-151-1/+1
| | | | | | | | | | | | | | I got the following compile error with gcc 4.7.0: error: narrowing conversion of ‘r’ from ‘QOpenGLTexture::SwizzleValue’ to ‘GLint {aka int}’ inside { } [-Werror=narrowing] The compiler must being going through the route of treating the enum as an unsigned int and thus choking on the conversion to a signed int. Change-Id: I35c15673d0371c69984bdec80622066f792527ba Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update QPA cursor only for non-synthetic mouse eventsLaszlo Agocs2013-10-141-3/+5
| | | | | | | | | | | | | | | | | | | | Unhandled touch events cause QGuiApplication to generate synthetic mouse event by default. This is good but on embedded systems, where there is no windowing system and thus the platform cursor implementation relies solely on QGuiApplication pushing position updates via pointerEvent(), this causes odd behavior when there is both a touchscreen and a mouse present. The patch changes QGuiApplication to call pointerEvent() only when the event is not synthetic. This will prevent the mouse cursor from jumping to the position of the touch when using the touchscreen. It is needed also because moving the mouse later would make the cursor jump back to its previous, "real" mouse position anyhow which is extremely annoying. This is now avoided. Change-Id: I807a173bff7e2afa7eb66961a7ecc88b2c0430ca Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Doc: Fix typos and add missing words.Marcel Krems2013-10-121-2/+2
| | | | | Change-Id: I40e4780bcabbca29425945a69d8a0781cd5c0e9f Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Export the block's line-height settings to htmlAndy Shaw2013-10-121-0/+23
| | | | | | | | Task-number: QTBUG-28404 Change-Id: I87e03ecd981c302a5aefdadf7bcfd9729e37bd13 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Re-add deprecated symbol for ABI compatibility with Qt 5.1.Harri Porten2013-10-112-1/+7
| | | | | | | | | | | When b0b786a2f05e9451a65519ab8904f55c35f51b7d deprecated QFontDatabase::supportsThreadedFontRendering() it made the function inline also. That way compilers like gcc did not export the symbol anymore. Change-Id: If9c343eaa2ff90540decbc19b0af33d439c0bbaa Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* include privates the right wayOswald Buddenhagen2013-10-111-2/+2
| | | | | | Task-number: QTBUG-33496 Change-Id: Id23e00627cb7896ba44c8b612ce4aff980750f7d Reviewed-by: aavit <eirik.aavitsland@digia.com>
* add a missing break in QGuiApplicationPrivate::processWindowSystemEventLiang Qi2013-10-111-0/+1
| | | | | | Task-number: QTBUG-34016 Change-Id: Ifbb4a63845328e32fb0ad679415dca0f90dde624 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Use QAtomicInt ref/deref patternAllan Sandfeld Jensen2013-10-111-1/+2
| | | | | | | Change check of QAtomicInt::load with the preferred ref() deref() pattern. Change-Id: I12d2e24812259c16623c8a59cac30cafa4b05565 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Memory leak with Small-caps QRawFontAllan Sandfeld Jensen2013-10-111-0/+4
| | | | | | | | | | | | | | | Make sure we deallocate the scaled rawfont, when it is not used due to a cached engine being used instead. This fixes a major memory leak in Qt WebKit when using Small Caps in the complex font path. The complex font path is always used for small caps since Qt 5.1. Task-number: QTBUG-33576 Change-Id: I500db9ae6f6576734f1a972387a1a488218a9db6 Reviewed-by: pierre.rossi@digia.com Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Ensure CSS rules are inherited from the parent tagsAndy Shaw2013-10-111-1/+5
| | | | | | | | | | | | | | | | When CSS was set in the head tag then it was not being inherited by the child tags. This ensures that the inhertiance happens and that the deeper the CSS is set then it will ensure that it has precedence over the ones set on the parent. A test is added that shows the standard inheritance from the head tag and the precedence from child tags in effect too. Task-number: QTBUG-28770 Change-Id: I30be3ec141b2cd8d6e0db8a92669aed34da93b33 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix broken text layout with ShowLineAndParagraphSeparatorsEskil Abrahamsen Blomfeldt2013-10-091-0/+3
| | | | | | | | | | | | | | | Before we add the current cluster we need to check if there's space for it. Calling checkFullOtherwiseExtend() also has the side effect of resetting the space data. We would add the cluster without checking for space when showing separators, causing broken behavior like we would count the space in the current item as trailing space, which would make us chop the end of the string. Task-number: QTBUG-28832 Change-Id: I8169662218ff6e645575d4e89a57f6b234f3c4cb Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Suppress automatic positioning of popup windows.Friedemann Kleint2013-10-091-1/+2
| | | | | | | | | | This seems to cause issues with menus on certain Windows machines. Task-number: QTBUG-33653 Change-Id: I8c31dd3ba5ccc6eb0551048401051d819f49a8c1 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Ensure lastPixel.y is also initalized to -1 when necessaryAndy Shaw2013-10-081-0/+3
| | | | | | | Task-number: QTBUG-31579 Change-Id: Ia4916ac0d384ea523bbfad0dafbc90044da7ec3e Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-0881-617/+617
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QPA: Fix event dispatcher dependent operations in platform integrationLaszlo Agocs2013-10-074-0/+22
| | | | | | | | | | | | | | | | | | 999e5162ec3e86c9cb84c3ec95dfd0ba4b21277f breaks QPlatformIntegration implementations that perform tasks in their constructor that rely on the event dispatcher. For example creating a QSocketNotifier is not possible anymore since the event dispatcher is created later on. This is fixed by introducing an additional virtual in QPlatformIntegration that gets called after createEventDispatcher(). Two broken platform plugins have been identified so far: eglfs is creating socket notifiers to read events from input devices and xcb's input context plugins may use dbus. Both are updated accordingly. Task-number: QTBUG-33768 Change-Id: I5badb623958a52ab5314ff93dd7d60061f5df70a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Fix typos of QWheelEvent exampleIvan Romanov2013-10-071-3/+3
| | | | | | | Just fixed typos with event and numPixels. Change-Id: I8191d7e812ae9d3975a142d198d709d4f9f85b7f Reviewed-by: hjk <hjk121@nokiamail.com>
* Output the CMAKE_CXX_LIBRARY_ARCHITECTURE when reporting missing dependencies.Stephen Kelly2013-10-061-1/+1
| | | | | Change-Id: I5d2d53b9899636dee9f30ab179727de82b78afd5 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Add Q_DECL_OVERRIDE to accessibility classesFrederik Gladhorn2013-10-051-14/+14
| | | | | | | | This actually shows two completely unused functions in QAccessibleTabBar (fixed in follow up patch). Change-Id: If6f464c022617b2ee1db654936e3ff9931103eb6 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Update QSessionManager and related classes documentationSamuel Gaist2013-10-026-90/+137
| | | | | | | | | | Update the Qt 4 documentation of QSessionManager to reflect the changes in Qt 5 Task-number: QTBUG-33528 Change-Id: I74286134155efc2781f9f6fc505fb6cf736d814e Reviewed-by: Martin Smith <martin.smith@digia.com>
* Correct the bit field sizes in QTextOptionThiago Macieira2013-10-012-1/+5
| | | | | | | | | There's an off-by-one error that has been carried over since at least Qt 4.0.0. Because of that, the class is actually 4 bytes bigger than calculated. Change-Id: Iaefdf657fdc780aae16390fde3c01074160e4cd9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPA: Fix semantics of GUI event dispatcher ownership in platform pluginsTor Arne Vestbø2013-09-304-26/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The QPlatformIntegration::guiThreadEventDispatcher() function acted as an accessor to event dispatchers created in the constructor of each platform plugin, but the logic and semantics of event-dispatcher handling in Qt itself (QCoreApplication/QGuiApplication) still assumed both ownership and control over the event dispatcher, such as when to create one, which one to create, and when to delete it. This conflicted with the explicit calls in the platform plugins to QGuiApplication::setEventDispatcher(), as well as left a possibility that the event-dispatcher created by the platform plugin would never be deleted, as none of the platform plugins actually took full ownership of the dispatcher and deleted it in its destructor. The integration function has now been renamed back to its old name, createEventDispatcher(), and acts as a factory function, leaving the logic and lifetime of event dispatcher to QtCoreApplication. The only platform left with creating the event-dispatcher in the constructor is QNX, where other parts of the platform relies on having an event-dispatcher before their initialization. We then need to manually take care of the ownership transfer, so that the event-dispatcher is still destroyed at some point. Change-Id: I113db97d2545ebda39ebdefa865e488d2ce9368b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix syncqt warning about include in qopenglpixeltransferoptions.h.Friedemann Kleint2013-09-301-1/+1
| | | | | | | | WARNING: qopenglpixeltransferoptions.h includes QSharedDataPointer when it should include QtCore/QSharedDataPointer Change-Id: I0a84a37d2f4e310535979ef97b81937d2b2b2313 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix check in texture cleanup codeSean Harmer2013-09-301-1/+1
| | | | | Change-Id: Iaf91cf27d64aedb71a8af7ba318ff1231ff11b0d Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Doc: Add docs for rvalue references and move constructorsGeir Vattekar2013-09-2713-0/+112
| | | | | | | | | These members were introduced in 4.8, but left undocumented. Because we consider undocumented API to be internal, the members are \since 5.2. Change-Id: I52e2840a8cfaa7f59f410b3e2a06c0942ea06539 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Remove code that doesn't do anything.Gunnar Sletta2013-09-261-19/+0
| | | | | Change-Id: Id2528167f21e1ab81b998ceb808a9fc4a24b239a Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Fix WinCE/MSVC2008 build errors related to std::lower_bound patches.Sérgio Martins2013-09-255-0/+35
| | | | | | | See QTBUG-33473 for more information about this compiler bug. Change-Id: I13b945350fdc38165c1515f0cdd75a53cf37cd6c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix truncation and conversion warnings on MSVC2010.Mitch Curtis2013-09-252-4/+4
| | | | | Change-Id: I44845e13b97753333a7c80a80ead0b352b8906b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Remove a Borland-related inclusionGiuseppe D'Angelo2013-09-231-6/+0
| | | | | | | | There are no calls to qSort in the file any more. Change-Id: I5534271a75065998d5a98147a0d19850318c940c Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Remove some qBinaryFind usages from QtGuiGiuseppe D'Angelo2013-09-235-14/+23
| | | | | | | | This is done per the mailing list discussion at http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: Iecb921cd778571d24680254566e9aa8fc8d5edff Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Remove some qBinaryFind usages from QtGuiGiuseppe D'Angelo2013-09-233-6/+12
| | | | | | | | This is done per the mailing list discussion at http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I9cbb1790f94e7726e127b9ad1bd5a58c433055a8 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Remove a Borland-related inclusionGiuseppe D'Angelo2013-09-231-5/+0
| | | | | | | There are no calls to qSort in the file any more. Change-Id: Ifd65b543941ab90d6a1ed4e318d925bdbf3f454e Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* De-inline virtuals of some non-exported private classes in QtGuiThiago Macieira2013-09-232-2/+11
| | | | | | | | | | This is to work around a bug in GCC 4.7's link-time optimiser. Without it, linking QtOpenGL and QtPrintSupport fails because the compiler generates the code for the virtuals, including the virtual table, but not the methods. Change-Id: Idcecd51c32e6228e0eefe67f1bd630ea1f5d5da7 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Long live QOpenGLTexture!Sean Harmer2013-09-2211-2/+5237
| | | | | | | Task-number: QTBUG-33274 Change-Id: I9259d947d11f8ba330a2cd7f5620d8f1af0a804b Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>