diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2012-03-05 15:01:55 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-15 09:50:18 +0100 |
commit | 088ae4ca71f54545a2a04da10a6e7cab4826db51 (patch) | |
tree | 5b8f505e2e8ea071052b7e52efc6f187b8d9af78 /src/printsupport/dialogs/qprintdialog.h | |
parent | 86fc4aa2b661101d392ff8ff832e3cb0e4ce8d91 (diff) |
Re-enable native print/pagesetup dialogs on Mac OS X
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>
Diffstat (limited to 'src/printsupport/dialogs/qprintdialog.h')
-rw-r--r-- | src/printsupport/dialogs/qprintdialog.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/printsupport/dialogs/qprintdialog.h b/src/printsupport/dialogs/qprintdialog.h index af39a90d73..1eeca111e0 100644 --- a/src/printsupport/dialogs/qprintdialog.h +++ b/src/printsupport/dialogs/qprintdialog.h @@ -55,7 +55,7 @@ class QPrintDialogPrivate; class QPushButton; class QPrinter; -#if defined (Q_OS_UNIX) +#if defined (Q_OS_UNIX) && !defined(Q_OS_MAC) class QUnixPrintWidgetPrivate; class Q_PRINTSUPPORT_EXPORT QUnixPrintWidget : public QWidget @@ -90,7 +90,7 @@ public: ~QPrintDialog(); int exec(); -#if defined (Q_OS_UNIX) +#if defined (Q_OS_UNIX) && !defined(Q_OS_MAC) virtual void accept(); #endif void done(int result); @@ -130,10 +130,10 @@ Q_SIGNALS: private: Q_PRIVATE_SLOT(d_func(), void _q_chbPrintLastFirstToggled(bool)) -#if defined (Q_OS_UNIX) +#if defined (Q_OS_UNIX) && !defined(Q_OS_MAC) Q_PRIVATE_SLOT(d_func(), void _q_collapseOrExpandDialog()) #endif -# if defined(Q_OS_UNIX) && !defined(QT_NO_MESSAGEBOX) +# if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(QT_NO_MESSAGEBOX) Q_PRIVATE_SLOT(d_func(), void _q_checkFields()) # endif friend class QUnixPrintWidget; |