summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* Accessibility: Menu item should keep track of owner being validFrederik Gladhorn2013-04-232-2/+3
| | | | | | | | | | | The QAction may stay around while the parent/owner gets deleted. This is for example the case for some dynamically created menus. This is required for fixing QTBUG-30792 Change-Id: I7b6122edec6def69aed77502403134e1568e21c9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Return GroupRole for unknown accessibility roles.Morten Johan Sørvig2013-04-231-2/+5
| | | | | | | | | UnknownRole draws attention from the screen reader and makes it focus on the unknown item. GroupRole is ignored and passes focus to child items. Change-Id: If7b4cd9ec02b1890929a709b84d897f452c39587 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Accessibility Windows: always check for negative child idsFrederik Gladhorn2013-04-222-26/+21
| | | | | | | | | | | Some screen readers will pass in child id's that are negative as response to notifications. We should always check for negative id's on incoming calls. Task-number: QTBUG-30792 Change-Id: Idaba3d1931d35ed068cfd9f20e70aa26da427616 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Accessibility Mac: Implement accessibilityFocusedUIElementFrederik Gladhorn2013-04-221-0/+18
| | | | | | Change-Id: I17b5b1f741a8b340d8f4b16f4ec39cc9a8159bfa Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Read correct font hinting config on Gnome/UnityEskil Abrahamsen Blomfeldt2013-04-224-8/+49
| | | | | | | | | | | | | Fixes regression against Qt 4. This tries to recreate the logic from 5c46d9a4c85abbcc0b5db2bbbafded3efd784cd9 in Qt 4, where we on Gnome would override the default hint style specified in FontConfig with Xft.hintstyle settings. This is the configuration used for changing the hint style in the Gnome Tweak Tool. Task-number: QTBUG-29582 Change-Id: I6b9fe2c8ff55ff080d034e5a53fc8cbb49f7651f Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Revert "Don't warn on 0x0 sized windows."Morten Johan Sørvig2013-04-221-1/+1
| | | | | | | | This reverts commit 88272d6c04f0f67fa9612dc7bdb2a5f8ba8d0314, which accidentally re-introduced a crash. Change-Id: Ie60bcf55f940b24f982eed4f20c6af3320b040a7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: don't delete m_touchDevice, QPA takes ownershipRichard Moe Gustavsen2013-04-222-6/+0
| | | | | | | | | | | | When registering m_touchDevice with QWindowSystemInterface, it will also transfer ownership to it. It will eventually be deleted in clenupDevicesList on qtouchdevice.cpp. This patch will also stop the app from crashing when telling it to quit. Change-Id: I97070efdf16b4db7d076935fbec62e60f094a7df Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Convert the CGImage into a QPixmap after reading from clipboardAndy Shaw2013-04-221-4/+2
| | | | | | | | Now that the relevant function is available we can do the conversion inside QMacPasteboardMimeTiff when obtaining an image from the clipboard Change-Id: Ie41b0fffedf4dd3f8ef49431482bd075a69722b1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Implement QApplication::beep().Friedemann Kleint2013-04-193-0/+19
| | | | | | | | | | Invoke slot "beep" on QPlatformNativeInterface. Implement for Windows and X11. Task-number: QTBUG-30416 Change-Id: I2be651165b899e5147818a012001d354827bb090 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Implement alertion state for windows.Friedemann Kleint2013-04-194-2/+35
| | | | | | | | | | | | | | Add QWindow::alert() and QPlatformWindow::setAlertState(). Add logic to clear alertion state when the window becomes active. The platform plugins then only need to implement a setter and a cheap getter and need not handle activation. Prototypically implement X11 and Windows. Task-number: QTBUG-30416 Change-Id: Ia70c4722d812462a21f4034b7d52735c9f2bc49c Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Cocoa: Disable QTBUG-30266 hack in full screenGabriel de Dietrich2013-04-191-1/+10
| | | | | | | | | That would set the full screen window in a weird state, where is was full screen (but unable to exit that mode) and showing the title bar at the same time. Change-Id: I3ac913876f3b326504dd5af18c34181d002509d0 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Let platform plugin decide if accessibility is activeFrederik Gladhorn2013-04-194-12/+17
| | | | | Change-Id: I881a8ff3fedf3db73ee37046a4363c70960a92a6 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* iOS: use an explicit pointer to qiosViewControllerRichard Moe Gustavsen2013-04-197-7/+17
| | | | | | | | | | | | | As it stood, we always relied on the root view controller being a QIOSViewController if isQtApplication() returned true. For mixed application, this might not always be true as native code can choose to replace the root view controller at times, or even rip it out, and place it as a child of another (e.g UISplitViewController). This change will give an extra protection against that. Change-Id: I0cb85796a8b82f9037c32f9e85e04e1dc7aad8e2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Make qtbase compile with QT_NO_DRAGANDDROPTasuku Suzuki2013-04-193-0/+10
| | | | | | | Change-Id: Id1a74c6b22b388d20103b4e73f83c8345ec70ba6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Make password mask characters themeable.Mitch Curtis2013-04-191-0/+2
| | | | | | | | Task-number: QTBUG-29871 Change-Id: I3cf739a321d7917f8f8431992e29bba0871b1934 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* iOS: QIOSBackingStore: enable FBO depth and stencil bufferRichard Moe Gustavsen2013-04-191-1/+5
| | | | | | | | | | | | | | Unless we enable those buffers for the FBO that backs the backingstore, setting a clip region on an associated QPainter will not work. One apparent bug from this was the menubar. Without this patch it appeared to never be drawn. The reason was that we ended up drawing the menubar background over the whole menubar instead of inside the clip region. Change-Id: I25660cec6ce9e43fe4cd693127dca6afeb8dcf65 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix format for alpha drawing.Friedemann Kleint2013-04-181-1/+1
| | | | | | | Task-number: QTBUG-28531 Change-Id: Ie97953950cad26776724848adc5751c861903cf7 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Remove nativeResourceForWindow warning.Morten Johan Sørvig2013-04-181-3/+1
| | | | | | | | | | The warning is useful for pointing out the the return value will be null. However, code that correctly checks the return value (such as qt_macWindowIsTextured), still causes the warning to be printed. Change-Id: I3828992b3d5e7b08451cf0e051b937fa9d9536d3 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Mac: Fix various memory leaksGabriel de Dietrich2013-04-183-5/+7
| | | | | Change-Id: Id554be11ffcf9a506c217b0dc5b96cb37c4dd57c Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa Menu: Remove unnecessary retain, release/retain in the right orderGabriel de Dietrich2013-04-181-5/+2
| | | | | | | Also, make sure platform menu item is deleted on ActionRemoved event. Change-Id: Ic07a81cb77833bdffd1464abf1c81ebdee4d16e9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Android: Don't crash when displaying multiple top-levelsEskil Abrahamsen Blomfeldt2013-04-187-33/+108
| | | | | | | | | | | | | | | | | | | | | | While the raster platform plugin supports multiple top level windows, this is not supported on the GL plugin, so if you use GL or QtQuick2 in your app and use several top levels, the app would crash with an error message. A problem is that the top-level SurfaceView is a special overlay View and does not support being stacked in a layout. So instead, we let all windows share the same GL surface and draw on top of each other. This works fine for simple use cases. We implement a new platform capability to make sure no top level windows (even combobox popups and dialogs) get non-fullscreen geometries. That has never worked properly with the eglfs plugin. Task-number: QTBUG-30473 Change-Id: Ia1438019638fc739cc93ffe79b46b81631254df2 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Calling wglMakeCurrent on an already current context gives 100% cpu loadGunnar Sletta2013-04-181-1/+9
| | | | | | | | | The problem occurs at least with nvidia cards when vsync is enabled in the control panel. Task-number: QTBUG-29686 Change-Id: I6fd2a3560a5baeeac7c3fe0440db85904c45026d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Do not send clipboard message to application under debugger.Friedemann Kleint2013-04-171-0/+20
| | | | | | | | | Fix Qt Creator hang when copying a stack trace from an application showing a runtime assert. Change-Id: I874bd48643ebce1a3551644dc850cb7cf5869522 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Windows: Fix compile with -directwrite.Friedemann Kleint2013-04-171-1/+1
| | | | | | | | Task-number: QTBUG-30643 Change-Id: I3a2a0e767a92bc2ff9d7d241dfad6771034e6ad4 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Correct dir entries caching in QFileDialogCyril Oblikov2013-04-171-10/+32
| | | | | | | | | | Using QFileSystemWatcher to update cache when directory is changed. It is needed to correctly filter files created after the dialog opening. Task-number: QTBUG-30604 Change-Id: I5479f9a54095de59ca2ba36b2bd4906de0907ac8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Fix typo in qWarning()Sergio Martins2013-04-171-1/+1
| | | | | Change-Id: I17aa0a1985c2da889bc602fd76dc07c890ed6f6b Reviewed-by: David Faure (KDE) <faure@kde.org>
* Cocoa: Fix menu popup, againGabriel de Dietrich2013-04-161-28/+38
| | | | | | | | This time, popUpContextMenu:withEvent:forView: wouldn't respect the menu's minimum width setting. Change-Id: I7731851f2cf45d596d45a24dab5abe7b9239f07f Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: Make sure no invisible proxy icon button is createdGabriel de Dietrich2013-04-161-0/+2
| | | | | | | | If the icon is null, don't force creation. Task-number: QTBUG-30064 Change-Id: If639714f667fedfcc67a3393a7d75111a7dbff3f Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* [QNX] Fix build/runtime if QT_NO_OPENGL definedAndreas Holzammer2013-04-161-2/+3
| | | | | | Change-Id: I38d511ac0a53b65abfe47baaa6333629df5b578d Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Accessibility Mac: Enable ignoring of childrenFrederik Gladhorn2013-04-162-4/+7
| | | | | | | | | | | | | The ignored children do not show up in the hierarchy, this should improve performance significantly. Previously the code would ignore the grouping property which seems to break QGroupBox. Change-Id: I4535af9c95bce76ded65f6d40fe07f17f3acffad Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* eglfs: Make sure virtual functions are not called from ctorEskil Abrahamsen Blomfeldt2013-04-152-5/+4
| | | | | | | We want to override some of them in a subclass. Change-Id: Ic7a22d7bc4589199b3f764157125094a4ff6ec28 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Make surface and window accessible to subclassesEskil Abrahamsen Blomfeldt2013-04-151-2/+4
| | | | | | | We need to access these in the Android plugin. Change-Id: I8c7f279bbe0b7087260cceb1f965c833c0097984 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Remove code for Android API level < 9Eskil Abrahamsen Blomfeldt2013-04-151-35/+2
| | | | | | | | We don't support API levels < 9, so we can simplify this code a little. Change-Id: I9823d4c5a44d265e03dec0ceedeeb3c34a1e1eab Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Add autorelease pool for cocoa plugin creation.Morten Johan Sorvig2013-04-151-0/+3
| | | | | | | Prevents mem leaks at startup on 10.6. Change-Id: I5f8b72c54ab396ee0ec2e47320163a6a342b78f1 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Add autorelease pools needed by Qt Creator.Morten Johan Sørvig2013-04-152-0/+4
| | | | | | | | With these Qt Creator startup is now warning-free on 10.6. Change-Id: Ie29d360611c0e516258920163e4e94d174217299 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Cocoa: Fix unresponsive main window after running more than one modal sessionGabriel de Dietrich2013-04-151-1/+4
| | | | | | | | | | | | | | | | For some reason, we postpone clearing the stack of modal sessions until we call processPostedEvents() again. However, it also means that when we clear the second modal session, that session keeps running although we just closed its window. The reason why it isn't stopped is because it wasn't the topmost modal session in the stack. This patch fixes the issue by stopping a modal session if any session above in the stack has been stopped. This makes it less problematic if we don't call processPostedEvents() in between ending modal sessions. Task-number: QTBUG-30504 Change-Id: I9f898250ae629947d066647f9d5a0b9f75cf0070 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Don't warn on 0x0 sized windows.Morten Johan Sørvig2013-04-151-1/+1
| | | | | | | | I don't think this is an user error. If it is then the warning should be in a cross-platform code path. Change-Id: I4c615d9b2372660bb03b17ccb25204b2a8d17b1a Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Cocoa: Fix popup menus on modal windowsGabriel de Dietrich2013-04-151-3/+33
| | | | | | | | | Previously, we used -popUpMenuPositioningItem:atLocation:inView: but this turns out not to work with modal windows. This can actually be reproduced in Cocoa. Change-Id: I9b750d1f97637f0cc30329d3da3acf5200f62206 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: Create QCocoaWindow when enabling touch.Morten Johan Sørvig2013-04-151-0/+5
| | | | | | | | The ref-counting and (native) touch enabling is implemented in QCocoaWindow. Change-Id: I4f3f5e16db59afec7dd7dd2f8360dd60b90bfe6d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Cocoa: Enable touch on 0->1 counter transition.Morten Johan Sørvig2013-04-151-1/+1
| | | | | Change-Id: I9d8fb84851a866c3020cbbca13d5b2dc297cfe65 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Add devicePixelRatio metric to QPaintDevice.Morten Johan Sørvig2013-04-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously QPainter computed the devicePixelRatio based on the physical and logical dpi, and expected that the ratio between them would be either 1x or 2x. This was problematic for paint devices like printers where the physical dpi can be much higher than the logical dpi, and also for QScreen where the physical dpi would have to be defined as a multiple of the logical dpi. Add QPaintDevice::PdmDevicePixelRatio and QPaintDevice:: devicePixelRatio() getter and implement it for the QPaintDevice subclasses. Use it when calculating the highdpi scale transform in qpainter.cpp and when scaling the clip rect in qwidget.cpp. Remove physical dpi scaling for QImage, QPixmap and QOpenGLPaintDevice, reverting to the old behavior. Change-Id: I6c97510613196d4536ff39d08e9750b8782283d4 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* QFontEngine: Fix cache_cost might be not initializedKonstantin Ritt2013-04-141-0/+1
| | | | | | Change-Id: I4cf4de5797e6623a71593e8f382496188e3abac8 Reviewed-by: jian liang <jianliang79@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QWindowsFontEngineDirectWrite: Fix resources leakingKonstantin Ritt2013-04-141-0/+2
| | | | | | | | | | | fontFamily has been acquired by IDWriteFont::GetFontFamily() and thus must be released with IDWriteFontFamily::Release(). Task-number: QTBUG-26861 Change-Id: I314153f97b8b59c9ba728220f93b493b13337039 Reviewed-by: jian liang <jianliang79@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* s/uint32_t/quint32/Tobias Hunger2013-04-122-6/+6
| | | | | | | | | uint32_t is in C++11, which we can not rely on being present. It is also in C99, but some compilers do not support that in C++ mode. Change-Id: I29bada724f5646a0a0562b3ab133cb49cf928d6d Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* Fix Windows CE compilation.Friedemann Kleint2013-04-121-7/+4
| | | | | | | | | | | | Breakage introduced by 11e9f1368be986d0e128e8f7b2423d9cc7dd5436 . Simplify #ifdef-blocks. Task-number: QTBUG-30063 Change-Id: I0710915ff7b0ad5947935904c43ff9b621f638f2 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Janne Anttila <janne.anttila@digia.com>
* Call QString::normalized when it is constructed via the native APIAndy Shaw2013-04-111-4/+4
| | | | | | | | | When a string comes from the native APIs then it may need to be normalized. Task-number: QTBUG-14787 Change-Id: I5164e80efcd1d99a50263c72bcf97d7fb31b38f7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QFreetypeFace: Fix getFace() uses UTF-8 paths on non UTF-8 localesKonstantin Ritt2013-04-112-2/+2
| | | | | | | | | | QFontEngine::FaceId::filename is intended to be local8Bit-encoded but QFreetypeFace::getFace() always treats it like UTF-8-encoded. Also replace explicit (to|from)Local8Bit and toLatin FaceId::filename conversions with QFile::(en|de)codeName, where appropriate. Change-Id: Ic7beabf0a160f2f02f1667bcb8e6067adaba1c16 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Windows: Dont use black as clear color on opengl windowsJens Bache-Wiig2013-04-101-4/+1
| | | | | | | | | | | Perhaps this made sense when all our open gl examples were black, but with components and I would assume the majority of use cases we should use the default window background color to fill exposed window background during a resize. Change-Id: Ia439a7c3919243efa6026e2e07bee62c25557df0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* QNX: Adjust rotation according to initial orientationRafael Roquetto2013-04-103-0/+14
| | | | | | | | Task-number: QTBUG-29201 Change-Id: I37e82904e0f3d8b372b31ee7d1379e61c788c622 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
* Fix access to invalid memoryKai Koehne2013-04-101-1/+2
| | | | | | | | | QString::toLatin1() creates a temporary QByteArray. Task-number: QTBUG-30578 Change-Id: I17c60bbade1486399f745c7e9878c6467971e6cc Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>