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:
parent
f6af0dad5b
commit
4b1332783e
@ -154,7 +154,7 @@ void ScribbleArea::resizeImage(QImage *image, const QSize &newSize)
|
||||
//! [21]
|
||||
void ScribbleArea::print()
|
||||
{
|
||||
#ifndef QT_NO_PRINTER
|
||||
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
|
||||
QPrinter printer(QPrinter::HighResolution);
|
||||
|
||||
QPrintDialog printDialog(&printer, this);
|
||||
|
@ -352,7 +352,7 @@ void ConclusionPage::setVisible(bool visible)
|
||||
|
||||
void ConclusionPage::printButtonClicked()
|
||||
{
|
||||
#ifndef QT_NO_PRINTER
|
||||
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
|
||||
QPrinter printer;
|
||||
QPrintDialog dialog(&printer, this);
|
||||
if (dialog.exec())
|
||||
|
@ -250,7 +250,7 @@ void View::toggleAntialiasing()
|
||||
|
||||
void View::print()
|
||||
{
|
||||
#ifndef QT_NO_PRINTER
|
||||
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
|
||||
QPrinter printer;
|
||||
QPrintDialog dialog(&printer, this);
|
||||
if (dialog.exec() == QDialog::Accepted) {
|
||||
|
@ -154,7 +154,7 @@ void MainWindow::openImage(const QString &fileName)
|
||||
|
||||
void MainWindow::printImage()
|
||||
{
|
||||
#ifndef QT_NO_PRINTER
|
||||
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
|
||||
if (model->rowCount(QModelIndex())*model->columnCount(QModelIndex()) > 90000) {
|
||||
QMessageBox::StandardButton answer;
|
||||
answer = QMessageBox::question(this, tr("Large Image Size"),
|
||||
|
@ -627,7 +627,7 @@ QString encode_pos(int row, int col)
|
||||
|
||||
void SpreadSheet::print()
|
||||
{
|
||||
#ifndef QT_NO_PRINTER
|
||||
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
|
||||
QPrinter printer(QPrinter::ScreenResolution);
|
||||
QPrintPreviewDialog dlg(&printer);
|
||||
PrintView view;
|
||||
|
@ -241,7 +241,7 @@ QMap<QString, StyleItems> MainWindow::currentPageMap()
|
||||
return pageMap;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_PRINTER
|
||||
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
|
||||
void MainWindow::on_printAction_triggered()
|
||||
{
|
||||
pageMap = currentPageMap();
|
||||
|
@ -62,12 +62,12 @@ public:
|
||||
public slots:
|
||||
void on_clearAction_triggered();
|
||||
void on_markAction_triggered();
|
||||
#ifndef QT_NO_PRINTER
|
||||
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
|
||||
void on_printAction_triggered();
|
||||
void on_printPreviewAction_triggered();
|
||||
#endif
|
||||
void on_unmarkAction_triggered();
|
||||
#ifndef QT_NO_PRINTER
|
||||
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
|
||||
void printDocument(QPrinter *printer);
|
||||
void printPage(int index, QPainter *painter, QPrinter *printer);
|
||||
#endif
|
||||
|
@ -235,7 +235,7 @@ void MainWindow::openDialog()
|
||||
//! [17]
|
||||
void MainWindow::printFile()
|
||||
{
|
||||
#ifndef QT_NO_PRINTER
|
||||
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
|
||||
QTextEdit *editor = static_cast<QTextEdit*>(letters->currentWidget());
|
||||
//! [18]
|
||||
QPrinter printer;
|
||||
|
@ -511,7 +511,7 @@ bool TextEdit::fileSaveAs()
|
||||
|
||||
void TextEdit::filePrint()
|
||||
{
|
||||
#ifndef QT_NO_PRINTER
|
||||
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
|
||||
QPrinter printer(QPrinter::HighResolution);
|
||||
QPrintDialog *dlg = new QPrintDialog(&printer, this);
|
||||
if (textEdit->textCursor().hasSelection())
|
||||
@ -525,7 +525,7 @@ void TextEdit::filePrint()
|
||||
|
||||
void TextEdit::filePrintPreview()
|
||||
{
|
||||
#ifndef QT_NO_PRINTER
|
||||
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
|
||||
QPrinter printer(QPrinter::HighResolution);
|
||||
QPrintPreviewDialog preview(&printer, this);
|
||||
connect(&preview, SIGNAL(paintRequested(QPrinter*)), SLOT(printPreview(QPrinter*)));
|
||||
|
@ -99,7 +99,7 @@ void ImageViewer::print()
|
||||
//! [5] //! [6]
|
||||
{
|
||||
Q_ASSERT(imageLabel->pixmap());
|
||||
#ifndef QT_NO_PRINTER
|
||||
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
|
||||
//! [6] //! [7]
|
||||
QPrintDialog dialog(&printer, this);
|
||||
//! [7] //! [8]
|
||||
|
@ -200,7 +200,7 @@ void ScribbleArea::resizeImage(QImage *image, const QSize &newSize)
|
||||
//! [21]
|
||||
void ScribbleArea::print()
|
||||
{
|
||||
#ifndef QT_NO_PRINTER
|
||||
#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
|
||||
QPrinter printer(QPrinter::HighResolution);
|
||||
|
||||
QPrintDialog printDialog(&printer, this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user