[Development] Disable printing support

John Layt jlayt at kde.org
Fri Jun 13 18:19:49 CEST 2014


> Em sex 13 jun 2014, às 10:21:08, Massimo Callegari escreveu:

>> I've added QT_NO_PRINTER and QT_NO_PRINTDIALOG to my qmake.conf
>> Qt5 base 5.3.0 still builds fine. libQt5PrintSupport is still created but
>> it's only 43k now. Unfortunately QtWebKit doesn't seem to change in size (I
>> guess cause the print library is still there) but that's a start.

I do try keep QT_NO_PRINTER working, glad to know it works for you.
You probably shouldn't need QT_NO_PRINTDIALOG as it is implied by
QT_NO_PRINTER, it's really there to allow people to disable the
dialogs but still keep printing available for non-gui apps.

As for the library still being there, yes it only ifdefs out the code
and not the actual library creation, which would be far better.  I've
added it to my TODO list, see QTBUG-39634 :-) Anyone have comments on
just keeping the -D QT_NO_PRINTER for this, or should we add a
configure option for -printsupport / -no-printsupport like we have for
gui and widgets?  We can probably remove the -cups / -no-cups /
QT_NO_CUPS options now too, there is no other printing option on Linux
(QTBUG-39636).

On 13 June 2014 16:29, Thiago Macieira <thiago.macieira at intel.com> wrote:
> Note that "print support" also includes PDF generation. Your device might
> still want to do that.

Actually no it doesn't, not since the GUI/PrintSupport split, but we
do have QT_NO_PDF that does that, and by implication disables printing
too on all platforms as they all need PdfFormat.  What QT_NO_PRINTER
does do though is remove the print() method from QTextDocument when it
shouldn't, as that now takes a QPagedPaintDevice rather than a
QPrinter (QTBUG-39635).

Cheers!

John.



More information about the Development mailing list