diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mainwindow.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 7e03c392..9a1ea708 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -66,7 +66,7 @@ #include <KIconLoader> #include <kdeprintdialog.h> -#include <kprintpreview.h> + // Qt Includes @@ -83,6 +83,7 @@ #include <QtGui/QDesktopWidget> #include <QtGui/QPrinter> #include <QtGui/QPrintDialog> +#include <QtGui/QPrintPreviewDialog> #include <QtWebKit/QWebFrame> #include <QtWebKit/QWebHistory> @@ -337,7 +338,7 @@ void MainWindow::setupTools() toolsMenu->setDelayed(false); toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::SaveAs))); - toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::Print))); + toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::PrintPreview))); toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::Find))); KActionMenu *webMenu = new KActionMenu(KIcon("applications-development-web"), i18n("Web Development"), this); @@ -543,8 +544,9 @@ void MainWindow::slotFilePrintPreview() return; QPrinter printer; - KPrintPreview previewdlg(&printer, this); - currentTab()->print(&printer); + QPrintPreviewDialog previewdlg(&printer, this); + connect(&previewdlg, SIGNAL(paintRequested(QPrinter *)), + currentTab(), SLOT(print(QPrinter *))); previewdlg.exec(); } @@ -899,7 +901,7 @@ void MainWindow::notifyMessage(const QString &msg, Rekonq::Notify status) // deleting popus if empty msgs if(msg.isEmpty()) { - delete m_popup; + m_popup->deleteLater(); return; } |