summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoanativeinterface.mm
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Merge remote-tracking branch 'origin/5.6' into devFrederik Gladhorn2016-01-081-0/+1
|\ | | | | | | | | | | Based on merge done by Liang Qi Change-Id: Id566e5b9f284d29bff2199f13f9417c660f5b26f
| * Fix mac build with -no-widgetsStephen Kelly2016-01-071-0/+1
| | | | | | | | | | | | | | Unused parameters are errors. Change-Id: I79782a8094491a953d6e838e6b8c5b9d6327f30a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | iOS: Implement support for QApplication::beep()Tor Arne Vestbø2015-12-171-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Link to AppKit instead of Cocoa.Jake Petroules2015-09-051-1/+1
|/ | | | | | | | | | | | | Cocoa is basically just AppKit + CoreData. Since we do not use CoreData in Qt, there is no reason to link to it or (transitively) import its headers. This is just a mechanical replacement of -framework Cocoa with -framework AppKit and <Cocoa/Cocoa.h> with <AppKit/AppKit.h> Change-Id: Ibcfc8a03c0ddff27a67fbc87dd7bd58a4b648956 Reviewed-by: Mika Lindqvist <postmaster@raasu.org> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Add QCocoaWindowFunctions and add a function to find the clip offsetJorgen Lind2015-06-111-0/+10
| | | | | | Change-Id: I0f9cd1f923867f6f24b3bc54e442a16b5d2a11e4 Reviewed-by: Tim Blechmann <tim@klingt.org> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Add shared implementation of a NSAutoreleasePool wrapper to qglobalTor Arne Vestbø2015-05-271-1/+1
| | | | | | | | | | | 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>
* OSX: fix leaks due to missing NSAutoreleasePoolErik Verbruggen2015-02-261-0/+1
| | | | | | | env OBJC_DEBUG_MISSING_POOLS=YES qtcreator Change-Id: Ibbe5f42af5b94a439be3f0dd0f2b6e34bb1afd3f Reviewed-by: Morten Johan Sørvig <morten.sorvig@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>
* OS X: Fix build with QT_NO_OPENGLSergio Martins2014-06-301-4/+12
| | | | | | Task-number: QTBUG-31151 Change-Id: I7ed8117ae05ba0eebaf85731c7fdd2bb51d6ed04 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Mac: Implement unified toolbar look for QTabBarMorten Johan Sørvig2014-04-091-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Extend the unified title and toolbar gradient to tabs in document mode that are adjacent unified tool bars. Change the updateMacBorderMetrics() function to register the tab bar geometry and visibility status with the Cocoa platform plugin. The Cocoa platform plugin will then merge this area with other registered areas if possible. Add QCocoaNativeInterface::testContentBorderPosition(). This function tests whether the given point is within the unified title and toolbar area. Use testContentBorderPosition() in QMacStyle to enable code paths that skips drawing the QToolBar bottom separator line and paints the active tab background with transparent pixels to make the background gradient visible. Change-Id: I2b70f9bb0c2c59af053a691a7df538f958783dab Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Cocoa: Update unified toolbar area on toolbar hideMorten Johan Sørvig2014-04-091-4/+16
| | | | | | | | | | | | | | | | | | | | | Add setContentBorderAreaEnabled() which us used to enable or disable an area. Used together with registerContentBorderArea() this allows changing the border area geometry and enabled status independently. Add section to the QToolBar show/hide event handler which calls setContentBorderAreaEnabled(). Make sure QToolBar and QToolBarLayout uses the same identifier - the QToolBar object pointer. Rename enableContentBorderArea -> setContentBorderEnabled. The "ContentBorder" is now the entire unified toolbar area while "ContentBorderArea"s are the sub-areas covered by toolbars. Change-Id: I339f381a50856e048ae40e7ffadd6a8a510c4994 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Set unified toolbar height accurately.Morten Johan Sørvig2014-03-201-1/+22
| | | | | | | | | | | | | | | Add registerContentBorderArea() to the Cocoa native interface which allows registering multiple "unified toolbar" areas for each window. Use this function in QToolBarLayout::setGeometry() to register the area for each TopToolBarArea toolbar. Task-number: QTBUG-36700 Change-Id: I52efcc5662556bb94f25f504be3710d0491f79b9 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
* 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: QImage -> CGImage conversion cleanupMorten Johan Sørvig2014-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Move to one qt_mac_toCGImage function that has simple semantics and properly retains a copy of the QImage for the lifetime of the CGImage. Remove the old qt_mac_toCGImage function which had two problems: 1) It would not retain the QImage data (this was probably ok for its original use case: creating short-lived CGImages for the paint engine) 2) It had acquired a somewhat odd **datacopy out parameter for the cases where you _do_ want to retain the image data. This makes the exported image conversion function from QtMacExtras work: The CGImages it creates will no longer reference free'd memory once the QImage is deleted. Change-Id: I583040d16aefb17fc3d801d6b047a0b2a76c7f74 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Cocoa: Add setNSToolbar(QWindow *, NSToolBar *)Morten Johan Sørvig2014-02-101-0/+15
| | | | | | | | | | Calling this function associates the given native toolbar with the QWindow. QWindow will then set it on the native NSWindow at the appropriate time during window creation. Change-Id: I2a50f79b2a0453cc739f8d68e965e37b95998083 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: Add setContentBorderThickness().Morten Johan Sørvig2014-01-111-0/+12
| | | | | | | | | | | | | | | | | | Add setContentBorderThickness() to the Cocoa platform plugin. This functions requests that the platform plugin draws a gradient in the unified title and toolbar area and/or the status bar area. The background gradient is drawn before and under the Qt backing store content. It is expected that parts of the backing store will be filled with transparent pixels to allow the gradient to be visible. To facilitate this the backing store image is created with an alpha channel. Task-number: QTBUG-34411 Change-Id: Iadc5e64ee9b9b42e92fb84a615817fdffd7a8802 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Don't force create the platform window.Morten Johan Sørvig2014-01-101-5/+0
| | | | | | | | | | This causes all sorts of unintended side effects and is generally a bad idea. Task-number: QTBUG-32988 Change-Id: Iebdae34764be4cfd9ced47aa93789871e0455ab3 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix static builds on Mac.Morten Johan Sørvig2013-12-181-2/+2
| | | | | | | | | | | | | QMacPasteboardMime is a public class in Qt 4. Qt 5 has two copies, one public QtMacExtras and an internal one in the cocoa plugin. This causes a symbol collision when building statically. Rename the internal copy to QMacInternalPasteboardMime. Task-number: QTBUG-35310 Change-Id: I891787b451a0b342ed85aa7196e606bc11623e21 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Mac: QWizard default background pixmap works againLiang Qi2013-09-261-0/+26
| | | | | | | | Task-number: QTBUG-26722 Change-Id: I579111b5d34f8e3cdc6bb016d9c0e42ec3ffb8c9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Stephen Chu <stephen@ju-ju.com>
* Fix QT_NO_PRINTER build on MacVitalii Shastun2013-09-261-2/+2
| | | | | | | | On Mac the QT_NO_PRINTER build was not implemented. Task-number: QTBUG-33565 Change-Id: I118472f9400aa0a0d0e192ae39a11ea38a66f340 Reviewed-by: John Layt <jlayt@kde.org>
* Don't use the SubWindow flag for windows embedded in foreign windowsShawn Rutledge2013-04-261-0/+8
| | | | | | | | | Instead, add QCocoaWindow::setEmbeddedInForeignView which can be called via QPlatformNativeInterface::NativeResourceForIntegrationFunction Task-number: QTBUG-30805 Change-Id: I05861e80ca664ddb430216388cf0fec573a4d32b Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Don't crash on a null window pointer.Morten Johan Sørvig2013-04-231-0/+3
| | | | | | | Task-number: QTBUG-30731 Change-Id: Id256b915012b43d1eb85bba62cbc1d42cfb58b34 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Cocoa: Add setAlertState(), isAlertState(), beep() functionsGabriel de Dietrich2013-04-231-0/+5
| | | | | | | | Also, fix operator precedence error in QApplication::alert(). Change-Id: I140ccfba29638d24bc1c97f5f9a9611f66eb6b8f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@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>
* 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>
* 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>
* Make qt_setDockMenu work and call it.Morten Johan Sørvig2013-03-291-5/+1
| | | | | | | | | 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>
* Cocoa: Make touch events work again.Morten Johan Sørvig2013-03-261-0/+9
| | | | | | | | | | | | | | 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>
* 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>
* Add qMenuToNSMenu() and qMenuBarToNSMenu() to QCocoaNativeInterface.Dmytro Tyshchenko2013-03-211-0/+18
| | | | | | | | | | | Preparing the addition of toNSMenu() functions to QtMacExtras which will expose the native handle of a QMenu or QMenuBar. Task-number: QTBUG-28869 Change-Id: Ib07712f5da0758addbbf8a84d6881297420e7ac8 Reviewed-by: Harri Porten <porten@froglogic.com> Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* QCococaWindow: Add NSView hosting support.Morten Johan Sørvig2013-02-231-0/+7
| | | | | | | | | | | | Add and export QCCoocaView::setContentView(NSView *), making it possible to host a foreign NSView in a QWindow. Change QCoocaWindow::m_contentView to be a generic NSView, instead of a QNSView. Add a separate m_qtView for code paths that expect a QNSView. Change-Id: I47935b69705c70ea7efbb03d6d4bf489947c3487 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Cocoa: Export QImage <-> CGImage conversion funcs.Morten Johan Sørvig2013-02-121-0/+16
| | | | | | | | | | | | | | For implementing to/fromMacCGImageRef in QtMacExtras. These do not depend on internal Qt state. The main reason for exporting them is to keep the implementation in one place to ease maintenance. Refactor qt_mac_cg_context to support QImage. Add qt_mac_toQImage. Change-Id: Ia9c226ed52d087b2c6b47aa8210ed8f2645b9cf2 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Cocoa: export setDockMenuMorten Johan Sørvig2013-01-281-0/+13
| | | | | Change-Id: I1eb35c34427660d2662f310a3e8c4e5ba42e08eb Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Export functions to add custom mime converters.Morten Johan Sørvig2013-01-211-0/+28
| | | | | | | | | | | For use with public API in QtMacExtras. This goes into Qt stable: Fix for new functionality, and close a feature regression against Qt 4. Change-Id: I555fdff3ddb39336ccd72f9711d465f1c18c6b45 Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Initalize the printinfo on Mac if it requests and it needs initalizingAndy Shaw2012-12-171-2/+4
| | | | | | | | | | | When the print panel was closed then it would clean up the printinfo and if it was requested for the same QPrinter then it would not be recreated in time. Therefore we check if it is initalized and if not we re-initalize it. Task-number: QTBUG-28657 Change-Id: I7dc9011b80e03cfa3eae8fee2fcf6cc8021a8566 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add nsOpenGLContextForContext to QCocoaNativeInterface.Zeno Albisser2012-11-231-4/+11
| | | | | | | | | | This change enables receiving the native NSOpenGLContext that is used by a QOpenGLContext. This clearly is non-public api that is only meant to be used as a last resort for cases where it is really necessary to get hold of a native context object. Change-Id: Iea7c6abb458acc7aa15926052673270d25d1d9d1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Add cglContextForContext to QCocoaNativeInterface.Zeno Albisser2012-10-151-0/+24
| | | | | | | | | | | | This change enables receiving the native CGLContextObj that is used by a QOpenGLContext. This clearly is non-public api that is only meant to be used as a last resort for cases where it is really necessary to get hold of a native context object. Change-Id: Id00efc88a73d7df04a68c022f19d9d1c4f6d386b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | 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>
* Cocoa: Compile when configured with -no-widgetsMorten Johan Sorvig2012-06-121-1/+14
| | | | | | | | | | Build printing only if Qt is configured with widget support. This is mostly useful for testing -no-widgets builds. Change-Id: I2d47b420e311869e85508db1f7372fe326617dec Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Minor QPlatformMenu API cleanup.Morten Johan Sorvig2012-05-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Make the QPlatformMenu* classes abstract with pure virtual functions. Delete qplatformmenu_qpa.cpp. QtGui no longer has to carry the empty implementations. Change the inheritance tree - Make QPlatformMenu and QPlatformMenuBar inherit QObject instead of QMenuItem. Add (now) missing virtual functions to QPlatformMenu. The effect of this change is to reduce the number of pure virtuals the platform has to implement. Change QPlatformMenuBar::syncMenu to take a QPlatformMenu pointer instead of a QPlatformMenuItem* pointer. Fix a couple of header/unused variable compiler warnings. Change-Id: I77450e40c6aae26f3e1aca204603acebd242c036 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Cocoa implementation of QPA menu interface.James Turner2012-05-191-0/+11
| | | | | | | | | | | Implement the QPA platform menu interface for Cocoa, including native menubar support and merging with the predefined menus created from the bundled .nib. Cleanup code previously used to maintain the menus, and add a manual test of the menus code. Change-Id: Ia99267ddb6485e18e05c540eb32c5aee6cbb85db Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Expose QPA API under qpa/*Girish Ramakrishnan2012-05-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main reasons for doing this are: 1. _qpa.h end up in the master QtGui include file. QtGui is meant for userland applications. qpa code is neither binary nor source compatible. Inadvertant use of QPA api makes the user code binary-incompatible. 2. syncqt creates forwarding headers for non-private header files. This gives people the impression that this is public API. As discussed on the mailing list, even though QPA api is internal and subject to change, it needs to treated differently from private headers since they will be used by in-qtbase and out-of-qtbase plugins. This commit does the following: 1. The _qpa in QPA header files is dropped. 2. syncqt now treats any file with qplatform prefix as a special file and moves it to qpa/ directory. The recommended way of using QPA API in plugins is: #include <qpa/qplatformfoo.h>. This allows the user include QPA API from multiple modules (for example, qplatformfoo might be in QtPrintSupport) 3. The user needs to explicitly add QT += <module>-private to get access to the qpa api. 4. Creates compat headers for the olden style qplatformfoo_qpa.h and QPlatformFoo includes. This commit does not change the cpp filenames. This requires a more careful merging of existing non qpa cpp files and existing cpp files on a case by case basis. This can be done at anytime. The following files are not renamed as part of this changed but will be fixed as part of a future change: src/gui/kernel/qgenericpluginfactory_qpa.h src/gui/kernel/qgenericplugin_qpa.h src/gui/kernel/qwindowsysteminterface_qpa.h files were renamed using for x in `find . -name "qplatform*_qpa.h"`; do git mv $x "${x/_qpa.h/.h}"; done for x in `find . -name "qplatform*_qpa_p.h"`; do git mv $x "${x/_qpa_p.h/_p.h}"; done includes were renamed using script for file in `find . -name "*.h" -or -name "*.cpp" -or -name "*.mm"`; do sed -i -e 's,.*#.*include.*<\(Qt.*/\)\?\(QPlatform.*\)>,#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.*"\(Qt.*/\)\?\(QPlatform.*\)",#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.* "\(qplatform.*\)_qpa.h",#include <qpa/\L\1.h>,g' \ -e 's,.*#.*include.*"\(qplatform.*\)_qpa_p.h",#include <qpa/\L\1_p.h>,g' \ -e 's,.*#.*include.*<\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)>,#include <qpa/\2\3>,g' \ -e 's,.*#.*include.*"\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)",#include <qpa/\2\3>,g' \ $file done Change-Id: I04a350314a45746e3911f54b3b21ad03315afb67 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Fix qtnamespace compile break on Mac.Sarah Smith2012-03-261-0/+4
| | | | | | | | | | | | | | | | | 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>
* Add method to get NSPrintInfo* from QPrintEngine in Cocoa pluginBradley T. Hughes2012-03-151-0/+8
| | | | | | | | | | | Add an invokable method that takes the QPrintEngine (which will always be a QMacPrintEngine) and return the NSPrintInfo* from the QMacPrintEnginePrivate. This will be used by the native dialogs in QtPrintSupport to get/set printer settings. Change-Id: If1e49027e8f0d505656db51be1f40a23f60e8e57 Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Add a QPlatformPrinterSupportPlugin for CocoaBradley T. Hughes2012-03-151-0/+7
| | | | | | | | | | | | | | | This is used to create the actual QPrintEngine and to query the system about printer information. The QCocoaPrinterSupport actually lives in the Cocoa platform plugin, so the QCocoaPrinterSupportPlugin uses the createPlatformPrinterSupport() function in the QPlatformNativeInterface (since the latter is a QObject). This is done to avoid adding a printing related virtual function to QPlatformIntegration (since we have plans to do a new printing API in the future). Change-Id: I8bf9be668ff8ae1d07840e2af1e0846dc3299334 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>