on xenial help sign in
Compile with Qt 5.4
commitc29a26834f7ce0e4e722b9fcfe985833e016c097 authorAlbert Astals <albert.astals@canonical.com> dateWed 26 Nov 2014, 11:09 (12 years ago) parentbe59376
8 files changed+33−5
plugins/Dash/abstractdashview.h+4 plugins/Dash/horizontaljournal.cpp+5−1 plugins/Dash/horizontaljournal.h+4 plugins/Dash/listviewwithpageheader.cpp+2−2 plugins/Dash/organicgrid.cpp+5−1 plugins/Dash/organicgrid.h+4 plugins/Dash/verticaljournal.cpp+5−1 plugins/Dash/verticaljournal.h+4
plugins/Dash/abstractdashview.h+4
@@ -104,7 +104,11 @@ private:
104104 virtual void doRelayout() = 0;
105105 virtual void updateItemCulling(qreal visibleFromY, qreal visibleToY) = 0;
106106 virtual void calculateImplicitHeight() = 0;
107+#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
107108 virtual void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) = 0;
109+#else
110+ virtual void processModelRemoves(const QVector<QQmlChangeSet::Change> &removes) = 0;
111+#endif
108112
109113 QQmlDelegateModel *m_delegateModel;
110114
plugins/Dash/horizontaljournal.cpp+5−1
@@ -184,9 +184,13 @@ void HorizontalJournal::calculateImplicitHeight()
184184 }
185185}
186186
187+#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
187188void HorizontalJournal::processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes)
189+#else
190+void HorizontalJournal::processModelRemoves(const QVector<QQmlChangeSet::Change> &removes)
191+#endif
188192{
189− Q_FOREACH(const QQmlChangeSet::Remove &remove, removes) {
193+ Q_FOREACH(const QQmlChangeSet::Change &remove, removes) {
190194 for (int i = remove.count - 1; i >= 0; --i) {
191195 const int indexToRemove = remove.index + i;
192196 // We only support removing from the end so
plugins/Dash/horizontaljournal.h+4
@@ -52,7 +52,11 @@ private:
5252 void calculateImplicitHeight() override;
5353 void doRelayout() override;
5454 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
55+#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
5556 void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) override;
57+#else
58+ void processModelRemoves(const QVector<QQmlChangeSet::Change> &removes) override;
59+#endif
5660
5761 int m_firstVisibleIndex;
5862 QList<QQuickItem*> m_visibleItems;
plugins/Dash/listviewwithpageheader.cpp+2−2
@@ -936,7 +936,7 @@ void ListViewWithPageHeader::onModelUpdated(const QQmlChangeSet &changeSet, bool
936936// qDebug() << "ListViewWithPageHeader::onModelUpdated" << changeSet << reset;
937937 const auto oldFirstVisibleIndex = m_firstVisibleIndex;
938938
939− Q_FOREACH(const QQmlChangeSet::Remove &remove, changeSet.removes()) {
939+ Q_FOREACH(const QQmlChangeSet::Change &remove, changeSet.removes()) {
940940// qDebug() << "ListViewWithPageHeader::onModelUpdated Remove" << remove.index << remove.count;
941941 if (remove.index + remove.count > m_firstVisibleIndex && remove.index < m_firstVisibleIndex + m_visibleItems.count()) {
942942 const qreal oldFirstValidIndexPos = m_visibleItems.first()->y();
@@ -990,7 +990,7 @@ void ListViewWithPageHeader::onModelUpdated(const QQmlChangeSet &changeSet, bool
990990 }
991991 }
992992
993− Q_FOREACH(const QQmlChangeSet::Insert &insert, changeSet.inserts()) {
993+ Q_FOREACH(const QQmlChangeSet::Change &insert, changeSet.inserts()) {
994994// qDebug() << "ListViewWithPageHeader::onModelUpdated Insert" << insert.index << insert.count;
995995 const bool insertingInValidIndexes = insert.index > m_firstVisibleIndex && insert.index < m_firstVisibleIndex + m_visibleItems.count();
996996 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()
237237 }
238238}
239239
240+#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
240241void OrganicGrid::processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes)
242+#else
243+void OrganicGrid::processModelRemoves(const QVector<QQmlChangeSet::Change> &removes)
244+#endif
241245{
242− Q_FOREACH(const QQmlChangeSet::Remove &remove, removes) {
246+ Q_FOREACH(const QQmlChangeSet::Change &remove, removes) {
243247 for (int i = remove.count - 1; i >= 0; --i) {
244248 const int indexToRemove = remove.index + i;
245249 // We only support removing from the end
plugins/Dash/organicgrid.h+4
@@ -79,7 +79,11 @@ private:
7979 void doRelayout() override;
8080 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
8181 void calculateImplicitHeight() override;
82+#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
8283 void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) override;
84+#else
85+ void processModelRemoves(const QVector<QQmlChangeSet::Change> &removes) override;
86+#endif
8387
8488 QSizeF m_smallDelegateSize;
8589 QSizeF m_bigDelegateSize;
plugins/Dash/verticaljournal.cpp+5−1
@@ -239,9 +239,13 @@ void VerticalJournal::updateItemCulling(qreal visibleFromY, qreal visibleToY)
239239 }
240240}
241241
242+#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
242243void VerticalJournal::processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes)
244+#else
245+void VerticalJournal::processModelRemoves(const QVector<QQmlChangeSet::Change> &removes)
246+#endif
243247{
244− Q_FOREACH(const QQmlChangeSet::Remove &remove, removes) {
248+ Q_FOREACH(const QQmlChangeSet::Change &remove, removes) {
245249 for (int i = remove.count - 1; i >= 0; --i) {
246250 const int indexToRemove = remove.index + i;
247251 // Since we only support removing from the end, indexToRemove
plugins/Dash/verticaljournal.h+4
@@ -90,7 +90,11 @@ private:
9090 void calculateImplicitHeight() override;
9191 void doRelayout() override;
9292 void updateItemCulling(qreal visibleFromY, qreal visibleToY) override;
93+#if (QT_VERSION < QT_VERSION_CHECK(5, 4, 0))
9394 void processModelRemoves(const QVector<QQmlChangeSet::Remove> &removes) override;
95+#else
96+ void processModelRemoves(const QVector<QQmlChangeSet::Change> &removes) override;
97+#endif
9498
9599 QVector<QList<ViewItem>> m_columnVisibleItems;
96100 QHash<int, int> m_indexColumnMap;