summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews/qtreewidget.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-06-16 17:22:03 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-06-17 20:59:22 +0200
commitfa814fcfea4b35d14487e68c25beafbaf5579e91 (patch)
treee71f07e7a958bbf1b4a90bf87409b5fb8b441005 /src/widgets/itemviews/qtreewidget.cpp
parent99c8ffb9f259760e45618f0988bbd79237d6d291 (diff)
Provide overload for Qt::AlignmentFlags in item widget items
Amends 53ee4c8b1f7ae72e7005166e1c0dbc4659f2ab32, which deprecated QListWidgetItem::setTextAlignment(int) etc and provided a typesafe Qt::Alignment overload instead. However, Qt::AlignLeft by itself is of type Qt::AlignmentFlag, it only becomes a Qt::Alignment when or'ed with another alignment flag. So the deprecated int-overload was taken by the compiler, resulting in a deprecation warning. Add a Qt::AlignmentFlag overload in addition, and document it as \internal since it is just a C++ technicality that we need both. Pick-to: 6.4 Change-Id: Ide97eed7f6d1f89a5f955b2ed45167e771bd8c81 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/widgets/itemviews/qtreewidget.cpp')
-rw-r--r--src/widgets/itemviews/qtreewidget.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/widgets/itemviews/qtreewidget.cpp b/src/widgets/itemviews/qtreewidget.cpp
index 9fa529127e..6df5dffb90 100644
--- a/src/widgets/itemviews/qtreewidget.cpp
+++ b/src/widgets/itemviews/qtreewidget.cpp
@@ -1367,6 +1367,11 @@ bool QTreeWidgetItem::isFirstColumnSpanned() const
*/
/*!
+ \fn void QTreeWidgetItem::setTextAlignment(int column, Qt::AlignmentFlag alignment)
+ \internal
+*/
+
+/*!
\fn int QTreeWidgetItem::indexOfChild(QTreeWidgetItem *child) const
Returns the index of the given \a child in the item's list of children.