summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews/qtablewidget_p.h
diff options
context:
space:
mode:
authorAntti Määttä <antti.maatta@qt.io>2023-05-02 12:39:59 +0300
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2023-05-05 05:28:19 +0000
commitfa67cd03342ebe72b0438a0383c69105c5e5870b (patch)
tree1d06caf6d61e61d36bcc7be1784b316f2c797901 /src/widgets/itemviews/qtablewidget_p.h
parent2434573f5e4d0ca96a6a5808f3e0191012f83819 (diff)
Use boolean to indicate QTableWidgetItem is header item
QTableWidgetItem uses additional enum flag ItemIsHeaderItem which has the same numerical value as ItemFlag ItemNeverHasChildren. This causes conflict since the user can set the latter flag using the setFlags, while the ItemIsHeaderItem is only used internally to mark header items. Remove the additional flag and use boolean instead to fix the conflict. Pick-to: 6.2 6.5 6.5.1 Fixes: QTBUG-113209 Change-Id: Icff549c7e452d9f84575a524361719204817274e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/itemviews/qtablewidget_p.h')
-rw-r--r--src/widgets/itemviews/qtablewidget_p.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/widgets/itemviews/qtablewidget_p.h b/src/widgets/itemviews/qtablewidget_p.h
index 1d893224c0..6bfa355edb 100644
--- a/src/widgets/itemviews/qtablewidget_p.h
+++ b/src/widgets/itemviews/qtablewidget_p.h
@@ -53,10 +53,6 @@ class QTableModel : public QAbstractTableModel
friend class QTableWidget;
public:
- enum ItemFlagsExtension {
- ItemIsHeaderItem = 128
- }; // we need this to separate header items from other items
-
QTableModel(int rows, int columns, QTableWidget *parent);
~QTableModel();
@@ -173,9 +169,10 @@ public:
class QTableWidgetItemPrivate
{
public:
- QTableWidgetItemPrivate(QTableWidgetItem *item) : q(item), id(-1) {}
+ QTableWidgetItemPrivate(QTableWidgetItem *item) : q(item), id(-1), headerItem(false) {}
QTableWidgetItem *q;
int id;
+ bool headerItem; // Qt 7 TODO: inline this stuff in the public class.
};
QT_END_NAMESPACE