summaryrefslogtreecommitdiffstats
path: root/src/printsupport/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Port from QStringViewLiteral to u""Marc Mutz2019-07-291-1/+1
| | | | | | | | | Now that all our supported compilers know char16_t, we no longer need QStringViewLiteral, whose only purpose in life was to turn u"" into L"" for MSVC < 2015. Change-Id: I25a094fe7992d9d5dbeb4a524d9e99e043dcb8ce Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Migrate Windows system libs to external dependenciesJoerg Bornemann2019-05-081-1/+4
| | | | | | Started-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Change-Id: I211ce3252b836894aeeac1c85eb316d9596bca57 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Remove handling of missing Q_COMPILER_RVALUE_REFSAllan Sandfeld Jensen2019-05-011-2/+0
| | | | | | | | Remove remaining handling of missing support for rvalue refs. Change-Id: I78bab8bccfeeb9c76f464f345874364a37e4840a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-04-111-4/+4
|\ | | | | | | | | | | | | Conflicts: src/widgets/styles/qstyle_p.h Change-Id: I0e6e856bd6628da1135b3ba674dddffabbeb5c09
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-101-4/+4
| |\ | | | | | | | | | Change-Id: I44eda44bf424fdcffab048a2534905d6162e5559
| | * printsupport: Fix clang-cl warningKai Koehne2019-04-091-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | qprintengine_win.cpp(1117,14): warning: comparison of two values with different enumeration types in switch statement ('QPrint::DuplexMode' and 'QPrinter::DuplexMode') [-Wenum-compare-switch] case QPrinter::DuplexShortSide: Change-Id: Ib5028d80ecf7f6bb9eb0562e5c137acfeb709a14 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Remove remaining Q_DECL_NOEXCEPT/Q_DECL_NOTHROW usageAllan Sandfeld Jensen2019-04-041-2/+2
|/ / | | | | | | | | Change-Id: I91ac9e714a465cab226b211812aa46e8fe5ff2ab Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-01-261-9/+21
|\| | | | | | | | | | | | | | | Conflicts: src/android/templates/AndroidManifest.xml tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp Change-Id: I4c9679e3a8ebba118fbf4772301ff8fde60455b9
| * Fix license header for qprinterinfo.cppKai Koehne2019-01-221-9/+21
| | | | | | | | | | | | | | Fixes: QTBUG-72598 Change-Id: I1fb9f384509726276ff32ceb5709e7b0fb98d729 Reviewed-by: Kai Pastor <dg0yt@darc.de> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | Add a few qAsConst() to range-for to prevent detachmentsSergio Martins2018-12-101-5/+5
| | | | | | | | | | | | | | | | | | | | | | places indicated by clazy As a drive-by, fixed minor styling issues in the affected lines. Change-Id: I88d3fc0c8573cde0e61f19a18dd9ea697ee40c34 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Pass non-trivial types by const-ref in range-loop [-Wclazy-range-loop]Sergio Martins2018-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | corelib/serialization/qcbormap.h:176:14: warning: Missing reference in range-for with non trivial type (QPair<QCborValue, QCborValue>) corelib/serialization/qjsoncbor.cpp:820:10: warning: Missing reference in range-for with non trivial type (QJsonValue) gui/kernel/qguiapplication.cpp:1171:10: warning: Missing reference in range-for with non trivial type (QString) printsupport/dialogs/qprintdialog_unix.cpp:741:10: warning: Missing reference in range-for with non trivial type (QString) printsupport/kernel/qprinter.cpp:1851:10: warning: Missing reference in range-for with non trivial type (QVariant) tools/qlalr/cppgenerator.cpp:463:8: warning: Missing reference in range-for with non trivial type (Name) Change-Id: I327b0f116e329e55952ed5740a5f5af4b2918392 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-10-255-12/+21
|\| | | | | | | | | | | | | | | | | Conflicts: src/corelib/animation/qpropertyanimation.cpp src/gui/image/qicon.cpp tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp Change-Id: I3698172b7b44ebb487cb38f50fd2c4a9f8a35b21
| * Extend PDF engine to allow the generation of PDFs with huge pagesAndre de la Rocha2018-10-221-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt's PDF engine previously supported only the PDF v1.4 standard, which only allows pages of up to 200x200in (about 5x5m). This patch optionally enables the generation of PDF v1.6-compliant files that allow the redefinition of user space units, so that pages of up to 381x381km are now possible. By default, generated files are compliant to v1.4 spec. v1.6 compliance must be enabled by, e.g., calling QPrinter::setPdfVersion() with QPrinter::PdfVersion_1_6. PDF v1.6-compliant files require Adobe Reader 7.0 or newer (also worked with the built-in viewers in current versions of Chrome, Firefox and Edge). Task-number: QTBUG-69386 Change-Id: I21708e0d465d5d7d9e46ff06dd04acfe1dfb0858 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-10-174-11/+15
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platformthemes/platformthemes.pro src/printsupport/kernel/qplatformprintdevice.cpp Change-Id: Iac01729ad954bb1c7af5867d982eb243b2139ee6
| | * Modernize the "mimetype" featureLiang Qi2018-10-124-12/+16
| | | | | | | | | | | | | | | | | | Change-Id: I9b67c2cbc0891a38ece18d521c86fbc7344dce7a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Printing: Expose default and supported color modesAlbert Astals Cid2018-10-122-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | We had this information internally but there was no public API for it Fixes: QTBUG-4071 Change-Id: Ic7f855e32a6870129e7723a47d31a629e0ea1aca Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Do not include qprintdialog in a kernel/ fileAlbert Astals Cid2018-10-051-13/+3
|/ / | | | | | | | | | | | | | | | | | | The only use is for ::tr so use QCoreApplication::translate Automatic is not used in dialog/ anyway so there's no translation to reuse Change-Id: I0c993e87f46384a0f09d83c9b5e96de5366f1eb9 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Windows code: Fix clang-tidy warnings about C-style castsFriedemann Kleint2018-08-301-6/+8
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Remove dead code in QWin32PrintEngineFriedemann Kleint2018-08-281-28/+15
| | | | | | | | | | | | | | | | | | | | | | | | The functions checks for _glyphs.isEmpty() and returns in that case, so, there is no point in having another code branch for _glyphs.size() == 0 below. Unindent branch for _glyphs.size() > 0 and brush it up a bit to silence clang-tidy (warnings about using isEmpty(), nullptr). Change-Id: I78e86583bb30c7bea1357e7a45f61b07d5a4d139 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Windows: Cache the printer capability information the first timeAndy Shaw2018-07-201-5/+6
| | | | | | | | | | | | | | | | | | | | 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 remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-241-8/+2
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_common.prf src/corelib/tools/qstring.cpp src/plugins/platforms/windows/qwindowsmousehandler.cpp src/widgets/widgets/qmainwindowlayout_p.h Change-Id: I5df613008f6336f69b257d08e49a133d033a9d65
| * QWin32PrintEngine: Fix crash in drawPixmap(), drawImage()Friedemann Kleint2018-05-231-8/+2
| | | | | | | | | | | | | | | | | | | | | | Use the printer's HDC instead of the screen HDC for StretchBlt(). Patch as contributed via bug report. Task-number: QTBUG-59689 Task-number: QTBUG-66325 Change-Id: I9b5d6ddd3f0e9e68f2a003ca9ed20ece20dccef8 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | 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: Take conflicts for duplex and page size into accountAlbert Astals Cid2018-03-272-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Duplex and Page Size are not shown in the "Advanced" options tag since they are more important options, this means we were not taking them into account for ppd conflicts since we never set their values in the ppd, we do use the new-style cups options for them when printing With this patch we add m_pageSizePpdOption and m_duplexPpdOption to set the values to the ppd struct behind the scenes. Change-Id: I48bd9fe93d0c08b7b8dd9620a07c56fc79cce13b Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Unify QPlatformPrintDevice constructorsAlbert Astals Cid2018-03-232-19/+1
| | | | | | | | | | Change-Id: I01714a626e204c73456ebed987055662331d6a3a Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Move duplex member from QPdfPrintEnginePrivate to QCupsPrintEnginePrivateAlbert Astals Cid2018-02-202-8/+3
| | | | | | | | | | | | | | | | 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>
* | Fix QPlatformPrintDevice::supportedPageSizeMatchAlbert Astals Cid2018-02-201-0/+4
| | | | | | | | | | | | | | | | | | | | First check if the pagesize is one of the known ones before comparing the page sizes. It's veeeery similar but without it when running the qprinter tests i get a failure since we set "Index Card 3x5in" but get back "Photo 3x5in" Change-Id: I72671231c2abec39e036de829d226784f06e1b41 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | QPagedPainterDevicePrivate: Remove m_pageLayoutAlbert Astals Cid2018-02-162-28/+19
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having it there is awkward since all the subclasses of QPagedPaintDevice, that is QPdfWriter and QPrinter, have their own m_pageLayout via their private engine classes so we ended up with code like pd->engine->setPageMargins(margins, units); // Set QPagedPaintDevice layout to match the current paint engine layout m_pageLayout = pd->engine->pageLayout(); Now we just use the subclass for it's page layout and all is simpler since we don't need to make sure the two variables are updated to have the same contents. Unfortunately this means that we have to implement a dummy subclass for QPagedPaintDevice(). That constructor doesn't make any sense since QPagedPaintDevice is not really a leaf you want to instantiate, it's there to provide common api for the subclasses and the QPagedPaintDevice(QPagedPaintDevicePrivate *dd) constructor should be used. Since it's a public class we can't remove that constructor and that's why we have that QDummyPagedPaintDevicePrivate. QPageLayout &QPagedPaintDevice::devicePageLayout() is also deprecated now since there's no "device" page layout anymore. Those functions were marked internal and as far as I can see unused outside QPdfWriter/QPrinter so it should be fine. [ChangeLog][QtGui] QPagedPaintDevice constructor has been deprecated since that class is not meant to be used standalone, its two public but internal devicePageLayout() methods are now deprecated. Change-Id: I054601b66afcb7dd662db6247c5ed7820fbee212 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Remove QPlatformPrinterSupport::createDefaultPrintDeviceAlbert Astals Cid2018-02-052-6/+0
| | | | | | | no one uses it Change-Id: I03d0350a44a19545d57b47d1b21d85f1a2059f4d Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* cups: Clear cups options at the start of QPrintPropertiesDialog::setupPrinterAlbert Astals Cid2018-01-242-0/+6
| | | | | | | | | | | | | | | | | | For some reason the cups options are kept globally instead of per printer at QCupsPrintEnginePrivate so when setting the printer options on accepting the print dialog, we first need to clear them and then call the other functions that set them, otherwise, we will "reuse" cups option set on the previous print. How to reproduce: * Open print dialog, set some advanced option to a non default value, easiest one is print in grayscale * Print * Check it prints in grayscale * Open print dialog, check the advanced options are all on default values * Print * Check it incorrectly prints in grayscale Change-Id: I59aacaf30db844ad40887d6b771f9354557852b6 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* CUPS: Don't show choices that conflict with the printer installed optionsAlbert Astals Cid2018-01-125-0/+16
| | | | | | | | | | 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>
* CUPS: Rework set/clearCupsOption APIAlbert Astals Cid2018-01-122-31/+19
| | | | | | | | | | | | Previously it was a bit awkward to use, you had to do QStringList cupsOptions = QCUPSSupport::cupsOptionsList(printer); QCUPSSupport::setCupsOption(cupsOptions, option, value); QCUPSSupport::setCupsOptions(printer, cupsOptions); now you simply have to do QCUPSSupport::setCupsOption(printer, option, value); Change-Id: Id31583f1ec72644791d82776debbae5583a2be54 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* CUPS: Enable printing arbitrary pages and page rangesAlbert Astals Cid2018-01-122-1/+7
| | | | | | Task-number: QTBUG-1311 Change-Id: I8e09def0e0d8c1404d3ee86845d98a30c23b6485 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Unix: Fix usability of the print properties dialogAlbert Astals Cid2018-01-121-2/+8
| | | | | | | | | | | | | | Previous behavior: * Open, change setting, cancel, open again, setting was as originally (i.e. unchanged) * Open, change setting, accept, open, change setting, cancel, open again, the setting would be as before pressing cancel * Open, change setting, accept, open, press cancel without changing anything, print, the initially changed setting is not applied New behavior: * Pressing cancel just cancels the changes since you opened the dialog, everything you accepted previously stays correctly selected Change-Id: I483647504682f26d3d21c5229cc6530bf14fe519 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* QtPrintSupport: Raise minimum supported MSVC version to 2015Friedemann Kleint2018-01-051-1/+1
| | | | | | | | Remove code for older versions and streamline #ifdefs. Task-number: QTBUG-51673 Change-Id: Ib87b2559d0d04fcfa70cabd134ac6936a3c2a261 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-026-11/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf sc/corelib/io/qfsfileengine_p.h src/corelib/io/qstorageinfo_unix.cpp src/platformsupport/eglconvenience/qeglpbuffer_p.h src/platformsupport/input/libinput/qlibinputkeyboard.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/ios/qiosscreen.h src/plugins/platforms/ios/qioswindow.h src/plugins/platforms/ios/quiview.mm src/printsupport/dialogs/qpagesetupdialog_unix_p.h src/printsupport/dialogs/qprintpreviewdialog.cpp src/printsupport/widgets/qcupsjobwidget_p.h src/widgets/widgets/qmenu.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
| * Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-12-301-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/win32-g++/qmake.conf src/corelib/global/qglobal_p.h src/corelib/global/qoperatingsystemversion_p.h src/corelib/io/qfilesystemengine_win.cpp src/network/bearer/qbearerengine.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qfusionstyle.cpp tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Change-Id: I80e2722f481b12fff5d967c28f89208c0e9a1dd8
| | * qprintengine_win.cpp: Fix -Wclazy-range-loopFriedemann Kleint2017-11-301-1/+1
| | | | | | | | | | | | | | | | | | | | | qprintengine_win.cpp:1502: warning: Missing reference in range-for with non trivial type (QPrint::InputSlot) [-Wclazy-range-loop] Change-Id: If6e55c1748e05e32aaa32a16063ba491fe242952 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * | PrintSupport: convert 0 with nullptr (c++11)Laurent Montel2017-11-305-10/+10
| | | | | | | | | | | | | | | Change-Id: I35a8022c78427c9b4d4a9d9941770d22c36c3be8 Reviewed-by: David Faure <david.faure@kdab.com>
* | | CUPS: Use printer job-hold-until as default instead of the noholdAlbert Astals Cid2017-12-192-5/+44
| | | | | | | | | | | | | | | | | | | | | 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/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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-182-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | 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-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | QPlatformPrintDevice: use QVector, not QList in the APIMarc Mutz2017-12-146-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPlaformPrintDevice uses QVector to store, but QList in the getters to retrieve these data. Port API from QList to QVector to avoid conversion between the two containers on every access. Saves almost 4KiB in text size (another 0.9% of QtPrintSupport). Change-Id: If33df141b87753803c45d9f4dae501a68abe49af Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | QPlatformPrintDevice: store QPageSize/QMimeType/int in QList, not QVectorMarc Mutz2017-12-142-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit pains me, because we want Qt to migrate away from QList, but the QtPrint API stack (all the way to public API, for QPageSize, and int) is formulated in terms of QList, not QVector, so it makes zero sense to store data in QVectors just to convert to QList on every opportunity. Store QMimeType in QList, too, since that's what QtCore uses. Saves 3KiB in text size (0.7% of QtPrintSupport). Change-Id: I71249f60be517cc06973b38d9ccad7a31f348be3 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Allow access to ppd file and ppdMarkOption via ↵Albert Astals Cid2017-12-132-0/+4
| | | | | | | | | | | | | | | | | | | | | QPpdPrintDevice::property/setProperty Change-Id: I47b49b52121950fa8e3ea7a056974d9f3033490f Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | Introduce QPrintDevice::property/setPropertyAlbert Astals Cid2017-12-134-0/+38
| | | | | | | | | | | | | | | | | | | | | So we can access QPlatformPrintDevice internals if needed Change-Id: Ib37c5717713f37262ef12d7b61793d80f05baf4a Reviewed-by: Liang Qi <liang.qi@qt.io>
* | | QAlphaPaintEngine: port away from QRegion::rects()Marc Mutz2017-12-061-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use begin()/end() instead. The old code extracted the rects from the region, then checked for a 'complex' region (by comparing the number of rectangles against 10), and replacing the region with the bounding rect if it was too complex. It then went on to adjust the rectangle list it had gotten from the original region to match the new. Simply delay getting the rectangles until after we have modified the region. Since there are many member function calls in-between, take a copy of the region to iterate over later, rather than relying on the region to be left untouched by all the code in-between. Change-Id: I49ddf4d545520ab435ab6b89eec3d24cf371823e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-171-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/fortuneclient/client.cpp examples/network/fortuneserver/server.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h src/plugins/platforms/cocoa/qcocoabackingstore.h src/plugins/platforms/cocoa/qcocoaintegration.h src/plugins/platforms/cocoa/qcocoascreen.h src/plugins/platforms/ios/qiosbackingstore.h src/plugins/sqldrivers/oci/qsql_oci.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Ia6dd2c52d4a691b671cf9a2ffca70deccece8f10