summaryrefslogtreecommitdiffstats
path: root/qt-ui/printdialog.h
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2014-08-04 19:32:13 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-04 09:47:18 -0700
commit69676b08fb03c8ebffc8c6aa2e30c98b49ef0da4 (patch)
treeee85556be0a95d027a16b45c14af69c2bd15c67a /qt-ui/printdialog.h
parent1a8dd659ca4999001bdc4a454277354b016d479c (diff)
downloadsubsurface-69676b08fb03c8ebffc8c6aa2e30c98b49ef0da4.tar.gz
Print: display an error message if no printers are found
When pressing Print or Preview from the PrintDialog, we need to first check if there are printers installed. If not we abort and show an error message. This is needed because if no printers are installed, things like the reported page height could be zero and the profile and table print code in PrintLayout will break. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/printdialog.h')
-rw-r--r--qt-ui/printdialog.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/qt-ui/printdialog.h b/qt-ui/printdialog.h
index 32069a278..b29021838 100644
--- a/qt-ui/printdialog.h
+++ b/qt-ui/printdialog.h
@@ -18,6 +18,7 @@ public:
explicit PrintDialog(QWidget *parent = 0, Qt::WindowFlags f = 0);
private:
+ bool checkForAvailablePrinters(void);
PrintOptions *optionsWidget;
PrintLayout *printLayout;
QProgressBar *progressBar;