From 31b06a0437f96935f12eb0db003a5867c83a9228 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Tue, 25 Feb 2020 15:30:16 +0100 Subject: QWizard: deprecate visitedPages and add visitedIds instead MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As per the ### Qt 6 comment. A method visitedPages should, following the convention of the other QWizard APIs, return a list of QWizardPage pointers. Since the method returns a list of IDs, visitedIds is the correct name. [ChangeLog][QtWidgets][QWizard] visitedPages has been deprecated, use visitedIds instead. Change-Id: Ifdb94adf093be14cb48c84cb40818c55ff5189a0 Reviewed-by: Jan Arve Sæther --- src/widgets/dialogs/qwizard.cpp | 12 +++++++++++- src/widgets/dialogs/qwizard.h | 5 ++++- 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp index 31e32bb931..b0f4312f40 100644 --- a/src/widgets/dialogs/qwizard.cpp +++ b/src/widgets/dialogs/qwizard.cpp @@ -2384,12 +2384,22 @@ bool QWizard::hasVisitedPage(int theid) const \sa hasVisitedPage() */ -QList QWizard::visitedPages() const +QList QWizard::visitedIds() const { Q_D(const QWizard); return d->history; } +/*! + \obsolete Use visitedIds() instead +*/ +#if QT_DEPRECATED_SINCE(5, 15) +QList QWizard::visitedPages() const +{ + return visitedIds(); +} +#endif + /*! Returns the list of page IDs. \since 4.5 diff --git a/src/widgets/dialogs/qwizard.h b/src/widgets/dialogs/qwizard.h index ef71efa0cb..a40635c4a5 100644 --- a/src/widgets/dialogs/qwizard.h +++ b/src/widgets/dialogs/qwizard.h @@ -128,7 +128,10 @@ public: void removePage(int id); QWizardPage *page(int id) const; bool hasVisitedPage(int id) const; - QList visitedPages() const; // ### Qt 6: visitedIds()? +#if QT_DEPRECATED_SINCE(5, 15) + QList visitedPages() const; +#endif + QList visitedIds() const; QList pageIds() const; void setStartId(int id); int startId() const; -- cgit v1.2.3