summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcore_foundation.mm
Commit message (Collapse)AuthorAgeFilesLines
* QStringView: add toNSString() / toCFString()Marc Mutz2020-05-081-6/+31
| | | | | | | | | | | | | | Use it in QString and QCocoaMenuItem. As a drive-by, s,OS X,\macos,g. [ChangeLog][QtCore][QStringView] Added toNSString(), toCFString() on macOS. Change-Id: Ib05818015a4be11a0d72d4487fb82c580d27854e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Replace Q_DECL_NOTHROW with noexcept the remaining placesAllan Sandfeld Jensen2019-04-091-9/+9
| | | | | | | | | | | | The first replacement had missed objective-C++ code some places ourside the src dir. In C-files Q_DECL_NOTHROW is replaced with Q_DECL_NOEXCEPT as we still need to turn it off when compiled in C mode, but can get rid of the old NOTHROW moniker. Change-Id: I6370f57066679c5120d0265a69e7e378e09d4759 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix crash when QUrl::from{NS/CF}URL() was passed a nullptrTor Arne Vestbø2017-03-271-0/+4
| | | | | | | Change-Id: Ib193447c4a91dd3d08746e97727f7d4764f33d80 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-081-6/+6
|\ | | | | | | | | | | | | | | Conflicts: configure.json mkspecs/win32-icc/qmake.conf Change-Id: Ibf40546b024d644c7d9ed490bee15b82597f4d3f
| * Doc: corrected minor link issuesNico Vertriest2017-02-021-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | qcore_foundation.mm: - Can't link to 'fromCGPoint()' - Undocumented parameter 'point' in QPointF::fromCGPoint() - Can't link to 'fromCGRect()' - Undocumented parameter 'rect' in QRectF::fromCGRect() - Can't link to 'fromCGSize()' - Undocumented parameter 'size' in QSizeF::fromCGSize() Change-Id: Ie48f04c7b990634f8c5a836100b1be7854848bb4 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Add conversion functions for QTimeZone and CFTimeZone/NSTimeZoneJake Petroules2017-01-231-0/+68
|/ | | | | Change-Id: I3a2e18d69577296bf612e13e40414bce1daa6a71 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Round to nearest millisecond in QDateTime::fromCFDate()Tor Arne Vestbø2016-10-021-3/+3
| | | | | | | | | | | | CFAbsoluteTime is measured in seconds, represented by a double, so when converting milliseconds to CFAbsoluteTime we may get a slight error due to missing precision in double to represent the milliseconds exactly. By rounding to the closest millisecond when converting back, we avoid truncating and being one ms off. Change-Id: If1e99f97b000fb8cb893ddfc5d7ba81096c0ea88 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* darwin: Add Foundation conversion functions for QSize/QSizeFTor Arne Vestbø2016-06-141-0/+37
| | | | | | | | | | The fromCGPoint function was left out for QSize, as the foundation type is using CGFloats internally. Clients should use an explicit QSizeF::toSize() when potentially throwing away precision. Change-Id: I12d43ae0881f09ad8d79f2caaa000c3983f4ef30 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* darwin: Add Foundation conversion functions for QPoint/QPointFTor Arne Vestbø2016-06-141-0/+38
| | | | | | | | | | 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-0/+44
| | | | | | | | | | 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>
* Simplify Foundation conversion function documentationTor Arne Vestbø2016-06-061-25/+22
| | | | | | | | The \fn command to specify the function signature is not needed when the documentation precedes the function itself. Change-Id: I9de0d1ae73af443f0beded77538d62cea85b5e72 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* Collate conversion functions for Core Foundation/Foundation typesTor Arne Vestbø2016-05-191-0/+421
Makes it easier to apply similar changes across all related functions, and to implement functions for new types by having the previous approaches available in one place. Change-Id: I3f0590d67d0e6deb1c6c856ab1de96b55b6af058 Reviewed-by: Jake Petroules <jake.petroules@qt.io>