summaryrefslogtreecommitdiffstats
path: root/src/printsupport/kernel
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headersJani Heikkinen2015-02-1127-182/+182
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Remove unnecessary math.h and limits.h includesAllan Sandfeld Jensen2015-02-041-4/+0
| | | | | Change-Id: I28c898f869ed3f03b08ff55f2972a38667c755ad Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-213-2/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
| * Fix QPrinter::setPaperSize regression when using QPrinter::DevicePixelDavid Faure2015-01-191-1/+4
| | | | | | | | | | | | | | | | | | | | | | The QPageSize-based refactoring led to casting DevicePixel to a QPageSize::Unit value of 6 (out of bounds). And then the switch in qt_nameForCustomSize would leave the string empty, leading to "QString::arg: Argument missing: , 672" warnings. Change-Id: I85e97174cc8ead9beccaaa3ded6edfad80f8e360 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
| * Update printer metrics after resolution change.Marcel Krems2015-01-161-0/+2
| | | | | | | | | | | | | | | | | | [ChangeLog][QtPrintSupport] Fixed QPrinter::{width,height} return values when the resolution is changed in the print dialog. Task-number: QTBUG-43124 Change-Id: Ib805907affed4b1ffb48e6b1ff89f7a79ab3e329 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
| * Remove extra ';' after QPrint namespace blockKai Pastor2015-01-081-1/+1
| | | | | | | | | | | | | | The extra ';' causes a warning when gcc is used with -Wpedantic. Change-Id: I3d99aca6f160e46dbe2173106160474664e06b2c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-032-15/+15
| | | | | | | | | | | | | | | | | | | | 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>
* | QCups: avoid relocationsMarc Mutz2014-11-251-2/+5
|/ | | | | | | | | | | | | | | | | | Replace a string (pointer) table with arrays of char arrays of maximally occurring size. In the pageLayoutData case, this is trivial, since all strings have the same size. In the pagesPerSheetData case, I've used a trick to cram the (only) two-digit number into a char[2] array, by following it with a null entry. Effects on AMD64 Linux GCC 4.7 release stripped: text: -352B data: -160B relocs: -14 Change-Id: I6c458ff7ada0f45dab976bbe42b24757fc321302 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make it possible to disable font embeddingEskil Abrahamsen Blomfeldt2014-11-153-11/+13
| | | | | | | | | | | | | | | | When font embedding is explicitly disabled, fall back to painter paths as we would if the font prohibits embedding. Note that this flag was never respected on any platform in any version of Qt, as far as I've been able to tell, because the handling of it in the X11 print engine was removed shortly after it was introduced in 2005. [ChangeLog][Printing] Disabling font embedding is now possible using the QPrinter::setFontEmbedding() function. Task-number: QTBUG-41943 Change-Id: Ice5e893f9893c5243310ae7892bec7497dd55c4a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix warning about unused variable in qprintengine_win.cpp.Friedemann Kleint2014-11-031-2/+0
| | | | | | | | qglobal.h:979:34: warning: unused variable 'q' [-Wunused-variable] ^ kernel\qprintengine_win.cpp:719:5: note: in expansion of macro 'Q_Q' Change-Id: I7fbad6c8341a3df1a06d3914209dec22876a2f09 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* QPrinter - Fix DuplexMode on all platformsJohn Layt2014-10-244-11/+85
| | | | | | | | | | | | | 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>
* Don't use cosmetic GDI pens as this is already accounted forAndy Shaw2014-10-231-4/+1
| | | | | | | | | | | | Since Qt will already handle the cosmetic case when rendering then it should be respected instead of overriding it by using the cosmetic GDI pen. This ensures that the pen's width is used and also the color of the pen. Task-number: QTBUG-33611 Change-Id: I2719311b3fb5480a5b228c0d415aa545967321cf Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Don't use QByteArrayLiteral in comparisonsMarc Mutz2014-10-091-2/+2
| | | | | | | | | | | | | | | For const char*s, operator== is overloaded, so comparing to a (C) string literal is efficient, since qstrcmp doesn't require the length of the strings to compare. OTOH, QByteArrayLiteral, when not using RVO, litters the code with QByteArray dtor calls, which are not inline. Worse, absent lambdas, it even allocates memory. So, just compare with a (C) string literal instead. Change-Id: Id3bfdc89558ba51911f6317a7a73c287f96e6f24 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Handle PPK_CustomBase in QWin32PrintEngine::propertyUlf Hermann2014-09-301-0/+3
| | | | | | | | If we leave out the default so that the compiler catches missing enum values we should actually handle them all ... Change-Id: Ieb4992dec84ce847e48ab3c4a94bd8825a148706 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Update license headers and add new license filesMatti Paaso2014-09-2426-486/+278
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-08-121-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | Manually included changes from 3a347a4e70e5a10ee92dd2578316c926a399e894 in src/opengl/qgl.cpp. Conflicts: src/opengl/qgl_qpa.cpp src/plugins/platforms/android/androidjnimain.cpp Change-Id: Ic26b58ee587d4884c9d0fba45c5a94b5a45ee929
| * Check if Start/EndPage returns non-positive value when error checkingAndy Shaw2014-08-071-4/+4
| | | | | | | | | | | | | | | | | | StartPage and EndPage are documented to return a non-positive value (0 or less) when they fail, therefore it is not enough to check if !StartPage. Checking if is 0 or less is more accurate. Change-Id: Ia0ff43da4e4309ba0a5983e91a0ad583aad0a955 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-221-1/+4
|\| | | | | | | | | | | | | | | Conflicts: src/widgets/kernel/qwidget_qpa.cpp src/widgets/widgets.pro Change-Id: I697eec936c4e1a6c360edc8f0b472e23c0461ecb
| * Windows printing: Preserve painter when syncing state.Friedemann Kleint2014-07-211-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | Fix a performance regression introduced by 58bb42dc2c338338b7b6079993ace3d55c2e1d7e . The picture painter was replaced by another painter. Task-number: QTBUG-40068 Task-number: QTBUG-38329 Change-Id: Ida51edd61c197f862adebdcdc685ebc105fe07a8 Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-013-18/+17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/network/socket/qnativesocketengine_winrt.cpp src/plugins/platforms/android/androidjniaccessibility.cpp src/plugins/platforms/windows/qwindowswindow.cpp Manually adjusted: mkspecs/qnx-armle-v7-qcc/qplatformdefs.h to include 9ce697f2d54be6d94381c72af28dda79cbc027d4 Thanks goes to Sergio for the qnx mkspecs adjustments. Change-Id: I53b1fd6bc5bc884e5ee2c2b84975f58171a1cb8e
| * QWin32PrintEnginePrivate check for NULL pDevMode and hdc.Dyami Caliri2014-06-252-15/+14
| | | | | | | | | | | | | | | | | | | | The MSDN documentation states that the pDevMode member of PPRINTER_INFO_2 may be NULL. Also, CreateDC may fail and return a NULL. Rework release() to release resources even if hdc was null. Task-number: QTBUG-39373 Change-Id: Ia08da61bf6ab99f02f0c7a09c608a5d3db34ef65 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| * QPrinter - Don't use QPrinterInfo::availablePrinters()John Layt2014-06-071-3/+3
| | | | | | | | | | | | | | | | The availablePrinters() method can be slow as it gets all info for every printer which may be slow with many network printers. Change-Id: I4bc5ef46ed4867326b60b66371178b84204639ce Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devJ-P Nurmi2014-06-051-16/+32
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt.prf src/plugins/platforms/xcb/qxcbwindow.h src/tools/qdoc/qdocindexfiles.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I214f57b03bc2ff86cf3b7dfe2966168af93a5a67
| * QPrinter/Windows: Fix handling of native paper source ids.Friedemann Kleint2014-05-231-16/+32
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Do not always fallback to bitmap printing when printing alpha.Jan Arve Saether2014-05-313-17/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous code resulted in that all regions that had some alpha blending content had to be rasterized as bitmaps. With this patch, we only need to fallback to proper alpha blending if there is a background content to blend against. If there is no background content we simly assume that the background is white (which happen to be the most common paper color). It will then be treated as a solid background. Task-number: QTBUG-33548 Change-Id: I9d2c9be95a701704cdb3724480421db49b4cdd98 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-061-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl.cpp src/opengl/qglpixelbuffer.cpp src/opengl/qglshaderprogram.cpp tests/auto/opengl/qglthreads/tst_qglthreads.cpp Change-Id: Iaba137884d3526a139000ca26fee02bb27b5cdb5
| * QPrintEngine - Fix alpha engine state syncJohn Layt2014-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Move the copy of the paint engine to after the engine state has been synced, otherwise the transform is incorrectly applied after the new page. Task-number: QTBUG-38329 Change-Id: I2e134889b3ef10f6e3dce42edac2a58e78c66c30 Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-04-113-66/+102
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-armv7le-qcc/qplatformdefs.h src/printsupport/kernel/qcups.cpp src/widgets/styles/qstyle.h tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp Change-Id: Ia41e13051169a6d4a8a1267548e7d47b859bb267
| * QCUPSSupport: fix misuse of QDateTime::addDays()David Faure2014-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | QDateTime::addDays() is a const function and returns a new QDateTime with the given days added, thus the current statement had no effect. Found by applying Q_REQUIRED_RESULT in dev branch. Change-Id: I1b061619d45d7806feaa2bf9fb6d9f0b43d63def Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * QPagedPaintDevice - Move QPageLayout methodsJohn Layt2014-04-052-65/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new QPageLayout methods weren't originally added to QPagePaintDevice as no new virtuals can be added, instead static polymorphism was used to add the methods directly in the derived classes QPdfWriter and QPrinter. This however means that classes like QTextDocument with print() methods that take a QPagedPaintDevice are unable to access the QPageLayout methods. To fix this, instead make the QPagedPaintDevicePrivate a virtual class and have QPdfWriter and QPrinter implement derived private classes that are called by the non-virtual QPagedPaintDevice base methods. Change-Id: Ieb6e513b1fa05f5ae76ea1f9156b0b1a053089eb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | QCUPSSupport: Extract Method bannerPageToString() from setBannerPages()Marc Mutz2014-03-311-49/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The new function just converts the job-sheets cups option argument, reducing the number of almost-identical switch statements to one. Effects on a stripped Linux AMD64 GCC 4.7 -std=c++11 -O2 build: text: -1008B data: +-0B relocs: +-0 Change-Id: I56843fa963e098e5c8ae203584f34bf5798667e6 Reviewed-by: Martin Klapetek <mklapetek@kde.org> Reviewed-by: John Layt <jlayt@kde.org>
* | QCUPSSupport: Extract Method jobHoldToString() from setJobHold()Marc Mutz2014-03-311-49/+37
|/ | | | | | | | | | | | | | The new function just calculates the job-hold-until cups option argument, reducing the number of setCupsOption() calls down to one. Effects on a stripped Linux AMD64 GCC 4.7 c++11 release build: text: -552B data: +-0B relocs: +-0 Change-Id: I4aa4118c3493cd302dd8fd7f4985c7e0f70ef071 Reviewed-by: Martin Klapetek <mklapetek@kde.org> Reviewed-by: John Layt <jlayt@kde.org>
* Initialize the picpainter State in the QAlphaPaintEngine.Michael Brüning2014-03-211-0/+1
| | | | | | | | | | | | | | Patch by John Layt. Analog to how the print preview problems on windows were fixed, this is needed to correctly print e.g. web view contents. Task-number: QTBUG-36308 Task-number: QTBUG-37240 Change-Id: If4ecffde969ed221bbbeea80232f29f095fd71cd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: John Layt <jlayt@kde.org>
* QPrinter - Doc fixJohn Layt2014-03-171-16/+1
| | | | | | | Remove duplicated documentation. Change-Id: I53b6430b69b0e76a04cdc12b32a6bd59756acaa8 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* QtPrintSupport - Fix QT_NO_PRINTER buildJohn Layt2014-03-174-2/+16
| | | | | | | | 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>
* QCupsSupport - Remove obsolete CUPS codeJohn Layt2014-03-172-545/+1
| | | | | | | | | All code directly using CUPS is now in the QPA plugin and QCupsSupport is no longer needed, other than the utilities for setting CUPS options which do not need direct access to CUPS. Delete all the obsolete code. Change-Id: I561ad8af2415a9b745e2d35fd0624a5acdf27648 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPrinter - Fix winPageSize() on Mac and LinuxJohn Layt2014-03-173-15/+6
| | | | | | | | | 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-176-208/+373
| | | | | | | | | | | | | | | | | 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 Windows to QPageLayoutJohn Layt2014-03-172-282/+168
| | | | | | | Switch the Windows QPrintEngine to use QPageLayout. Change-Id: I2b617fe103980c4efbb0ed367547e436f2d8a5e2 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPrintEngine - Switch Windows to QPlatformPrintDeviceJohn Layt2014-03-173-404/+170
| | | | | | | | | | Change the Windows QPrintEngine implementation to use the QPlatformPrintDevice to obtain device information, and use QPageSize to obtain page size conversions. A following change will use QPageLayout to store that page size. Change-Id: I990943e2b62ab6dab2c4d4a292c7ed7261beadf2 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPrintEngine - Switch Cups to QPlaformPrintDeviceJohn Layt2014-03-173-6/+4
| | | | | | | | 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-93/+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>
* QPagedPaintDevice - Use QPageSize and QPageLayoutJohn Layt2014-03-172-54/+297
| | | | | | | | | | | | | | | | | | | | Use new QPageLayout and QPageSize class to store and convert page sizes and layouts consistently. Extend the PageSize enum to match QPage::PageSize. Note that public setters/getters cannot be added as virtuals would break BIC, but without virtuals the derived classes would break. Instead an internal api is provided and the derived classes will need to implement identical api to manipulate it. [ChangeLog][QtGui][QPagedPaintDevice] Paged paint devices such as QPrinter and QPdfWriter now support all Postscript standard page sizes. Task-number: QTBUG-27685 Task-number: QTBUG-25744 Change-Id: I62e96ab94194ab4ac8bed8fa804e0ce1c3233313 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPrinterInfo - Switch to QPlatformPrintDeviceJohn Layt2014-03-177-225/+240
| | | | | | | | | | | | | | | | | | | 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 - New QPA base classJohn Layt2014-03-178-0/+1312
| | | | | | | | | | Add a new QPA class to abstract Print Devices. Each platform instance will encapsulate all required details about a print device instead of the code being distributed throughout the print engine and print plugin. Change-Id: I7f6a537ad55a6e7f599d83f461b1e2ee62b15094 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPageSize - Add new QPageSize classJohn Layt2014-03-171-0/+1
| | | | | | | | | | | | | | | | | | New QPageSize class to encapsulate paper sizes and names to ensure all sizes and conversions are consistent and match the Postscript standard sizes. Subsequent changes will use this class in the paged paint devices, paint engines, print engines, and print plugins to replace multiple inconsistent local implementations. [ChangeLog][QtGui][QPageSize] Added new QPageSize class to implement Adobe Postscript PPD standard page sizes. This class supports the standard page sizes, names and keys from the PPD standard, and provides convenient size and rect conversion methods. Change-Id: Ie2c8be0c3df0d29ac5da4cd9877ad41d0982633c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPrinter - Add page metric testsJohn Layt2014-03-171-2/+10
| | | | | | | | | | | | | Add more page metrics tests to expose the many bugs and inconsistencies in the page layout handling. No platform or pdf backend passes all these tests so they are skipped for now, but following commits will use the tests to ensure the re-write of the page layout handling fixes the many problems in a consistent way for all backends. Change-Id: Ic5b16aa08dfe2bd9a9191662fd2bbe6b913e15c9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* QPrintEngine - Improve devMode handlingJohn Layt2014-02-262-41/+35
| | | | | | | | | Improve the sharing of the devMode between the QPrintEngine and the print dialogs, in particular start to change the dialogs from directly accessing the QPrintEngine internals. Change-Id: Ieb4649c19b936433c85207297a0b6e59356c3880 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QPrintEngine - Remove Windows use of port and driverJohn Layt2014-02-262-36/+15
| | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-121-2/+6
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/gui/image/qimage.cpp src/gui/text/qtextengine.cpp src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp src/printsupport/kernel/qprintengine_win.cpp Change-Id: I09ce991a57f39bc7b1ad6978d0e0d858df0cd444