summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
Commit message (Collapse)AuthorAgeFilesLines
* default to Regular font with FontConfigMichał Sawicz2012-11-231-5/+5
| | | | | | | | | | | | | | | Default to Regular/Normal instead of Medium in QFontConfigDatabase. Requesting Medium as default was fine until the font actually provided a Medium font, at which point it was selected by default. Tweak the buckets so that Medium has preference over Bold when DemiBold is requested. They will have to be extended for Medium when QTBUG-25814 is resolved. Change-Id: I111b7f99083d50c3e8264f84f10a997f619ef4b3 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fix transformed text on Mac OS XEskil Abrahamsen Blomfeldt2012-11-232-0/+7
| | | | | | | | | | | | | | | | | In change 1582407fc782c0befd0760633324dd5c206524a1, the Q_WS_MAC code path which disabled drawing cached glyphs for any transform was removed, as was the comment that scaling and rotation wasn't supported by the Mac font engines. This obviously broke transformed text on Mac, so we need to put it back. I put it into the font engine itself where it belongs, and I kept the somewhat confusing naming convention which is used in the paint engine to minimize this patch. I'll clean up these function names in a future commit. Task-number: QTBUG-27362 Change-Id: I4fc6a503eedd4b1ebaf3ee659d948f997f433338 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Return something from QPAEventDispatcherGlib::processEventshjk2012-11-231-1/+1
| | | | | | Change-Id: I0abaf73d4b6b96dbcf499ea86749ced76348c281 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Mac: fix invalid context in imageForGlyphTeemu Katajisto2012-11-211-1/+1
| | | | | | | | | | | | The bounding rectangle may have negative width or height when a graphics view with text is rotated in certain angles. Make sure that the image width and height are positive, otherwise the context will be null and the following messages can be seen in test logs: <Error>: CGContextSetFontSize: invalid context 0x0 Change-Id: I10f83f6909035fb3c4ac456123cf1922eaea7c73 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* QPAEventDispatcherGlib: Use correct flags when sending eventsOliver Wolff2012-11-212-3/+18
| | | | | | | | | | Instead of assuming that all events should be handled when a user event occurs, userEventSourceDispatch has to use the flags used in QPAEventDispatcherGlib::processEvents. Task-number: QTBUG-27595 Change-Id: Ib13607f89f7d3207ec83ab26f7d59b3c59a28c4e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Detect Unity by checking XDG_CURRENT_DESKTOP and use Gnome theme.Friedemann Kleint2012-11-202-2/+7
| | | | | | | | | | Fallback to Gtk for unknown desktops, which should be suitable for most cases like XFCE. Task-number: QTCREATORBUG-8254 Change-Id: Iaf9959f75852e03a83b5af7d0dead01ef657d678 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* exclude 3rdparty from lupdateOswald Buddenhagen2012-11-201-0/+2
| | | | | | Change-Id: I00c569787943a87dda60786b179af1f55a94ea68 Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Avoid duplicate entries in QGenericUnixTheme::themeNames()J-P Nurmi2012-11-121-3/+3
| | | | | | Change-Id: I6dc258274dc6614f56f306c30c95fe20c14fdf89 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* evdevtouch: also use BTN_TOUCH with value == 0 to detect TouchPointReleasedJon Trulson2012-11-111-0/+5
| | | | | | | | | | | | | | | | | | | The current code seems to rely on an event, ABS_MT_TOUCH_MAJOR with a value of 0 to detect a touch release. Not all devices[0] emit this, and the spec[1] does not specify this behavior. So, add a check for a BTN_TOUCH with a value of 0 to also indicate Qt::TouchPointReleased. [0] http://www.chalk-elec.com/?page_id=1280#!/~/product/category=3094861&id=14647624 using hid_ntrig kernel module. [1] https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt Change-Id: I4fc8ff404cad2083a57ff18737c5ea2b06d8ceac Reviewed-by: Robert Daniels <robert.daniels@vantagecontrols.com> Reviewed-by: Laszlo Agocs <lagocs83@gmail.com>
* Accessibility Linux: Do not depend on external libatspi2Frederik Gladhorn2012-11-081-2/+0
| | | | | | | | | | | This has (and still does) caused lots of grief since it means accessibility was often unintendedly not built. Instead copy the lib-at-spi-2 header file needed for the type enum and build it by default again. Change-Id: I1ba26f20edff1aeb444c96a37928f36230ac7576 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Rename all QWindow properties that have "window" in themShawn Rutledge2012-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | windowTitle, windowModality, windowIcon and so on are named that way to be similar to the ones in QWidget. However QQuickWindow inherits all of the declared properties, and we would like to have shorter property names in QML. If you are working with a Window then it's obvious the title property is the window title. Unfortunately, there must be patches in many other modules which depend on this one. In order to avoid the need to merge them all at the same time, there is also patch https://codereview.qt-project.org/#change,39001 which temporarily adds backwards-compatible accessors, which can be removed after the other modules are able to build without them. We should not rename windowState to state, because in QML, state usually drives the state machine for animation transitions etc. (although QWindow is not an Item, a user might get confused about it). Related patches are https://codereview.qt-project.org/#change,39001 https://codereview.qt-project.org/#change,37764 https://codereview.qt-project.org/#change,37765 https://codereview.qt-project.org/#change,37766 https://codereview.qt-project.org/#change,37762 Change-Id: Ie4424ec15fbdef6b29b137f90a2ae33f173edd21 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix for compiling with clang with c++11.Erik Verbruggen2012-11-061-1/+1
| | | | | Change-Id: I4f4928783d0e35b0df5e979fef1de80e9a026f55 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: make text subpixel rendering check to work for non-Apple displaysTeemu Katajisto2012-11-031-16/+38
| | | | | | | Task-number: QTBUG-27386 Change-Id: I4e12663f80060dfcea6970a705861af388d816ac Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Mac: Correct writingSystem check value for ChineseLiang Qi2012-10-301-2/+2
| | | | | | | | | | | | | For simplified and traditional Chinese. Based on the Apple doc: Internationalization Programming Topics - Language and Locale Designations. Task-number: QTBUG-27130 Change-Id: I677563525edd607583561be20f4dbed24b2443a5 Reviewed-by: Jiang Jiang <gzjjgod@gmail.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Accessibility: make sure right objects are cached on linuxFrederik Gladhorn2012-10-271-1/+1
| | | | | | | | This patch goes together with 730a5a994ff46055055c58b25bd059373dddb934 and is the second code path that deals with the hash of valid objects. Change-Id: Ia7b0995cb667cfce5f7697aa61856e44f745a932 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Be more careful about asserting in accessibility.Frederik Gladhorn2012-10-271-1/+5
| | | | | | | | | | It is possible to call the accessibility update for any widget, even if it doesn't implement the right interfaces. While that is bad, warning about it is better than asserting. Change-Id: I23c0c783083f73fb816d75b2c9b78efd603edcb6 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Possibility to change custom Drag&Drop cursors while dragging something. ↵Cyril Oblikov2012-10-261-2/+13
| | | | | | | | | | | Implementation for Windows and X11. Additional checks to figure out if new Drag&Drop cursors where set. This means it is possible now to keep QDrag object in your program and call setDragCursor() method every time we need to change cursor depending on context. Change-Id: I4be69e44b2863371a7ffbb29efc17c18210d6cde Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Remove Cleanlooks and PlastiqueJens Bache-Wiig2012-10-221-2/+2
| | | | | | | | | We have a new style Fusion that will replace these styles. They will be moved to a separate module rather than included in platforms that do not need them. Change-Id: I51ebbcad5406e99130e5b12e62ba624d1489088c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* remove explicit load(qt_build_config)s from the librariesOswald Buddenhagen2012-10-191-1/+0
| | | | | | | .qmake.conf (and previously .qmake.cache) already does that for us. Change-Id: I06cc01fa45921d7bd66dda7a0f88729faeff37bd Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Handle separators in menus in AT-SPI (Linux accessibility)José Millán Soto2012-10-191-2/+3
| | | | | Change-Id: Id9c109d53bbb8ded04bbe98a622d44e13d572340 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Clean up instantiation of mapping of AT-SPI roles.Frederik Gladhorn2012-10-191-66/+65
| | | | | Change-Id: If31b33f1b259f896408a66b0574d640b0ad57019 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Accessibility: make sure right objects are cached on linuxFrederik Gladhorn2012-10-191-1/+1
| | | | | | | | | | | | | The linux test would actually fail because the qobjects created could end up having the same address (create-delete-create...). After an object is deleted, it's not instantly removed from the cache of valid objects. Instead it would stay in the list with it's smart pointer becoming zero. This patch adds the missing null pointer check so we are always up to date. Change-Id: Ia7be14741d4798c2b8e75cb7127298c73cf206ef Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Cocoa: fix coretext memory leaksTeemu Katajisto2012-10-192-0/+3
| | | | | Change-Id: Id85dbf8a2ea8994d9fca07d3f10b43f62ec305a0 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Fix compile with -no-widgetsRohan McGovern2012-10-182-4/+3
| | | | | | | | | | | | Remove more unnecessary references to QtWidgets in accessibility implementation. Disable accessibility tests (which rely on QtWidgets) when QtWidgets is not available. Change-Id: I57315537779d31af1245d42d1b4c49174016da54 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Accessibility doesn't need QApp from QWidgets.Frederik Gladhorn2012-10-171-1/+1
| | | | | | Change-Id: I440179bfa95d6aa73c8b69b09431e4dc9fae5436 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Fix function names in warning messages.Frederik Gladhorn2012-10-161-7/+7
| | | | | Change-Id: I14abc176ea670799496e10bee296b4e84fdc7181 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Use QLatin1String in AtSpiAdaptor::applicationInterfaceJosé Millán Soto2012-10-151-4/+4
| | | | | | | Using QLatin1String in string constants which were not using it. Change-Id: I3aa4b7104cf3d1765874e0ee9a6fd23aadd8d671 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* QPlatformWindow: change API for QPlatformWindow::setWindowFlagsRichard Moe Gustavsen2012-10-152-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The current implementation requests the platform window to set as many of the flags it can, and return the same flags with the unsupported flags removed. The problem with this approach is that the platform window is created as late as possible, so a call to QWindow::setWindowFlags would in many (most?) cases never be forwarded to the platform window (instead, the platform window is responsible to check the current window flags upon creation). As such, the filtering would never be done. Looking at the current set of plugins, most of them also seems to ignore this protocol, returning the flags unfiltered. This patch suggests removing the return value from QPlatformWindow::setWindowFlags. This will at least be consistent, so that setting/getting flags would produce the same result independent of delayed window creation. If needed, we can later add new API to QPlatformIntegration or QPlatformWindow for querying supported window flags. Change-Id: I9c759b5f9fab5ebed764a982f77fe19881118875 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Accessibility: Implement GetVersion and GetLocale in app adaptor.Frederik Gladhorn2012-10-131-1/+10
| | | | | Change-Id: I73a49b22add9e268907025dd0bf7ec76e7fd0c0b Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Add workaround for typo in libatspi VisualdataChangedFrederik Gladhorn2012-10-131-1/+2
| | | | | Change-Id: I6375d77fac4e743a372f18b3e3d63c128ce51271 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Remove trivial debug output from QSpiAccessibleBridgeJocelyn Turcotte2012-10-111-3/+1
| | | | | | | | This information can get noisy when windows get opened/closed frequently during auto tests. Change-Id: I2777b51c97b3108be3d784794e12e20985d4d65b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Do not handle invalid accessibles in atspi bridge.Frederik Gladhorn2012-10-101-0/+4
| | | | | | Change-Id: I13a7dd1e190c5d3a5bb8be0ee66c2f18d0d3a1b5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Accessibility: For app claim support for app iface.Frederik Gladhorn2012-10-031-0/+2
| | | | | Change-Id: Idb7f5971d61885f18d827f6bff3994df7a3860e5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Implement action de-marshalling.Frederik Gladhorn2012-10-031-2/+5
| | | | | Change-Id: Ie9ae85298fad6217f9f50a018fbba50f028deba2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Make accessibility debug output optional.Frederik Gladhorn2012-10-033-56/+63
| | | | | | | | | On linux with the new plugin debug output was a bit too generous. Instead use environment var: If QT_DEBUG_ACCESSIBILITY is set, give the full a11y output. Change-Id: I1c9e2078e38799f91468cfc2d9ddcaa36ba4fa03 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fixed qglxconvenience.cpp compile for GLX 1.3.Samuel Rødal2012-10-011-1/+3
| | | | | | | | These defines are new in GLX 1.4, earlier they were ARB extensions. Task-number: QTBUG-27370 Change-Id: I83828067d106e93a3909de46a4051d492e277ba9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Accessibility: rather than assert, just warn.Frederik Gladhorn2012-09-271-5/+7
| | | | | | | | | Screen readers do random things with the dbus interface, we should be careful when handling what they send. Change-Id: Ie8fc515c8d399dae9b5e892a135b54a1820d09e2 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* XCB: Correctly report the created OpenGL context version and profileSean Harmer2012-09-261-0/+2
| | | | | | | | | | | | | | | This commit fixes the xcb qpa plugin such that it now correctly reports the version and profile of the created OpenGL context in the QOpenGLSurfaceFormat. To do this we have to create a temporary X window so that we can make our new context current. We also handle the buggy nVidia drivers which incorrectly report 0 for the GL_CONTEXT_PROFILE_MASK query. The reduced format is also copied back from qglx_findVisualInfo. Change-Id: I6f34fe1c6130aebbb6b40c36df4acc216069d2b1 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2273-1758/+1758
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Correct QSpiAccessibleBridge::setRootObject definitionJosé Millán Soto2012-09-222-5/+3
| | | | | | | | | | | | | QSpiAccessibleBridge::setRootObject was defined to require a QAccessibleInterface* as parameter instead of QObject*, as a result of that, QSpiAccessibleBridge::setRootObject did not reimplement QPlatformAccessibility::setRootObject and the adaptor was not initialized. After this change, applications should work with screen readers. Change-Id: Iee3d39f8e0959c1d75b1e682847d266a723c141b Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* OpenGL: Add runtime check for OS X version and improve logicSean Harmer2012-09-211-4/+9
| | | | | | | | | | | | | Apple recommend adding NSOpenGLProfileVersion3_2Core when asking for a 3.2 Core profile context and NSOpenGLProfileVersionLegacy in all other cases. Also added a missing runtime check for OS X 10.7 or newer. Fixes a potential crash if Qt was built on 10.7/8 but executed on 10.6. Change-Id: I4c09d2dbbe8df25a3553cc01b468dabab0f8eaa4 Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Mark (non-public API's) ctor's as explicitSergio Ahumada2012-09-143-5/+5
| | | | | | | | | Make C++ class constructors that can be used with only one required argument 'explicit' to minimize wrong use of the class. Change-Id: I12ad5b6eb1794108c6b7464a2573e84068733b03 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove unused file.Frederik Gladhorn2012-09-111-94/+0
| | | | | Change-Id: I402f1d3216129d693a4b0d33e015fd047c7d2298 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fix printing with OS X platform pluginEskil Abrahamsen Blomfeldt2012-09-101-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Since we do not pass in the destination dpi to CoreText when making the font, we need to pass in a point size which is scaled to include the dpi change. The default dpi for the screen is 72, thus the scale factor is destinationDpi/72. Since pixelSize = pointSize / 72 * dpi, the pixelSize is actually the scaled point size for the destination dpi, thus we pass in that instead. Note that this only works because the default screen dpi on Mac is 72. You can look at the CoreText font database in Qt 4.8 to verify that the same trick is used there. When 96 dpi is explicitly set (specifically for autotests), we need to fall back to the old behavior, since the OSX platform plugin will then use 72 for some fonts and 96 for others making it impossible to detect the DPI in a consistent way. The correct fix would be to pass in the dpi to the function, but until that fix can be made, we just use the old code to keep the autotests passing. Task-number: QTBUG-25555 Change-Id: Id20a273549c3abf3db56ef1c48553c0958c48d61 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fix rounding error when drawing scaled text on OS XEskil Abrahamsen Blomfeldt2012-09-101-6/+6
| | | | | | | | | This especially affected the print preview dialog, where certain characters would be grossly mispositioned. Task-number: QTBUG-27131 Change-Id: I385474a6f609a8f4291988206c7e63a0747673dd Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Removing duplicate includesSergio Ahumada2012-09-091-1/+0
| | | | | | | Do not include a header more than once Change-Id: Ia2e5d66e72988ad833cf5177a3f8aa988bf510e9 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Use QStringList::join(QChar) overload where applicable [QtWidgets]Marc Mutz2012-09-072-2/+2
| | | | | | | | | | | This is an automated change performing the following replacements: join\("(.)"\) -> join('\1') join\(QLatin1String\("(.)"\)\) -> join(QLatin1Char('\1')) join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1')) Change-Id: Ia30048e0c40967dc86a4e4ad26ac02ab67519096 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Use QStringList::join(QChar) overload where applicable [QtGui]Marc Mutz2012-09-072-2/+2
| | | | | | | | | | This is an automated change performing the following replacements: join\("(.)"\) -> join('\1') join\(QLatin1String\("(.)"\)\) -> join(QLatin1Char('\1')) join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1')) Change-Id: Id8d43c1b1ca9cd3aa0b4eedca6709b6287a9bc98 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Enable autodetecting of EGL event for desktop GLJorgen Lind2012-09-071-9/+8
| | | | | | | | And only use the QT_CONFIG,egl syntax in eglconvenience Change-Id: I81c0602334714f4b27a7e90e7b5859c989e6bd63 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com> Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
* Mark plugin class docs as internal.Frederik Gladhorn2012-09-075-15/+8
| | | | | | Change-Id: I2eb0a6ce4108774377df1296de4152715b65de6e Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>