summaryrefslogtreecommitdiffstats
path: root/src/printsupport/dialogs
Commit message (Collapse)AuthorAgeFilesLines
...
* QPageSetupWidget - Fix copying of printer settingsJohn Layt2013-12-081-3/+0
| | | | | | | | | Don't copy the dialog settings to the QPrinter before the Print button is pressed, in case the Cancel button is pressed instead. The settings already get copied in the right place. Change-Id: I84d0053b450cf5839bf1a879af013f305a8fd377 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* QPrintDialog - Fix setting of PageOrderJohn Layt2013-12-082-14/+1
| | | | | | | | | The print dialog was setting the PageOrder on the QPrinter as soon as the check box was toggled and not when the Print button was pressed, meaning the change is not forgotten when Cancel is pressed. Change-Id: I19637b7efacfb5388c70d2e7d9d05a05ecc5b2ea Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* QPrintDialog - Fix casting print engineJohn Layt2013-11-261-2/+2
| | | | | | | We want to cast the print engine, not the paint engine. Change-Id: Ia8f11f0215fa066417118fbfbcc921a60282d713 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Add missing Q_INIT_RESOURCETor Arne Vestbø2013-11-071-0/+6
| | | | | | | | | | | The library needs to do Q_INIT_RESOURCE for all resources it uses internally, otherwise static linking will fail, and the user has no idea how to rectify it as the name of the missing resource is not known. The Q_INIT_RESOURCE needs to happen outside of any namespace, hence the use of static initResources() functions. Change-Id: I8f7d36b440b05809d97dd489cf8789f345633cec Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QPrintDialog - Fix Windows Current Page option selectionunknown2013-11-041-2/+4
| | | | | | | | | | | In the Windows print dialog default the print range radio button selection to the QPrinter set value, but only if the option is enabled in the dialog. Task-number: QTBUG-32965 Change-Id: Ic64d86d263a2f8e31c8b32608b569499d0f24d63 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* use private linkage where possibleOswald Buddenhagen2013-10-311-1/+1
| | | | | | Change-Id: Ie8eaa71bee87654c21218a23efd7e9d65b71f022 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Set currently selected printer to QCUPSSupport in PageSetupWidgetMartin Klapetek2013-10-181-0/+1
| | | | | | | | Also adds new method to allows setting a printer in QCUPSSupport by printer name. Change-Id: Iff7a88d95eab9de2c96872c45b12e708207bda16 Reviewed-by: John Layt <jlayt@kde.org>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-1/+1
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix QT_NO_PRINTER build on MacVitalii Shastun2013-09-262-3/+4
| | | | | | | | On Mac the QT_NO_PRINTER build was not implemented. Task-number: QTBUG-33565 Change-Id: I118472f9400aa0a0d0e192ae39a11ea38a66f340 Reviewed-by: John Layt <jlayt@kde.org>
* Merge branch 'stable' into devSergio Ahumada2013-09-211-1/+1
|\ | | | | | | Change-Id: I37d85631ab1165ab91457d8880c4da907a9df73b
| * Initialize the print panel with the NSPrintInfo we have createdAndy Shaw2013-09-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | Since the Cocoa Print Panel was not initialized with the NSPrintInfo we had created, it meant that it did get any of the settings from the print dialog as it was trying to access an invalid NSPrintInfo. Task-number: QTBUG-32734 Change-Id: I23c766eb13281f4c494656a54d37c5bf28fb68fd Reviewed-by: John Layt <jlayt@kde.org>
* | Offer Page Range option for apps that can't do it themselvesMartin Klapetek2013-09-201-12/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some apps may not support printing only a particular page range, but with CUPS we can do "server-side print range", ie. we can select the page range for the application. If CUPS is available, the Page Range widget is now displayed if app advertises no such capability and page range is selected on the server instead. [ChangeLog][QtPrintSupport][QPrintDialog] Added CUPS server-side print range support for apps that can't support print range option themselves Change-Id: Ia7784065ba5a8b53bb05ae46e982c718ef672fa5 Reviewed-by: John Layt <jlayt@kde.org>
* | Check if Print Properties dialog was shown before accessing itMartin Klapetek2013-09-201-8/+10
| | | | | | | | | | | | | | | | | | Prevents a crash in case the user did not open the properties dialog, in which case QUnixPrintWidgetPrivate::propertiesDialog is null. Change-Id: I43c8c6ab90053757835bbf41d6167204d42efcef Reviewed-by: John Layt <jlayt@kde.org>
* | Expose more CUPS options via the 'Properties' dialogMartin Klapetek2013-09-204-65/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On systems with CUPS support users can now choose how many pages from a document are to be printed on paper. This can vary from 1 page per document to 16 pages per document. The page preview changes upon the users selection. Also included in the patch is an option to choose the flow for text. Users can now print documents in the "Right to Left" order or "Bottom to Top", including many other options. [ChangeLog][QtPrintSupport][QPrintDialog] Added support for setting CUPS Pages Per Sheet and Pages Per Sheet Layout options Change-Id: I4e60a4523c6e06d4c15fe9ee9590248fa7ae2038 Reviewed-by: John Layt <jlayt@kde.org>
* | Add CUPS Page Set options to print supportMartin Klapetek2013-09-173-7/+106
| | | | | | | | | | | | | | | | | | | | | | Adds combobox to select CUPS Page Set option (even/odd pages) into the Unix print dialog [ChangeLog][QtPrintSupport][QPrintDialog] Added support for setting CUPS Page Set (even/odd pages only) in the print dialog. Change-Id: I27dd846f58c164039fe2759064aafdf726a1287e Reviewed-by: John Layt <jlayt@kde.org>
* | Add CUPS options widget to print supportMartin Klapetek2013-09-101-0/+21
|/ | | | | | | | | | | | | | | This adds new tab 'Job Options' into Properties dialog in print dialog. In this tab it's possible to set some advanced printing job options such as print schedule, job priority or job billing. Patch also adds new utility methods into QCUPSSupport, which are used to set particular CUPS job options. [ChangeLog][QtPrintSupport][QPrintDialog] Added support for setting CUPS job options in the print dialog. Change-Id: If2640eedb3d83f50cbb20491f7ec50b325f54f22 Reviewed-by: John Layt <jlayt@kde.org>
* QPrintDialog OSX: don't crash if ApplicationModal and no parentShawn Rutledge2013-07-251-1/+3
| | | | | | | Task-number: QTBUG-32464 Change-Id: I5ee2741735255254c17555dfb977ce73941d3e22 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
* QPrintDialog: document the modality on OS X and WindowsShawn Rutledge2013-07-241-0/+4
| | | | | | | | | You can't programmatically close the dialog because it's modal. Task-number: QTBUG-32464 Change-Id: I2f24581dc660a088b4e741fa4ee1518e27adea4a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QtPrintSupport: Initialize UI of widget-based dialog.Friedemann Kleint2013-06-263-6/+4
| | | | | | | | | | | | | Remove virtual from QPageSetupDialogPrivate::init() (which was called from the constructor) and keep it as a non-virtual function for QUnixPageSetupDialogPrivate. Fix breakage introduced by 54b899f44877d87f6118b1bab02fb67c35d738e8 . Task-number: QTBUG-31790 Change-Id: I6d552bc250e4d72c1bb50eceadd2852b1b957aea Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc: Remove widgets examples from Qt Print Support documentationTopi Reinio2013-05-201-2/+1
| | | | | | | | | | | | | | | | The .qdocconf file for Qt Print Support includes examples/widgets in its exampledirs, presumably because a few examples there have printing support. The documentation for these examples is not accessible from Print Support index/module pages, and qdoc prints a lot of warnings for them (missing images). There's only few dependencies to examples in Print Support docs. These are resolved by copying a code snippet to correct place, and removing \sa links from QAbstractPrintDialog. Task-number: QTBUG-31137 Change-Id: Iac20d151f93ac16449241c6ee85979781b26e607 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Clean up old PostScript printing codeSze Howe Koh2013-05-121-9/+2
| | | | | | | | | | | | | PostScript support was removed back in 2011: 34f712e79e97b757b4426e1ffa09e065c9e379a1 - The QPSPrint* classes are gone - The QPrinter::OutputFormat enum only has NativeFormat and PdfFormat constants - QPaintEngine::PostScript is unused now Change-Id: I27d595b92341f41e14bd1e4fd860eac6826d7890 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add support for setting/getting the paper name on the QPrinterAndy Shaw2013-03-121-5/+11
| | | | | | | | 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>
* iOS: Don't include QtPrintSupport dialogs on iOSTor Arne Vestbø2013-02-271-1/+1
| | | | | | | It pulls in a dependency on Cocoa. Change-Id: I293063adfdef8b92f80ffda0c66ac6e6d12958ff Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-294-16/+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-1817-17/+17
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Replace macro qdoc with Q_QDOCDebao Zhang2013-01-081-1/+1
| | | | | | | | Both qdoc and Q_QDOC are used in source code, which looks not good. Change-Id: I4f3a71670278b0758d92bfa5db086a07e1b1acfd Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Fix print support docsLars Knoll2012-11-301-1/+1
| | | | | | | Make sure qdoc generates a correct overview for the module. Change-Id: I6ea95638459201a0bb09f2e645173ade3a36f0e0 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QtPrintSupport: use CUPS defaults for UNIX print dialogTeemu Katajisto2012-11-223-290/+178
| | | | | | | | | | | | | | Update printer defaults in UNIX print dialog when printer is changed. Task-number: QTBUG-23037 Task-number: QTBUG-6239 Task-number: QTBUG-15351 Task-number: QTBUG-19233 Task-number: QTBUG-22036 Change-Id: Ib03635035211bd69b5b23da20ffd2c03ac318a1a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* QtPrintSupport: remove advanced tab from UNIX print properties dialogTeemu Katajisto2012-11-222-436/+15
| | | | | | | | | | | | | The Advanced tab shows CUPS options and duplicates some of the settings in Page tab. These duplicate settings cannot be kept in synchronization and thus the Advanced tab causes confusion which settings are used. Remove the Advanced tab because the same settings are either available in Page tab or can be configured in system printer settings. Change-Id: I2dc2bf8b3b84dd19f24b2e6c1c9539c925d5d725 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Cocoa: QPrintDialog does not show/closes down immediatlyRichard Moe Gustavsen2012-11-141-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | This happends if an event loop recursion ends before the native print dialog gets executed (in the same scope). The reason is that the event dispatcher gets interrupted as the first recursion ends. And (because of the big difference between how AppKit implements modal windows compared to Qt) this sets a flag in the dispatcher that gets handled on the next callback to QCocoaEventDispatcher::processPostedEvents. This will tell the dispatcher to break out of the current modal session. But since it cannot detect that an alien (native) session is now running, it closes down that session by accident instead. While code can be written in the event dispatcher to detect this problem, it ends up more clean to just work around the problem from the native dialogs instead. This to avoid making the dispatcher more complex than it already is. Native dialogs is a bit messy already, and the work-arounds needed should be isolated inside those components, and not inside the dispatcher. Change-Id: Ibfde9db4c98401562e7628da1db18d6bed619245 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2217-398/+398
| | | | | | | | 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>
* SIC: QtPrintSupport - Remove QAbstractPageSetupDialogJohn Layt2012-09-179-275/+131
| | | | | | | | | | | | QAbstractPageSetupDialog is a completely unnecessary base class that is not really abstract and is used nowhere else. This changes merges its methods into the QPageSetupDialog main class. While technically SIC no-one else uses this so no apps should be affected. Change-Id: I59b1739f1c453c34c25d1664d5d042e7918db316 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Mark (non-public API's) ctor's as explicitSergio Ahumada2012-09-141-2/+2
| | | | | | | | | Make C++ class constructors that can be used with only one required argument 'explicit' to minimize wrong use of the class. Change-Id: I12ad5b6eb1794108c6b7464a2573e84068733b03 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* printsupport: Fix missing or improper include guard in headersSergio Ahumada2012-09-081-2/+2
| | | | | | | | Use an include guard in headers to ensure the header is not included more than once. Make the header guard match its file name. Change-Id: Iefc02181fe235ede51c567fb54997531e5cd08a3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* replace \key and \gui qdoc commands with \uicontrolJeremy Katz2012-08-011-1/+1
| | | | | Change-Id: I0753305d4fe1ea20417f451766101da1247dfeeb Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QtPrintSupport: Replace remaining Q_WS_ conditionals by name checks.Friedemann Kleint2012-07-212-5/+3
| | | | | Change-Id: Ic772e2187b3c93c5e0cdee6681289ab81e2c2f65 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Unix printing: Fix suggested file name for printing to file.Friedemann Kleint2012-07-171-12/+13
| | | | | Change-Id: Ieefe602dc8328a2e4188f7fa341016f8e330526e Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Clean up the EXPORT macros in qglobal.h.Thiago Macieira2012-06-293-0/+3
| | | | | | | | | | | | | | | | | | | | QtPlatformSupport is a static library. It should never export anything, so Q_PLATFORMSUPPORT_EXPORT is unnecessary. QtSql, QtXml, QtDBus, QtOpenGL and QtPrintSupport now have the macros on their own source trees. It's possible these modules might be separated out from qtbase in the future. For QtDBus, the macros are moving back to where they used to be. This also leaves qglobal.h only creating the macros for QtCore, QtGui, QtWidgets and QtNetwork, the core libraries. Q_CANVAS_EXPORT, Q_OPENVG_EXPORT and Q_COMPAT_EXPORT aren't used anywhere in the Qt sources, so simply delete them. And the Q_QUICK1_EXPORT macro in the static section was wrong, so remove it too. Change-Id: I50bdf86e783338f814903b25979721f788a7becf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* remove explicit RCC_DIR addition to INCLUDEPATHOswald Buddenhagen2012-06-191-3/+0
| | | | | | | | | | qrc_ files are generally not meant to be included, so there is not much point in doing this. qprintsupport was a notable exception - which broke on mac and thus needed a hack. just remove the qrc_ inclusion. Change-Id: If5115665f331a280869e800673bf7b81d3ab559a Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* SIC: QPrintSupport - Remove options api from QPageSetupDialogJohn Layt2012-06-074-137/+5
| | | | | | | | | | | | | QPageSetupDialog has an enum PageSetupDialogOption, however one option had support removed in Qt 4.5 and the remaining 2 are actually for an internal implementation detail that could lead to memory leaks if changed by an app. This change removes the enum and the api as they is now useless. Change-Id: I9a3ab689dcab57151de894db5ebf22f6ad90d71e Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: John Layt <jlayt@kde.org>
* QtPrintSupport - Cleanup QPrintDialog headerJohn Layt2012-06-014-75/+156
| | | | | | | | | | | | | | Move QUnixPrintWidget from the header to the UNIX implementation as it is not used anywhere else and doesn't need to be exported. Make the private slots only compile under UNIX, remove the Mac and Win stubs for them as unneeded. Add some documentation to the UNIX dialog Change-Id: I8f30504285df877e17ac8eeace875f666f43d94d Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com> Reviewed-by: John Layt <jlayt@kde.org>
* QtPrintSupport: Add CUPS printsupport pluginJohn Layt2012-05-313-25/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* QtPrintSupport: Fix QPrintDialog assertJohn Layt2012-05-291-2/+2
| | | | | | | | | Fix an assert that wasn't changed when the "Print to PS" option was removed Change-Id: Ife7350976707059861660a74dc2f89d302d861f0 Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com> Reviewed-by: John Layt <jlayt@kde.org>
* Replace `const QLatin1String &` with `QLatin1String` where appropriateKonstantin Ritt2012-05-251-1/+1
| | | | | | | Task-Id: QTBUG-24502 Change-Id: I360dee4dc68c165de0631ce4cf34e76fd873080e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Windows/MinGW: Fix warnings about missing enumeration values.Friedemann Kleint2012-05-211-0/+1
| | | | | Change-Id: I8fa6456e517d670a4d463fdc589cb32e4f79843c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Merge branch 'docs-refactoring' into masterMarius Storm-Olsen2012-05-101-1/+1
|\ | | | | | | Change-Id: Iebd1966abace3cdf7f9428dcfc1ded5b124ab113
| * Doc: Modularize QtPrintSupport documentation.Casper van Donderen2012-05-091-1/+1
| | | | | | | | | | | | | | | | This change moves the snippets and images to the modularized directories. Change-Id: Ib8f8556bcef13593ee40ac1122d765ed307ecb93 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* | Revert "QtPrintSupport: Remove remaining LPR specific code"Rohan McGovern2012-05-082-14/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't compile with a typical cross-compilation setup, which generally won't include cups headers. The commit should have been rejected, but wasn't, due to a bug in the Qt Project CI. Since it now causes all other modules depending on qtbase to fail their CI, it must be reverted to minimize disruption while the commit can be amended and/or the test toolchain updated to include cups headers. This reverts commit 80f7a388906f94f58bf765a32b9abbb16f967db2. Change-Id: I315ae275b37de358a74af28ab7bd691c9849acba Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* | QtPrintSupport: Remove remaining LPR specific codeJohn Layt2012-05-072-105/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CUPS is the only supported print system on UNIX, LPR/PS support has already been dropped but some LPR specific code still remains. * Move qt_getCupsPrinterPaperSizes from qprinterinfo_unix to QCUPSSupport * Remove qprinterinfo_unix as no longer used * Remove LPR related code from QPdfPrintEngine * Remove all QT_NO_LPR uses * Remove most QT_NO_CUPS uses, use QT_NO_PRINTER where necessary Some QT_NO_CUPS uses remain in QPdfPrintEngine, these will be removed in a following change implementing a CUPS plugin. Change-Id: I439b6fad9cf88c3d24aa48e49475f49ad310dbad Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Expose QPA API under qpa/*Girish Ramakrishnan2012-05-072-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>