Fix compilation when QT_NO_PRINTDIALOG is defined.
authorQt4iOS <ian@mediator-software.com>
Sat, 24 Mar 2012 14:49:52 +0000 (14:49 +0000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 27 Mar 2012 17:26:45 +0000 (19:26 +0200)
Some code intended to be disabled when QT_NO_PRINTDIALOG is defined
was being compiled due to misplaced #ifdef and/or #endif.

Change-Id: Ic8587872fae03cac2895e54e34f8f20cb575d92b
Reviewed-by: John Layt <jlayt@kde.org>
src/printsupport/dialogs/qpagesetupdialog_mac.mm
src/printsupport/dialogs/qprintdialog_unix.cpp

index 6e4469e..512c4dc 100644 (file)
@@ -39,6 +39,8 @@
 **
 ****************************************************************************/
 
+#ifndef QT_NO_PRINTDIALOG
+
 #include <Cocoa/Cocoa.h>
 
 #include "qpagesetupdialog.h"
@@ -47,8 +49,6 @@
 #include <QtGui/qplatformnativeinterface_qpa.h>
 #include <QtPrintSupport/qprintengine.h>
 
-#ifndef QT_NO_PRINTDIALOG
-
 QT_USE_NAMESPACE
 
 @class QT_MANGLE_NAMESPACE(QCocoaPageLayoutDelegate);
index 5c5ca77..f3f7eea 100644 (file)
@@ -178,7 +178,6 @@ private:
     const ppd_file_t* cupsPPD;
 #endif
 };
-#endif
 
 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
 class QOptionTreeItem
@@ -1245,7 +1244,8 @@ void QPPDOptionsEditor::cbChanged(int)
 */
 }
 
-#endif
+#endif // !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
+#endif // defined (Q_OS_UNIX)
 
 QT_END_NAMESPACE