Restore pass-by-ref to QRect QCalendarWidget::paintCell()

Accidentally changed to pass-by-value while doing that to QDate,
in commit af837734b2

Task-number: QTBUG-86400
Change-Id: I8d2db532f537e5f82a5f3b36e72fcf7fefdd2ee5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
(cherry picked from commit 8db0d701e8b1fe00cdd5d71c18afff84de606013)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Edward Welbourne 2020-11-27 11:23:32 +01:00 committed by Qt Cherry-pick Bot
parent aeb5165cb6
commit d75dc06f6a
2 changed files with 2 additions and 2 deletions

View File

@ -2295,7 +2295,7 @@ QSize QCalendarWidget::minimumSizeHint() const
Paints the cell specified by the given \a date, using the given \a painter and \a rect.
*/
void QCalendarWidget::paintCell(QPainter *painter, QRect rect, QDate date) const
void QCalendarWidget::paintCell(QPainter *painter, const QRect &rect, QDate date) const
{
Q_D(const QCalendarWidget);
d->m_delegate->paintCell(painter, rect, date);

View File

@ -147,7 +147,7 @@ protected:
void resizeEvent(QResizeEvent * event) override;
void keyPressEvent(QKeyEvent * event) override;
virtual void paintCell(QPainter *painter, QRect rect, QDate date) const;
virtual void paintCell(QPainter *painter, const QRect &rect, QDate date) const;
void updateCell(QDate date);
void updateCells();