summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoaintegration.mm
Commit message (Collapse)AuthorAgeFilesLines
* QGuiApplication, platform plugins: don't modify AA_DontUseNativeMenuBarShawn Rutledge2016-09-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The default should be false, meaning the application will prefer to use a native menubar if the platform supports it. The application author can set it to true if he wants to always use a Qt-rendered menubar instead; or, he can call QMenuBar::setNativeMenuBar(). Qt and its plugins should not override the author's wishes. Instead, if the platform plugin cannot create a native menubar for whatever reason, createPlatformMenuBar() will return null, and QMenuBar will fall back to using a Qt menubar instead. The application can check the result via QMenuBar::isNativeMenuBar(). QMdiArea when maximized inside a QMainWindow with an empty title does not replace the main window's title if we are using native menus. This behavior turned out to be the same on Unity as it is on macOS, so the autotest needed adjustment to expect that behavior whenever the menubar is native, not only on certain platforms. tst_QMenuBar::allowActiveAndDisabled() tests a standalone QMenuBar. In f92f78094 it was disabled on macOS, but on Ubuntu it passes as long as we force it to be a non-native menubar, so it should pass that way on macOS too. Removed unused variable RESET to fix warning. Task-number: QTBUG-54793 Change-Id: I716e40da709f96331cbbf25213bd7bc153e4dbe2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-151-0/+4
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakeevaluator.cpp One side changed the iterator to use ranged-for, the other changed its body; they only conflicted because the latter had to add braces around the body, intruding on the for-line. Trivial resolution. Change-Id: Ib487bc3bd6e3c5225db15f94b9a8f6caaa33456b
| * [macOS] Check that the screen's index is still valid after updatingAndy Shaw2016-07-081-0/+4
| | | | | | | | | | | | | | | | | | | | It is possible for a screen to be disconnected while it is doing an update of the available screens. Therefore before returning the pointer to the screen then it should be rechecked that the index is still within the range of available screens. Change-Id: Iaa08070e79a72cb309d8a24cea786a5dccf6b719 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7Liang Qi2016-04-261-0/+9
|\ \
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-251-0/+9
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test configure src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java src/corelib/global/qglobal.cpp src/widgets/kernel/qapplication.cpp src/widgets/styles/qwindowsvistastyle.cpp tests/auto/corelib/kernel/qobject/tst_qobject.cpp Change-Id: I067083f34e5290aa5f7565e40c30a069cc37b83a
| | * OS X: Fix available geometry at startup when menu bar is hiddenTor Arne Vestbø2016-04-131-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Later versions of OS X allow you to auto-hide the menu bar, which should free up 22 pixels vertically at the top of the screen in the available geometry. Due to how the NSScreens are invalidated (asynchronously), we pick up this geometry change too late, resulting in QWindows maximizing as if the menu bar was still there. To work around this we explicitly tell the system to apply the default presentation options before initializing the QScreen properties, which results in the NSScreen being invalidated synchronously and having the right available geometry. Change-Id: I40d6ef2211165d53e0825173e3b6c6c17a5a954e Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* | | OSX: remove tablet->mouse event synthShawn Rutledge2016-04-251-0/+1
|/ / | | | | | | | | | | | | | | | | The synthesis of mouse events for unhandled tablet events is now in cross-platform code, so the platform plugins don't need to do it. Task-number: QTBUG-47007 Change-Id: I948be398e4b1ab627a8dc97ca20c08dba4390238 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-211-3/+7
|\| | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qgtkstyle_p.cpp tests/auto/corelib/io/qtextstream/test/test.pro tests/auto/corelib/plugin/plugin.pro Change-Id: I512bc1b36acf3933ed2b96c00f476ee3819c1f4b
| * Cocoa: Fix crash on screen disconnect.Morten Johan Sørvig2016-03-151-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maintain virtual siblings list on screen deletion. QCocoaIntegration::updateScreens() has a loop which will delete all non-current QScreen objects using QPlatformIntegration::destroyScreen(). destroyScreen() vill eventually call QWindowPrivate:: setTopLevelScreen() which accesses the virtual siblings list for the deleted screen. This can cause a stale pointer access if the virtual screen list is not up to date, especially when disconnecting two screens at the same time. Change-Id: Ia6b9d01edf8e5eea25b64604a2b3b28b173125f7 Task-number: QTBUG-48275 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-131-10/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/socket/qabstractsocket.cpp src/plugins/platforms/winrt/qwinrtscreen.cpp src/sql/drivers/mysql/qsql_mysql.cpp Change-Id: Ifb73623d09f53340ee5e10283f1f86b580998902
| | * Revert "Cocoa: correct QDesktopWidget::availableGeometry()"Liang Qi2015-09-151-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wrong calculation of flip. This reverts commit 1a5cc2a868969f1b1e9278c4145b7af2fc4b8f69. Task-number: QTBUG-47030 Change-Id: Ide178eb5e027c4ecec1e3952c973fb64987eb7ce Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
| * | Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-021-2/+10
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/tools/qstring.h src/gui/image/qimagereader.cpp src/network/access/qnetworkaccessmanager.cpp src/tools/qdoc/doc/examples/examples.qdoc src/widgets/accessible/qaccessiblewidgetfactory_p.h src/widgets/doc/qtwidgets.qdocconf Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
| | * Cocoa: correct QDesktopWidget::availableGeometry()Liang Qi2015-09-071-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since 10.9, System Preferences->Mission Control->Displays have separate Spaces settings needs to be followed. Task-number: QTBUG-47030 Change-Id: I1c1cf326246bd5609090ce5ac3212d963d562593 Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* | | Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | iOS: Implement support for QApplication::beep()Tor Arne Vestbø2015-12-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vibrates the device or plays an alert sound on devices that do not support vibration. The other implementations of beep() have been moved to QPlatformIntegration as a proper API instead of having them as invokables in QPlatformNativeInterface. Change-Id: Ic597dbef04b46d49862b070e78ddfc0d763829a2 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
* | | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-09-251-7/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/io.pri src/corelib/io/qdatastream.cpp src/corelib/io/qdatastream.h src/network/socket/qabstractsocket.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h src/widgets/styles/qgtkstyle.cpp tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/qmimedatabase-cache.pro tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/qmimedatabase-xml.pro tests/auto/dbus/qdbusconnection/qdbusconnection.pro tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp Change-Id: I347549a024eb5bfa986699e0a11f96cc55c797a7
| * | Fix QT_NO_ACCESSIBILITY build on OS XLiang Qi2015-09-111-4/+2
| | | | | | | | | | | | | | | Change-Id: Id8b41787fb9f50296ee9e0ad1f108418565d9325 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
| * | Harmonize input context selectionBernd Weimer2015-08-251-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Input context selection works differently across platforms. On some platforms it is not possible to request a specific context at all (e.g. Wayland). This will be unified, depending on the environment variable "QT_IM_MODULE", you will get: - null: default (platform) context, if defined (otherwise no context) - empty: no context - set: set one, if it exists and is valid (otherwise no context) [ChangeLog][Platform Specific Changes] Haromnized input context selection. QT_IM_MODULE environment variable will be taken into account. Change-Id: Ic8f826fbc6ace25941cd19b9b086943e848fbe01 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Nedim Hadzic <nedim.hadzic@pelagicore.com>
* | | Introduce Qt::AA_PluginApplication replacing Qt::AA_MacPluginApplication.Friedemann Kleint2015-09-011-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | Reuse the enumeration value for a generic Qt::AA_PluginApplication attribute since there are also initializations in platform ports other than OS X that need to be suppressed in the plugin case. Task-number: QTBUG-47556 Task-number: QTBUG-45762 Change-Id: I885f75030a251ccf66597aae3580499d012934e7 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | OSX FreeType: Add support for sub pixel font rendering.Sérgio Martins2015-08-141-0/+10
| | | | | | | | | | | | Task-number: QTBUG-42839 Change-Id: Iea4552d766936a55fd177e4287591d2715202d9c Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* | OSX: Add initial FreeType supportMathias Hasselmann2015-08-111-2/+22
| | | | | | | | | | | | | | | | | | This permits text rendering consistent with other FreeType enabled platforms, like Windows and Linux. Task-number: QTBUG-42839 Change-Id: I8c99bcaa3fb07c16e935a0c3705af467bc3da584 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Cocoa Integration: Support non-native input context pluginsGabriel de Dietrich2015-08-011-2/+6
| | | | | | | | | | | | | | | | | | | | This is useful, for example, when we want to test the virtual keyboard on OS X. It uses the usual QT_IM_MODULE code path provided by QPlatformInputContextFactory if that environment variable is set. If not, it defaults to QCocoaInputContext. Change-Id: Ib917d7bd2f4e86eacbc50dd7592cc288a9a702de Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Add shared implementation of a NSAutoreleasePool wrapper to qglobalTor Arne Vestbø2015-05-271-4/+3
|/ | | | | | | | | | | We have at least 5 different (but equal) implementations of a wrapper in Qt, and some code uses explicit NSAutoreleasePools. Having a shared implementation lets us clean up things a bit and makes it easier to reason about which pools are actually needed. Change-Id: I2fd8eefc3ae7308595ef9899b7820206268362a5 Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Add a means to set the application icon where supportedAndy Shaw2015-04-101-0/+13
| | | | | | | | | | | | | On OS X the application icon can be changed at runtime, so this adds a way to set this via the QPlatformIntegration. [ChangeLog][OS X] QApplication::setWindowIcon now changes the icon for the application in the dock. Task-number: QTBUG-43999 Change-Id: Ice298c0bd52f10f4866f37c6d3f20cf5419b7a1b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* Cocoa: Correct mouse event forwarding for popupsMorten Johan Sørvig2015-03-121-0/+24
| | | | | | | | | | | | | | | | | | | | We need to track the active popup globally, having parent windows track child popups is not sufficient since there may be one or more intermediate windows in between the event receiving window and popup window. Add API to QOCocoaIntegration for tracking the global popup window and use it instead of the per-window tracking. Make sure to only close popups on clicks outside the popup only. Add code to QNSView::handleMouseEvent that redirects mouse events to the active popup. Add manual test. Change-Id: Ia3e3fd42d8fddf5c69f0c6879b333ca544521f61 Task-number: QTBUG-43464 Task-number: QTBUG-31937 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* OSX: fix leaks due to missing NSAutoreleasePoolErik Verbruggen2015-02-261-0/+2
| | | | | | | env OBJC_DEBUG_MISSING_POOLS=YES qtcreator Change-Id: Ibbe5f42af5b94a439be3f0dd0f2b6e34bb1afd3f Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Decide whether to synthesize mouse events on a per device basisAlexander Volkov2015-02-251-2/+0
| | | | | | | | | | | | | | | | | | | | | Currently Qt uses the QPlatformIntegration::StyleHint SynthesizeMouseFromTouchEvents to check whether to synthesize mouse events from touch events. But not only platform plugins can produce touch events, they can be created by e.g. QTest::touchEvent() and in this case we almost definitely need synthesizing regardless of the platform. This commit introduces a QTouchDevice::MouseEmulation capability which replaces use of the QPlatformIntegration::SynthesizeMouseFromTouchEvents. So it's possible to pass QTouchDevice without this capability to QTest::touchEvent() and be sure that mouse events will be synthesized. Notice that touch pads always emulate mouse events. As a result we can activate some tests which were disabled for specific platform configurations by commits 6c1670d8c273819435867c42725c0db0eee597dc and e9760f1559361c39f269fb89f1ebd01f6ee8378d. Change-Id: Idc82fa4007a095fc1cb5934979361b0023d2b793 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Fixed license headersJani Heikkinen2015-02-171-1/+1
| | | | | Change-Id: Ibebe1318d1c2de97601aa07269705c87737083ee Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-22/+14
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Add a function for QPA plugins to explicitly destroy QScreensGiulio Camuffo2014-12-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Previously QPlatformScreen was automatically deleting its QScreen in ~QPlatformScreen(). That means that we cannot use QScreen's methods when the screen is being removed, because doing so would call virtual methods of QPlatformScreen. By that point the QPlatformScreen subclass object does not exist anymore, and we call the default implementation instead of the subclassed one, or get a crash for the pure virtual methods. This happens for example when removing a screen which contains a QWindow with some QML item using QQuickScreenAttached. This patch adds a QPlatformIntegration::destroyScreen() function, which deletes the QScreen and later the QPlatformScreen. ~QPlatformScreen will still delete the QScreen if it was not deleted with destroyScreen(), so code not ported to the new approach will continue to work as before, with only a warning added. Task-number: QTBUG-41141 Change-Id: Ie4a03dee08ceb4c3e94a81875411f6f723273fe1 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Cocoa QPA Plugin: Remove code depending depending on OS X 10.6 and olderGabriel de Dietrich2014-10-271-10/+3
| | | | | | | Snow Leopard is unsupported from 5.4.0. Change-Id: I5c269cbdc93000a4657b63559cc3c526e298e3db Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-231-2/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The isAlwaysAskOption was removed in 38621713150b663355ebeb799a5a50d8e39a3c38 so manually removed code in src/plugins/bearer/connman/qconnmanengine.cpp Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qcollator_macx.cpp src/corelib/tools/qstring.cpp src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow_p.h src/gui/text/qtextengine.cpp src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig_p.h src/plugins/platforms/android/qandroidinputcontext.cpp src/plugins/platforms/xcb/qglxintegration.cpp src/plugins/platforms/xcb/qglxintegration.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp src/testlib/qtestlog.cpp src/widgets/dialogs/qfiledialog.cpp src/widgets/kernel/qwindowcontainer.cpp tests/auto/corelib/tools/qcollator/tst_qcollator.cpp tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp Change-Id: Ic5d4187f682257a17509f6cd28d2836c6cfe2fc8
| * Cocoa: Work around faulty screen list on startupMorten Johan Sørvig2014-08-241-2/+6
| | | | | | | | | | | | | | | | | | | | | | The NSScreen API has been observed to a return a screen list with one mirrored, non-primary screen when Qt is running as a startup item. Always use the screen if there's only one screen in the list. Change-Id: I721e25bb7595599287b97f6528e04060ce5da6c1 Task-id: QTBUG-37878 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | qpa: Make screen geometry updates (full and available geometry) atomicTor Arne Vestbø2014-09-101-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updating the geometry and available geometry in two steps means that QScreen will be in an inconsistent state when emitting the geometry change signal, as the available geometry has not been updated yet. Piggy-backing changes to the availableGeometry based on the virtual geometry changing does not make sense, so we now tie geometry and availableGeometry (and their size variants) to their own separate geometryChanged and availableGeometryChanged signals. Change-Id: Iee0ced642cbb91c470cb54bc507d2c0512482c13 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Revert "Session management for OS X"Olivier Goffart2014-07-131-8/+0
| | | | | | | | | | | | | | | | | | Broke tst_QMenu::statusTip by closing the menu while it should not. (and therefore, a QTimer::singleShot that fires while following test are running is making the test fail) This reverts commit 50c04d631858639c630e85456e7e003a80e33493. Change-Id: Ib4ef8190f945b915fe268745cc64d471994c5e2d Reviewed-by: Richard J. Moore <rich@kde.org>
* | Session management for OS XSamuel Gaist2014-07-101-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch aims to implement the session management available on OS X. Currently applicationShouldTerminate is just a go through that closes everything and ends the application. The new implementation calls first appCommitData and cancels the termination properly if required. This means that if a user wishes to logout, Qt applications can now cancel that like e.g. answering to Safari asking whether it is ok to close because of a number of opened tab/window. Task-number: QTBUG-33034 Change-Id: Icedc8590a1c0934d9bc87d3a43d6702a9903bfb8 Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-011-11/+30
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/network/socket/qnativesocketengine_winrt.cpp src/plugins/platforms/android/androidjniaccessibility.cpp src/plugins/platforms/windows/qwindowswindow.cpp Manually adjusted: mkspecs/qnx-armle-v7-qcc/qplatformdefs.h to include 9ce697f2d54be6d94381c72af28dda79cbc027d4 Thanks goes to Sergio for the qnx mkspecs adjustments. Change-Id: I53b1fd6bc5bc884e5ee2c2b84975f58171a1cb8e
| * Cocoa: Re-implement QCocoaScreen::topLevelAt()Morten Johan Sørvig2014-06-061-11/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation used [NSApp orderedWindows] which does not return NSPanel subclasses, which is used by Qt dialogs and pops. Use [NSWidow windowNumberAtPoint:belowWindowWithWindowNumber] instead, which hit-tests on all window types. This can potentially include windows from other processes and non-Qt windows which needs to be filtered out. Add EXPECT_FAIL to tst_MacGui::nonModalOrder. The correct topLevelAt() implementation now exposes that this test is failing. Task-number: QTBUG-39322 Change-Id: I81afa3da964e08fe682802220d8fe81e9284205e Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | OS X: Fix build with QT_NO_OPENGLSergio Martins2014-06-301-0/+4
| | | | | | | | | | | | Task-number: QTBUG-31151 Change-Id: I7ed8117ae05ba0eebaf85731c7fdd2bb51d6ed04 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | Support adapting an existing NSOpenGLContext in cocoaLaszlo Agocs2014-06-251-1/+5
| | | | | | | | | | Change-Id: I61b4055020c82dd5ac40850fe7def91d26ffb6fe Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devJ-P Nurmi2014-06-051-12/+5
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt.prf src/plugins/platforms/xcb/qxcbwindow.h src/tools/qdoc/qdocindexfiles.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I214f57b03bc2ff86cf3b7dfe2966168af93a5a67
| * Cocoa: Remove the NSWindow -> QCococaWindow hash.Morten Johan Sørvig2014-05-261-12/+5
| | | | | | | | | | | | | | | | Cast the NSWindow to a QNSWindow instead. Now there is no way we can fail to maintain the hash properly. Change-Id: I5fd03b6fad964a61fadb3460b7063fd43ff25c79 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | OS X: Add support for ApplicationState capabilitySamuel Gaist2014-04-241-2/+1
|/ | | | | | | | | | | | | | | | Currently a click on e.g. the dock icon is not propagated to the application so if for example the main widget is hidden, it can't be brought back. Also neither applicationDidBecomeActive nor applicationDidResignActive do anything. This patch fixes it [ChangeLog][QPA][OS X] Add support for ApplicationState capability. Application can now detect when an application states has changed as well when the dock icon has been clicked. Task-number: QTBUG-10899 Change-Id: I53d3e6eed4adc62b343e7aa3e3d8068d3248e7df Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Cocoa: Make QScreen::topLevelAt() work correctlyMorten Johan Sørvig2014-04-051-0/+28
| | | | | | | | | | | | | | | | | The QPlatformScreen::topLevelAt() default implementation is flawed in that it does not check z-ordering but simply returns the first window in the window list that contains the test point. Add QCocoaScreen::topLevelAt(). Use [NSApp orderedWindows] to iterate through the window list in z order. Add a NSWindow->QCococaWindow mapping hash to QCocoaIntegration for getting the corresponding QWindow once a NSWindow is found. Task-number: QTBUG-37597 Change-Id: I7af70163a32528cb56f8d6caa037b98f580ee191 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Cocoa: Fix crash when disconnecting an AirDisplay monitor.Dyami Caliri2014-04-031-2/+7
| | | | | | | | | | | | | | | | | There are some cases where unplugging a monitor temporarily leaves a QCocoaScreen object with an invalid m_screenIndex. Debugging shows that the OS does not report the screen update before Qt attempts a repaint. This calls devicePixelRatio(), which calls osScreen(), and the index for the screen is out of bounds. By temporarily exiting updateGeometry() when the screen is unavailable, we avoid the crash. The OS quickly reports the monitor state change and everything returns to normal, unnoticed to application. Task-number: QTBUG-37606 Change-Id: Iacb2ff22bd3df72a5d87b2289242fb393625af57 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* NSScreen screens may be empty so add the main screen in that caseAndy Shaw2014-03-291-2/+8
| | | | | | | | | | In some circumstances NSScreen screens can be empty yet there is still a valid main screen so we prevent any problems arising by ensuring we work with the main screen in that instance. Task-number: QTBUG-37876 Change-Id: I5827009a9894eb8c1d4f5addc6c6f59e1c50c3d0 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Cocoa: Enable QQuickWidget on Mac OS X.Morten Johan Sørvig2014-03-201-0/+1
| | | | | Change-Id: I0635bf0bfcd49c20987a81c6f8895fc3343fbd20 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Cocoa: added queryKeyboardModifiers() in platform pluginLiang Qi2014-03-151-0/+5
| | | | | | Task-number: QTBUG-37181 Change-Id: I9256d0c9b83d6e5982864dc747586cbe2322b60c Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: remove qmacmime includes where not neededRichard Moe Gustavsen2014-03-061-1/+0
| | | | | | Change-Id: Id20df8b80f3064ac0d193124fb790a075a89e53c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: create QCocoaMimeTypes for Cocoa-only mime-typesRichard Moe Gustavsen2014-03-061-0/+2
| | | | | | | | | | | | Prepare to move qmacmime out of the cocoa port and into QPlatformSupport for sharing with iOS. This patch will start by moving tiff out, since it depends too much on old carbon image manipulation code that will not compile on iOS (depends on ApplicationServices etc). Change-Id: Id7a9b919c8f51fa9beb2f4ee2f13cca96894f6a6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>