summaryrefslogtreecommitdiffstats
path: root/src/printsupport/kernel
Commit message (Collapse)AuthorAgeFilesLines
* printsupport: Fix missing or improper include guard in headersSergio Ahumada2012-09-083-8/+8
| | | | | | | | Use an include guard in headers to ensure the header is not included more than once. Make the header guard match its file name. Change-Id: Iefc02181fe235ede51c567fb54997531e5cd08a3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Ensure that printer orientation is preservedTitta Heikkala2012-08-301-2/+15
| | | | | | | | | | | | | | | | | After setting the printer name the initialization is no longer done for a printer with a name. Instead doReinit() method is called to preserve the orientation (set with setOrientation() method before calling setPrinterName()). Before the orientation was changed back to default when setPrinterName() method was called ignoring the orientation set. Updated also the autotest because the case: taskQTBUG4497_reusePrinterOnDifferentFiles() is no longer expected to fail on Windows. Task-number: QTBUG-26008 Change-Id: Ia6bc9ae14d79a646e61bfc97652f9f5af90738b3 Reviewed-by: Andy Shaw Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix qdoc errors in PrinterInfo.Frederik Gladhorn2012-08-281-2/+1
| | | | | | | | Document parameter and associate comment with function by removing newline. Change-Id: Ib4bb07c325144ef3501aea81d9e49e09b007387d Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com> Reviewed-by: Laszlo Papp <lpapp@kde.org>
* Misc documentation fixes triggered by qdoc errors/warningsShawn Rutledge2012-08-201-16/+9
| | | | | Change-Id: I6ca3b138114fe957a09e8ec2f22273865635fc8b Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* QtPrintSupport: Replace remaining Q_WS_ conditionals by name checks.Friedemann Kleint2012-07-211-11/+1
| | | | | Change-Id: Ic772e2187b3c93c5e0cdee6681289ab81e2c2f65 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove Library dependency on SettingsTasuku Suzuki2012-07-091-1/+1
| | | | | | | | made QLibraryInfo available with QT_NO_SETTINGS. QKdeTheme is removed when QT_NO_SETTINGS is defined. Change-Id: I63d619bb305e6c23985d9ea50c72d39a697b7a4b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Remove _qpa from cpp filenamesGirish Ramakrishnan2012-07-032-1/+1
| | | | | | | | 36547f4eff44361f7a6acd0cff107c0e47561f93 removed the _qpa from .h files and promised to remove it from .cpp files at a later date. Change-Id: I24a5c3796f6b07dd9a1931b699f3212d315edb12 Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
* Clean up the EXPORT macros in qglobal.h.Thiago Macieira2012-06-295-1/+70
| | | | | | | | | | | | | | | | | | | | QtPlatformSupport is a static library. It should never export anything, so Q_PLATFORMSUPPORT_EXPORT is unnecessary. QtSql, QtXml, QtDBus, QtOpenGL and QtPrintSupport now have the macros on their own source trees. It's possible these modules might be separated out from qtbase in the future. For QtDBus, the macros are moving back to where they used to be. This also leaves qglobal.h only creating the macros for QtCore, QtGui, QtWidgets and QtNetwork, the core libraries. Q_CANVAS_EXPORT, Q_OPENVG_EXPORT and Q_COMPAT_EXPORT aren't used anywhere in the Qt sources, so simply delete them. And the Q_QUICK1_EXPORT macro in the static section was wrong, so remove it too. Change-Id: I50bdf86e783338f814903b25979721f788a7becf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* QtPrintSupport - Add CUPS printer and options queries to pluginJohn Layt2012-06-092-0/+19
| | | | | | | | | | | | | | | | Implement initial support in the CUPS plugin for directly calling CUPS to obtain printer list and basic printer info rather than QCupsSupport. Add api to the plugin to return any options for a printer, usually IPP options as implemented for CUPS, but whatever applies for the host print system. Future changes will add support for returning the PPD options. This api may eventually be added to QPrinterInfo, but not in 5.0. Change-Id: I6c8bae4c9295009599e6ab31382f5fff4c93981f Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com> Reviewed-by: John Layt <jlayt@kde.org>
* QtPrintSupport: Move printer list into plugin base classJohn Layt2012-06-082-2/+5
| | | | | | | | | Move the cached printer list from the Windows plugin into the base class so the CUPS plugin can also use it in a subsequent commit. Change-Id: Idf5fb7fc49b1820aad58f16e8854ab9120caa193 Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com> Reviewed-by: John Layt <jlayt@kde.org>
* QtPrintSupport: Move plugin access of QPrinterInfo internals to baseJohn Layt2012-06-084-17/+18
| | | | | | | | | | Move all plugin methods requiring access to QPrinterInfo internals into the plugin base class, and remove the plugin classes as friends from QPrinterInfo. Change-Id: Ic527efc681e198abf19e038dd77c36bb8017d049 Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com> Reviewed-by: John Layt <jlayt@kde.org>
* Remove dependency from QFactoryInterface for the print pluginLars Knoll2012-06-081-10/+1
| | | | | Change-Id: Ia35890b72e7797ef655bf97b4a34af2908657c0e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtPrintSupport: Add CUPS printsupport pluginJohn Layt2012-05-3111-1391/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move CUPS code around to create a new CUPS printsupport plugin, this fixes QPrinterInfo for CUPS which depends on the plugin to work. It QT_NO_CUPS is defined then the plugin is not built and only Print to PDF is supported under Linux. * Move unused genericiunixprintersupport plugin to start new CUPS printsupport plugin * Split QPdfPrintEngine to create QCupsPrintEngine * Remove LPR related code from QPdfPrintEngine * Move CUPS specific code from plugin base class to derived CUPS class * Remove forcing CUPS print engine to use PDF mode as PDF is now Native * Move qt_getCupsPrinterPaperSizes from qprinterinfo_unix to QCUPSSupport * Remove qprinterinfo_unix as no longer used * Remove all QT_NO_LPR uses There is now no CUPS specific code left in printsupport/kernel except QCUPSSupport which is needed for the dialogs. Task-number: QTBUG-23060 Change-Id: Ie8fa4512a2424edc8943068e0fa9fb714cc42db9 Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: John Layt <jlayt@kde.org>
* QtPrintSupport - Add QPrinterInfo api for more printer detailsJohn Layt2012-05-293-0/+49
| | | | | | | | | | | | | | | A previous commit changed the Mac behaviour for printerName() from returning the CUPS Description to returning the CUPS Name. In case anyone was relying on this for a human-readable name add new api to return the CUPS Description. Also add the Location and Make and Model which will be used in the Unix print dialog instead of directly calling CUPS. Change-Id: I9901bf8d6368466adf111580f5db5a3f01ca9170 Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: John Layt <jlayt@kde.org>
* QtPrintSupport: Change QPrinterInfo::defaultPrinter() behaviourJohn Layt2012-05-292-1/+6
| | | | | | | | | | | | | | | | | | | | | | In Qt4 QPrinterInfo::defaultPrinter() has inconsistant behaviour depending on the platform. On Mac and Unix if no default printer is set in the system then the first available printer is returned. but on Windows it returns a null QPrinterInfo. Currently Qt5 returns the first printer on all platforms, but this causes an inconsistency if you call isDefault() on the returned QPrinterInfo. The apidox is slightly ambiguous, but does seem to imply no printer will be returned if no default is set. The only place in Qt the public api is used is in QPrinter which is coded expecting that defaultPrinter() may return null but for there still to be availablePrinters(). Change-Id: I1bbef8cba259b7d51980a0199e9fd6d5466d921f Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com> Reviewed-by: John Layt <jlayt@kde.org>
* QtPrintSupport - Modify Platform Plugin QPrinterInfo apiJohn Layt2012-05-244-11/+35
| | | | | | | | | | | | | | Change the way the printsupport plugin creates QPrinterInfo objects, provide platform api to return a named printer, and expose this as static public api in QPrinterInfo. Only the Mac plugin used the old api, the other plugins will have direct support added in separate commits, but will use the default implementation for now. Change-Id: I7d6b6556eb39919cfb15bc0e814afbaf13c5712c Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* qpa api: replace QPA headers with something more benignGirish Ramakrishnan2012-05-222-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current 'we mean it' headers are considered too aggressive for QPA. Replaced using the following script. for file in `find -type f -name "qplatform*.h" -and -not -name "*_p.h"`; do LINE_NO_1=`grep -n -m 1 "W A R N I N G" $file | awk -F ':' '{print $1}'` LINE_NO_2=`grep -n -m 1 "We mean it." $file | awk -F ':' '{print $1}'` if [ -z "$LINE_NO_1" ]; then LINE_NO_1=`grep -n -m 1 "#define " $file | awk -F ':' '{print $1}'` LINE_NO_2=$((1+$LINE_NO_1)) else LINE_NO_1=$(($LINE_NO_1-2)) LINE_NO_2=$(($LINE_NO_2+2)) fi head -n $LINE_NO_1 $file > $file.new cat >> $file.new <<EOF // // W A R N I N G // ------------- // // This file is part of the QPA API and is not meant to be used // in applications. Usage of this API may make your code // source and binary incompatible with future versions of Qt. // EOF tail -n +$LINE_NO_2 $file >> $file.new mv $file.new $file done Change-Id: I8a974c9bf8942647b7ad950afb372c1f738aa725 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* printsupport: set duplex setting correctly to CUPS printerTeemu Katajisto2012-05-151-14/+14
| | | | | | | | If CUPS printer default is not DuplexNone then setting duplex to None for printer did not have any effect on duplex setting. Change-Id: Ifdd82241952c9a63cdf9b53fe787f7503b8049bd Reviewed-by: John Layt <jlayt@kde.org>
* Fix font printing on Windows using the native engine.Friedemann Kleint2012-05-151-22/+30
| | | | | | | | | | | - Add HFONT, LOGFONT, trueType as properties of the Windows font engine, make it a real Q_OBJECT. - Query properties in the Windows print engine and use the HFONT, LOGFONT there. Change-Id: I5c35275b32ef6580d7fa15ed83c6e79e33dc3334 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove capitalization when specifying include-libraries.kb2012-05-141-1/+1
| | | | | | | | | | | | | MinGW installations on case-sensitive filesystems expect lowercase names of include-libraries and (usually) include files. When crosscompiling on Debian 6 (targeting MS Windows) linking fails because mingw is looking for non-existent include-libraries. Using lowercase names solves this. Change-Id: Id3454f4ed8ba42b6ea93d65d9c0ce567db6712df Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Doc: Fix \sa usageMarius Storm-Olsen2012-05-111-6/+6
| | | | | | | | | Ensure comma between elements (757 missing), single space and curly- braces around title elements, etc. Change-Id: Id16c3fda7fc47a12a0682f8720214f4990609a97 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Merge branch 'docs-refactoring' into masterMarius Storm-Olsen2012-05-101-1/+1
|\ | | | | | | Change-Id: Iebd1966abace3cdf7f9428dcfc1ded5b124ab113
| * Doc: Modularize QtPrintSupport documentation.Casper van Donderen2012-05-091-1/+1
| | | | | | | | | | | | | | | | This change moves the snippets and images to the modularized directories. Change-Id: Ib8f8556bcef13593ee40ac1122d765ed307ecb93 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* | No longer use deprecated methods for plugin loading.Friedemann Kleint2012-05-091-7/+3
| | | | | | | | | | Change-Id: I19c66b1c41ea4dd236726c86d7d071b210ec9244 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Revert "QtPrintSupport: Remove remaining LPR specific code"Rohan McGovern2012-05-0810-99/+1188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't compile with a typical cross-compilation setup, which generally won't include cups headers. The commit should have been rejected, but wasn't, due to a bug in the Qt Project CI. Since it now causes all other modules depending on qtbase to fail their CI, it must be reverted to minimize disruption while the commit can be amended and/or the test toolchain updated to include cups headers. This reverts commit 80f7a388906f94f58bf765a32b9abbb16f967db2. Change-Id: I315ae275b37de358a74af28ab7bd691c9849acba Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* | QtPrintSupport: Remove remaining LPR specific codeJohn Layt2012-05-0710-1188/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CUPS is the only supported print system on UNIX, LPR/PS support has already been dropped but some LPR specific code still remains. * Move qt_getCupsPrinterPaperSizes from qprinterinfo_unix to QCUPSSupport * Remove qprinterinfo_unix as no longer used * Remove LPR related code from QPdfPrintEngine * Remove all QT_NO_LPR uses * Remove most QT_NO_CUPS uses, use QT_NO_PRINTER where necessary Some QT_NO_CUPS uses remain in QPdfPrintEngine, these will be removed in a following change implementing a CUPS plugin. Change-Id: I439b6fad9cf88c3d24aa48e49475f49ad310dbad Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Expose QPA API under qpa/*Girish Ramakrishnan2012-05-078-9/+9
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main reasons for doing this are: 1. _qpa.h end up in the master QtGui include file. QtGui is meant for userland applications. qpa code is neither binary nor source compatible. Inadvertant use of QPA api makes the user code binary-incompatible. 2. syncqt creates forwarding headers for non-private header files. This gives people the impression that this is public API. As discussed on the mailing list, even though QPA api is internal and subject to change, it needs to treated differently from private headers since they will be used by in-qtbase and out-of-qtbase plugins. This commit does the following: 1. The _qpa in QPA header files is dropped. 2. syncqt now treats any file with qplatform prefix as a special file and moves it to qpa/ directory. The recommended way of using QPA API in plugins is: #include <qpa/qplatformfoo.h>. This allows the user include QPA API from multiple modules (for example, qplatformfoo might be in QtPrintSupport) 3. The user needs to explicitly add QT += <module>-private to get access to the qpa api. 4. Creates compat headers for the olden style qplatformfoo_qpa.h and QPlatformFoo includes. This commit does not change the cpp filenames. This requires a more careful merging of existing non qpa cpp files and existing cpp files on a case by case basis. This can be done at anytime. The following files are not renamed as part of this changed but will be fixed as part of a future change: src/gui/kernel/qgenericpluginfactory_qpa.h src/gui/kernel/qgenericplugin_qpa.h src/gui/kernel/qwindowsysteminterface_qpa.h files were renamed using for x in `find . -name "qplatform*_qpa.h"`; do git mv $x "${x/_qpa.h/.h}"; done for x in `find . -name "qplatform*_qpa_p.h"`; do git mv $x "${x/_qpa_p.h/_p.h}"; done includes were renamed using script for file in `find . -name "*.h" -or -name "*.cpp" -or -name "*.mm"`; do sed -i -e 's,.*#.*include.*<\(Qt.*/\)\?\(QPlatform.*\)>,#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.*"\(Qt.*/\)\?\(QPlatform.*\)",#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.* "\(qplatform.*\)_qpa.h",#include <qpa/\L\1.h>,g' \ -e 's,.*#.*include.*"\(qplatform.*\)_qpa_p.h",#include <qpa/\L\1_p.h>,g' \ -e 's,.*#.*include.*<\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)>,#include <qpa/\2\3>,g' \ -e 's,.*#.*include.*"\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)",#include <qpa/\2\3>,g' \ $file done Change-Id: I04a350314a45746e3911f54b3b21ad03315afb67 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Use QFile::encodeName to encode a file name on UnixThiago Macieira2012-05-041-1/+1
| | | | | | | This usually matches QString::toLocal8Bit, not toAscii. Change-Id: I7b1c3e500be8265de0710cf36ca407c8b3f31edd Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtPrintSupport]Thiago Macieira2012-05-031-2/+2
| | | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I73963515a44175cb63251d0508d5f28d78076d76 Reviewed-by: John Layt <jlayt@kde.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fixed QtGui and QtPrintSupport with -qtnamespace and MSVCRohan McGovern2012-05-021-2/+2
| | | | | | | | With this compiler, external functions declared inside other functions will end up in the wrong namespace. Change-Id: Ia37283d632dbc2ee0c269aeffa1f045b3e60148e Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-04-171-2/+2
|\ | | | | | | Change-Id: I964b0a6f5c38351fdfafb8a2a128a349ff8c89d1
| * Merge remote-tracking branch 'origin/master' into api_changesOswald Buddenhagen2012-04-101-27/+0
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/widgets/styles/qwindowsxpstyle.cpp tests/auto/gui/kernel/qwindow/qwindow.pro tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
| * \ Merge master into api_changesKent Hansen2012-03-271-0/+2
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qisenum.h src/dbus/qdbusconnection_p.h src/widgets/kernel/qwidget.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: I85102515d5fec835832cc20ffdc5c1ba578bd01d
| * \ \ Merge master into api_changesKent Hansen2012-03-235-75/+58
| |\ \ \ | | | | | | | | | | | | | | | Change-Id: I93551e4d13a1b0815b359b9415060e9089477db1
| * \ \ \ Merge master into api_changesKent Hansen2012-03-162-3/+3
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qmetatype.cpp src/gui/kernel/qplatformsurface_qpa.cpp tests/auto/corelib/tools/qtimeline/qtimeline.pro Change-Id: Iff3fff34eeeb06f02369767ddfce44cfde505178
| * \ \ \ \ Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-03-121-2/+0
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp Change-Id: I884afc3b6d65c6411733a897a1949e19393573a7
| * | | | | | QtPrintSupport: make some constructors explicitMarc Mutz2012-03-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semi-automatic search, so I'm reasonably sure that all the exported ones have been caught. Change-Id: Ic65f21e06fb2c5d851390cd025c2a48db51f5930 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | | | | | | doc: Mark all qpa classes as internalGirish Ramakrishnan2012-04-161-0/+10
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All QPA api as marked as so: * preliminary - the api is subject to change anytime * internal - internal api that shouldn't be used by apps * ingroup qpa - "qpa" module. In the long run, qdoc should generate documentation for qplatform* API as if it were a seperate module. Change-Id: I4e76c0e0c1805c679cabd52d5006f9fa9bc411c0 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* | | | | | Documentation cleanupDebao Zhang2012-03-311-27/+0
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | They are comments of Qt3 support members which have been removed already. Change-Id: I4b3dfaac1e5e1c3c13b83e41d0505dd16a4b6a8e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | | | | Fix warnings in qtbase.Friedemann Kleint2012-03-241-0/+2
| |_|_|/ |/| | | | | | | | | | | | | | | Change-Id: I981e08872440e35eb9bfad32b20543cfce8439c9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | | | Fix QPrinter test in WindowsMiikka Heikkinen2012-03-235-76/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed Q_WS_WIN flagging to Q_OS_WIN in QPrinter API and related implementation to make API match the documentation and Qt 4.8. Also Removed the unused internal HDC related functions from the API, that were previously behind Q_WS_WIN flag. Some of the properties tested are documented to be valid for native print engine only in X11 environment, so skipped testing those in non-xcb environments. Copy collation is also apparently not supported in Windows native print engine, though this seems to be undocumented, so skipped that only in Windows. At least one of the test blocks in tst_QPrinter::valuePreservation() failed due to default printer not getting set properly, so fixed that, too. Task-number: QTBUG-24191 Task-number: QTBUG-22927 Change-Id: I44a5e3d647a1279fcc7f1e99de6881f9be330246 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | | | Fix infinite recursion crash in QPrinterInfo::supportedPaperSizes()Miikka Heikkinen2012-03-192-0/+23
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function calls platform specific function QWindowsPrinterSupport::supportedPaperSizes(), which then called back to QPrinterInfo::supportedPaperSizes(), causing infinite recursion. Fixed by providing a proper implementation for querying supported paper sizes in QWin32PrintEngine - the same implementation was used in Qt 4.8. Task-number: QTBUG-24190 Change-Id: I64a2773d83596df19818bf2636f1255943d7851d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* | | Re-enable native print/pagesetup dialogs on Mac OS XBradley T. Hughes2012-03-152-3/+3
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since QtPrintSupport does not have access to the internals of the print engine on Mac OS X (it lives in the platform plugin). We instead use the NSPrintInfoFromPrintEngine() invokable method in QPlatformNativeInterface to return an NSPrintInfo* that we can use where needed, or we use QPrintEngine::property()/setProperty() to communicate with the engine. This commit disables the generic UNIX dialogs and CUPS support on Mac OS X, ensuring that the default format on Mac OS X is the QPrinter::NativeFormat (previously qprinter.cpp would force PdfFormat as default on Q_OS_UNIX which is also defined on Mac OS X). The rest of the changes are straight forward porting. The methods: extern void macStartInterceptWindowTitle(QWidget *window); extern void macStopInterceptWindowTitle(); don't exist anymore, so don't use them. QMacCocoaAutoReleasePool also doens't work, so use NSAutoreleasePool directly. Change-Id: I341609e5efa53cadf8d174e4b282cbcae93e39e8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* | Remove stale references to QtopiaDonald Carr2012-03-121-2/+0
|/ | | | | | | | | Change-Id: Idd9b5fae8f6a0273636a878325e82e5664a40d43 Reviewed-by: Donald Carr <donald.carr@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Don't leak from QPlatformPrinterSupportPlugin::get()Bradley T. Hughes2012-03-051-7/+19
| | | | | | | | Cache the first QPlatformPrinterSupport returned from the first QPlatformPrinterSupportPlugin, and treat it as an persistent singelton. Change-Id: Ic1c83d7c1cdf4a09723a74e0b9fd485e0b0b3acb Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add API to convert QSizeF<->PaperSize in QPlatformPrinterSupportBradley T. Hughes2012-03-052-0/+23
| | | | | | | | | | These static public functions give printsupport plugins access to the non-exported qt_paperSizeToQSizeF() and qSizeFTopaperSize() functions in qprinter.cpp to aid implementing QPrintEngine and QPlatformPrinterSupport::supportedPaperSizes(). Change-Id: I3ebcdcd17e863b06ceb135e096e630b37882a293 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Remove #ifdef Q_WS_MAC code from QPrinterBradley T. Hughes2012-03-051-7/+0
| | | | | | | | We have a QPlatformPrinterSupportPlugin on Mac OS X to return the QPrintEngine/QPaintEngine, no need to keep this code. Change-Id: Ie24dcfd157810ede69790fc7b27c12e24766efce Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-021-5/+5
| | | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I519bf9c29b14092e3ab6067612f42bf749eeedf5 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QPrinterInfo: remove unused variableMarc Mutz2012-02-261-1/+0
| | | | | Change-Id: I1a3db07e7fe25066a6b13ca41854566ccb1298df Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Windows: Fix inclusion of <windows.h>Friedemann Kleint2012-02-011-2/+1
| | | | | | | | | | | | | - Always use <qt_windows.h> as the last file to be included. - Remove it from some headers, use Qt::HANDLE instead of HANDLE. - Clean up #ifdef, use Q_OS_WIN for Windows/Windows CE. - Add NOMINMAX to qt_windows.h to avoid problems with the min/max macros. - Remove <windows.h> from qplatformdefs.h (VS2005) Change-Id: Ic44e2cb3eafce38e1ad645c3bf85745439398e50 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>