summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 930a4e64..83ff514b 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -572,13 +572,11 @@ void MainWindow::printRequested(QWebFrame *frame)
QPrinter printer;
QPointer<QPrintDialog> dialog = KdePrint::createPrintDialog(&printer, this);
- if (dialog->exec() != QDialog::Accepted)
+ if (dialog->exec() == QDialog::Accepted)
{
- delete dialog;
- return;
+ frame->print(&printer);
}
delete dialog;
- frame->print(&printer);
}