From 264272fb88358c1bc681442bbfd4673de29ef969 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 26 Oct 2011 09:11:48 +0200 Subject: QtPrintSupport: Remove Q_WS_QPA, qpa sections from .pro files. Compile without -qpa. Change-Id: Icfbf733964a7d6db80f8ec706a4b6fe84cd71b4d Reviewed-by: Oliver Wolff --- src/printsupport/kernel/qplatformprintersupport_qpa.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/printsupport/kernel/qplatformprintersupport_qpa.cpp') diff --git a/src/printsupport/kernel/qplatformprintersupport_qpa.cpp b/src/printsupport/kernel/qplatformprintersupport_qpa.cpp index 3c11b3304c..e97ca3fef4 100644 --- a/src/printsupport/kernel/qplatformprintersupport_qpa.cpp +++ b/src/printsupport/kernel/qplatformprintersupport_qpa.cpp @@ -106,26 +106,22 @@ bool QPlatformPrinterSupport::printerInfoIsDefault(const QPrinterInfo &p) int QPlatformPrinterSupport::printerInfoCupsPrinterIndex(const QPrinterInfo &p) { - int i = -1; -#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_SYMBIAN)) || defined(Q_WS_QPA) #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY) - if (!p.isNull()) - return i = p.d_func()->cupsPrinterIndex; -#endif -#endif + return p.isNull() ? -1 : p.d_func()->cupsPrinterIndex; +#else Q_UNUSED(p) - return i; + return -1; +#endif } void QPlatformPrinterSupport::setPrinterInfoCupsPrinterIndex(QPrinterInfo *p, int index) { -#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_SYMBIAN)) || defined(Q_WS_QPA) #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY) p->d_func()->cupsPrinterIndex = index; -#endif -#endif +#else Q_UNUSED(p) Q_UNUSED(index) +#endif } QT_END_NAMESPACE -- cgit v1.2.3