summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoaprintdevice.mm
Commit message (Collapse)AuthorAgeFilesLines
* Updated license headersJani Heikkinen2016-01-151-13/+19
| | | | | | | | | | | 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>
* Fix inefficient code foreaching on container.values()Sérgio Martins2015-07-081-2/+2
| | | | | | | Saves one full iteration and memory allocation. Change-Id: Ice527499b5f5f62bd1e47d76fdf40119948ee3a1 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Clean up API of QPlatformPrintDevice (QPA).Friedemann Kleint2015-05-051-28/+0
| | | | | | | | | | | | | | | | | | | | | The class inherited QSharedData, had a non-virtual clone() function and a non-virtual operator==() which compared QPlatformPrintDevice::id(). Derived classes implemented clone() and operator==() comparing ids to no effect. The class does not have any setters modifying its values, so detaching, copying and assigning does not make sense. Remove the inheritance, clone(), and operator==() and make the class a non-copyable base class. Use a QSharedPointer instead of a QSharedDataPointer to store it in QPrintDevice. Remove copy constructors and clone() reimplementations that were never called in implementations. Found while investigating QTBUG-44991. Task-number: QTBUG-44991 Change-Id: Ib79354b37048d04d50d936f1d0ae06c36efaac00 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com> Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-21/+13
| | | | | | | | | | | | | | | | | | 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>
* QCocoaPrintDevice: fix bad CFReleaseDyami Caliri2014-10-301-4/+4
| | | | | | | CFRelease should be called IFF PMPrinterCopyDescriptionURL succeeds Change-Id: Id289aea3a4e3da397dae4062319256a043538597 Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* Cocoa QPA Plugin: Remove code depending depending on OS X 10.6 and olderGabriel de Dietrich2014-10-271-4/+0
| | | | | | | Snow Leopard is unsupported from 5.4.0. Change-Id: I5c269cbdc93000a4657b63559cc3c526e298e3db Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* QPrinter - Fix DuplexMode on all platformsJohn Layt2014-10-241-0/+3
| | | | | | | | | | | | | Add support to get/set the DuplexMode on Windows and Mac, improve the CUPS duplex handling, ensure support is the same on all platforms. [ChangeLog][QtPrintSupport][QPrinter] Added duplex support for Windows and OS X. Task-number: QTBUG-11332 Change-Id: I9d61d63233d828c3b1fd6df54072c6049f3c6298 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QCocoaPrintDevice: Compile on Mac OS 10.6Morten Johan Sørvig2014-04-291-0/+4
| | | | | | | MAXPATHLEN is not defined, use PATH_MAX. Change-Id: I5a8febce66584c15bdfe81df64fe3f1954972a47 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Cocoa: Fix possible printing memory leak.Morten Johan Sørvig2014-04-091-4/+5
| | | | | | | | The created page format must always be released, even if one of the subsequent PM* functions fails. Change-Id: If42aaeccd6bdb51ba53444f491ca2878783d0678 Reviewed-by: John Layt <jlayt@kde.org>
* Cocoa: Fix crash when creating printer object.Morten Johan Sørvig2014-04-091-3/+6
| | | | | | | | | | | | Fix reference counting error in QCocoaPrintDevice:: createPageSize(). "key" is accessed with a "Get" function and should not be released. Switch from using QCFString to a plain CFStringsRef with manual ref counting. Task-number: QTBUG-38023 Change-Id: I04d661bffeb5b3122b0c3c8eaaffdd1af51842fd Reviewed-by: John Layt <jlayt@kde.org>
* QtPrintSupport - Fix QT_NO_PRINTER buildJohn Layt2014-03-171-0/+4
| | | | | | | | Fix the QT_NO_PRINTER build for issues that have accumulated over last few months, and in the new changes already approved. Change-Id: I9aed21dee861837fd1a68a96692c873a4f5be293 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPlatformPrintDevice - Add Mac implementationJohn Layt2014-03-171-0/+498
Implement the OSX support for QPlatformPrintDevice Change-Id: I2e3900818d4d9f0682a15ed94b8c824085adb465 Reviewed-by: Lars Knoll <lars.knoll@digia.com>