diff options
author | Jesus Fernandez <jesus.fernandez@qt.io> | 2018-07-23 13:27:18 +0200 |
---|---|---|
committer | Jesus Fernandez <Jesus.Fernandez@qt.io> | 2018-07-27 12:11:39 +0000 |
commit | 318b15db15b515675b0b1e7b3319c793b9f1a757 (patch) | |
tree | 86138f46623a631e8b4e3efc457252a4b58991a5 /src/gui/text/qtextdocument.cpp | |
parent | c3f2b8b9ea6d384f9903a5ece2aaf1aeb6b8d237 (diff) |
Remove dead code
The ascending variable was a leftover from an old implementation. Now
it's not needed anymore. It's safe to remove it, and the condition can
be removed as well.
Amends commit 699e8fe3a6724dd8288dd6a55b25e070eb198c9d
Coverity-Id: 11004
Change-Id: I003b7016e9bd3bd523fb70ed4de84211ec840a78
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Diffstat (limited to 'src/gui/text/qtextdocument.cpp')
-rw-r--r-- | src/gui/text/qtextdocument.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index 5d8eed409e..5d88530e65 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -2017,7 +2017,6 @@ void QTextDocument::print(QPagedPaintDevice *printer) const int fromPage = pd->fromPage; int toPage = pd->toPage; - bool ascending = true; if (fromPage == 0 && toPage == 0) { fromPage = 1; @@ -2033,6 +2032,7 @@ void QTextDocument::print(QPagedPaintDevice *printer) const return; } +// bool ascending = true; // if (printer->pageOrder() == QPrinter::LastPageFirst) { // int tmp = fromPage; // fromPage = toPage; @@ -2046,12 +2046,7 @@ void QTextDocument::print(QPagedPaintDevice *printer) const if (page == toPage) break; - - if (ascending) - ++page; - else - --page; - + ++page; if (!printer->newPage()) return; } |