Compile without -qpa.
Change-Id: Icfbf733964a7d6db80f8ec706a4b6fe84cd71b4d
Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
dialogs/qprintdialog.h \
dialogs/qprintpreviewdialog.h
-!qpa:mac {
+# ### fixme
+false {
OBJECTIVE_SOURCES += dialogs/qpagesetupdialog_mac.mm \
dialogs/qprintdialog_mac.mm
-
}
win32 {
dialogs/qprintdialog_win.cpp
}
-!mac:!symbian:unix|qpa:!win32 {
- HEADERS += dialogs/qpagesetupdialog_unix_p.h
- SOURCES += dialogs/qprintdialog_unix.cpp \
- dialogs/qpagesetupdialog_unix.cpp
- FORMS += dialogs/qprintsettingsoutput.ui \
- dialogs/qprintwidget.ui \
- dialogs/qprintpropertieswidget.ui
+unix {
+ HEADERS += dialogs/qpagesetupdialog_unix_p.h
+ SOURCES += dialogs/qprintdialog_unix.cpp \
+ dialogs/qpagesetupdialog_unix.cpp
+ FORMS += dialogs/qprintsettingsoutput.ui \
+ dialogs/qprintwidget.ui \
+ dialogs/qprintpropertieswidget.ui
}
INCLUDEPATH += $$PWD
class QPushButton;
class QPrinter;
-#if defined (Q_OS_UNIX) && !defined(QTOPIA_PRINTDIALOG) && !defined(Q_WS_MAC) && !defined(Q_OS_SYMBIAN)
+#if defined (Q_OS_UNIX)
class QUnixPrintWidgetPrivate;
class Q_PRINTSUPPORT_EXPORT QUnixPrintWidget : public QWidget
~QPrintDialog();
int exec();
-#if defined (Q_OS_UNIX) && !defined(QTOPIA_PRINTDIALOG) && !defined(Q_WS_MAC)
+#if defined (Q_OS_UNIX)
virtual void accept();
#endif
void done(int result);
void setOptions(PrintDialogOptions options);
PrintDialogOptions options() const;
-#if defined(Q_OS_UNIX) || defined(Q_WS_MAC) || defined(Q_OS_WIN)
+#if defined(Q_OS_UNIX) || defined(Q_OS_WIN)
void setVisible(bool visible);
#endif
private:
#ifndef QTOPIA_PRINTDIALOG
Q_PRIVATE_SLOT(d_func(), void _q_chbPrintLastFirstToggled(bool))
-#if defined (Q_OS_UNIX) && !defined (Q_OS_MAC)
+#if defined (Q_OS_UNIX)
Q_PRIVATE_SLOT(d_func(), void _q_collapseOrExpandDialog())
#endif
-# if defined(Q_OS_UNIX) && !defined (Q_OS_MAC) && !defined(QT_NO_MESSAGEBOX)
+# if defined(Q_OS_UNIX) && !defined(QT_NO_MESSAGEBOX)
Q_PRIVATE_SLOT(d_func(), void _q_checkFields())
# endif
#else // QTOPIA_PRINTDIALOG
QPushButton *collapseButton;
};
-#if defined (Q_OS_UNIX)
class QUnixPrintWidgetPrivate
{
public:
d->setupPrinter();
}
-#endif
-
////////////////////////////////////////////////////////////////////////////////
#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
$$PWD/qplatformprintplugin.cpp \
$$PWD/qplatformprintersupport_qpa.cpp
-unix:!symbian {
+unix {
HEADERS += \
$$PWD/qprinterinfo_unix_p.h
SOURCES += \
LIBS += -lWinspool -lComdlg32
}
-x11|qpa:!win32 {
+win32 {
+ DEFINES += QT_NO_CUPS QT_NO_LPR
+} else {
SOURCES += $$PWD/qcups.cpp
HEADERS += $$PWD/qcups_p.h
-} else {
- DEFINES += QT_NO_CUPS QT_NO_LPR
}
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
void QPrinterPrivate::createDefaultEngines()
{
QPrinter::OutputFormat realOutputFormat = outputFormat;
-#if defined (Q_OS_UNIX) && ! defined (Q_WS_MAC)
+#if defined (Q_OS_UNIX)
if(outputFormat == QPrinter::NativeFormat) {
realOutputFormat = QPrinter::PdfFormat;
}
switch (realOutputFormat) {
case QPrinter::NativeFormat: {
-#if defined (Q_WS_QPA)
QPlatformPrinterSupport *ps = QPlatformPrinterSupportPlugin::get();
if (ps) {
printEngine = ps->createNativePrintEngine(printerMode);
paintEngine = pdfEngine;
printEngine = pdfEngine;
}
-#elif defined (Q_WS_WIN)
- QWin32PrintEngine *winEngine = new QWin32PrintEngine(printerMode);
- paintEngine = winEngine;
- printEngine = winEngine;
-#elif defined (Q_WS_MAC)
+#if defined (Q_WS_MAC)
QMacPrintEngine *macEngine = new QMacPrintEngine(printerMode);
paintEngine = macEngine;
printEngine = macEngine;
-#elif defined (Q_OS_UNIX)
- Q_ASSERT(false);
#endif
}
break;
*/
bool QPrinterInfo::isNull() const
{
- const Q_D(QPrinterInfo);
+ Q_D(const QPrinterInfo);
return d == &QPrinterInfoPrivate::shared_null;
}
*/
bool QPrinterInfo::isDefault() const
{
- const Q_D(QPrinterInfo);
+ Q_D(const QPrinterInfo);
return d->isDefault;
}
On Mac OS X 10.3, this function always returns an empty list.
*/
-#ifdef Q_WS_QPA
QList<QPrinter::PaperSize> QPrinterInfo::supportedPaperSizes() const
{
- const Q_D(QPrinterInfo);
+ Q_D(const QPrinterInfo);
if (!isNull() && !d->hasPaperSizes) {
d->paperSizes = QPlatformPrinterSupportPlugin::get()->supportedPaperSizes(*this);
d->hasPaperSizes = true;
return QPlatformPrinterSupportPlugin::get()->defaultPrinter();
}
-#endif //Q_WS_QPA
-
QT_END_NAMESPACE
#endif // QT_NO_PRINTER
public:
QPrinterInfoPrivate(const QString& name = QString()) :
name(name), isDefault(false)
-#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)
, cupsPrinterIndex(0)
#endif
-#endif
, hasPaperSizes(false)
{}
~QPrinterInfoPrivate()
QString name;
bool isDefault;
-#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)
int cupsPrinterIndex;
#endif
-#endif
mutable bool hasPaperSizes;
mutable QList<QPrinter::PaperSize> paperSizes;
};