summaryrefslogtreecommitdiffstats
path: root/src/printsupport
Commit message (Collapse)AuthorAgeFilesLines
* Fix page size selection in QPageSetupDialogJoni Poikelin2015-03-131-2/+2
| | | | | | | Task-number: QTBUG-44978 Change-Id: Id0c0188d62e344fad93d9bbf57b3f90ce899405d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Windows printing: Add more error reporting.Friedemann Kleint2015-03-092-11/+36
| | | | | | Task-number: QTCREATORBUG-13742 Change-Id: Ic234c7e86531c0924ddc03c63cd50b442bdcc9e9 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-241-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/xml/htmlinfo/simpleexample.html examples/xml/rsslisting/rsslisting.cpp qmake/generators/win32/msbuild_objectmodel.cpp src/3rdparty/harfbuzz-ng/src/hb-private.hh src/corelib/global/qlogging.cpp src/corelib/io/qstorageinfo_unix.cpp src/corelib/thread/qwaitcondition_unix.cpp src/gui/kernel/qguiapplication.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp src/testlib/doc/src/qt-webpages.qdoc tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: Ib272ff0bc30a1a5d51275eb3cd2f201dc82c11ff
| * Respect the orientation setting from the page setup dialogAndy Shaw2015-02-111-0/+3
| | | | | | | | | | | | | | Task-number: QTBUG-27887 Change-Id: I2af7a495c4e693e9519c7e0ffde54b7e6a1d8715 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Fixed license headersJani Heikkinen2015-02-172-2/+2
| | | | | | | | | | Change-Id: Ibebe1318d1c2de97601aa07269705c87737083ee Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Introduce QT_NO_MIMETYPESérgio Martins2015-02-174-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | The mime type stuff generates one of the biggest translation units in QtCore due to the compressed 1.7MB freedesktop.org.xml resource. With QT_NO_MIMETYPE, libQt5Core.so is almost 400Kb smaller (4.8MB->4.4MB gcc 4.9 stripped release build) Change-Id: I5339090994034355724ff4deddb64720e81baeaf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Updated BSD licensed file headersJani Heikkinen2015-02-155-15/+15
| | | | | | | | | | Change-Id: I6441ff931dbd33b698d762e6f6784898f3f60fe7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Update copyright headersJani Heikkinen2015-02-1155-395/+379
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-042-6/+0
| | | | | | | | | | Change-Id: I28c898f869ed3f03b08ff55f2972a38667c755ad Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Fix 1700 override warnings [-Winconsistent-missing-override]Sérgio Martins2015-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | Classes should either use or not use override, otherwise it hurts code readability. Some inline keywords were removed because of an error with MSVC2010: error C2216: 'override' cannot be used with 'inline' Change-Id: I7276d5525a92281bd0d743beb11d0dc73441443b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Make it more obvious that Q_WS_ is dead code, and should perhaps be portedTor Arne Vestbø2015-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We still have a bunch of Q_WS_ ifdefs in our code, which are easy to mistake for Q_OS_ ifdefs when quickly scanning the code. By renaming the ifdefs we make it clear that the code in question is dead. In incremental follow-ups, we can then selectively either remove, or port, the pieces that are dead code. Change-Id: Ib5ef3e9e0662d321f179f3e25122cacafff0f41f Reviewed-by: Marc Mutz <marc.mutz@kdab.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>
* | Remove Q_NO_USING_KEYWORDThiago Macieira2014-12-203-24/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a lot of code now requiring it. Any compiler that doesn't support the keyword is too old for Qt now. The last time anyone asked about this macro was for QTBUG-27393 and we don't know which compiler that was. As a necessity, this patch contains a reversal of a0c3a57aed5cde37017733e7cf5e41cc6a1174aa [ChangeLog][Compiler Specific Changes] Qt 5.5 now unconditionally uses the "using" keyword. Compilers that do not support this keyword are deprecated and will not be able to build Qt. Previous versions of Qt may or may not compile, as no testing was done to ensure it worked. Change-Id: Ief042f34aba555a095d1f342a0ee7ee9feadf42d Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-0310-34/+34
| | | | | | | | | | | | | | | | | | | | 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-2444-828/+476
| | | | | | | | | - 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-291-3/+2
|\| | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket_openssl_symbols.cpp Change-Id: Ic62419fa1fee5f4de6c372459d72e6e16f9a810b
| * Windows: Fix assignment of margins in QPageSetupDialog.Friedemann Kleint2014-07-221-3/+2
| | | | | | | | | | | | Task-number: QTBUG-40061 Change-Id: Id5c952a7d6280f2ab7180bff01911d6cffe57034 Reviewed-by: Kai Koehne <kai.koehne@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>
* | Doc: Removed "url" variable from qdocconf files.Jerome Pasion2014-07-041-1/+0
| | | | | | | | | | | | | | | | url is set in qtbase/doc/global which is inherited by the Qt 5 module qdocconf files. Change-Id: Ieffa174f598f4a3b8ce8be9bfae7ca9b6981f12b Reviewed-by: Martin Smith <martin.smith@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-052-17/+33
|\| | | | | | | | | | | | | | | | | | | 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>
| * QPrintDialog OSX: Fix qApp->processEvents argumentsDyami Caliri2014-05-221-1/+1
| | | | | | | | | | | | | | | | | | The call to processEvents had the flags separated by a comma instead of bitwise OR. This worked because processEvents has an optional second argument that is an int. Change-Id: I6dc74bc44b1d782aa7206f106c51c16eab5f2a76 Reviewed-by: Jake Petroules <jake.petroules@petroules.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-063-10/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * QPrintDialog - Fix Mac reference counting error.Morten Johan Sørvig2014-04-181-3/+3
| | | | | | | | | | | | | | | | | | | | "key" is accessed with a "Get" function and should not be released. Switch from using QCFString to a CFStringsRef. Change-Id: Id4eecc642de8698314fc57d44af05c202966b11c Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: John Layt <jlayt@kde.org>
| * QPrintDialog - Fix mac change of printer nameJohn Layt2014-04-181-5/+5
| | | | | | | | | | | | | | | | | | If the user changes the printer name in the Mac print dialog then update the print device in QPrint to reflect this. Task-number: QTBUG-37808 Change-Id: I3aaf27e2db7277ab083dc8f8d59f0f80ecd424f1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
| * Revert "Automatically link printsupport plugins to static applications."Oswald Buddenhagen2014-04-181-1/+0
| | | | | | | | | | | | | | | | | | | | It has been fully obsoleted by 4255ba40ab073afcf2a095b135883612859af4c2. This reverts commit 99eecab83d4a4c79979aa0b1fcf1f58c14dcf526. Change-Id: Id7b8d3bba27ff43e38e4fe32a4f2950de9ced493 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: John Layt <jlayt@kde.org>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-04-114-66/+105
|\| | | | | | | | | | | | | | | | | | | 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
| * make cmake registration of qt plugins make use of PLUGIN_EXTENDSOswald Buddenhagen2014-04-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of assigning plugins to the first module which claims the whole type, try to assign it to a module which the plugin claims to extend. as we are getting stricter in that go, somebody needs to claim the 'generic', 'platformthemes', and 'platforminputcontexts' plugin types. the natural claimant is QtGui. however, as we don't want to auto-link any of these plugins, make them all claim that they extend a non-existing module. QtGui also claims 'iconengines' plugins. the 'printsupport' plugins are also claimed by the respective module. Change-Id: I7af7c16089f137b8d4a4ed93d1577bd85815c87b Reviewed-by: Jørgen Lind <jorgen.lind@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * 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>