on xenial help sign in
And now make it compile ^_^
commit8fbff0cf8d2e6591c0cd296c858026fc15835e7e authorAlbert Astals <albert.astals@canonical.com> dateTue 18 Mar 2014, 11:57 (13 years ago) parent60f4a59
1 file changed+6−6
plugins/DashViews/listviewwithpageheader.cpp+6−6
plugins/DashViews/listviewwithpageheader.cpp+6−6
@@ -376,13 +376,18 @@ void ListViewWithPageHeader::positionAtBeginning()
376376 }
377377}
378378
379+static inline bool uFuzzyCompare(qreal r1, qreal r2)
380+{
381+ return qFuzzyCompare(r1, r2) || (qFuzzyIsNull(r1) && qFuzzyIsNull(r2));
382+}
383+
379384void ListViewWithPageHeader::showHeader()
380385{
381386 if (!m_headerItem)
382387 return;
383388
384389 const auto to = qMax(-minYExtent(), contentY() - m_headerItem->height() + m_headerItemShownHeight);
385− if (!uFuzzyCompare(to, contentY()) {
390+ if (!uFuzzyCompare(to, contentY())) {
386391 const bool headerShownByItsOwn = contentY() < m_headerItem->y() + m_headerItem->height();
387392 if (headerShownByItsOwn && m_headerItemShownHeight == 0) {
388393 // We are not clipping since we are just at the top of the viewport
@@ -485,11 +490,6 @@ void ListViewWithPageHeader::componentComplete()
485490 polish();
486491}
487492
488−static inline bool uFuzzyCompare(qreal r1, qreal r2)
489−{
490− return qFuzzyCompare(r1, r2) || (qFuzzyIsNull(r1) && qFuzzyIsNull(r2));
491−}
492−
493493void ListViewWithPageHeader::viewportMoved(Qt::Orientations orient)
494494{
495495 // Check we are not being taken down and don't paint anything