diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2009-11-23 15:42:37 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2009-11-23 15:42:37 (GMT) |
commit | 22eac0feb492e4719c51c85926f2c7185963a01a (patch) | |
tree | 6b7829dd152a85339f73b7904cb6c191fab8cfd3 /src/gui/text | |
parent | 6ef5b4485b9fe5a9d25d2d9b5e67f110fb728a8b (diff) | |
parent | ddd885ae9a46f8abcc4e5eb45bb4c53d7f86f4c2 (diff) | |
download | Qt-22eac0feb492e4719c51c85926f2c7185963a01a.zip Qt-22eac0feb492e4719c51c85926f2c7185963a01a.tar.gz Qt-22eac0feb492e4719c51c85926f2c7185963a01a.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qtextdocument.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index 048325c..523dd18 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -1767,6 +1767,12 @@ void QTextDocument::print(QPrinter *printer) const fromPage = qMax(1, fromPage); toPage = qMin(doc->pageCount(), toPage); + if (toPage < fromPage) { + // if the user entered a page range outside the actual number + // of printable pages, just return + return; + } + if (printer->pageOrder() == QPrinter::LastPageFirst) { int tmp = fromPage; fromPage = toPage; |