summaryrefslogtreecommitdiffstats
path: root/src/plugins
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Mac: Ensure the native filedialog sets file name when savingLiang Qi2013-04-091-2/+2
| | | | | | | | | | | | The name field string was not set in native dialog when one was present. The previous fix is not correct. In the doc of setNameFieldStringValue, it said "The value must not be nil". Task-number: QTBUG-28342 Change-Id: I847fb7472b8fecc0303433d8bf72b6a5bd7da72b Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* OSX window: set QWindow geometry after native window is createdShawn Rutledge2013-04-091-2/+1
| | | | | | | | | | | | | | | Initial window position is at 0,0 by default, then it's corrected in createNSWindow (by calling initialGeometry). After window creation, QNSWindowDelegate will receive the windowDidMove notification and call QCocoaWindow::windowDidMove() which then calls QNSView::updateGeometry(). It will not call QWindowSystemInterface::handleGeometryChange() because the window is still being constructed. So we can fix this by directly setting QWindow::geometry in the QCocoaWindow constructor. Task-number: QTBUG-30382 Change-Id: I3db7a6e83693e5787ae82dcab1767de938d2e5d1 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Mac: Return Qt::Key_F9 for F9, not Qt::Key_F8hjk2013-04-091-1/+1
| | | | | | Task-number: QTBUG-30520 Change-Id: I7006e43ea638796045925e753a2ef8f9d0a066e9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: Properly clean window mask dataGabriel de Dietrich2013-04-082-4/+6
| | | | | | | Also, get rid of qt_mac_toCGImage and QPainter warnings. Change-Id: I9e2a0e93d74c318d99651de9222994615e082ac9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Make QTextCursor accessibility boundary finder availableFrederik Gladhorn2013-04-085-92/+29
| | | | | | | | | This allows re-using the function in QtQuick. In addition TextBoundaryType is moved to QAccessible and QAccessible2 as namespace ceases to exist. Change-Id: I184bc2c181a22ca51ac4db4e5a080dc26d4acfe0 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Mac: a dialog should have a titlebar by defaultShawn Rutledge2013-04-081-2/+5
| | | | | | | | Change 595deca5 for QTBUG-22316 resulted in having titlebars only on modal dialogs. Change-Id: Ic23c957e0e95cf567d90831e105cc402465df982 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Android: set logicalDpi based on DisplayMetrics.scaledDensityPaul Olav Tvete2013-04-055-2/+24
| | | | | | | | | | | | | | The mathematically correct way would be to set logicalDPi to 160*scaledDensity, but then a 12 pt font would be gigantic. On iOS, we use a factor of 72 to be compatible with the native APIs, but that means that a 12 pt font is very small. A factor of 100 means that desktop apps look reasonable by default. Task-number: QTBUG-29674 Change-Id: I607f110150fb95685a6980b92f6f92f2b489f959 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* EglFS: allow the hook to override logicalDpi()Paul Olav Tvete2013-04-054-0/+18
| | | | | | | | Task-number: QTBUG-29674 Change-Id: Id88a8735ceb7f5bcb63344b3b0653486a6caa70d Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Windows: Ignore mouse events generated by Windows.Friedemann Kleint2013-04-051-1/+5
| | | | | | | | Task-number: QTBUG-29946 Change-Id: Idef0e7cc8bc407377e60e4a9d67c3ba78b347b76 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Windows: Do not use native dialogs for non-modal dialogs.Friedemann Kleint2013-04-051-4/+2
| | | | | | | | | | | | Windows file dialogs are always modal (inheriting IModalWindow). As the QtQuick dialog plugin has a widget-based fallback now, there is no need to use native dialogs for the non-modal case. Task-number: QTBUG-30513 Change-Id: I8b62af86fde34e8c0cf5e917d2e62260e16c82fb Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* The default behavior should be double buffered, not singlebufferedGunnar Sletta2013-04-051-3/+2
| | | | | | | | | Without this, it is not possible to do vsync drawing on NVidia GeForce 210 on Windows 7. Change-Id: I6064826eaa55266344393f50cdf5d17113350255 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* iOS: Fix build on case sensitive file systemsTor Arne Vestbø2013-04-041-1/+1
| | | | | Change-Id: I920e7320e429006aef9433db3e942dc257dc72eb Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Handle UIDeviceOrientation vs UIInterfaceOrientationTor Arne Vestbø2013-04-043-3/+3
| | | | | | | | | | The former represents the physical device orientation, the latter the UI orientation. We need to explicitly cast between them, as they are different enums, but with compatible values for the subset we use. Change-Id: I2926068802f35680cb6de5ced6dcf286014fdb2e Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Fix warning: qt_setDockMenu not foundFrederik Gladhorn2013-04-041-0/+1
| | | | | | | | | | | | qcocoanativeinterface.mm:196:5: warning: instance method '-qt_setDockMenu:' not found (return type defaults to 'id') [-Wobjc-method-access] [NSApp QT_MANGLE_NAMESPACE(qt_setDockMenu): menu]; Change-Id: I80838d0098e7f172d9b8124f04e91dba64764318 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Android: Don't show '&' character in menusPaul Olav Tvete2013-04-041-6/+23
| | | | | | | | | Strip out shortcut indicator before showing the text. Task-number: QTBUG-30507 Change-Id: I8fa2ef8a2052f4c43d14b3babfd5aca0a08e29d5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* QPA/Mac: Fix resources leakingKonstantin Ritt2013-04-033-7/+13
| | | | | | | | | | | Having static QFont instance leads to a resources leaking, since QFontCache is unable to clean-up font engines when the application exits. Relates to QTBUG-25434 Change-Id: I71d91094de27c07ab2434c415e4c28b6acab3646 Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2013-04-032-4/+12
|\ | | | | | | refs/staging/stable
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-04-032-4/+12
| |\ | | | | | | | | | Change-Id: Icedabda08961326a0a447ec71f1b0f0f5df075eb
| | * Windows: Fix reported screen metrics.Friedemann Kleint2013-03-262-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | A call to SetProcessDPIAware() is required in some cases. Task-number: QTBUG-30063 Change-Id: Iba0203d76c8e7068bf9fd4581770c1aca76a4708 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | | If the menu item is merged then we should not release itAndy Shaw2013-04-031-2/+2
|/ / | | | | | | | | | | | | | | | | | | When a menu item is merged then we do not want to release it as it will cause a problem with the Application menu. Therefore we just hide it instead. Change-Id: Ia9f7acfe063001111769841c9a360cac369f7ed7 Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | Correct location of mtdev define.Robin Burchell2013-04-031-1/+1
| | | | | | | | | | | | | | | | evdevtouch moved to platform support, so the location in the plugin is now wrong (as was the file name) Change-Id: I976f5d7ee68f5da5ed1f61773b3d5da683e12c6f Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | Move the dbmstype to QSqlDriverPrivate so it can be used for all driversAndy Shaw2013-04-021-1/+1
| | | | | | | | | | | | | | | | | | By moving it to QSqlDriverPrivate we make it easier to check what database is actually connected which is particularly useful for the autotests. Change-Id: I54d1c2c998919c1d54efb1b6ac9303070ece54aa Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* | Cache QAccessibleInterfaces.Frederik Gladhorn2013-04-0221-443/+598
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since there already is a one-to-one relationship between QObject and QAccessibleInterface it makes little sense to create and destroy the interfaces on each call to queryAccessibleInterface. Add a cache and keep created interfaces around for the lifetime of the corresponding QObject. This changes the memory management rules: accessible interfaces must no longer be deleted. If you get an QAccessibleIntrface pointer that pointer will stay valid as long as the corresponding QObject is not deleted. This also re-enables accessibility for Mac. We limit the range of the IDs so that they are useable for Windows directly. That means we can get rid of the event cache there. This is based on: Iebf2f374916fc70a9dd29e95f45a6444b85f6cee Change-Id: I9fe6531812c0dbc5b41101ac05830a6dd75e13a3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | Let EglFS pick up a platform input context if installedGunnar Sletta2013-04-022-0/+7
| | | | | | | | | | Change-Id: Ia3765997682f8f90c7f7da712527beea365e01ed Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | Fix reporting writing systems for non-TrueType fontsKonstantin Ritt2013-04-012-68/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to EnumFontFamExProc docs: > The ENUMLOGFONTEX structure includes the localized name > of the script (character set). lfCharSet ENUMLOGFONT's member must be used instead of comparing these names to non-localized ones. Also, when the font supports more than a single charset, EnumFontFamExProc callback is called for it once per charset; thus, we shouldn't "unsupport" writing systems in a subsequent call. Task-number: QTBUG-30448 Change-Id: I58fcf32958490cf5a3e873db8335e71a39a9c518 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | QFontConfigDatabase: fix fallbacksForFamily() for CJK languagesKonstantin Ritt2013-04-012-2/+2
| | | | | | | | | | | | | | | | | | | | For Han Unicode script, the language couldn't be determined algorithmically, the only way is guessing based on the user's locale. The is a regression introduced in 9b0fab6b62df98519ebfab117f14b9d3465d8c68 Change-Id: I84645885a825fdfb6c268edaf10185bf5e447eb5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Remove unused header file.Gatis Paeglis2013-03-301-2/+0
| | | | | | | | | | | | | | | | As Thomas Senyk found out, the compose input context plugin had a redundant include for the X11 keysym header file. Change-Id: Iad603b545803867d02d915acffe27991bb0b7ee4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Mac style: Fix disabled menu item palette entryGabriel de Dietrich2013-03-291-1/+2
| | | | | | | | | | | | | | Also, removed an "magic color" form the style implementation. Change-Id: Iefd3ddc0d9d651d2b87f20eb1f9990a214b651df Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Make qt_setDockMenu work and call it.Morten Johan Sørvig2013-03-292-6/+3
| | | | | | | | | | | | | | | | | | The application delegate code from Qt 4 implements a non-working qt_setDockMenu. Correct the signature of the applicationDockMenu method. Change-Id: I6f531a78f91e0550b0e66cc4f2fa072006a030f4 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Remove QMacQuartzPaintDevice.Morten Johan Sørvig2013-03-291-39/+0
| | | | | | | | | | | | | | Not used in Qt 5. Change-Id: Ia0e14414afa524c5cc04151d20c168d93d8dcadb Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | QCocoaScreen: Properly align secondary screens w.r.t. primary screenGabriel de Dietrich2013-03-271-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | When using different resolution screens, one can arrange them around the primary screen. However, the vertical offset has to take into account the fact that NSScreen origin is bottom-left, whereas QScreen origin is top-left. This usualy impacts the geometry's y coordinate, and can result in popups showing in the wrong screen. Task-number: QTBUG-30348 Change-Id: I159e6be2b590bd2d9a31f3f36c3785afcc62123e Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Allow tslib to be specified at configure time.Michael Brasser2013-03-261-0/+4
| | | | | | | | | | Change-Id: I0ebf0eeea7e6a0b8136fb805f34f04082bc58c5e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Cocoa: Make touch events work again.Morten Johan Sørvig2013-03-264-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring back the ref-counted enable on enter/leave workaround we had in Qt 4: If any widget in a window sets WA_AcceptTouchEvents then that window will start processing touch events. Enabling touch events has implications for delivery of other events, for example by causing scrolling event lag. Change-Id: I307488937f417612eff624bf9892b82a7f69c1b7 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Cocoa: Correct enter/leave event handling.Morten Johan Sørvig2013-03-263-4/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make top-level windows generate enter/leave events for sub-windows. Keep track of the current "under mouse" window in mouseMoved and send EnterLeave events when it changes. mouseEntered/mouseExited handles enters and leaves from the top-level window. Add tests/manual/cocoa/nativewidgets. Task-number: QTBUG-27550 Task-number: QTBUG-29751 Change-Id: If4b9f9e0f39d9fb05fdab45a100ffdcf107965ad Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | QNX: Code cleanup: normalize 'if' macro usageRafael Roquetto2013-03-2627-41/+41
| | | | | | | | | | | | | | | | | | Always use "if defined" instead of "ifdef". The same is valid for "ifndef" macros Change-Id: I8e8f65e36dc636c10b3d656ce9a89ab3a664a80b Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | Fixed shortcuts for some (e.g. Russian) layoutsCyril Oblikov2013-03-261-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | If CMD modificator is active [nsevent characters] is used now to get keyCode. In this case for example English "X" is returned instead of Russian "Ч" even if Russian input source is selected. Task-number: QTBUG-30306 Change-Id: I93cd292633e68327df0c580ed74fe8ad1c9ed27d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* | Clean up touch window registration.Friedemann Kleint2013-03-252-7/+16
| | | | | | | | | | | | | | | | | | Stop processing for Qt::Desktop windows (which caused RegisterTouchWindow() to fail with access denied) and set a flag to cleanly unregister. Change-Id: I3d10c93ec92536d3ab1c0503f088c40b0c08a01f Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | OSX: WindowTransparentForInput QNSView pass events to next responderShawn Rutledge2013-03-241-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default implementation (in the super class) passes the event to the next responder. This seems to be one valid way to handle the Qt::WindowTransparentForInput flag. So if a non-alien widget for which a native NSView is created has the flag WA_TransparentForMouseEvents, that means the window will have Qt::WindowTransparentForInput, and the NSView which is created on its behalf will pass on each event so that other NSViews have a chance to handle it. (It will also try to reject becoming first responder, but that doesn't seem to be enough for the following events to be passed on.) This is a followup to I979be9f72f7d225d7b960fc5db4c3956d2749982 which purported to obey the WindowTransparentForInput flag, but actually doesn't. Change-Id: Ia72a3573c2e3cbfa7ede70bee41ac36df6924598 Task-number: QTBUG-28816 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | Guard usage of [NSApp setDockMenu].Morten Johan Sørvig2013-03-241-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | setDockMenu is not documented an may disappear. Closest documented replacement seems to be [NSApplicationDelegate applicationDockMenu:]. It can't be used as a direct replacement since it's a "virtual" getter that the application delegate implements. Change-Id: Id161196018057b75cbe7d6f6d2610c0932345c5f Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Use [NSSavePanel directoryUrl].Morten Johan Sørvig2013-03-241-1/+1
| | | | | | | | | | | | | | [NSSavePanel directory] is deprecated. Change-Id: I3515b565a25028dc5b7c966481707e001e44a077 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Call [m_qtView hasMask]Morten Johan Sørvig2013-03-241-1/+1
| | | | | | | | | | | | | | | | hasMask is a function on QNSView, m_contentView can be any NSView subclass. Change-Id: I88b5acbb8aad9aa4664e0f71f37add9dfa64f1b7 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Remove unused variables in the Cocoa pluginMorten Johan Sørvig2013-03-242-2/+0
| | | | | | | | | | Change-Id: I7cdd369e2fbab02954da6ba3c05b31d93f1e7995 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Accessibility: Fix crash when updating in dtorFrederik Gladhorn2013-03-232-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This happens for example when running several tests. Widgets in destructor should be treated as invalid since their window pointer and other properties are no longer valid. When deleting a window containing only a table view there would be a table model reset update comming from the window being destroyed. Change-Id: Ia387c814333ce373fe132b189fc180787e36cdd5 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Accessibility: Fix crash in windowHelperFrederik Gladhorn2013-03-233-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When accessing the parent, we cannot be sure that the parent interfaces are all valid. Invalid parents can happen during destruction. Another cause is unusual hierarchies, the QAbstractItemView::columnDelegate test triggers a situation where this used to crash. In addition to the actual problem, add checks for every parent() call. Change-Id: I70b2bf7bc3c02b0f33e22b81023fd24519adeba9 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>