summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosglobal.h
Commit message (Collapse)AuthorAgeFilesLines
* darwin: Add Foundation conversion functions for QPoint/QPointFTor Arne Vestbø2016-06-141-3/+0
| | | | | | | | | | The fromCGPoint function was left out for QPoint, as the foundation type is using CGFloats internally. Clients should use an explicit QPointF::toPoint() when potentially throwing away precision. Change-Id: I12a37e8f81c86b7ada56066cc18ee29709cc21e3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* darwin: Add Foundation conversion functions for QRect/QRectFTor Arne Vestbø2016-06-101-2/+0
| | | | | | | | | | The fromCGRect function was left out for QRect, as the foundation type is using CGFloats internally. Clients should use an explicit QRectF::toRect() when potentially throwing away precision. Change-Id: I0d4c5c5a4e6a45ea3287e3f37a00b69b0bfdefcf Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Add support for Apple tvOSMike Krus2016-05-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Pass -xplatform macx-tvos-clang to configure to build. Builds device and simulator by default. Added ‘uikit’ platform with the common setup. Also added QT_PLATFORM_UIKIT define (undocumented). qmake config defines tvos (but not ios). tvOS is 64bits only (QT_ARCH is arm64) and requires bitcode to be embedded in the binary. A new ‘bitcode’ configuration was added. For ReleaseDevice builds (which get archived and push to the store), bitcode is actually embedded (-fembed-bitcode passed to clang). For all other configurations, only using bitcode markers to keep file size down (-fembed-bitcode-marker). Build disables Widgets in qtbase, and qtscript (unsupported, would require fixes to JavaScriptCore source code). Qpa same as on iOS but disables device orientation, status bar, clipboard, menus, dialogs which are not supported on tvOS. Change-Id: I645804fd933be0befddeeb43095a74d2c178b2ba Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* QtBase (remainder): use printf-style qWarning/qDebug where possible (I)Marc Mutz2016-03-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The printf-style version of QDebug expands to a lot less code than the std::ostream-style version. Of course, you pay in type safety (but compilers warn about it these days), you cannot stream complex Qt types and streaming QStrings is awkward, but in many cases you actually improve on readability. But the main reason is that something that's not supposed to be executed under normal operation has no business bloating executable code size. This is not an attempt at converting all qWarnings() to printf-style, only the low-hanging fruit. In this first part, replace qWarning() << "" with qWarning("..."). Had to fix broken qImDebug() definition. Instead of defining it as a nullary macro in the QT_NO_DEBUG case and as a variadic macro in the other, define it in both cases, as is customary, as a non-function macro so that overload selection works without requiring variadic macro support of the compiler. Saves e.g. ~250b in text size in QtPrintSupport on optimized GCC 5.3 AMD64 builds. Change-Id: Ie30fe2f7942115d5dbf99fff1750ae0d477c379f Reviewed-by: Kai Koehne <kai.koehne@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: Clean up style in Objective-C message signaturesTor Arne Vestbø2015-05-241-1/+1
| | | | | | | | | | - Space between class/instance signifier - No space between return type and message name - No space in message arguments Change-Id: Ie25e0be3c134586c44bb82bf7075f6eb153388a9 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | 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>
* iOS: remove unused function 'fromPortraitToPrimary'Richard Moe Gustavsen2014-11-051-1/+1
| | | | | Change-Id: Ic768790a90ef7048bd5e7027e9682988085368fe Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Detect window deactivation without waiting for next runloop iterationTor Arne Vestbø2014-10-281-0/+10
| | | | | | | | | Since we know and control whether or not we are making a new QUIView first responder, we can take not of this at that point, and use that information when another view is resigning first responder. Change-Id: I508720d418c92dc8a8011b489cc5cace8fc82633 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Add logging category for input method debuggingTor Arne Vestbø2014-10-281-0/+10
| | | | | Change-Id: If1505b3b5f6ceb18fc8972192d637fc42530f993 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* iOS: Add UIResponder helper to get current first responderTor Arne Vestbø2014-08-261-0/+4
| | | | | Change-Id: I422d45860a52861893d963fabbecd4ac30477272 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: move infoPlistValue to qiosglobalRichard Moe Gustavsen2013-12-041-0/+1
| | | | | Change-Id: If237f08683290105413dc47923e23a496765bb22 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: don't loose precision when converting CG typesRichard Moe Gustavsen2013-11-251-4/+5
| | | | | | | | | CGRect and CGPoint consist of CGFloat variables. So we should convert to QRectF and QPointF rather than QRect and QPoint. Change-Id: I76f180e4064f54d5810c49b88fdbbcd914bdb686 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Don't keep around reference to a single QIOSViewControllerTor Arne Vestbø2013-11-201-1/+0
| | | | | | | | We might have more of them in a multi-screen setup or when implementing support for modal windows using sub-viewcontrollers. Change-Id: Ibe98273a13af981fffe2704a2c05bfd9d3f3e9e0 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: use an explicit pointer to qiosViewControllerRichard Moe Gustavsen2013-04-191-1/+1
| | | | | | | | | | | | | 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>
* iOS: Don't crash on landscape mode startupMorten Johan Sørvig2013-02-271-1/+3
| | | | | | | | | fromPortraitToPrimary is called from the QIOSScreen constructor. This is probably to early to call QGuiApplication functions. Change-Id: I882304fd641df13dc530491990245ba9ad495377 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: Set touch point position in screen coords.Morten Johan Sørvig2013-02-271-0/+2
| | | | | | | | Previously the position was set in window coordinates, which would break for non-fullscreen windows. Change-Id: Iefa2f590c6d62b09fc3e7fe60a882c1acd33e029 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: clean-up header includesRichard Moe Gustavsen2013-02-271-3/+1
| | | | | | | | Try to keep qiosglobal.h free from unnecessary includes, since its typically included from many different locations. Change-Id: I6638bcaef1189b3eee3dbd5f744c15f8f7858d71 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: add convenience function to get to the root QIOSViewControllerRichard Moe Gustavsen2013-02-271-0/+4
| | | | | | | | | | | | | | | It seems that we need to access our view controller from many places, and the syntax to do so is tricky to remember. So lets just add it to our global functions, with the added bonus of a using a little cache. Note: many of these functions could be made inline, but since one concern of the plugin will be the end size of the app, I prefer to trade size for speed at this point. We can always change this later. Change-Id: I578ea9ae8218d23d635b7728a930763ca53c4eaa Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: report changes to keyboard rect back to QtRichard Moe Gustavsen2013-02-271-0/+1
| | | | | | | | | QInputContext expects us to report whenever the input panel changes geometry. This patch implements this. Change-Id: I9162f0d48da6925274a7489c9bcb6adab9afae82 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: add global function 'isQtApplication'Richard Moe Gustavsen2013-02-271-0/+1
| | | | | | | | | | Several places in the code we need to check if the plugin is running as a cross-platform Qt application or inside a native app. So we refactor this function to qiosglobal so we can access it from everywhere. Change-Id: I78db0dcde71b7d281868ce304867c8f876caef2a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* iOS: refactor general convenience functions into new file 'qiosglobal'Richard Moe Gustavsen2013-02-271-0/+59
Some functions are needed across several files and classes. Lets place them in a common file for all to use. Change-Id: I5f9b578f948d66d10e57a835b80b5c493e07fb4c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>