summaryrefslogtreecommitdiffstats
path: root/src/printsupport
Commit message (Collapse)AuthorAgeFilesLines
...
| * QPageSetupWidget - Fix copying of printer settingsJohn Layt2013-12-081-3/+0
| | | | | | | | | | | | | | | | | | Don't copy the dialog settings to the QPrinter before the Print button is pressed, in case the Cancel button is pressed instead. The settings already get copied in the right place. Change-Id: I84d0053b450cf5839bf1a879af013f305a8fd377 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
| * QPrintDialog - Fix setting of PageOrderJohn Layt2013-12-082-14/+1
| | | | | | | | | | | | | | | | | | The print dialog was setting the PageOrder on the QPrinter as soon as the check box was toggled and not when the Print button was pressed, meaning the change is not forgotten when Cancel is pressed. Change-Id: I19637b7efacfb5388c70d2e7d9d05a05ecc5b2ea Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-052-121/+150
|\| | | | | | | | | | | | | Conflicts: src/sql/drivers/sqlite/qsql_sqlite.cpp Change-Id: Ia7cffd2c99ae3d5eea6b5740683c06e921336dcd
| * QPrinter - Simplify setting manual propertiesJohn Layt2013-11-292-59/+33
| | | | | | | | | | | | | | | | Change from a list to a set and define a utility method to both set the property and store that we have set it. Change-Id: I0cf13f1b0e90942424744316d0d3f699b9ead144 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * QPrinter - Fix OutputFormat when no printersJohn Layt2013-11-292-72/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the QPrinter constructor, setOutputFormat() and setPrinterName() make bad assumptions about the availability of printers when configuring NativeFormat which can lead to inconsistent print engine set-ups leading to crashes in the print dialog, especially on Windows where a valid DEVMODE is needed. This change cleans up the init and methods to ensure NativeFormat can only ever be set if we have both a valid plugin and a valid printer, if not the PdfFormat is used. One side-effect of this is that it is now impossible to set an invalid printer name via QPrinter (but still able to be done via QPrintEngine if really needed). Also if no default printer is set then use the first available one. This also fixes a bug where setting a new printer name on Windows reset all the saved settings. [ChangeLog][Important Behavior Changes] QPrinter no longer allows you to set an invalid printer name. Task-number: QTBUG-34345 Task-number: QTBUG-26008 Task-number: QTBUG-26430 Change-Id: I19737e4209d8c8df5817ea83246b3dd0c483ee85 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Cleanup some Windows printengine code to make it look more readableAndy Shaw2013-12-031-56/+39
| | | | | | | | | | Change-Id: I9e014a2a68b1502d20b88adccab39b7394b2ad86 Reviewed-by: John Layt <jlayt@kde.org>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-11-291-8/+0
|\| | | | | | | Change-Id: Ibb342cc5fc55ff9a3f4b3ecbd53936b57bc13e63
| * 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>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-11-2610-78/+138
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the conflicts in msvc_nmake.cpp the ifdefs are extended since we need to support windows phone in the target branch while it is not there in the current stable branch (as of Qt 5.2). Conflicts: configure qmake/generators/win32/msvc_nmake.cpp src/3rdparty/angle/src/libEGL/Surface.cpp src/angle/src/common/common.pri src/corelib/global/qglobal.h src/corelib/io/qstandardpaths.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxscreeneventhandler.h src/plugins/platforms/xcb/qglxintegration.h src/widgets/kernel/win.pri tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp tools/configure/configureapp.cpp Change-Id: I00b579eefebaf61d26ab9b00046d2b5bd5958812
| * 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>
* | QPrintPreviewWidget: use QSignalBlockerMarc Mutz2013-10-301-3/+4
|/ | | | | Change-Id: Ic2d48c8e2c9c3c6f06e67ebf7e12bd4899b421aa Reviewed-by: Olivier Goffart <ogoffart@woboq.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>