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 <volker.hilsheimer@qt.io>
This commit is contained in:
parent
af760da541
commit
15a1ae90f5
@ -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 {
|
||||
|
@ -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);
|
||||
|
@ -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); }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user