summaryrefslogtreecommitdiffstats
path: root/src/plugins/printsupport
Commit message (Collapse)AuthorAgeFilesLines
* Remove unnecessary math.h and limits.h includesAllan Sandfeld Jensen2015-02-041-2/+0
| | | | | Change-Id: I28c898f869ed3f03b08ff55f2972a38667c755ad Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-12-291-0/+4
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.cpp src/gui/kernel/qplatformsystemtrayicon.cpp src/gui/kernel/qplatformsystemtrayicon.h src/plugins/platforms/xcb/xcb-plugin.pro Change-Id: I00355d3908b678af8a61c38f9e814a63df808c79
| * Fix win32-g++ build due to -WerrorSérgio Martins2014-12-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | qwindowsprintdevice.cpp:182:85: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] && DeviceCapabilities((LPWSTR)m_id.utf16(), NULL, DC_PAPERSIZE, NULL, NULL) == paperCount MinGW DeviceCapabilities is returning an int, although microsoft documents it as returning DWORD. Change-Id: I3acd76dde0b8b83f8a785ec84e3413115c847cb2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-032-5/+5
|/ | | | | | | | | | Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Do not pass a null pointer to unlink()Alexander Volkov2014-11-061-2/+3
| | | | | | | | Found by clang static analyzer. Change-Id: I8f15ae1a8e6afb91eafa6cee1d1b21e3539af6c1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* QPrinter - Fix DuplexMode on all platformsJohn Layt2014-10-243-0/+10
| | | | | | | | | | | | | 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>
* Get the correct available resolutions from the printerAndy Shaw2014-10-231-3/+3
| | | | | | | | | | On Windows the resolutions are available in pairs so get the y resolution from each pair as the y resolution is the one that is actually useful in QtPrintSupport terms Task-number: QTBUG-42007 Change-Id: I02c0588dd97c541e679f22431435751563caadb2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Windows: QWindowsPrintDevice::printableMargins avoids leaking the DCShawn Rutledge2014-10-221-1/+1
| | | | | | | | | MSDN says if the DC was created by calling CreateDC, it must be freed by DeleteDC not ReleaseDC. Task-number: QTBUG-41941 Change-Id: I4c60b5d2587f1c4d3332fce74224cbc8b756eb2a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Don't use QStringLiteral in comparisonsMarc Mutz2014-10-092-2/+2
| | | | | | | | | | | | | | For QLatin1String, operator== is overloaded, so comparing to a latin-1 (C) string literal is efficient, since strlen() is comparatively fast. OTOH, QStringLiteral, when not using RVO, litters the code with QString dtor calls, which are not inline. Worse, absent lambdas, it even allocates memory. So, just compare using QLatin1String instead. Change-Id: I7af3bf3a67c55dae33ffaf9922d004fa168a3f9c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update license headers and add new license filesMatti Paaso2014-09-2414-262/+150
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Add missing private headers warningSamuel Gaist2014-09-041-0/+11
| | | | | Change-Id: I7a4dd22ea3bcebf4c3ec3ad731628fd8f3c247e0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QWindowsPrintDevice check for NULL pDevMode from PPRINTER_INFO_2Dyami Caliri2014-06-201-0/+3
| | | | | | | | | The MSDN documentation states that the pDevMode member of PPRINTER_INFO_2 may be NULL. Task-number: QTBUG-39764 Change-Id: I9c3a4bb565115415dbf45544f3d2391107356610 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QPrinter/Windows: Fix handling of native paper source ids.Friedemann Kleint2014-05-231-0/+1
| | | | | | | | | | | | On Windows, it is possible to pass native Windows paper source ids >= DMBIN_USER to QPrinter::setPaperSource() and they are listed by supportedPaperSources(). Task-number: QTBUG-38897 Task-number: QTBUG-38888 Change-Id: I8f1264e80ce5bdddd3873602200b24eabee00502 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* printsupport: only build cocoa backend for OS XRichard Moe Gustavsen2014-04-301-1/+1
| | | | | | | | Cocoa is not available on iOS, so the plugin should not be built. But recent build system changes exposed that we did. Change-Id: I000d54b330a075abb8f4a8b28a970bb5b5edfeb5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Windows printer support: Fix linking problem when built with -no-opengl .Friedemann Kleint2014-04-231-1/+1
| | | | | | | | Add missing libraries that were otherwise pulled in by opengl.prf. Task-number: QTBUG-38431 Change-Id: I1705d432088a47b5a202595e818e9efcd5f6a4cf Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Fix build on older MinGW versionsKonstantin Ritt2014-03-171-0/+4
| | | | | | | | | > In constructor 'QWindowsPrintDevice::QWindowsPrintDevice(const QString&)': > src\plugins\printsupport\windows\qwindowsprintdevice.cpp:105:86: > error: 'DC_COLLATE' was not declared in this scope Change-Id: Ifb64c323765ae4b6abb80c32d4ba2bc3fbffa245 Reviewed-by: John Layt <jlayt@kde.org>
* QtPrintSupport - Fix QT_NO_PRINTER buildJohn Layt2014-03-175-9/+14
| | | | | | | | 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>
* QPrinter - Fix winPageSize() on Mac and LinuxJohn Layt2014-03-171-0/+3
| | | | | | | | | Using QPageSize internally provides the Windows ID on all platforms so remove the conditional compile on the QPrinter api and add support to the print engines. Change-Id: I31e23d5090a9b6ceb087c29dead050b0ee1855a5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPrinter - Use QPageSize and QPageLayoutJohn Layt2014-03-171-0/+12
| | | | | | | | | | | | | | | | | Use QPageSize and QPageMargins to get/set values in the print engines, add api to directly set the values, and rewrite the docs to make the paper-based api obsolete instead of the page-based api. Add new PPK keys to pass QPageSize, QPageMargins and QPageLayout to the print engines to ensure no level of detail is lost, e.g. for custom sizes passed to QPrinter. [ChangeLog][QtPrintSupport][QPrinter] QPrinter can now use QPageSize and QPageLayout in the public api to control the page layout for a print job. Change-Id: Iee39a4042bcd6141d29b0a82b49066d7a7a78120 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPrintEngine - Switch Cups to QPlaformPrintDeviceJohn Layt2014-03-172-184/+104
| | | | | | | | Use QPlatformPrintDevice in the Cups print engine for all device specific code. Change-Id: Ic1f5f8b4010a9958c320f3c0c727cf1bd1a70c65 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPdfPaintEngine - Use QPageLayout and QPageSizeJohn Layt2014-03-172-80/+41
| | | | | | | | | | Switch internals of QPdfPageEngine and derived classes to use QPageLayout and QPageSize to make handling of page layout and size more consistent by removing multiple implementations. In particular remove all use of the QPdf namespace version of page size. Change-Id: Ie820340015e8812c8162bd1a257dd0f51f4f0b85 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPrinterInfo - Switch to QPlatformPrintDeviceJohn Layt2014-03-174-173/+8
| | | | | | | | | | | | | | | | | | | Change the QPrinterInfo implementation to use QPlatformPrintDevice as the backend. Remove all the old QPrinterInfo related code from the QPA plugin. Add public api to QPrinterInfo to support some features from QPlatformPrintDevice. [ChangeLog][QtPrintSupport][QPrinterInfo] Added new public api for isRemote(), state(), defaultPageSize(), supportedPageSizes(), supportsCustomPageSizes(), minimumPhysicalPageSize(), maximumPhysicalPageSize(), supportedResolutions(), availablePrinterNames(), and defaultPrinterName(). The use of availablePrinters() is discouraged due to performance concerns. Task-number: QTBUG-35248 Change-Id: Ic38323a930549ad67bf04a1a6bb43d623dfe6a33 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPlatformPrintDevice - Add Windows implementationJohn Layt2014-03-175-2/+614
| | | | | | | Add Windows implementation of QPlatformPrintDevice. Change-Id: I007678cd6d2bdae0728b61cc2796a5c5e5d1578f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPlatformPrintDevice - Add CUPS implementationJohn Layt2014-03-175-0/+676
| | | | | | | | | | Add support to the CUPS print plugin for the new QPlatformPrintDevice class. Note this is called QPpdPrintDevicePrivate as it uses the CUPS PPD support which is deprecated from CUPS 1.6 onwards. A different plugin will be implemented for the CUPS 1.6 support. Change-Id: I26d005f90842d9c6262341171ef157536d28cc5d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPrintEngine - Remove Windows use of port and driverJohn Layt2014-02-261-3/+1
| | | | | | | | | | | | | | The use of the driver name and port name in the DEVNAMES structure is no longer required within the Windows print engine and dialogs. The CreateDC docs clearly state any driver value passed in for a printer is ignored. The PRINTDLGEX docs also state only the name is actually used. The use of the port name is not required as the DeviceCapabilities api works fine with just the printer name and the FILE: port can be manually handled. Change-Id: I7765d73d4a31b1a3c5dab55ee4cfd3580bcf9ad7 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPrintEngine - Fix PPK_CollateCopiesJohn Layt2014-02-051-1/+1
| | | | | | | | | | | | | | | | | Mac supports Collate Copies using native api, so add support. Note this is mostly only useful for setting the print dialog default, as Mac supports server-side multiple copies so the app will never need to collate the copies itself. Change PDF and Windows to default to collate true to match Mac as this is the behavior users expect. Task-number: QTBUG-27724 Task-number: QTBUG-35251 Task-number: QTBUG-22144 Change-Id: Ia43dbc260b3a71aa5b267cca54c168ffbea794fc Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Refresh CUPS printer list when QPrinterInfo.availablePrinters() is called.Friedemann Kleint2013-10-172-6/+19
| | | | | | | | | | Introduce freeCupsPrinters() thus fixing a bug in the old deallocation code which would first set m_cupsPrintersCount = 0 and then pass it to cupsFreeDests(). Task-number: QTBUG-33666 Change-Id: I94c51cb390761a669a9cbd589c1131cfb51354c3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Refresh Windows printer list when QPrinterInfo.availablePrinters() is called.Friedemann Kleint2013-10-172-19/+37
| | | | | | | | | Introduce static query functions. Task-number: QTBUG-33666 Change-Id: I291098c9da82bc2cc24957044187e93cdc33c41d Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Add support for setting/getting the paper name on the QPrinterAndy Shaw2013-03-122-2/+46
| | | | | | | | This adds support for specifying a paper name which will be set on the printer if it is available for the driver. Change-Id: Id7fd0c8cf68745db3d7a8de7e2ac98d3e2ba9b79 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Add support for getting the paper names available for the printerAndy Shaw2013-02-114-0/+12
| | | | | | | Task-number: QTBUG-27714 Change-Id: I9bc6f1188f262e43f581add058d7895e1b5bd9e3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-292-4/+0
| | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-1810-10/+10
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add PLUGIN_CLASS_NAME to qtbase pluginsMiikka Heikkinen2012-12-103-0/+3
| | | | | | | | Needed for automating static plugin loading. Task-number: QTBUG-28131 Change-Id: Icd993c0fc8335f29aeec30e853a408d888069399 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* specify MODULE to avoid module .pri filename clashMark Brand2012-11-023-3/+3
| | | | | | | | | | | | | | | Since 733ac1f6e6b3155a594376ef99288c6117124000 the default MODULE is the base of the .pro file for the plugin (i.e., "windows"). Since MODULE becomes the base of the module .pri, the names of the module .pri files can clash. Now we explicitly specify MODULE for printersupport plugins to avoid overwriting the module .pri files of the platform plugins whose .pro files have the same names. Follow-up to 81f8f0db5cb75e29b041a011ca4e7dbbf2d903c5 which renamed the TARGET. Change-Id: Ie83892dc419257e1df3b81bcf6ecec751ae345b0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* disambiguate plugin name vs. windows platform pluginOswald Buddenhagen2012-11-011-1/+1
| | | | | | | | | static plugin linking needs unique names. also, non-unique names are generally somewhat counterproductive. Change-Id: Idffba2b442b98dd2b0917f9f0af89f0694a99196 Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* beef up qt_plugin.prfOswald Buddenhagen2012-11-013-11/+6
| | | | | | | it now defines the DESTDIR and creates an INSTALLS rule. Change-Id: I15a462ccad9acbe3521c352fa98327825dc27c05 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* QtPrintSupport: Fix build with QT_NO_PICTURE.Sérgio Martins2012-10-131-0/+1
| | | | | | | | | | | | | | Printer support depends on having Picture support. If QT_NO_PICTURE is defined, qfeatures.h will define QT_NO_PRINTER. Not all code is including qfeatures.h, which causes inconsistency, some code has QT_NO_PRINTER defined and some has not, which causes the build to fail. Change-Id: I10a854244a41d017b921b731ec0e08f90a3326cf Reviewed-by: Holger Ihrig <holger.ihrig@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* QtPrinterSupport: Fix compilation with QT_NO_PRINTERSergio Ahumada2012-10-093-0/+11
| | | | | | | | | | | This seems to be a left over of 80f7a388906f94f58bf765a32b9abbb16f967db2 Task-number: QTBUG-27177 Change-Id: I72a285ed1d64f756d585a86d8401ee23eb4a1ce1 Reviewed-by: Sérgio Martins <sergio.martins.qnx@kdab.com> Reviewed-by: Indrajit Tapadar <indrajit.tapadar@digia.com> Reviewed-by: Holger Ihrig <holger.ihrig@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* QtPrintSupport: cleanup CUPS tmp filesTeemu Katajisto2012-09-271-0/+1
| | | | | | | | | Set fd so that it gets closed in QPdfPrintEnginePrivate::closePrintDevice() Task-number: QTBUG-14724 Change-Id: Ic9c02c92b07ece92911d7bc3eac79689b4864253 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* QtPrintSupport: use PPD defaults in CUPS pluginTeemu Katajisto2012-09-262-0/+112
| | | | | | | | | | Initialize CUPS plugin with default values from the PPD file. Implement paper size handling when using CUPS paper sizes to make paper sizes to map properly when used through QPrinter interface. Change-Id: I84d20aa4b1c7250fca754aecde419467f57ef16b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2210-240/+240
| | | | | | | | 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>
* printersupport: Fix cups.pro qmake warningGirish Ramakrishnan2012-06-131-1/+1
| | | | | | Change-Id: I59c8e3021fbf733af003ebd99be4a63e0a68f155 Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* QtPrintSupport - Add CUPS printer and options queries to pluginJohn Layt2012-06-092-10/+89
| | | | | | | | | | | | | | | | Implement initial support in the CUPS plugin for directly calling CUPS to obtain printer list and basic printer info rather than QCupsSupport. Add api to the plugin to return any options for a printer, usually IPP options as implemented for CUPS, but whatever applies for the host print system. Future changes will add support for returning the PPD options. This api may eventually be added to QPrinterInfo, but not in 5.0. Change-Id: I6c8bae4c9295009599e6ab31382f5fff4c93981f Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com> Reviewed-by: John Layt <jlayt@kde.org>
* QtPrintSupport: Move printer list into plugin base classJohn Layt2012-06-082-13/+1
| | | | | | | | | Move the cached printer list from the Windows plugin into the base class so the CUPS plugin can also use it in a subsequent commit. Change-Id: Idf5fb7fc49b1820aad58f16e8854ab9120caa193 Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com> Reviewed-by: John Layt <jlayt@kde.org>
* QtPrintSupport: Move plugin access of QPrinterInfo internals to baseJohn Layt2012-06-083-20/+4
| | | | | | | | | | Move all plugin methods requiring access to QPrinterInfo internals into the plugin base class, and remove the plugin classes as friends from QPrinterInfo. Change-Id: Ic527efc681e198abf19e038dd77c36bb8017d049 Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com> Reviewed-by: John Layt <jlayt@kde.org>
* Remove dependency from QFactoryInterface for the print pluginLars Knoll2012-06-082-12/+0
| | | | | Change-Id: Ia35890b72e7797ef655bf97b4a34af2908657c0e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtPrintSupport: Add CUPS printsupport pluginJohn Layt2012-05-318-0/+649
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move CUPS code around to create a new CUPS printsupport plugin, this fixes QPrinterInfo for CUPS which depends on the plugin to work. It QT_NO_CUPS is defined then the plugin is not built and only Print to PDF is supported under Linux. * Move unused genericiunixprintersupport plugin to start new CUPS printsupport plugin * Split QPdfPrintEngine to create QCupsPrintEngine * Remove LPR related code from QPdfPrintEngine * Move CUPS specific code from plugin base class to derived CUPS class * Remove forcing CUPS print engine to use PDF mode as PDF is now Native * Move qt_getCupsPrinterPaperSizes from qprinterinfo_unix to QCUPSSupport * Remove qprinterinfo_unix as no longer used * Remove all QT_NO_LPR uses There is now no CUPS specific code left in printsupport/kernel except QCUPSSupport which is needed for the dialogs. Task-number: QTBUG-23060 Change-Id: Ie8fa4512a2424edc8943068e0fa9fb714cc42db9 Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: John Layt <jlayt@kde.org>
* Remove capitalization when specifying include-libraries.kb2012-05-141-1/+1
| | | | | | | | | | | | | MinGW installations on case-sensitive filesystems expect lowercase names of include-libraries and (usually) include files. When crosscompiling on Debian 6 (targeting MS Windows) linking fails because mingw is looking for non-existent include-libraries. Using lowercase names solves this. Change-Id: Id3454f4ed8ba42b6ea93d65d9c0ce567db6712df Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Expose QPA API under qpa/*Girish Ramakrishnan2012-05-074-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Compile fix for MinGW.Friedemann Kleint2012-03-241-1/+3
| | | | | Change-Id: Id8099668dd1a4b137b6f9451be8617d07bc9d0c3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>