Ignore:
Timestamp:
Aug 2, 2010, 9:27:30 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.3 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/text/qtextdocument.cpp

    r651 r769  
    16321632}
    16331633
    1634 extern int qt_defaultDpi();
     1634Q_GUI_EXPORT extern int qt_defaultDpi();
    16351635
    16361636/*!
     
    16801680
    16811681    const QTextDocument *doc = this;
    1682     QTextDocument *clonedDoc = 0;
     1682    QScopedPointer<QTextDocument> clonedDoc;
    16831683    (void)doc->documentLayout(); // make sure that there is a layout
    16841684
     
    17131713    } else {
    17141714        doc = clone(const_cast<QTextDocument *>(this));
    1715         clonedDoc = const_cast<QTextDocument *>(doc);
     1715        clonedDoc.reset(const_cast<QTextDocument *>(doc));
    17161716
    17171717        for (QTextBlock srcBlock = firstBlock(), dstBlock = clonedDoc->firstBlock();
     
    17881788                if (printer->printerState() == QPrinter::Aborted
    17891789                    || printer->printerState() == QPrinter::Error)
    1790                     goto UserCanceled;
     1790                    return;
    17911791                printPage(page, &p, doc, body, pageNumberPos);
    17921792                if (j < pageCopies - 1)
     
    18081808            printer->newPage();
    18091809    }
    1810 
    1811 UserCanceled:
    1812     delete clonedDoc;
    18131810}
    18141811#endif
Note: See TracChangeset for help on using the changeset viewer.