summaryrefslogtreecommitdiffstats
path: root/src/printsupport
Commit message (Collapse)AuthorAgeFilesLines
* QPrinter - Make PDF support required for QPrinterJohn Layt2013-11-271-8/+0
| | | | | | | | | | Most of QPrinter assumes that QPdf is available as the fall back engine in case either the plugin fails to load or there are no real printers configured. Make this assumption explicit in the feature configure and remove the two places where QT_NO_PDF is actually checked. Change-Id: Ibb1bdf3bafa5809fbc844c84d7127911a1685506 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* QPrinterInfo - Fix isNull() by fixing constructorsJohn Layt2013-11-262-20/+22
| | | | | | | | | | | | | | The QPrinterInfo copy and QPrinter constructors and the assignment operator were not taking the shared_null into account, and so any use of them resulted in a new null QPrinterInfo different to shared_null, which lead to isNull() always returning true in anything other than the simplest use case. While fixing this also make the shared_null a Q_GLOBAL_STATIC. Task-number: QTBUG-21087 Change-Id: I0beb24088208e9ed58d21ca26b0c8d00b02e5b8f Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* QPrintDialog - Fix casting print engineJohn Layt2013-11-261-2/+2
| | | | | | | We want to cast the print engine, not the paint engine. Change-Id: Ia8f11f0215fa066417118fbfbcc921a60282d713 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Match up the specified paper size to an existing one if possibleAndy Shaw2013-11-141-46/+82
| | | | | | | | | | | | | | | When EnumForms was used then the dmPaperSize was not always correct for the custom paper sizes available on some printers. By using DeviceCapabilities we can be sure that the information is correct in this respect. This also fixes respecting of the custom paper size if one is given and there is no corresponding existing paper size for it. Task-number: QTBUG-34276 Change-Id: I9924d5be8527027fc434261e37f6c7aae66210c3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Add missing Q_INIT_RESOURCETor Arne Vestbø2013-11-071-0/+6
| | | | | | | | | | | The library needs to do Q_INIT_RESOURCE for all resources it uses internally, otherwise static linking will fail, and the user has no idea how to rectify it as the name of the missing resource is not known. The Q_INIT_RESOURCE needs to happen outside of any namespace, hence the use of static initResources() functions. Change-Id: I8f7d36b440b05809d97dd489cf8789f345633cec Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Updated url variable in qdocconf files.Jerome Pasion2013-11-061-1/+1
| | | | | | | | | | | | | | In 5.2, the HTML output is in a flatter structure and when they are hosted in qt-project.org/doc, the documentation will be found at http://qt-project.org/doc/qt-$QT_VER The url variable is used by projects outside of Qt 5 which need to link to Qt 5 documentation, such as Qt Creator. Task-number: QTBUG-34584 Change-Id: Ifa55fcd9e402b0e184a41e316340e46aeb7101de Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Make error messages a bit better.Stephen Kelly2013-11-051-1/+1
| | | | | | Change-Id: I83b5852abfbb3437c03516bc4b36eff385ddb983 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* QPrintDialog - Fix Windows Current Page option selectionunknown2013-11-041-2/+4
| | | | | | | | | | | In the Windows print dialog default the print range radio button selection to the QPrinter set value, but only if the option is enabled in the dialog. Task-number: QTBUG-32965 Change-Id: Ic64d86d263a2f8e31c8b32608b569499d0f24d63 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* use private linkage where possibleOswald Buddenhagen2013-10-312-2/+2
| | | | | | Change-Id: Ie8eaa71bee87654c21218a23efd7e9d65b71f022 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove compiler warning when QT_NO_PRINTER is definedPaul Olav Tvete2013-10-311-0/+2
| | | | | | | This broke the build on Android with warnings-are-errors. Change-Id: I9edb9539c4a6f7286ff46cbaa53bcfef4cf5280f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Clean up QPlatformPrinterSupport via post routine.Friedemann Kleint2013-10-311-4/+16
| | | | | Change-Id: I5aff587f0186f15c9fa65d236e5ebe9a7901dd86 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Set currently selected printer to QCUPSSupport in PageSetupWidgetMartin Klapetek2013-10-183-0/+13
| | | | | | | | Also adds new method to allows setting a printer in QCUPSSupport by printer name. Change-Id: Iff7a88d95eab9de2c96872c45b12e708207bda16 Reviewed-by: John Layt <jlayt@kde.org>
* If CUPS has no default printer, set up the first one in listMartin Klapetek2013-10-181-1/+3
| | | | | | | | Otherwise QCUPSSupport is instantiated without any printer being set up, which leads to bugs and/or crashes in other parts using QCUPSSupport. Change-Id: I1f4ddde5a28d6448d78aed856104ce8448e213c7 Reviewed-by: John Layt <jlayt@kde.org>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-082-16/+16
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: remove duplicate \externalpage definitionsTopi Reinio2013-09-261-31/+0
| | | | | | | | Delete all duplicate \externalpage definitions from corelib, printsupport and testlib sources. Change-Id: I7dc5358861f4dad3e8ce080619b61ca3da64ec85 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix QT_NO_PRINTER build on MacVitalii Shastun2013-09-262-3/+4
| | | | | | | | On Mac the QT_NO_PRINTER build was not implemented. Task-number: QTBUG-33565 Change-Id: I118472f9400aa0a0d0e192ae39a11ea38a66f340 Reviewed-by: John Layt <jlayt@kde.org>
* When calling setPageSizeMM then the size needs to be passed as MMAndy Shaw2013-09-231-3/+23
| | | | | | | | This simplifies the code a bit and ensures that it is respecting what the relevant function expects the size to be as. Change-Id: Iec88fab84c27a33d6f1a9e9413ea6beb0a39c68d Reviewed-by: John Layt <jlayt@kde.org>
* Remove some qBinaryFind usages from the CUPS printing codeGiuseppe D'Angelo2013-09-231-2/+4
| | | | | | | | This is done per the mailing list discussion at http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I0f9c8db3ede32570a1fd6cc43a31e2fc76ab2a0a Reviewed-by: John Layt <jlayt@kde.org>
* Fix warnings about conversion from const char* to QString.Thiago Macieira2013-09-231-3/+3
| | | | | | Change-Id: I6d3dca0688a94eb34b55efc841a75e4ebd3a2bd7 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: John Layt <jlayt@kde.org>
* Merge branch 'stable' into devSergio Ahumada2013-09-211-1/+1
|\ | | | | | | Change-Id: I37d85631ab1165ab91457d8880c4da907a9df73b
| * Initialize the print panel with the NSPrintInfo we have createdAndy Shaw2013-09-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | Since the Cocoa Print Panel was not initialized with the NSPrintInfo we had created, it meant that it did get any of the settings from the print dialog as it was trying to access an invalid NSPrintInfo. Task-number: QTBUG-32734 Change-Id: I23c766eb13281f4c494656a54d37c5bf28fb68fd Reviewed-by: John Layt <jlayt@kde.org>
* | Offer Page Range option for apps that can't do it themselvesMartin Klapetek2013-09-203-12/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some apps may not support printing only a particular page range, but with CUPS we can do "server-side print range", ie. we can select the page range for the application. If CUPS is available, the Page Range widget is now displayed if app advertises no such capability and page range is selected on the server instead. [ChangeLog][QtPrintSupport][QPrintDialog] Added CUPS server-side print range support for apps that can't support print range option themselves Change-Id: Ia7784065ba5a8b53bb05ae46e982c718ef672fa5 Reviewed-by: John Layt <jlayt@kde.org>
* | Check if Print Properties dialog was shown before accessing itMartin Klapetek2013-09-201-8/+10
| | | | | | | | | | | | | | | | | | Prevents a crash in case the user did not open the properties dialog, in which case QUnixPrintWidgetPrivate::propertiesDialog is null. Change-Id: I43c8c6ab90053757835bbf41d6167204d42efcef Reviewed-by: John Layt <jlayt@kde.org>
* | Expose more CUPS options via the 'Properties' dialogMartin Klapetek2013-09-206-65/+256
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On systems with CUPS support users can now choose how many pages from a document are to be printed on paper. This can vary from 1 page per document to 16 pages per document. The page preview changes upon the users selection. Also included in the patch is an option to choose the flow for text. Users can now print documents in the "Right to Left" order or "Bottom to Top", including many other options. [ChangeLog][QtPrintSupport][QPrintDialog] Added support for setting CUPS Pages Per Sheet and Pages Per Sheet Layout options Change-Id: I4e60a4523c6e06d4c15fe9ee9590248fa7ae2038 Reviewed-by: John Layt <jlayt@kde.org>
* | Add CUPS Page Set options to print supportMartin Klapetek2013-09-175-7/+136
| | | | | | | | | | | | | | | | | | | | | | Adds combobox to select CUPS Page Set option (even/odd pages) into the Unix print dialog [ChangeLog][QtPrintSupport][QPrintDialog] Added support for setting CUPS Page Set (even/odd pages only) in the print dialog. Change-Id: I27dd846f58c164039fe2759064aafdf726a1287e Reviewed-by: John Layt <jlayt@kde.org>
* | Add CUPS Banner Pages options to print supportMartin Klapetek2013-09-115-13/+150
| | | | | | | | | | | | | | | | | | | | | | Adds a way to set standard CUPS Banner Pages. This widget is part of the Job Options widget/tab in Properties dialog. [ChangeLog][QtPrintSupport][QPrintDialog] Added support for setting CUPS Banner pages in the print dialog. Change-Id: Ia7a22b7a0f51c12d170986caee61af7109e781e9 Reviewed-by: John Layt <jlayt@kde.org>
* | Add CUPS options widget to print supportMartin Klapetek2013-09-107-1/+527
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds new tab 'Job Options' into Properties dialog in print dialog. In this tab it's possible to set some advanced printing job options such as print schedule, job priority or job billing. Patch also adds new utility methods into QCUPSSupport, which are used to set particular CUPS job options. [ChangeLog][QtPrintSupport][QPrintDialog] Added support for setting CUPS job options in the print dialog. Change-Id: If2640eedb3d83f50cbb20491f7ec50b325f54f22 Reviewed-by: John Layt <jlayt@kde.org>
* | Make QFontEngine not derive from QObjectKonstantin Ritt2013-09-101-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Whilst having the objectName set for each engine is somewhat handy when debugging, deriving from QObject just for that is a wasting of memory in all other cases. This also broke the font engine abstraction by allowing qobject_cast() to access some private data; the only sane way to distinguish engines is querying their Type value. Change-Id: Ib1d195692859eb39089f6d8d9016cb8f9dcc0400 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Make sure QPrinter::Folio maps to the right paper size on WindowsAndy Shaw2013-09-022-2/+5
| | | | | | | | | | | | | | | | | | | | | | Since there are two different Folio specifications (Adobe and Microsoft) then we need to ensure we consistently use the same one across all platforms. Therefore we change the one on Windows to match the corresponding standard paper and add a note explaining how to get the DMPAPER_FOLIO size. Change-Id: I0f20ba5598ef8f680125fcd33dbc6924bd521d75 Reviewed-by: John Layt <jlayt@kde.org>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-143-1/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-xcode/Info.plist.app mkspecs/macx-xcode/Info.plist.lib qmake/doc/qmake.qdocconf src/corelib/global/qglobal.h tests/auto/other/exceptionsafety/exceptionsafety.pro tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
| * Fix text being cut off at the right side in print preview.Michael Brüning2013-07-291-0/+1
| | | | | | | | | | | | | | | | | | | | This patch now also copies the state of the QPainter returned from QPaintEngine::painter for the first page of a print preview, as it is done for all other pages of a preview in QPreviewPaintEngine::newPage(). Task-number: QTBUG-30621 Change-Id: I50001231c4006b9627ff80504618cbe0fa6d9f65 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * QPrintDialog OSX: don't crash if ApplicationModal and no parentShawn Rutledge2013-07-251-1/+3
| | | | | | | | | | | | | | Task-number: QTBUG-32464 Change-Id: I5ee2741735255254c17555dfb977ce73941d3e22 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
| * QPrintDialog: document the modality on OS X and WindowsShawn Rutledge2013-07-241-0/+4
| | | | | | | | | | | | | | | | | | You can't programmatically close the dialog because it's modal. Task-number: QTBUG-32464 Change-Id: I2f24581dc660a088b4e741fa4ee1518e27adea4a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Doc: Setting module pages' \qtvariable.Jerome Pasion2013-08-021-0/+1
| | | | | | | | | | | | | | | | | | Argument to \qtvariable is the QT variable needed for linking to the module. Task-number: QTBUG-32172 Change-Id: I181c0cfaf9529f3aea741cdaee0f20d6cd0e2d2f Reviewed-by: Martin Smith <martin.smith@digia.com>
* | Merge branch 'stable' into devSergio Ahumada2013-07-111-9/+0
|\| | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/json/qjsonwriter.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
| * Deal with unused functions, as found by the Intel compilerThiago Macieira2013-07-011-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use Q_DECL_UNUSED for the one that is possibly unused (we have two overloads so that one gets selected): qglobal.cpp(2069): warning #177: function "<unnamed>::fromstrerror_helper(int, const QByteArray &)" was declared but never referenced Remove functions really not used: qbezier.cpp(153): warning #177: function "findInflections" was declared but never referenced qbezier.cpp(534): warning #177: function "splitBezierAt" was declared but never referenced qpathclipper.cpp(1039): warning #177: function "midPoint" was declared but never referenced qpainter.cpp(119): warning #177: function "check_gradient" was declared but never referenced qdockarealayout.cpp(2580): warning #177: function "qMin(int, int, int)" was declared but never referenced qmainwindowlayout.cpp(1019): warning #177: function "validateDockWidgetArea" was declared but never referenced qgraphicsanchorlayout_p.cpp(670): warning #177: function "checkAdd" was declared but never referenced qcups.cpp(481): warning #177: function "paperSize2String" was declared but never referenced complexwidgets.cpp(373): warning #177: function "removeInvisibleWidgetsFromList" was declared but never referenced Change-Id: I1e5558e206b04edea381442030dc69536198d966 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-273-6/+4
|\| | | | | | | | | | | | | | | Conflicts: configure mkspecs/features/create_cmake.prf Change-Id: I94aea83b83833395d5db399209e0e51b92ef23b5
| * QtPrintSupport: Initialize UI of widget-based dialog.Friedemann Kleint2013-06-263-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove virtual from QPageSetupDialogPrivate::init() (which was called from the constructor) and keep it as a non-virtual function for QUnixPageSetupDialogPrivate. Fix breakage introduced by 54b899f44877d87f6118b1bab02fb67c35d738e8 . Task-number: QTBUG-31790 Change-Id: I6d552bc250e4d72c1bb50eceadd2852b1b957aea Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Doc: Adding navigation configs in the module qdocconf files.Jerome Pasion2013-06-251-0/+3
|/ | | | | | | | -The navigation bar requires the titles of the landing page and relevant pages. Change-Id: I5d5986b2bf74205cd49957b63fd6ac4e32cbb36b Reviewed-by: Martin Smith <martin.smith@digia.com>
* Doc: Removed pages from "technology-apis" group.Jerome Pasion2013-05-272-2/+0
| | | | | | | | "technology-apis" doesn't serve a purpose anymore and its product function is replaced by the new overviews on the landing page. Change-Id: I1e959981fd163966a54bec0d697bed12007c39e6 Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
* QPrintPreviewDialog: Prevent changing of page in resize handling.Friedemann Kleint2013-05-231-0/+2
| | | | | | | Task-number: QTBUG-14517 Change-Id: I59e444eed8d44be9fb7213fdbab4be473d595be8 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* Doc: Remove widgets examples from Qt Print Support documentationTopi Reinio2013-05-204-8/+36
| | | | | | | | | | | | | | | | The .qdocconf file for Qt Print Support includes examples/widgets in its exampledirs, presumably because a few examples there have printing support. The documentation for these examples is not accessible from Print Support index/module pages, and qdoc prints a lot of warnings for them (missing images). There's only few dependencies to examples in Print Support docs. These are resolved by copying a code snippet to correct place, and removing \sa links from QAbstractPrintDialog. Task-number: QTBUG-31137 Change-Id: Iac20d151f93ac16449241c6ee85979781b26e607 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Clean up old PostScript printing codeSze Howe Koh2013-05-121-9/+2
| | | | | | | | | | | | | PostScript support was removed back in 2011: 34f712e79e97b757b4426e1ffa09e065c9e379a1 - The QPSPrint* classes are gone - The QPrinter::OutputFormat enum only has NativeFormat and PdfFormat constants - QPaintEngine::PostScript is unused now Change-Id: I27d595b92341f41e14bd1e4fd860eac6826d7890 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc: Remove PostScript print supportSze Howe Koh2013-05-111-2/+2
| | | | | | | | | PostScript support was removed back in 2011, but not documented then: 34f712e79e97b757b4426e1ffa09e065c9e379a1 Change-Id: Ie818bf5f733422db910efadd57efa0ddabcc5175 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* qtprintsupport: Fix missing images in tools-customcompleter.htmlSergio Ahumada2013-05-071-1/+2
| | | | | | Change-Id: I115e7a76ec9078cdc2e6da61510962cd11e23593 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QPrinter - Fix doc errorsJohn Layt2013-04-121-2/+2
| | | | | | | | Fix doc errors. Task-number: QTBUG-27143 Change-Id: I59376bdb48ce03eb61f38b7dd7eb58f0d517a873 Reviewed-by: Casper van Donderen <casper.vandonderen@gmail.com>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-04-031-2/+1
|\ | | | | | | Change-Id: Icedabda08961326a0a447ec71f1b0f0f5df075eb
| * Doc: Changed title of Qt Print Support's C++ Classes page.Jerome Pasion2013-03-221-2/+1
| | | | | | | | | | | | | | | | -old title created broken links in Assistant. -conforms to Qt 5 naming scheme. Change-Id: Iaf619c1264edc1f9d2fd24f7031fe6c07efd2c1d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Make sure that we #include qconfig.h before testing for features.Thiago Macieira2013-03-192-0/+4
| | | | | | | | | | | | | | | | | | | | | | This is mandatory in public headers (qiodevice.h, qopengl*, etc.), but it's a good idea even in private headers, in case someone includes that header first somewhere. In particular, all platformsupport API is private. Change-Id: If287baa5d9ed14e93c1666efa0e6332c4c1cd9a4 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-162-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>