Skip to content

Commit

Permalink
Make things compile with the printer feature disabled
Browse files Browse the repository at this point in the history
Always include qtprintsupportglobal.h before checking the
ifdef, and add ifdef's where they where missing.

Change-Id: I535dce33b26955fb0196ea05d54be41fe93e9151
Reviewed-by: Jake Petroules <[email protected]>
Reviewed-by: Oswald Buddenhagen <[email protected]>
  • Loading branch information
laknoll committed Sep 15, 2016
1 parent b754b28 commit b22471e
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/printsupport/dialogs/qprintdialog_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
****************************************************************************/

#include "qplatformdefs.h"
#include <QtPrintSupport/qtprintsupportglobal.h>

#ifndef QT_NO_PRINTDIALOG

Expand Down
2 changes: 2 additions & 0 deletions src/printsupport/dialogs/qprintdialog_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
**
****************************************************************************/

#include <QtPrintSupport/qtprintsupportglobal.h>

#ifndef QT_NO_PRINTDIALOG

#include "qprintdialog.h"
Expand Down
2 changes: 1 addition & 1 deletion src/printsupport/kernel/qpaintengine_alpha.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
**
****************************************************************************/

#include <qglobal.h>
#include <qtprintsupportglobal.h>

#ifndef QT_NO_PRINTER
#include <qdebug.h>
Expand Down
4 changes: 4 additions & 0 deletions src/printsupport/kernel/qplatformprintplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
#include "private/qfactoryloader_p.h"
#include <qcoreapplication.h>

#ifndef QT_NO_PRINTER

QT_BEGIN_NAMESPACE

Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
Expand Down Expand Up @@ -86,3 +88,5 @@ QPlatformPrinterSupport *QPlatformPrinterSupportPlugin::get()
}

QT_END_NAMESPACE

#endif
4 changes: 4 additions & 0 deletions src/printsupport/kernel/qplatformprintplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
#include <QtCore/qplugin.h>
#include <QtCore/qfactoryinterface.h>

#ifndef QT_NO_PRINTER

QT_BEGIN_NAMESPACE


Expand All @@ -74,4 +76,6 @@ class Q_PRINTSUPPORT_EXPORT QPlatformPrinterSupportPlugin : public QObject

QT_END_NAMESPACE

#endif

#endif // QPLATFORMPRINTPLUGIN_H
2 changes: 2 additions & 0 deletions src/printsupport/kernel/qprintengine_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
**
****************************************************************************/

#include <QtPrintSupport/qtprintsupportglobal.h>

#ifndef QT_NO_PRINTER

#include "qprintengine_win_p.h"
Expand Down

0 comments on commit b22471e

Please sign in to comment.