summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
Commit message (Collapse)AuthorAgeFilesLines
* Remove the virtual keyword from reimpl. methodsRafael Roquetto2012-03-2810-66/+66
| | | | | | | | | | Qt Coding Standards state that "when reimplementing a virtual method, do not put the virtual keyword in the header file'". Change-Id: I89ae34eee78ad5b58a3e41845384a656225ed658 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
* Refactoring virtual keyboard class into non-singletonKevin Krammer2012-03-2810-84/+98
| | | | | | | | | | | | | Getting rid of the singleton gives us better control over when the virtual keyboard handling class is instantiated and configured. Also notify screens about keyboard height changes and let them notify through QWindowSystemInterface instead of "guessing" the screen in QQnxVirtualKeyboard. Change-Id: I71a7f6b5e9d5455563404f6abe7a0daec567a12d Reviewed-by: Sean Harmer <sh@theharmers.co.uk> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Move screen event processing into its own classKevin Krammer2012-03-286-466/+592
| | | | | | | | | | The event handler class can then be reused when we have proper BPS event support available from corelib Change-Id: Iafe645e69248597377045c711108ce0acbe3984b Reviewed-by: Sean Harmer <sh@theharmers.co.uk> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Use "qt-project.org" instead of "trolltech" in the resource systemhjk2012-03-283-8/+8
| | | | | | | Task-number: QTBUG-23272 Change-Id: Idcdb9620910577b3c0fc9a792a0446665bd2eab6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove xlib plugin.Robin Burchell2012-03-2727-6172/+0
| | | | | | | | | | | There's not much point having this with the xcb plugin being present, and xlib is pretty much unmaintained / broken anyway. Task-number: QTBUG-24913 Change-Id: I090a9a0e6d2f893c030574e23f1d59f610282bd3 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* XCB: Simplify xcb error handlingUli Schlachter2012-03-274-132/+41
| | | | | | | | | | | Instead of getting errors just to feed them to the default error handle, the corresponding unchecked request is used which automatically makes errors go to the default error handler. Change-Id: Ib213a860affb72de6f9896f68505e283a809d58f Signed-off-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Implement application font loading for WindowsMiikka Heikkinen2012-03-274-28/+177
| | | | | | | | | | | | | | | | | For FreeType Windows font database, use the application font loading implementation of the parent class. For native Windows font database, the implementation was adapted from Qt 4.8. Also fixed a bug in font database population, where old data was not destroyed before population, resulting in fonts not getting properly repopulated when a new font was added. Task-number: QTBUG-24193 Task-number: QTBUG-24195 Task-number: QTBUG-24196 Change-Id: Ie224a87baf7500b9867aaafa807f62dd4503dee8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Introduce FontSmoothingGamma as a platform style hint.Friedemann Kleint2012-03-273-12/+20
| | | | | | | | | | - Allocate gamma tables on the heap in a thread-safe way, use font smoothing returned by the style hints of the platform to calculate them. - Improve font rendering on Windows. Change-Id: I8cd39b51cf03cbd642474c02b9076814baecd597 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix IAccessible2 for Windows, enable MSAA/IAccessible for MinGW.Jan-Arve Saether2012-03-272-5/+3
| | | | | | | | | | | | | | | Commit 5e9089135bfe7db7d7a43c9ee4d4c24ab8f6458d had some problems: * It left out the cast to IServiceProvider in the refactoring of QueryInterface. This broke IAccessible2. * It also failed to enable the codepath for MinGW inside wrap(), which effectively caused MSAA for MinGW to be disabled. It also adds an autotest to the bridge (finally). It is simple, but it should help avoiding committing stuff that completely breaks the bridge. Change-Id: I459d89c3bdb93e54ddea85872b50fc1dba0fe4a0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Cocoa: silence warning about QCocoaWindow member initialization orderBradley T. Hughes2012-03-271-1/+1
| | | | | | | | | | qcocoawindow.mm:99:7: warning: field 'm_glContext' will be initialized after field 'm_inConstructor' [-Wreorder] , m_glContext(0) ^ Change-Id: I9e090ddeeaeea581b480b2e7b2b99360062c0632 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Cocoa: initialize QCocoaEventDispacherPrivate::lastSerialBradley T. Hughes2012-03-261-0/+1
| | | | | | | | This silences warnings from valgrind about a conditional depending on an uninitialized value. Change-Id: I819a44ed5dc02e163c00849811870c94f66b6651 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cocoa: Remove unused qt_mac_is_sheet() functionBradley T. Hughes2012-03-261-11/+0
| | | | | | | | The static qt_mac_is_sheet() function in qcocoafiledialoghelper.mm was not called anywhere, remove it. Change-Id: I88785e15aa17ae9c9ffbc33eba30433c8834b798 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cocoa: silence warnings about unused variablesBradley T. Hughes2012-03-265-2/+5
| | | | | | | | Silence warnings about unused function parameters and local variables while building the Cocoa platform plugin. Change-Id: I6aedc4cb21c5fb48d2d6e501561473d3f7112aed Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cocoa: silence warnings from QCocoaBackingStoreBradley T. Hughes2012-03-261-16/+1
| | | | | | | | Remove unused (and misspelled) flipedRect() function, as well as several unused variables. Change-Id: I48a5bf2eaad67686f60523a5c22262cad5314128 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cocoa: QCocoaWindow::clearNSWindow() needs to cleanup properlyBradley T. Hughes2012-03-261-1/+3
| | | | | | | | | | | clearNSWindow() should also clear the delegate and remove the contentView from the window, since we are no longer using that window. Make sure the QCocoaWindow::~QCocoaWindow() doesn't release the m_contentView until after clearNSWindow(), to avoid crashes while trying to cleanup the window and view. Change-Id: Ia081488f629a4fd4cf10fb1053fb8183b1914d35 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cocoa: don't show window when calling raise()Bradley T. Hughes2012-03-261-2/+6
| | | | | | | | | | | Calling raise() on a hidden window should not show it. The setVisible() function will ensure that the window is raised (since we use orderFront or makeKeyAndOrderFront). This fixes the failing tst_QDockWidget::task169808_setFloating() test as well. Task-number: QTBUG-24774 Change-Id: If34472ebbcd615c10654efafd54c84c03d10bc8c Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cocoa: reimplement QPlatformWindow::setOpacity()Bradley T. Hughes2012-03-262-0/+7
| | | | | | | | Qt and Cocoa opacity levels are compatible, so we just need to forward the setOpacity() argument to [NSWindow setAlphaValue] Change-Id: I5fd5678894fd6949811ad1c4b493e592561f01f6 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Remove dummy impl. of shared graphics cache in XCB pluginEskil Abrahamsen Blomfeldt2012-03-267-1279/+2
| | | | | | | | | This implementation was disabled and didn't really work properly, so it doesn't make sense to update or do bug fixes to it. Removing it completely instead. Change-Id: I62abe35f0f9a91bb207b87296d25c3c62d58228e Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Cocoa: reimplement QPlatformBackingStore::scroll()Bradley T. Hughes2012-03-262-0/+13
| | | | | | | | Use qt_scrollImageInRect() from QtGui to accelerate scrolling in the Cocoa plugin. Change-Id: I8ad1377ed3307345f72d17c72049cec5472c97d3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cocoa: send key events for modifier keysBradley T. Hughes2012-03-261-0/+37
| | | | | | | | Implement -flagsChanged: in QNSView so that we can calculate the necessary modifier key events to send. Change-Id: I3de89537d6e22b4a6d69ae646a71d9722dd9f82a Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cocoa: keep a NSWindow pointer in QCocoaWindowBradley T. Hughes2012-03-261-1/+1
| | | | | | | | The NSWindow we create could either be a QNSWindow (our NSWindow subclass) or a QNSPanel (our NSPanel subclass). Change-Id: I6e5c18328bf0fd1786a042d1fddc5b3e8be17f89 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fix qtnamespace compile break on Mac.Sarah Smith2012-03-266-6/+18
| | | | | | | | | | | | | | | | | Appears as though the QT_NAMESPACE macros are incorrect here. In fact in qisenum.h because the #define is no respecter of a namespace in most of these conditional compile cases they will be ignored effectively. The QT_HEADER also - if qtypetraits.h conditional compile occurs then it will result in adding extern "C" { twice. For the macros invoking them will not cause the extern "C" { to be used anyway, so just remove this altogether. Task-number: QTBUG-24903 Change-Id: I710dc330f58357f395241a0cf3172e41a5864576 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Glenn Watson <glenn.watson@nokia.com> Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
* Use XCB_TIME_CURRENT_TIME instead of CurrentTime from X.h in xcb plugin.Samuel Rødal2012-03-241-1/+1
| | | | | | | | | | The less X header dependencies the better, we might at some time in the future be able to do without the XCB_USE_XLIB define as well. Change-Id: Ib45986036febef70798851ee8455e054eafc9d22 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jan Arne Petersen <jpetersen@openismus.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix building the XCB platform pluginThiago Macieira2012-03-241-1/+2
| | | | | | | | The dlxxx functions are in libdl and the xcb_shm functions are in libxcb-shm. Change-Id: I412e1df4dc2939b7dac4f6b244c46e23c79da630 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Enable IAccessible for MinGW32, keep IAccessible2 disabled for MinGWJan-Arve Saether2012-03-246-93/+154
| | | | | | | | | | | | | No surprise, the files generated by midl contains code that only the MS compiler will understand. However, since the generated files are only needed for IA2, we can still compile the old IAccessible/MSAA implementation for mingw (like it was before the introduction of IA2) I used mingw 4.6.1 to test this. Change-Id: Iad581f2fee087bd7b796ac5a01548f2fcacbd595 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* API cleanup: remove CoordinateType enumJan-Arve Saether2012-03-242-4/+39
| | | | | | | | The bridge can do the mapping to and from screen position. This is now done in the windows bridge. Change-Id: I5ca5df0fbeeb58202539f55a0f62717fb1685092 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* xcb: fix (negative) coordinate handlingMarc Mutz2012-03-241-5/+7
| | | | | | | | | | | | | | | | | | | | For some reason, XCB accepts positions as unsigned integers, even though the X protocol explicitly allows negative values (windows overlapping the left/top screen border). After discussion with Samuel and Laszlo, use a reinterpret_cast to convert from the signed representation to the unsigned one. I also extended the clipping of the extents to the position. I guess if X can't handle widths beyond XCOORD_MAX, it won't be happy with x-coordinates exceeding that limit, either. Change-Id: I2fa0e61f823b6cd45dad6471eaa55f38bb3c3e52 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Make QEglFSBackingStore use QtGui-only APIs.Samuel Rødal2012-03-233-55/+43
| | | | | | | | | We now have better replacements for QGLPaintDevice etc. Change-Id: I3ac563f0ac26a563b3c788d16c77e0237d9d96d9 Reviewed-by: Donald Carr <donald.carr@nokia.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com> Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
* Initial implementation of QQnxServicesRafael Roquetto2012-03-235-0/+176
| | | | | | | | | | Extends platform services for QNX devices. Change-Id: I1eb685cdb38591cd73eaaf40ffb5691db0142953 Reviewed-by: Jeff Kehres <jkehres@rim.com> Reviewed-by: Sean Harmer <sh@theharmers.co.uk> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Implement QSystemTrayIcon for X11.Friedemann Kleint2012-03-231-0/+1
| | | | | | | Reimplement using a QWidget. Use X Change-Id: I7f8326598fb7210d59bc1d682cdada4526d5b6dd Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Check if Qt::ImEnabled is true before handling im events on MacTasuku Suzuki2012-03-233-17/+60
| | | | | | | | | | Key events were not sent to items on graphics view after the change 412dbdf410c765e75c60d1f48143dd6c02a69493. This is because the change only checks if QGuiApplication::focusObject() exists. Qt::ImEnabled needs to be checked too. Change-Id: I2a78af717a7a1a5d84fbc8b521253bdc25b43286 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cocoa: Add window fullscreen button on OS X Lion.Morten Johan Sorvig2012-03-231-0/+9
| | | | | | | | | Use the heuristic that windows that are not an NSPanel and has the MaximizedButtonHint get the fullscreen button. Change-Id: I9a3520b7e4cd1833421d5d2f5b73da7edbfc3e74 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Add QPA readme.Morten Johan Sorvig2012-03-231-0/+49
| | | | | | | Change-Id: Ibc3a95f3560af909a45d147098184c2194187932 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fix compilation: std::min is in <algorithm>Thiago Macieira2012-03-221-0/+1
| | | | | Change-Id: I89227bb9fca0f081a232c2ede10c4d455edb2ee9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fixed QScreen::name() return value on xcb.Samuel Rødal2012-03-221-1/+5
| | | | | | | | Previously the primary sceen number wasn't stripped before adding the actual screen number, resulting in names such as ":0.0.0". Change-Id: Ifbcf12dcf1c200fd6bc5e4b95a5d82483957e0d2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Make QNX virtual keyboard handling main event loop drivenKevin Krammer2012-03-222-90/+92
| | | | | | | | | | | | Refactor from polling in an endless loop running in a separate thread to using a QSocketNotifier working on the main thread. Similar to "de-threading" of the navigator event handling in 9dc86ac0f2d019f93665c1ae0e3c2cd33fd88bce Change-Id: I994dceed07312a3846737c8bea34cffa4ab408f1 Reviewed-by: Sean Harmer <sh@theharmers.co.uk> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Fix QSysInfo::WindowsVersion checking (QSysInfo::WV_NT_based is a mask)Joerg Bornemann2012-03-221-2/+2
| | | | | | | | Manual merge of the original fix 1ef309e9 in the Qt 4.8 repo. Task-number: QTBUG-20480 Change-Id: Id08500c2dd16965af3942e65cff1f4afa24180b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Cocoa: fix setting color with alpha channel value for color dialogTeemu Katajisto2012-03-221-0/+5
| | | | | | | | | | | Make sure that if ShowAlphaChannel option is set then also setShowsAlpha needs to be set for the panel before setting the current color, otherwise alpha channel value is omitted. Task-number: QTBUG-24320 Change-Id: Ifb3822711af8ffd0cf6cb4c8aab2b0020d296663 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Need to check new rotation against initial rotation instead of currentKevin Krammer2012-03-221-1/+1
| | | | | | | | | Only swap width/height of initial geometry if orthogonal to initial rotation not orthogonal to current rotation Change-Id: I825954e98dee6c0d07a284307dfb8e1f9fd538e6 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
* Use delete[] instead of delete.Sergio Martins2012-03-221-1/+1
| | | | | Change-Id: Idfa039a56ce0f7af92e91ec1657d91c79c400d6c Reviewed-by: David Faure <faure@kde.org>
* Use main thread event loop for navigator event processingKevin Krammer2012-03-215-72/+55
| | | | | | | | | Removes the need for an extra thread by creating the event handler's socket notifier in the context of the main thread. Change-Id: If8c7bb986074083b5b9a7b9c96734a970ba32f92 Reviewed-by: Sean Harmer <sh@theharmers.co.uk> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Cocoa: improve mouse button tracking warningsBradley T. Hughes2012-03-211-5/+5
| | | | | | | | | | The warnings about "Internal mouse button tracking invalid" should check for the correct button before emitting a warning. The warning should also mention the correct button as well. For otherMouseDragged, we simply check for any button that's not the left or right button. Change-Id: I9eb6d6bd7fb5919e745b7f8eb517b4bc9efd36a6 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cocoa: Improve window activation handling.Morten Johan Sorvig2012-03-213-5/+15
| | | | | | | | | Make Qt window activation follow the Cocoa key window, with one exception: Popup windows become the key window but not the Qt active window. Change-Id: Ic4d8685737fa3ec5c15a68b81844929370c9cd8e Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Cocoa: Implement screen availableGeometry.Morten Johan Sorvig2012-03-212-2/+8
| | | | | | | | As usual the y coordinate needs to be inverted. Change-Id: Iac9b48f9bdb475a3d5a76b930c2e138a625f1ef8 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Cocoa: fix inactive palette text colorBradley T. Hughes2012-03-211-9/+10
| | | | | | | | | The QPalette::Inactive text color should be the same as kThemeTextColorDialogActive. kThemeTextColorDialogInactive is for disabled widgets/windows. Change-Id: I55eb63fff213cb9870a991455cbc3254b9d1538e Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* EGLFS: Integrate building into configure.Donald Carr2012-03-211-0/+4
| | | | | | | | | | With the move to the QPA architecture EGL is now only required by individual platform plugins and the configure script has been adjusted to reflect this. Change-Id: Ieadacef0b970f29752d9e3e36a007e5cbb005b0d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Avoid Qt/X11 header contamination via egl.hDonald Carr2012-03-201-0/+3
| | | | | | | | | egl.h on certain platforms directly includes X11 headers, resulting in an all too familiar header conflict. There are existing defines we merely need to set in order to avoid this eventuality. Change-Id: Ic91b66286ad6cc329f9c88b5e47834690a8eb96a Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add egl include paths and link lines to eglfs.Girish Ramakrishnan2012-03-201-1/+1
| | | | | | | | This is the equivalent of 821fc4cf4e520a74b8d4c834f2fb46e4e2f27001 from qt4 but done differently because qt5 has egl.prf. Change-Id: I52114239bdeda6c300db04a7859cae52aa9e9b41 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Cocoa: Panels can become key windows too.Morten Johan Sorvig2012-03-201-1/+7
| | | | | | | | | | The cocoa plugin uses NSPanel instead of NSWindow for popup-type windows. With the exception of tooltips and splash screens these windows should take input focus as well. Change-Id: Icdf0854e7c511ccc106e035dae4763ae90c23aa5 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Cocoa: set font engine glyph format based on display typeBradley T. Hughes2012-03-202-4/+4
| | | | | | | | | Make the QCoreTextFontEngine::glyphFormat depend on the primary display's subpixel layout (if any). This change also refactors the antialiasing threshold setting to live beside the defaultGlyphFormat. Change-Id: I27f94f775d91d2a68cd647cc24503b31b6ff5e61 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>