diff options
author | Marius Storm-Olsen <marius.storm-olsen@nokia.com> | 2009-11-06 10:43:08 (GMT) |
---|---|---|
committer | Marius Storm-Olsen <marius.storm-olsen@nokia.com> | 2009-11-09 11:10:42 (GMT) |
commit | 195f4b98fbf31a92e27be4533fc2ccae99372b82 (patch) | |
tree | 2bb163a7a74f985f52fb38e5c4f664818c85150b /src/gui/dialogs | |
parent | 9e0c2d6f00cb1195bf7bc1eae34a6f8f9b43191f (diff) | |
download | Qt-195f4b98fbf31a92e27be4533fc2ccae99372b82.zip Qt-195f4b98fbf31a92e27be4533fc2ccae99372b82.tar.gz Qt-195f4b98fbf31a92e27be4533fc2ccae99372b82.tar.bz2 |
API review: Rename numPages() -> pageCount()
QPrintPreviewWidget wasn't following the Qt API naming convention of
*Count()/set*Count(). Introduce proper function, and obsolete the old.
Removed all usage of the old function in Qt.
Reviewed-by: Andreas Aardal Hanssen
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r-- | src/gui/dialogs/qprintpreviewdialog.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/dialogs/qprintpreviewdialog.cpp b/src/gui/dialogs/qprintpreviewdialog.cpp index 4cb0c93..1f0b51d 100644 --- a/src/gui/dialogs/qprintpreviewdialog.cpp +++ b/src/gui/dialogs/qprintpreviewdialog.cpp @@ -446,7 +446,7 @@ void QPrintPreviewDialogPrivate::setFitting(bool on) void QPrintPreviewDialogPrivate::updateNavActions() { int curPage = preview->currentPage(); - int numPages = preview->numPages(); + int numPages = preview->pageCount(); nextPageAction->setEnabled(curPage < numPages); prevPageAction->setEnabled(curPage > 1); firstPageAction->setEnabled(curPage > 1); @@ -458,7 +458,7 @@ void QPrintPreviewDialogPrivate::updatePageNumLabel() { Q_Q(QPrintPreviewDialog); - int numPages = preview->numPages(); + int numPages = preview->pageCount(); int maxChars = QString::number(numPages).length(); pageNumLabel->setText(QString::fromLatin1("/ %1").arg(numPages)); int cyphersWidth = q->fontMetrics().width(QString().fill(QLatin1Char('8'), maxChars)); @@ -515,7 +515,7 @@ void QPrintPreviewDialogPrivate::_q_navigate(QAction* action) else if (action == firstPageAction) preview->setCurrentPage(1); else if (action == lastPageAction) - preview->setCurrentPage(preview->numPages()); + preview->setCurrentPage(preview->pageCount()); updateNavActions(); } |