diff options
-rw-r--r-- | qt-ui/printdialog.cpp | 9 | ||||
-rw-r--r-- | qt-ui/printdialog.h | 1 |
2 files changed, 2 insertions, 8 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(); diff --git a/qt-ui/printdialog.h b/qt-ui/printdialog.h index 8f5edec72..ebaea846a 100644 --- a/qt-ui/printdialog.h +++ b/qt-ui/printdialog.h @@ -26,7 +26,6 @@ private: private slots: void previewClicked(); void printClicked(); - void closeClicked(); void onPaintRequested(QPrinter *); }; |