on xenial help sign in
Compile with Qt 5.4
c29a268Albert Astals
plugins/Dash/abstractdashview.h+4
@@ -104,7 +104,11 @@ private:
104 virtual void doRelayout() = 0;
104 virtual void doRelayout() = 0;
105 virtual void updateItemCulling(qreal visibleFromY, qreal visibleToY) = 0;
105 virtual void updateItemCulling(qreal visibleFromY, qreal visibleToY) = 0;
106 virtual void calculateImplicitHeight() = 0;
106 virtual void calculateImplicitHeight() = 0;
107+#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
107 virtual void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) = 0;
108 virtual void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) = 0;
109+#else
110+ virtual void processModelRemoves(const QVector<QQmlChangeSet::Change> &removes) = 0;
111+#endif
108
112
109 QQmlDelegateModel *m_delegateModel;
113 QQmlDelegateModel *m_delegateModel;
110
114
plugins/Dash/horizontaljournal.cpp+5−1
@@ -184,9 +184,13 @@ void HorizontalJournal::calculateImplicitHeight()
184 }
184 }
185}
185}
186
186
187+#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
187void HorizontalJournal::processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes)
188void HorizontalJournal::processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes)
189+#else
190+void HorizontalJournal::processModelRemoves(const QVector<QQmlChangeSet::Change> &removes)
191+#endif
188{
192{
189− Q_FOREACH(const QQmlChangeSet::Remove &remove, removes) {
193+ Q_FOREACH(const QQmlChangeSet::Change &remove, removes) {
190 for (int i = remove.count - 1; i >= 0; --i) {
194 for (int i = remove.count - 1; i >= 0; --i) {
191 const int indexToRemove = remove.index + i;
195 const int indexToRemove = remove.index + i;
192 // We only support removing from the end so
196 // We only support removing from the end so
plugins/Dash/horizontaljournal.h+4
@@ -52,7 +52,11 @@ private:
52 void calculateImplicitHeight() override;
52 void calculateImplicitHeight() override;
53 void doRelayout() override;
53 void doRelayout() override;
54 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
54 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
55+#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
55 void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) override;
56 void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) override;
57+#else
58+ void processModelRemoves(const QVector<QQmlChangeSet::Change> &removes) override;
59+#endif
56
60
57 int m_firstVisibleIndex;
61 int m_firstVisibleIndex;
58 QList<QQuickItem*> m_visibleItems;
62 QList<QQuickItem*> m_visibleItems;
plugins/Dash/listviewwithpageheader.cpp+2−2
@@ -936,7 +936,7 @@ void ListViewWithPageHeader::onModelUpdated(const QQmlChangeSet &changeSet, bool
936// qDebug() << "ListViewWithPageHeader::onModelUpdated" << changeSet << reset;
936// qDebug() << "ListViewWithPageHeader::onModelUpdated" << changeSet << reset;
937 const auto oldFirstVisibleIndex = m_firstVisibleIndex;
937 const auto oldFirstVisibleIndex = m_firstVisibleIndex;
938
938
939− Q_FOREACH(const QQmlChangeSet::Remove &remove, changeSet.removes()) {
939+ Q_FOREACH(const QQmlChangeSet::Change &remove, changeSet.removes()) {
940// qDebug() << "ListViewWithPageHeader::onModelUpdated Remove" << remove.index << remove.count;
940// qDebug() << "ListViewWithPageHeader::onModelUpdated Remove" << remove.index << remove.count;
941 if (remove.index + remove.count > m_firstVisibleIndex && remove.index < m_firstVisibleIndex + m_visibleItems.count()) {
941 if (remove.index + remove.count > m_firstVisibleIndex && remove.index < m_firstVisibleIndex + m_visibleItems.count()) {
942 const qreal oldFirstValidIndexPos = m_visibleItems.first()->y();
942 const qreal oldFirstValidIndexPos = m_visibleItems.first()->y();
@@ -990,7 +990,7 @@ void ListViewWithPageHeader::onModelUpdated(const QQmlChangeSet &changeSet, bool
990 }
990 }
991 }
991 }
992
992
993− Q_FOREACH(const QQmlChangeSet::Insert &insert, changeSet.inserts()) {
993+ Q_FOREACH(const QQmlChangeSet::Change &insert, changeSet.inserts()) {
994// qDebug() << "ListViewWithPageHeader::onModelUpdated Insert" << insert.index << insert.count;
994// qDebug() << "ListViewWithPageHeader::onModelUpdated Insert" << insert.index << insert.count;
995 const bool insertingInValidIndexes = insert.index > m_firstVisibleIndex && insert.index < m_firstVisibleIndex + m_visibleItems.count();
995 const bool insertingInValidIndexes = insert.index > m_firstVisibleIndex && insert.index < m_firstVisibleIndex + m_visibleItems.count();
996 const bool firstItemWithViewOnTop = insert.index == 0 && m_firstVisibleIndex == 0 && m_visibleItems.first()->y() + m_clipItem->y() > contentY();
996 const bool firstItemWithViewOnTop = insert.index == 0 && m_firstVisibleIndex == 0 && m_visibleItems.first()->y() + m_clipItem->y() > contentY();
plugins/Dash/organicgrid.cpp+5−1
@@ -237,9 +237,13 @@ void OrganicGrid::calculateImplicitHeight()
237 }
237 }
238}
238}
239
239
240+#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
240void OrganicGrid::processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes)
241void OrganicGrid::processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes)
242+#else
243+void OrganicGrid::processModelRemoves(const QVector<QQmlChangeSet::Change> &removes)
244+#endif
241{
245{
242− Q_FOREACH(const QQmlChangeSet::Remove &remove, removes) {
246+ Q_FOREACH(const QQmlChangeSet::Change &remove, removes) {
243 for (int i = remove.count - 1; i >= 0; --i) {
247 for (int i = remove.count - 1; i >= 0; --i) {
244 const int indexToRemove = remove.index + i;
248 const int indexToRemove = remove.index + i;
245 // We only support removing from the end
249 // We only support removing from the end
plugins/Dash/organicgrid.h+4
@@ -79,7 +79,11 @@ private:
79 void doRelayout() override;
79 void doRelayout() override;
80 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
80 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
81 void calculateImplicitHeight() override;
81 void calculateImplicitHeight() override;
82+#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
82 void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) override;
83 void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) override;
84+#else
85+ void processModelRemoves(const QVector<QQmlChangeSet::Change> &removes) override;
86+#endif
83
87
84 QSizeF m_smallDelegateSize;
88 QSizeF m_smallDelegateSize;
85 QSizeF m_bigDelegateSize;
89 QSizeF m_bigDelegateSize;
plugins/Dash/verticaljournal.cpp+5−1
@@ -239,9 +239,13 @@ void VerticalJournal::updateItemCulling(qreal visibleFromY, qreal visibleToY)
239 }
239 }
240}
240}
241
241
242+#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
242void VerticalJournal::processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes)
243void VerticalJournal::processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes)
244+#else
245+void VerticalJournal::processModelRemoves(const QVector<QQmlChangeSet::Change> &removes)
246+#endif
243{
247{
244− Q_FOREACH(const QQmlChangeSet::Remove &remove, removes) {
248+ Q_FOREACH(const QQmlChangeSet::Change &remove, removes) {
245 for (int i = remove.count - 1; i >= 0; --i) {
249 for (int i = remove.count - 1; i >= 0; --i) {
246 const int indexToRemove = remove.index + i;
250 const int indexToRemove = remove.index + i;
247 // Since we only support removing from the end, indexToRemove
251 // Since we only support removing from the end, indexToRemove
plugins/Dash/verticaljournal.h+4
@@ -90,7 +90,11 @@ private:
90 void calculateImplicitHeight() override;
90 void calculateImplicitHeight() override;
91 void doRelayout() override;
91 void doRelayout() override;
92 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
92 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
93+#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
93 void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) override;
94 void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) override;
95+#else
96+ void processModelRemoves(const QVector<QQmlChangeSet::Change> &removes) override;
97+#endif
94
98
95 QVector<QList<ViewItem>> m_columnVisibleItems;
99 QVector<QList<ViewItem>> m_columnVisibleItems;
96 QHash<int, int> m_indexColumnMap;
100 QHash<int, int> m_indexColumnMap;