summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/mainwindow.cpp7
-rw-r--r--qt-ui/printdialog.h1
-rw-r--r--subsurface-configure.pri2
-rw-r--r--subsurface.pro16
4 files changed, 20 insertions, 6 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 5b4e9b43d..86d612457 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -36,7 +36,9 @@
#include "simplewidgets.h"
#include "diveplanner.h"
#include "about.h"
+#ifndef NO_PRINTING
#include "printdialog.h"
+#endif
#include "divelogimportdialog.h"
#ifndef NO_USERMANUAL
#include "usermanual.h"
@@ -91,6 +93,9 @@ MainWindow::MainWindow() : QMainWindow(),
#ifdef NO_USERMANUAL
ui.menuHelp->removeAction(ui.actionUserManual);
#endif
+#ifdef NO_PRINTING
+ ui.menuFile->removeAction(ui.actionPrint);
+#endif
}
MainWindow::~MainWindow()
@@ -274,9 +279,11 @@ void MainWindow::on_actionExportUDDF_triggered()
void MainWindow::on_actionPrint_triggered()
{
+#ifndef NO_PRINTING
PrintDialog dlg(this);
dlg.exec();
+#endif
}
void MainWindow::disableDcShortcuts()
diff --git a/qt-ui/printdialog.h b/qt-ui/printdialog.h
index 33cc25f03..32069a278 100644
--- a/qt-ui/printdialog.h
+++ b/qt-ui/printdialog.h
@@ -29,5 +29,4 @@ slots:
void printClicked();
void onPaintRequested(QPrinter *);
};
-
#endif // PRINTDIALOG_H
diff --git a/subsurface-configure.pri b/subsurface-configure.pri
index 14e5cef67..5177c9d68 100644
--- a/subsurface-configure.pri
+++ b/subsurface-configure.pri
@@ -139,7 +139,7 @@ isEmpty(LIBGIT2DEVEL) {
link_pkgconfig: packagesExist(libiconv): PKGCONFIG += libiconv
# disable things when were on android
-contains(QMAKE_PLATFORM, android): DEFINES += NO_MARBLE NO_USERMANUAL
+contains(QMAKE_PLATFORM, android): DEFINES += NO_MARBLE NO_USERMANUAL NO_PRINTING
#
# Find libmarble
diff --git a/subsurface.pro b/subsurface.pro
index baf1341b3..d10f73df4 100644
--- a/subsurface.pro
+++ b/subsurface.pro
@@ -76,7 +76,11 @@ HEADERS = \
qt-ui/profile/divetooltipitem.h \
qt-ui/profile/ruleritem.h
-android: HEADERS -= qt-ui/usermanual.h
+android: HEADERS -= \
+ qt-ui/usermanual.h \
+ qt-ui/printdialog.h \
+ qt-ui/printlayout.h \
+ qt-ui/printoptions.h
SOURCES = \
deco.c \
@@ -148,7 +152,11 @@ else: linux*: SOURCES += linux.c
mac: SOURCES += macos.c
win32: SOURCES += windows.c
-android: SOURCES -= qt-ui/usermanual.cpp
+android: SOURCES -= \
+ qt-ui/usermanual.cpp \
+ qt-ui/printdialog.cpp \
+ qt-ui/printlayout.cpp \
+ qt-ui/printoptions.cpp
FORMS = \
qt-ui/about.ui \
@@ -167,8 +175,8 @@ FORMS = \
qt-ui/divelogimportdialog.ui \
qt-ui/usermanual.ui
-# Usermanual isn't supported on android right now
-android: FORMS -= qt-ui/usermanual.ui
+# Nether usermanual or printing is supported on android right now
+android: FORMS -= qt-ui/usermanual.ui qt-ui/printoptions.ui
RESOURCES = subsurface.qrc