mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Remove printing when building for Android
Qt for Android doesn't support printing. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
605cff32a5
commit
198199adae
4 changed files with 20 additions and 6 deletions
|
@ -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()
|
||||
|
|
|
@ -29,5 +29,4 @@ slots:
|
|||
void printClicked();
|
||||
void onPaintRequested(QPrinter *);
|
||||
};
|
||||
|
||||
#endif // PRINTDIALOG_H
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue