summaryrefslogtreecommitdiffstats
path: root/src/printsupport
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'gerrit/master' into newdocsTor Arne Vestbø2012-10-263-7/+16
|\ | | | | | | Change-Id: I10cf9f915c602c8e5a0e7d7c9e17b7bc5ca00640
| * Make QPen default to 1-width non-cosmetic.Samuel Rødal2012-10-222-5/+16
| | | | | | | | | | | | | | | | | | | | | | Use the Qt4CompatiblePainting render hint when painting with QPainter to treat default constructed QPens as cosmetic still. The NonCosmeticDefaultPen render hint gets documented as obsolete, since it was in any case not respected by the raster nor OpenGL paint engine. Change-Id: I04d910e9700baf7f13a8aac07a3633014bb9283e Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * remove explicit load(qt_build_config)s from the librariesOswald Buddenhagen2012-10-191-2/+0
| | | | | | | | | | | | | | .qmake.conf (and previously .qmake.cache) already does that for us. Change-Id: I06cc01fa45921d7bd66dda7a0f88729faeff37bd Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Merge remote-tracking branch 'gerrit/master' into newdocsTor Arne Vestbø2012-10-162-16/+3
|\| | | | | | | Change-Id: If2168c519daf45390af04af9ef9722770453a493
| * Revert a change to printer orientationTitta Heikkala2012-10-151-15/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reverting change: Ia6bc9ae14d79a646e61bfc97652f9f5af90738b3 The previous change does not set the printer correctly. It looks based on the tests that the correct printer is set, but in reality the default printer is used (even though printerName() is returning the printer set). Updated taskQTBUG4497_reusePrinterOnDifferentFiles() test case so that it generates PDF instead of PS. Testing the binary output can't be guaranteed to work in this case. Change-Id: Iee111f2c2dec84f86344a38816c21e191f5373ea Reviewed-by: Andy Shaw <andy.shaw@digia.com>
| * Fix number of available printers in CUPS support.Rafael Roquetto2012-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the number of available printers changes, we want to update the count. Additionally, if that number has gone to zero, we want to ensure that the number of available printers in the static object is reset to zero. This fixes a crash that occurs if: * You print * You kill cupsd (or it crashes because you're porting it and your port is unstable) * You try to print again before restarting it. Change-Id: I6c6069db9d800ce7426e75df760829fea278e56e Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | doc: Add a bunch of missing dependsTor Arne Vestbø2012-10-161-1/+1
|/ | | | Change-Id: I32c3730f8181d73a7c8e36ef382c74b8da754269
* Modularize documenation buildTor Arne Vestbø2012-10-102-6/+4
| | | | | | | | | | qdocconf files can now reference $QT_INSTALL_DOCS to pick up e.g. global includes, instead of using relative paths. Qt modules will automatically get a doc target that builds and installs into the right place (including supporting shadow-builds) if they set QMAKE_DOCS before loading(qt_module). Change-Id: Ia408385199e56e3ead0afa45645a059d1a8b0d48 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2249-1035/+1035
| | | | | | | | 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>
* printsupport: Include own headers firstSergio Ahumada2012-09-192-2/+4
| | | | | | | | cpp files should include their own headers first (but below config.h) Change-Id: I32a2c76a39d03f543c3eb8393b5e3015276f0622 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Sergey Hambardzumyan <sergey.hambardzumyan@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>
* Fix QPrinter documentation errors.Mitch Curtis2012-09-132-76/+34
| | | | | | | | | Removed documentation for non-existent functions and added external-resources.qdoc. Change-Id: I5159540d8304dd6e2e452be11404d40fc599a2a7 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* QtPrintSupport: set QPrinter margins also to QPagedPaintDeviceTeemu Katajisto2012-09-111-0/+3
| | | | | | | | | | | | | QPagedPaintDevice::setMargins() is virtual method and reimplemented in QPrinter but super class margins were not set in reimplemented method. This fixes problem where QTextDocument::print() checked the margins using QPagedPaintDevice::margins() and overrided the margins set in QPrinter::setMargins(). Change-Id: I3bdcc33b8f6b5a9cbcb04a21484fdd1612dd7d58 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix qdoc tag.Frederik Gladhorn2012-09-111-1/+1
| | | | | | Change-Id: I683ee205945f4b3febff6ba9ec9e419a017f24b6 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Do not include /examples in qdocconfs.Frederik Gladhorn2012-09-111-1/+1
| | | | | Change-Id: I84a925a8be4964fae667f5a2500157283a8057d2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Doc: Centralize more common settings in 1 global qdocconf.Casper van Donderen2012-09-111-36/+1
| | | | | | | | | | All qdocconf settings that should be used by all Qt modules are now in qt-module-defaults.qdocconf. Change-Id: I2a0315a55db3fcbb0160c4392d2da98611043d83 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* printsupport: Fix missing or improper include guard in headersSergio Ahumada2012-09-084-10/+10
| | | | | | | | 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>
* Doc: Fix docbuild when not using -developer-build.Casper van Donderen2012-09-011-2/+2
| | | | | | | | https://codereview.qt-project.org/#change,33974 only works in the case of a developer build. Not in a normal prefix build. Change-Id: I3a3e5029cefaa9f83c5deb71665f0efa9d812819 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Doc: Simplify qtbase qdocconfs.Casper van Donderen2012-08-311-15/+2
| | | | | | | | | | We should be using the global qdocconf for the common variables. This change also allows you to just specify -installdir without using a templatedir. Change-Id: I207d279d9b5199212e896fc5ccab5c212b1896c6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Ensure that printer orientation is preservedTitta Heikkala2012-08-301-2/+15
| | | | | | | | | | | | | | | | | After setting the printer name the initialization is no longer done for a printer with a name. Instead doReinit() method is called to preserve the orientation (set with setOrientation() method before calling setPrinterName()). Before the orientation was changed back to default when setPrinterName() method was called ignoring the orientation set. Updated also the autotest because the case: taskQTBUG4497_reusePrinterOnDifferentFiles() is no longer expected to fail on Windows. Task-number: QTBUG-26008 Change-Id: Ia6bc9ae14d79a646e61bfc97652f9f5af90738b3 Reviewed-by: Andy Shaw Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Exclude the examples/widgets/doc dir for all but widgets.Frederik Gladhorn2012-08-291-0/+2
| | | | | | | | There are too many references to the QWidget lib documentation in there. On the other hand this keeps snippets working. Change-Id: I7dd63b7fba1758accea2663f7b427940a8857e32 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Fix qdoc errors in PrinterInfo.Frederik Gladhorn2012-08-281-2/+1
| | | | | | | | Document parameter and associate comment with function by removing newline. Change-Id: Ib4bb07c325144ef3501aea81d9e49e09b007387d Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com> Reviewed-by: Laszlo Papp <lpapp@kde.org>
* Misc documentation fixes triggered by qdoc errors/warningsShawn Rutledge2012-08-201-16/+9
| | | | | Change-Id: I6ca3b138114fe957a09e8ec2f22273865635fc8b Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* rename qt_module_config.prf => qt_module.prfOswald Buddenhagen2012-08-081-1/+1
| | | | | | | this is more logical, following the qt_plugin and qt_tool scheme. Change-Id: Ib3b2abec6728cdab260e15128b1cd78e8e6f5d6a Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* replace \key and \gui qdoc commands with \uicontrolJeremy Katz2012-08-012-2/+2
| | | | | Change-Id: I0753305d4fe1ea20417f451766101da1247dfeeb Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QtPrintSupport: Replace remaining Q_WS_ conditionals by name checks.Friedemann Kleint2012-07-213-16/+4
| | | | | 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>
* Remove Library dependency on SettingsTasuku Suzuki2012-07-091-1/+1
| | | | | | | | made QLibraryInfo available with QT_NO_SETTINGS. QKdeTheme is removed when QT_NO_SETTINGS is defined. Change-Id: I63d619bb305e6c23985d9ea50c72d39a697b7a4b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Remove _qpa from cpp filenamesGirish Ramakrishnan2012-07-032-1/+1
| | | | | | | | 36547f4eff44361f7a6acd0cff107c0e47561f93 removed the _qpa from .h files and promised to remove it from .cpp files at a later date. Change-Id: I24a5c3796f6b07dd9a1931b699f3212d315edb12 Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
* Clean up the EXPORT macros in qglobal.h.Thiago Macieira2012-06-298-1/+73
| | | | | | | | | | | | | | | | | | | | 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>
* Get started with patching up the Qt GUI docsGunnar Sletta2012-06-281-3/+1
| | | | | | | | Primary goal, make the front page of the Qt GUI module a bit more clarifying and avoid downstream references inside the Qt GUI docs. Change-Id: Icbcfbb64b93963add889bf83711daa9575885c02 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* fix misnomer: qt_module.prf => qt_build_config.prfOswald Buddenhagen2012-06-191-1/+1
| | | | | | qt_module suggests to be congruent to qt_plugin. Change-Id: I629530bcbe2ba6c0adbdc11a275119c8aff0c953
* automatically add QT_BUILD_FOO_LIB to DEFINESOswald Buddenhagen2012-06-191-1/+1
| | | | | Change-Id: I35d9861e48469eb5cc8824e361450684047e6559 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* clean up projects from QPRO_PWD nonsense, etc.Oswald Buddenhagen2012-06-191-1/+0
| | | | | Change-Id: I4c41aedf5bfb37e31ad202cacd2312b0bdb168e2 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* auto-generate QMAKE_PKGCONFIG_REQUIRES and QMAKE_PKGCONFIG_DESCRIPTIONOswald Buddenhagen2012-06-191-2/+0
| | | | | | | less boilerplate, more accuracy Change-Id: I6cc2abd50eafb4901d987c122f10a62ec9ea9da3 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* auto-generate module prisOswald Buddenhagen2012-06-191-2/+0
| | | | | Change-Id: I654428771034221ccf424be34d5d9c7764daf3b4 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* automatically add the version header to HEADERSOswald Buddenhagen2012-06-191-2/+0
| | | | | Change-Id: I7c2e1d852ebdbc5cca7a3a31ab2b4c9ab9faffd9 Reviewed-by: Joerg Bornemann <joerg.bornemann@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>
* make qt_module_config.prf install the module pri fileOswald Buddenhagen2012-06-191-1/+0
| | | | | | | | | absorb module.prf into qt_installs.prf, as that's where it belongs. add qt_install_module option and automatically set it in qt_module_config. make qt_installs use that option. Change-Id: I860616f3a29a456f7b88ddaffa09375400c8911e Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* QtPrintSupport - Add CUPS printer and options queries to pluginJohn Layt2012-06-092-0/+19
| | | | | | | | | | | | | | | | 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-2/+5
| | | | | | | | | 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-084-17/+18
| | | | | | | | | | 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-081-10/+1
| | | | | Change-Id: Ia35890b72e7797ef655bf97b4a34af2908657c0e Reviewed-by: Thiago Macieira <thiago.macieira@intel.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-3114-1416/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 - Add QPrinterInfo api for more printer detailsJohn Layt2012-05-293-0/+49
| | | | | | | | | | | | | | | A previous commit changed the Mac behaviour for printerName() from returning the CUPS Description to returning the CUPS Name. In case anyone was relying on this for a human-readable name add new api to return the CUPS Description. Also add the Location and Make and Model which will be used in the Unix print dialog instead of directly calling CUPS. Change-Id: I9901bf8d6368466adf111580f5db5a3f01ca9170 Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: John Layt <jlayt@kde.org>
* QtPrintSupport: Change QPrinterInfo::defaultPrinter() behaviourJohn Layt2012-05-292-1/+6
| | | | | | | | | | | | | | | | | | | | | | In Qt4 QPrinterInfo::defaultPrinter() has inconsistant behaviour depending on the platform. On Mac and Unix if no default printer is set in the system then the first available printer is returned. but on Windows it returns a null QPrinterInfo. Currently Qt5 returns the first printer on all platforms, but this causes an inconsistency if you call isDefault() on the returned QPrinterInfo. The apidox is slightly ambiguous, but does seem to imply no printer will be returned if no default is set. The only place in Qt the public api is used is in QPrinter which is coded expecting that defaultPrinter() may return null but for there still to be availablePrinters(). Change-Id: I1bbef8cba259b7d51980a0199e9fd6d5466d921f Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.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>