Commit 9bc2650c authored by Johannes Zarl-Zierl's avatar Johannes Zarl-Zierl

DateBarWidget: fix assertion.

BUG: 426538
parent 009a4356
......@@ -832,7 +832,7 @@ void DateBar::DateBarWidget::focusOutEvent(QFocusEvent *)
int DateBar::DateBarWidget::unitAtPos(int x) const
{
Q_ASSERT_X(x - barAreaGeometry().left() >= 0, "DateBarWidget::unitAtPos", "horizontal offset cannot be negative!");
Q_ASSERT_X(x - barAreaGeometry().left() <= m_barWidth, "DateBarWidget::unitAtPos", "horizontal offset larger than m_barWidth!");
Q_ASSERT_X(x - barAreaGeometry().left() <= barAreaGeometry().width(), "DateBarWidget::unitAtPos", "horizontal offset larger than total width!");
return (x - barAreaGeometry().left()) / m_barWidth;
}
......
......@@ -221,7 +221,7 @@ private:
int m_currentUnit;
QDateTime m_currentDate;
int m_barWidth;
int m_barWidth; ///< width of a single unit in pixel
int m_barHeight;
bool m_includeFuzzyCounts;
QMenu *m_contextMenu;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment