Compile fix when QT_NO_PRINTDIALOG is defined

...but QT_NO_PRINTER isn't.

Change-Id: I888c177cfdd2245eb55de766dfd93f6acd4293e9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This commit is contained in:
Paul Olav Tvete 2013-02-18 15:59:14 +01:00 committed by The Qt Project
parent f6af0dad5b
commit 4b1332783e
11 changed files with 13 additions and 13 deletions

View File

@ -154,7 +154,7 @@ void ScribbleArea::resizeImage(QImage *image, const QSize &newSize)
//! [21] //! [21]
void ScribbleArea::print() void ScribbleArea::print()
{ {
#ifndef QT_NO_PRINTER #if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
QPrinter printer(QPrinter::HighResolution); QPrinter printer(QPrinter::HighResolution);
QPrintDialog printDialog(&printer, this); QPrintDialog printDialog(&printer, this);

View File

@ -352,7 +352,7 @@ void ConclusionPage::setVisible(bool visible)
void ConclusionPage::printButtonClicked() void ConclusionPage::printButtonClicked()
{ {
#ifndef QT_NO_PRINTER #if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
QPrinter printer; QPrinter printer;
QPrintDialog dialog(&printer, this); QPrintDialog dialog(&printer, this);
if (dialog.exec()) if (dialog.exec())

View File

@ -250,7 +250,7 @@ void View::toggleAntialiasing()
void View::print() void View::print()
{ {
#ifndef QT_NO_PRINTER #if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
QPrinter printer; QPrinter printer;
QPrintDialog dialog(&printer, this); QPrintDialog dialog(&printer, this);
if (dialog.exec() == QDialog::Accepted) { if (dialog.exec() == QDialog::Accepted) {

View File

@ -154,7 +154,7 @@ void MainWindow::openImage(const QString &fileName)
void MainWindow::printImage() void MainWindow::printImage()
{ {
#ifndef QT_NO_PRINTER #if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
if (model->rowCount(QModelIndex())*model->columnCount(QModelIndex()) > 90000) { if (model->rowCount(QModelIndex())*model->columnCount(QModelIndex()) > 90000) {
QMessageBox::StandardButton answer; QMessageBox::StandardButton answer;
answer = QMessageBox::question(this, tr("Large Image Size"), answer = QMessageBox::question(this, tr("Large Image Size"),

View File

@ -627,7 +627,7 @@ QString encode_pos(int row, int col)
void SpreadSheet::print() void SpreadSheet::print()
{ {
#ifndef QT_NO_PRINTER #if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
QPrinter printer(QPrinter::ScreenResolution); QPrinter printer(QPrinter::ScreenResolution);
QPrintPreviewDialog dlg(&printer); QPrintPreviewDialog dlg(&printer);
PrintView view; PrintView view;

View File

@ -241,7 +241,7 @@ QMap<QString, StyleItems> MainWindow::currentPageMap()
return pageMap; return pageMap;
} }
#ifndef QT_NO_PRINTER #if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
void MainWindow::on_printAction_triggered() void MainWindow::on_printAction_triggered()
{ {
pageMap = currentPageMap(); pageMap = currentPageMap();

View File

@ -62,12 +62,12 @@ public:
public slots: public slots:
void on_clearAction_triggered(); void on_clearAction_triggered();
void on_markAction_triggered(); void on_markAction_triggered();
#ifndef QT_NO_PRINTER #if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
void on_printAction_triggered(); void on_printAction_triggered();
void on_printPreviewAction_triggered(); void on_printPreviewAction_triggered();
#endif #endif
void on_unmarkAction_triggered(); void on_unmarkAction_triggered();
#ifndef QT_NO_PRINTER #if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
void printDocument(QPrinter *printer); void printDocument(QPrinter *printer);
void printPage(int index, QPainter *painter, QPrinter *printer); void printPage(int index, QPainter *painter, QPrinter *printer);
#endif #endif

View File

@ -235,7 +235,7 @@ void MainWindow::openDialog()
//! [17] //! [17]
void MainWindow::printFile() void MainWindow::printFile()
{ {
#ifndef QT_NO_PRINTER #if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
QTextEdit *editor = static_cast<QTextEdit*>(letters->currentWidget()); QTextEdit *editor = static_cast<QTextEdit*>(letters->currentWidget());
//! [18] //! [18]
QPrinter printer; QPrinter printer;

View File

@ -511,7 +511,7 @@ bool TextEdit::fileSaveAs()
void TextEdit::filePrint() void TextEdit::filePrint()
{ {
#ifndef QT_NO_PRINTER #if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
QPrinter printer(QPrinter::HighResolution); QPrinter printer(QPrinter::HighResolution);
QPrintDialog *dlg = new QPrintDialog(&printer, this); QPrintDialog *dlg = new QPrintDialog(&printer, this);
if (textEdit->textCursor().hasSelection()) if (textEdit->textCursor().hasSelection())
@ -525,7 +525,7 @@ void TextEdit::filePrint()
void TextEdit::filePrintPreview() void TextEdit::filePrintPreview()
{ {
#ifndef QT_NO_PRINTER #if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
QPrinter printer(QPrinter::HighResolution); QPrinter printer(QPrinter::HighResolution);
QPrintPreviewDialog preview(&printer, this); QPrintPreviewDialog preview(&printer, this);
connect(&preview, SIGNAL(paintRequested(QPrinter*)), SLOT(printPreview(QPrinter*))); connect(&preview, SIGNAL(paintRequested(QPrinter*)), SLOT(printPreview(QPrinter*)));

View File

@ -99,7 +99,7 @@ void ImageViewer::print()
//! [5] //! [6] //! [5] //! [6]
{ {
Q_ASSERT(imageLabel->pixmap()); Q_ASSERT(imageLabel->pixmap());
#ifndef QT_NO_PRINTER #if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
//! [6] //! [7] //! [6] //! [7]
QPrintDialog dialog(&printer, this); QPrintDialog dialog(&printer, this);
//! [7] //! [8] //! [7] //! [8]

View File

@ -200,7 +200,7 @@ void ScribbleArea::resizeImage(QImage *image, const QSize &newSize)
//! [21] //! [21]
void ScribbleArea::print() void ScribbleArea::print()
{ {
#ifndef QT_NO_PRINTER #if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
QPrinter printer(QPrinter::HighResolution); QPrinter printer(QPrinter::HighResolution);
QPrintDialog printDialog(&printer, this); QPrintDialog printDialog(&printer, this);