summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Ehrlicher <[email protected]>2024-12-15 12:51:06 +0100
committerChristian Ehrlicher <[email protected]>2024-12-16 21:29:23 +0100
commit15a1ae90f5b6da3ffd50acda63ddd33ca14227f4 (patch)
tree947aa1dd798334f02dcb93b2a6c36554a7f4cec7
parentaf760da54190d96b315ea8edeec00c86871af0d8 (diff)
QAbstractItemView: use 'int' as datatype for updateThreshold
... to sync it with the rest of the api. This amends ff339819925ab550c48b53d9baaba43e5adebfaa. Pick-to: 6.9 Task-number: QTBUG-124173 Change-Id: I0ed4681bf7d3717f84a7e888affb0c8cae877c35 Reviewed-by: Volker Hilsheimer <[email protected]>
-rw-r--r--src/widgets/itemviews/qabstractitemview.cpp8
-rw-r--r--src/widgets/itemviews/qabstractitemview.h7
-rw-r--r--src/widgets/itemviews/qabstractitemview_p.h2
3 files changed, 8 insertions, 9 deletions
diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp
index 4f02abd1dce..798d9bc3716 100644
--- a/src/widgets/itemviews/qabstractitemview.cpp
+++ b/src/widgets/itemviews/qabstractitemview.cpp
@@ -3226,13 +3226,13 @@ int QAbstractItemView::sizeHintForColumn(int column) const
\sa dataChanged()
*/
-uint32_t QAbstractItemView::updateThreshold() const
+int QAbstractItemView::updateThreshold() const
{
Q_D(const QAbstractItemView);
return d->updateThreshold;
}
-void QAbstractItemView::setUpdateThreshold(uint32_t threshold)
+void QAbstractItemView::setUpdateThreshold(int threshold)
{
Q_D(QAbstractItemView);
if (d->updateThreshold == threshold)
@@ -3439,8 +3439,8 @@ void QAbstractItemView::dataChanged(const QModelIndex &topLeft, const QModelInde
<< "\n topleft: " << topLeft
<< "\n bottomRight:" << bottomRight;
d->viewport->update();
- } else if ((bottomRight.row() - topLeft.row() + 1ULL) *
- (bottomRight.column() - topLeft.column() + 1ULL) > d->updateThreshold) {
+ } else if ((bottomRight.row() - topLeft.row() + 1LL) *
+ (bottomRight.column() - topLeft.column() + 1LL) > d->updateThreshold) {
// too many indices to check - force full update
d->viewport->update();
} else {
diff --git a/src/widgets/itemviews/qabstractitemview.h b/src/widgets/itemviews/qabstractitemview.h
index db95b713a7c..287ca4be77a 100644
--- a/src/widgets/itemviews/qabstractitemview.h
+++ b/src/widgets/itemviews/qabstractitemview.h
@@ -46,8 +46,7 @@ class Q_WIDGETS_EXPORT QAbstractItemView : public QAbstractScrollArea
RESET resetVerticalScrollMode)
Q_PROPERTY(ScrollMode horizontalScrollMode READ horizontalScrollMode
WRITE setHorizontalScrollMode RESET resetHorizontalScrollMode)
- Q_PROPERTY(uint32_t updateThreshold READ updateThreshold
- WRITE setUpdateThreshold)
+ Q_PROPERTY(int updateThreshold READ updateThreshold WRITE setUpdateThreshold)
public:
enum SelectionMode {
@@ -179,8 +178,8 @@ public:
virtual int sizeHintForRow(int row) const;
virtual int sizeHintForColumn(int column) const;
- uint32_t updateThreshold() const;
- void setUpdateThreshold(uint32_t threshold);
+ int updateThreshold() const;
+ void setUpdateThreshold(int threshold);
void openPersistentEditor(const QModelIndex &index);
void closePersistentEditor(const QModelIndex &index);
diff --git a/src/widgets/itemviews/qabstractitemview_p.h b/src/widgets/itemviews/qabstractitemview_p.h
index 292ba095098..1a1a66682ac 100644
--- a/src/widgets/itemviews/qabstractitemview_p.h
+++ b/src/widgets/itemviews/qabstractitemview_p.h
@@ -422,7 +422,7 @@ public:
bool verticalScrollModeSet;
bool horizontalScrollModeSet;
- uint32_t updateThreshold;
+ int updateThreshold;
virtual QRect visualRect(const QModelIndex &index) const { return q_func()->visualRect(index); }