summaryrefslogtreecommitdiffstats
path: root/qt-ui/printdialog.cpp
diff options
context:
space:
mode:
authorGravatar Boris Barbulovski <bbarbulovski@gmail.com>2014-02-09 00:13:58 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-09 08:20:17 -0800
commit7c4c0802dceffdaa7bb3c41ce5fbc7f79d8a916a (patch)
tree912844e26136a8b390f727cc9ad855072b13342a /qt-ui/printdialog.cpp
parentaeaa0503069f2f1f095afed6f19d4fefa19a5385 (diff)
downloadsubsurface-7c4c0802dceffdaa7bb3c41ce5fbc7f79d8a916a.tar.gz
PrintDialog small improvements.
* Remove closeClicked() slot, and use QDialogs accept() slot * Simplify QObject::connect call by removing the QObject scope. Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/printdialog.cpp')
-rw-r--r--qt-ui/printdialog.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/qt-ui/printdialog.cpp b/qt-ui/printdialog.cpp
index ba96ccccd..46ed261f7 100644
--- a/qt-ui/printdialog.cpp
+++ b/qt-ui/printdialog.cpp
@@ -38,7 +38,7 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f)
hLayout->addWidget(printButton);
QPushButton *closeButton = new QPushButton(tr("&Close"));
- connect(closeButton, SIGNAL(clicked(bool)), this, SLOT(closeClicked()));
+ connect(closeButton, SIGNAL(clicked(bool)), this, SLOT(accept()));
hLayout->addWidget(closeButton);
progressBar = new QProgressBar();
@@ -59,7 +59,7 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f)
void PrintDialog::previewClicked(void)
{
QPrintPreviewDialog previewDialog(&printer, this);
- QObject::connect(&previewDialog, SIGNAL(paintRequested(QPrinter *)), this, SLOT(onPaintRequested(QPrinter *)));
+ connect(&previewDialog, SIGNAL(paintRequested(QPrinter *)), this, SLOT(onPaintRequested(QPrinter *)));
previewDialog.exec();
}
@@ -70,11 +70,6 @@ void PrintDialog::printClicked(void)
printLayout->print();
}
-void PrintDialog::closeClicked(void)
-{
- close();
-}
-
void PrintDialog::onPaintRequested(QPrinter *printerPtr)
{
printLayout->print();