mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Fix NO_PRINTING when printing is disabled in Qt
Qt for android doesn't have any printing support, so this fixes NO_PRINTING so we can build against a Qt without any printing support at all. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
eda0190e2a
commit
c3f6fcb0bf
3 changed files with 6 additions and 4 deletions
|
@ -120,6 +120,8 @@ else()
|
|||
printer.cpp
|
||||
templatelayout.cpp
|
||||
)
|
||||
set(PRINTING_PKG PrintSupport)
|
||||
set(PRINTING_LIB Qt5::PrintSupport)
|
||||
endif()
|
||||
|
||||
if(NO_USERMANUAL)
|
||||
|
@ -153,8 +155,8 @@ if(SUBSURFACE_MOBILE)
|
|||
set(QT_QUICK_PKG Quick)
|
||||
set(QT_QUICK_LIB Qt5::Quick)
|
||||
endif()
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core Concurrent Widgets Network ${WEBKIT_PKG} PrintSupport Svg Test LinguistTools ${QT_QUICK_PKG})
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network ${WEBKIT_LIB} Qt5::PrintSupport Qt5::Svg ${QT_QUICK_LIB})
|
||||
find_package(Qt5 REQUIRED COMPONENTS Core Concurrent Widgets Network ${WEBKIT_PKG} ${PRINTING_PKG} Svg Test LinguistTools ${QT_QUICK_PKG})
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network ${WEBKIT_LIB} ${PRINTING_LIB} Qt5::Svg ${QT_QUICK_PKG})
|
||||
set(QT_TEST_LIBRARIES ${QT_LIBRARIES} Qt5::Test)
|
||||
|
||||
# Generate the ssrf-config.h every 'make'
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include "printoptions.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
#ifndef NO_PRINTING
|
||||
#include <QProgressBar>
|
||||
#include <QPrintPreviewDialog>
|
||||
#include <QPrintDialog>
|
||||
|
@ -10,7 +11,6 @@
|
|||
|
||||
#define SETTINGS_GROUP "PrintDialog"
|
||||
|
||||
#ifndef NO_PRINTING
|
||||
PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f)
|
||||
{
|
||||
// check if the options were previously stored in the settings; if not use some defaults.
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#ifndef PRINTDIALOG_H
|
||||
#define PRINTDIALOG_H
|
||||
|
||||
#ifndef NO_PRINTING
|
||||
#include <QDialog>
|
||||
#include <QPrinter>
|
||||
#include "printoptions.h"
|
||||
#include "printer.h"
|
||||
|
||||
#ifndef NO_PRINTING
|
||||
class QProgressBar;
|
||||
class PrintOptions;
|
||||
class PrintLayout;
|
||||
|
|
Loading…
Reference in a new issue