summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-06-23 15:43:51 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-24 17:18:58 +0800
commit5904be2e0681a20be23a5190c4bd3d183db8689f (patch)
tree3a7ffda860e11f2b8da7f136f6f8d29c1b1aa503 /qt-ui/mainwindow.cpp
parent9f7c79557e0fe2add48eacdddd1f0a559faf2ccf (diff)
downloadsubsurface-5904be2e0681a20be23a5190c4bd3d183db8689f.tar.gz
Fix NO_PRINTING building again
Back in 6699e3ab ("Add print button to planner") unconditional printing code was added. This puts that same code behind NO_PRINTING macro. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 9f741e84f..13a441349 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -20,7 +20,6 @@
#include <QStringList>
#include <QSettings>
#include <QShortcut>
-#include <QPrintDialog>
#include <fcntl.h>
#include "divelistview.h"
#include "starwidget.h"
@@ -43,6 +42,7 @@
#include "updatemanager.h"
#include "planner.h"
#ifndef NO_PRINTING
+#include <QPrintDialog>
#include "printdialog.h"
#endif
#include "divelogimportdialog.h"
@@ -440,6 +440,7 @@ void MainWindow::setPlanNotes(const char *notes)
void MainWindow::printPlan()
{
+#ifndef NO_PRINTING
QString diveplan = ui.divePlanOutput->toHtml();
QString withDisclaimer = diveplan + QString(disclaimer);
@@ -452,6 +453,7 @@ void MainWindow::printPlan()
ui.divePlanOutput->setHtml(withDisclaimer);
ui.divePlanOutput->print(&printer);
ui.divePlanOutput->setHtml(diveplan);
+#endif
}
void MainWindow::on_actionDivePlanner_triggered()