summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-02-25 15:30:16 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-02-27 19:35:19 +0100
commit31b06a0437f96935f12eb0db003a5867c83a9228 (patch)
treeb5027e42720e55c7916a5a906d92d169446f85b0 /src
parentcb390719c6cc8b31788755b98981bc2a4327a903 (diff)
QWizard: deprecate visitedPages and add visitedIds instead
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 <jan-arve.saether@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/dialogs/qwizard.cpp12
-rw-r--r--src/widgets/dialogs/qwizard.h5
2 files changed, 15 insertions, 2 deletions
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,13 +2384,23 @@ bool QWizard::hasVisitedPage(int theid) const
\sa hasVisitedPage()
*/
-QList<int> QWizard::visitedPages() const
+QList<int> QWizard::visitedIds() const
{
Q_D(const QWizard);
return d->history;
}
/*!
+ \obsolete Use visitedIds() instead
+*/
+#if QT_DEPRECATED_SINCE(5, 15)
+QList<int> 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<int> visitedPages() const; // ### Qt 6: visitedIds()?
+#if QT_DEPRECATED_SINCE(5, 15)
+ QList<int> visitedPages() const;
+#endif
+ QList<int> visitedIds() const;
QList<int> pageIds() const;
void setStartId(int id);
int startId() const;