diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-12-30 11:59:55 +0200 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-12-30 11:59:55 +0200 |
commit | d1d8b92b37e3842d8a455e31c9dd1bf554dd92c4 (patch) | |
tree | af9e891e39ce124b1f648477f0569c208d548460 /src/timeline | |
parent | 5e3022bd9af4423cb7b3d0e364683415969924a3 (diff) |
Use qobject_cast on TimelineItem
Diffstat (limited to 'src/timeline')
-rw-r--r-- | src/timeline/TimelineView.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/timeline/TimelineView.cc b/src/timeline/TimelineView.cc index 29da24b3..a6200ca8 100644 --- a/src/timeline/TimelineView.cc +++ b/src/timeline/TimelineView.cc @@ -374,7 +374,7 @@ TimelineView::addTimelineItem(TimelineItem *item, TimelineDirection direction) if (direction == TimelineDirection::Bottom) { const auto lastItemPosition = scroll_layout_->count() - 1; auto lastItem = - static_cast<TimelineItem *>(scroll_layout_->itemAt(lastItemPosition)->widget()); + qobject_cast<TimelineItem *>(scroll_layout_->itemAt(lastItemPosition)->widget()); if (lastItem) { auto oldDate = lastItem->descriptionMessage().datetime; @@ -389,7 +389,7 @@ TimelineView::addTimelineItem(TimelineItem *item, TimelineDirection direction) // the widgets to the bottom of the page. if (scroll_layout_->count() > 1) { auto firstItem = - static_cast<TimelineItem *>(scroll_layout_->itemAt(1)->widget()); + qobject_cast<TimelineItem *>(scroll_layout_->itemAt(1)->widget()); if (firstItem) { auto oldDate = firstItem->descriptionMessage().datetime; |