summaryrefslogtreecommitdiffstats
path: root/src/plugins/printsupport
Commit message (Collapse)AuthorAgeFilesLines
* cmake: Remove APPLE prefix from platform namesTor Arne Vestbø2020-03-162-2/+2
| | | | | | | None of the other platforms have it. Change-Id: Ib448c2c03ba03f711b507ef391977c0e6aa7c192 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* cmake: Fix naming when referring to Apple macOSTor Arne Vestbø2020-03-162-2/+2
| | | | | Change-Id: Iafb5e448d0d65d42f788464fc600594a5666f9af Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Regenerate projects to correctly handle private dependenciesAlexandru Croitor2020-02-053-10/+8
| | | | | | | Change-Id: I7d84bc9962bff5c89a90367ae704974c6ce2ec89 Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Regenerate plugin projects to get new target namesAlexandru Croitor2020-01-273-9/+9
| | | | | | | | | And also to get the original output names (qmake's "TARGET"), so that the plugin file names are as they were in Qt 5. Change-Id: I96a060d1a81693652847857372bec334728cb549 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/dev' into merge-devLeander Beernaert2020-01-241-2/+2
|\ | | | | | | Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
| * Replace usages of QVariant::value by qvariant_castOlivier Goffart2019-12-151-2/+2
| | | | | | | | | | | | | | This is done automatically with a clazy check Change-Id: I3b59511d3d36d416c8eda74858ead611d327b116 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Regenerate src/*Alexandru Croitor2019-11-143-3/+3
| | | | | | | | | | | | Change-Id: I0314b4faa1e4860e86198eea4189987e527dfec2 Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Regenerate everything under ./srcAlexandru Croitor2019-11-123-3/+0
| | | | | | | | | | | | | | Change-Id: Ibdbdc17f8c2ee41356f490dd839a47e1bcf4c586 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-10-141-3/+1
|\| | | | | | | Change-Id: I4a78428a8ea273b6960792e3b8043f816fa37fcf
| * Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-041-3/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/codecs/qicucodec.cpp src/dbus/qdbusserver.cpp src/gui/painting/qbezier.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp src/plugins/printsupport/cups/qppdprintdevice.cpp Change-Id: I2703128bb64baf5580fbc2c2061b55b0f0611d2a
| | * Fix -no-feature-mimetype buildAllan Sandfeld Jensen2019-08-191-3/+3
| | | | | | | | | | | | | | | Change-Id: I282f630d6e8a0b2b10fd1286d7a185a068abc9f1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Merge remote-tracking branch 'origin/wip/qt6' into wip/cmakeAlexandru Croitor2019-10-111-0/+2
|\| | | | | | | | | | | Change-Id: I3a1d7673c3c20019ab12a2ea0a60f1619920a34c
| * | Fix build without features.mimetypeTasuku Suzuki2019-08-201-0/+2
| | | | | | | | | | | | | | | Change-Id: I9d3c20845b9ddecbafd6dfd756c5d17ae0c6b5fc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Regenerate printsupport pluginsAlexandru Croitor2019-10-084-12/+58
| | | | | | | | | | | | | | | | | | Change-Id: I3820d86bf4a36dd8ea53e5847c8d4de4b1ea9c61 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* | | cmake: Add missing CLASS_NAMEAlbert Astals Cid2019-10-031-0/+1
| | | | | | | | | | | | | | | | | | Change-Id: I5853578f427ae1d1b32ee5405694c216e2dd17cf Reviewed-by: Qt CMake Build Bot Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Add CMakeLists.txt for cocoa printsupport plug-inJean-Michaël Celerier2019-09-242-1/+26
| | | | | | | | | | | | | | | | | | | | | Change-Id: I0cc8b2827e0986d9ef486f327e7d84362e7d99c4 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into wip/cmakeAlexandru Croitor2019-06-031-1/+2
|\| | | | | | | | | | | | | | | | | Take 5. Change-Id: Ifb2d20e95ba824e45e667fba6c2ba45389991cc3
| * | Migrate Windows system libs to external dependenciesJoerg Bornemann2019-05-081-1/+2
| |/ | | | | | | | | | | Started-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Change-Id: I211ce3252b836894aeeac1c85eb316d9596bca57 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Write find_dependency() calls in Qt Module config filesAlexandru Croitor2019-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces a new function called qt_find_package() which can take an extra option called PROVIDED_TARGETS, which associates targets with the package that defines those targets. This is done by setting the INTERFACE_QT_PACKAGE_NAME and INTERFACE_QT_PACKAGE_VERSION properties on the imported targets. This information allows us to generate appropriate find_dependency() calls in a module's Config file for third party libraries. For example when an application links against QtCore, it should also link against zlib and atomic libraries. In order to do that, the library locations first have to be found by CMake. This is achieved by embedding find_dependency(ZLIB) and find_dependency(Atomic) in Qt5CoreDependencies.cmake which is included by Qt5CoreConfig.cmake. The latter is picked up when an application project contains find_package(Qt5Core), and thus all linking dependencies are resolved. The information 'which package provides which targets' is contained in the python json2cmake conversion script. The generated output of the script contains qt_find_package() calls that represent that information. The Qt5CoreDependencies.cmake file and which which dependencies it contains is generated at the QtPostProcess stop. Note that for non-static Qt builds, we only need to propagate public 3rd party libraries. For static builds, we need all third party libraries. In order for the INTERFACE_QT_PACKAGE_NAME property to be read in any scope, the targets on which the property is set, have to be GLOBAL. Also for applications and other modules to find all required third party libraries, we have to install all our custom Find modules, and make sure they define INTERFACE IMPORTED libraries, and not just IMPORTED libraries. Change-Id: I694d6e32d05b96d5e241df0156fc79d0029426aa Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | Merge commit 'dev' into 'wip/cmake-merge'Tobias Hunger2019-04-166-6/+20
|\| | | | | | | Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
| * Use Q_DISABLE_COPY_MOVE for private classesFriedemann Kleint2018-12-122-3/+3
| | | | | | | | | | Change-Id: I3cfcfba892ff4a0ab4e31f308620b445162bb17b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| * Fix QPpdPrintDevice::isDefaultAlbert Astals Cid2018-11-293-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | How to test: * Have two printers * Use lpoptions -d to set the default printer to be one and then the other * Use lpstat -d to check setting the default printer worked * Use this simple test program and check the resulting values make sense qDebug() << "DefaultPrinter" << QPrinterInfo::defaultPrinter().printerName(); const QList<QPrinterInfo> list = QPrinterInfo::availablePrinters(); for(const QPrinterInfo &pi : list) { qDebug() << pi.printerName() << pi.isDefault(); } Fixes: QTBUG-70317 Change-Id: I535d11451c568630a374f5c37d8cac32cbb6d3ab Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-10-172-2/+2
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platformthemes/platformthemes.pro src/printsupport/kernel/qplatformprintdevice.cpp Change-Id: Iac01729ad954bb1c7af5867d982eb243b2139ee6
| | * Modernize the "mimetype" featureLiang Qi2018-10-122-2/+2
| | | | | | | | | | | | | | | | | | Change-Id: I9b67c2cbc0891a38ece18d521c86fbc7344dce7a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | cmake: Find Cups and enable its pluginAlbert Astals Cid2019-02-122-0/+39
|/ / | | | | | | | | Change-Id: I44bf176587331d86eb147d106f28deb0a6618ab4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Remove some misplaced sizeof() scalings on array sizes for new[]Edward Welbourne2018-09-031-2/+2
| | | | | | | | | | | | | | | | | | | | Noticed during review of clang-tidy warnings. I have searched the source tree (using grep) and only this one file contains examples of this mistake. Change-Id: I3bbcec736e5a184db7251962fd3671a21ab5d238 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Windows code: Fix clang-tidy warnings about (private) class definitionsFriedemann Kleint2018-09-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | Add override, disable copies where appropriate and use = default for trivial functions. Change-Id: Ia5bc7419b1aa053c5503ea7dfaf11cb6dfafd2e2 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Windows code: Fix clang-tidy warnings about C-style castsFriedemann Kleint2018-08-302-9/+14
| | | | | | | | | | | | | | | | | | | | | | Replace by reinterpret_cast or const_cast, respectively. Use auto when initializing a variable to fix Clang warnings about repeating the type name, do minor tidying along the way, and a few conversions of 0 or NULL to nullptr. Change-Id: Ieb271a87ddcf064f536e1ff05d23b1e688b1b56a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | cups: Add a QT_CONFIG(dialogbuttonbox) guardTamas Zakor2018-08-231-0/+6
| | | | | | | | | | | | | | | | | | | | This fixes build with -no-feature-action configuration. The corresponding dialog is added by: 6c5c1a562c cups: Show a dialog when asked for password Change-Id: Ic88bdd62c756749959e66252427b5edc2c3ce7cc Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Windows: Cache the printer capability information the first timeAndy Shaw2018-07-202-10/+167
| | | | | | | | | | | | | | | | | | | | As remote based printers can be slow to query, meaning that it will take time to check all the capabilities, especially if the QPrinter is recreated on need. Then the information should be cached and reused if the printer is deemed to be the same. Change-Id: If8f9626c0d44113c698b4f61bbd197157932ccbe Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Liang Qi2018-05-031-1/+4
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-031-1/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/graphicsview/elasticnodes/graphwidget.cpp examples/widgets/graphicsview/elasticnodes/node.cpp examples/widgets/graphicsview/elasticnodes/node.h src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_drawing.mm src/widgets/kernel/qmacgesturerecognizer_p.h Change-Id: I13cf06bac75d48d779d8ee7b5c91bfc976f2a32c
| | * If the page size is not valid on the new printer, set a custom sizeAndy Shaw2018-05-021-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the page size was not valid on the new printer, it would end up having the wrong page size name on the new printer. What should happen in this case is that it should set the originally set page size as a custom page size on the printer instead. Task-number: QTBUG-62221 Change-Id: Iaca34ae262f5d0685ca60e4ca4b38229a2283289 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
* | | cups: Show a dialog when asked for passwordAlbert Astals Cid2018-05-031-0/+72
|/ / | | | | | | | | | | | | | | | | Otherwise the default cups implementation is used, that is, asking for the password on the command line, which is probably not what our users expect. Change-Id: Ib563d542fee71c13ed23b1a99fbe06a7d4d4eadf Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | q{cocoa,ppd}printdevice: Fix string comparisonMichael Weghorn2018-04-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'QPrint::Color' should be returned in case 'ColorModel' is NOT set to 'Gray'. However, the logic was inverted before, since 'qstrcmp()' returns 0 if the two strings match. Also, eliminate a redundant condition: The left-hand side of the '||' already makes sure that 'colorModel' is non-null, so there's no need to check again. (Corresponding cppcheck warning: "Redundant condition: colorModel. '!A || (A && B)' is equivalent to '!A || B'") Change-Id: I965c29e8c020bc9c47a53678e23d94f05be3fd53 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | cups: Support raw printersAlbert Astals Cid2018-04-042-13/+12
| | | | | | | | | | | | | | | | They don't have a ppd but we don't *really* need a ppd to just print Change-Id: Idf6b6dafc19420a511b057194488e2170cae4d70 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | QPpdPrintDevice: Move loadPrinter code to the constructorAlbert Astals Cid2018-04-042-34/+19
| | | | | | | | | | | | | | It was only called from it and makes the code simpler by not having to have the code to free the ppd, etc Change-Id: I4351f9906757b666255b7c31b4c1d8aecf6e873b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | cups: Honor installable options for DuplexAlbert Astals Cid2018-03-271-3/+7
| | | | | | | | | | | | | | | | | | | | | | i.e. don't show the duplex options if you don't have the duplexer hardware installed, otherwise you just get a conflict warning selecting any duplex option which doesn't make any sense since it's not something you can fix by other means than going out and buying the missing hardware Change-Id: Ief3fea5b86ab65b18765887b1c5d6d279ee337fa Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Remove unused QPpdPrintDevice constructorAlbert Astals Cid2018-03-232-8/+0
| | | | | | | | | | Change-Id: I19a6cddebfbd1b72f01feae8873a634348cdc926 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Move duplex member from QPdfPrintEnginePrivate to QCupsPrintEnginePrivateAlbert Astals Cid2018-02-202-1/+7
|/ | | | | | | | Duplex doesn't really make sense in the context of printing to pdf, and the variable was only being used in QCupsPrintEnginePrivate anyway Change-Id: I801634c56759572825b5c9549d7a1dc92e5697a0 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Remove QCupsPrintEnginePrivate::setupDefaultPrinterAlbert Astals Cid2018-02-052-33/+0
| | | | | | | it was declared but never used Change-Id: Iededb2943759cd2d66de95bcc1758dbcc4283ee3 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CUPS: Don't show choices that conflict with the printer installed optionsAlbert Astals Cid2018-01-122-2/+14
| | | | | | | | | | Some options only make sense if the printer has installed some extensions, e.g. we should not shown "Staple" options if the Stapler addon is not installed, so with this change we use ppdInstallableConflict to know whether an option should be shown to the user or not. Change-Id: I5733e1ac8b667c26b292aeafc90a10c155b751a4 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Fix custom page size handling in the Unix print dialogAlbert Astals Cid2018-01-091-3/+2
| | | | | | | | | | | | | | | | | There were several problems that i've fixed in a single commit since they are very interwinded * The dialog used QPageSize::Custom for two things, the custom sizes coming from the printer and the "user can write whatever size they want" size. Now only the printer custom sizes use QPageSize::Custom and we use m_realCustomPageSizeIndex for the "user can write whatever size they want" one. * The dialog stored the QPageSize id as the combo userData, that doesn't work when the printer has multiple custom sizes since they all share QPageSize::Custom so now it stores the QPageSize itself Task-number: QTBUG-58733 Change-Id: Ie640a07bb5e24b753db83c091c836e8af4ff126c Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* CUPS: Fix conflict handlingAlbert Astals Cid2018-01-051-2/+4
| | | | | | | | | | | The previous code assumed that ppdMarkOption returning non zero (i.e. it has conflicts) also meant that the option wasn't applied at the ppd level, but it actually is. What we need to do is after calling ppdMarkOption parse the tree again looking to see if any option is conflicting and mark it as such in the UI. Change-Id: I836f1902d14dc8c176bb06776471cbf4ed11786f Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Fix print to a printer instanceRenato Araujo Oliveira Filho2017-12-191-2/+5
| | | | | | | | | | | | | | Make sure to use the printer original name as 'cupsPrintFile' function argument Testing: - Create a instance of your print with lpoptions - Try print a document using the new instance of the printer - Check if the instance properties was respected Change-Id: I884b641d1871fe04c7b119c82d4edb4aa41db2f5 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Add i18n support for cups advance optionsRenato Araujo Oliveira Filho2017-12-191-0/+1
| | | | | | | | Used 'ppdLocalize' to translate cups options Change-Id: I7fea7c26194fd6c6ee62a17d3e35d7c2c5be6d3c Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CUPS: Use printer job-hold-until as default instead of the noholdAlbert Astals Cid2017-12-191-0/+2
| | | | | | | This also reads the job-hold-until from lpoptions if set there for the particular printer Change-Id: Ic60fef675ab9f4760cd99ee9ac417b0478459681 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CUPS: Use printer job-billing as default instead of the empty stringAlbert Astals Cid2017-12-181-0/+2
| | | | | | | | This also reads the job-billing from lpoptions if set there for the particular printer Change-Id: Ia4a6961de504005b8dcd9209da0624e9ae9ef7e4 Reviewed-by: Laurent Montel <laurent.montel@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CUPS: Use printer job-sheets as default instead of none,noneAlbert Astals Cid2017-12-181-0/+2
| | | | | | | | This also reads the job-sheets from lpoptions if set there for the particular printer Change-Id: I35aff103261ef58492779071d866e8a15ac78607 Reviewed-by: Laurent Montel <laurent.montel@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* CUPS: Use default cups job-priority instead of 50Albert Astals Cid2017-12-181-0/+2
| | | | | | | | This also reads the job-priority from lpoptions if set there for the particular printer Change-Id: I75d983c377d2135a0b0d3e028829a7384a5e1897 Reviewed-by: Laurent Montel <laurent.montel@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>