Albert Astals Cid has proposed merging 
lp:~unity-team/kubuntu-packaging/qtdeclarative-opensource-src_improve-delegate-range
 into lp:~kubuntu-packagers/kubuntu-packaging/qtdeclarative-opensource-src.

Commit message:
Improve the delegate range patch.

Requested reviews:
  Timo Jyrinki (timo-jyrinki)
  Kubuntu Packagers (kubuntu-packagers)

For more details, see:
https://code.launchpad.net/~unity-team/kubuntu-packaging/qtdeclarative-opensource-src_improve-delegate-range/+merge/206877

I just found out we need to take the delegate creation range in another 
function. I'm attaching an updated 
qtquick_delegate_creation_range_itemviews.patch
-- 
https://code.launchpad.net/~unity-team/kubuntu-packaging/qtdeclarative-opensource-src_improve-delegate-range/+merge/206877
Your team Kubuntu Packagers is requested to review the proposed merge of 
lp:~unity-team/kubuntu-packaging/qtdeclarative-opensource-src_improve-delegate-range
 into lp:~kubuntu-packagers/kubuntu-packaging/qtdeclarative-opensource-src.
=== modified file 'debian/patches/qtquick_delegate_creation_range_itemviews.patch'
--- debian/patches/qtquick_delegate_creation_range_itemviews.patch	2014-01-08 13:55:25 +0000
+++ debian/patches/qtquick_delegate_creation_range_itemviews.patch	2014-02-18 09:50:57 +0000
@@ -15,7 +15,7 @@
 
 --- a/src/quick/items/qquickgridview.cpp
 +++ b/src/quick/items/qquickgridview.cpp
-@@ -652,8 +652,8 @@
+@@ -640,8 +640,8 @@
          if (colPos != col * colSize()) {
              colPos = col * colSize();
              firstItem->setPosition(colPos, rowPos);
@@ -25,9 +25,23 @@
          for (int i = 1; i < visibleItems.count(); ++i) {
              FxGridItemSG *item = static_cast<FxGridItemSG*>(visibleItems.at(i));
              if (++col >= columns) {
+@@ -2387,7 +2387,12 @@
+         }
+     } else {
+         int i = 0;
+-        int to = buffer+tempPos+size()-1;
++        int to = 0;
++        if (delegateCreationBeginValid && delegateCreationEndValid) {
++            to = delegateCreationEnd;
++        } else {
++            to = buffer+tempPos+size()-1;
++        }
+         while (i < count && rowPos <= to + rowSize()*(columns - colNum)/qreal(columns+1)) {
+             FxViewItem *item = 0;
+             if (change.isMove() && (item = currentChanges.removedItems.take(change.moveKey(modelIndex + i))))
 --- a/src/quick/items/qquickitemview.cpp
 +++ b/src/quick/items/qquickitemview.cpp
-@@ -699,6 +699,70 @@
+@@ -717,6 +717,70 @@
      }
  }
  
@@ -98,7 +112,7 @@
  QQuickTransition *QQuickItemView::populateTransition() const
  {
      Q_D(const QQuickItemView);
-@@ -1432,6 +1496,7 @@
+@@ -1452,6 +1516,7 @@
      , highlightRange(QQuickItemView::NoHighlightRange)
      , highlightRangeStart(0), highlightRangeEnd(0)
      , highlightMoveDuration(150)
@@ -106,7 +120,7 @@
      , headerComponent(0), header(0), footerComponent(0), footer(0)
      , transitioner(0)
      , minExtent(0), maxExtent(0)
-@@ -1440,6 +1505,7 @@
+@@ -1460,6 +1525,7 @@
      , haveHighlightRange(false), autoHighlight(true), highlightRangeStartValid(false), highlightRangeEndValid(false)
      , fillCacheBuffer(false), inRequest(false)
      , runDelayedRemoveTransition(false), delegateValidated(false)
@@ -114,7 +128,7 @@
  {
      bufferPause.addAnimationChangeListener(this, QAbstractAnimationJob::Completion);
      bufferPause.setLoopCount(1);
-@@ -1660,11 +1726,15 @@
+@@ -1680,11 +1746,15 @@
  
  void QQuickItemViewPrivate::refill()
  {
@@ -137,7 +151,7 @@
  void QQuickItemViewPrivate::refill(qreal from, qreal to)
 --- a/src/quick/items/qquickitemview_p.h
 +++ b/src/quick/items/qquickitemview_p.h
-@@ -91,6 +91,8 @@
+@@ -89,6 +89,8 @@
      Q_PROPERTY(qreal preferredHighlightBegin READ preferredHighlightBegin WRITE setPreferredHighlightBegin NOTIFY preferredHighlightBeginChanged RESET resetPreferredHighlightBegin)
      Q_PROPERTY(qreal preferredHighlightEnd READ preferredHighlightEnd WRITE setPreferredHighlightEnd NOTIFY preferredHighlightEndChanged RESET resetPreferredHighlightEnd)
      Q_PROPERTY(int highlightMoveDuration READ highlightMoveDuration WRITE setHighlightMoveDuration NOTIFY highlightMoveDurationChanged)
@@ -146,7 +160,7 @@
  
      Q_ENUMS(HighlightRangeMode)
      Q_ENUMS(PositionMode)
-@@ -197,6 +199,14 @@
+@@ -195,6 +197,14 @@
      int highlightMoveDuration() const;
      virtual void setHighlightMoveDuration(int);
  
@@ -161,7 +175,7 @@
      enum PositionMode { Beginning, Center, End, Visible, Contain, SnapPosition };
  
      Q_INVOKABLE void positionViewAtIndex(int index, int mode);
-@@ -246,6 +256,8 @@
+@@ -244,6 +254,8 @@
      void preferredHighlightBeginChanged();
      void preferredHighlightEndChanged();
      void highlightMoveDurationChanged();
@@ -181,7 +195,7 @@
  {
      Q_DECLARE_PUBLIC(QQuickItemView)
  public:
-@@ -278,6 +278,8 @@
+@@ -279,6 +279,8 @@
      qreal highlightRangeStart;
      qreal highlightRangeEnd;
      int highlightMoveDuration;
@@ -190,7 +204,7 @@
  
      QQmlComponent *headerComponent;
      FxViewItem *header;
-@@ -309,6 +311,8 @@
+@@ -311,6 +313,8 @@
      bool inRequest : 1;
      bool runDelayedRemoveTransition : 1;
      bool delegateValidated : 1;
@@ -303,7 +317,7 @@
  #include <QtQuick/private/qquicktext_p.h>
  #include <QtQml/private/qqmllistmodel_p.h>
  #include "../../shared/util.h"
-@@ -208,6 +210,8 @@
+@@ -207,6 +209,8 @@
      void moved_topToBottom_RtL_BtT();
      void moved_topToBottom_RtL_BtT_data();
  
@@ -312,7 +326,7 @@
  private:
      QList<int> toIntList(const QVariantList &list);
      void matchIndexLists(const QVariantList &indexLists, const QList<int> &expectedIndexes);
-@@ -6254,6 +6258,69 @@
+@@ -6256,6 +6260,69 @@
      moved_defaultLayout_data();
  }
  
@@ -480,16 +494,15 @@
  #include <QtQuick/private/qquicktext_p.h>
  #include <QtQml/private/qqmlobjectmodel_p.h>
  #include <QtQml/private/qqmllistmodel_p.h>
-@@ -208,7 +209,8 @@
+@@ -213,6 +214,7 @@
      void delayedChanges_QTBUG_30555();
      void outsideViewportChangeNotAffectingView();
      void testProxyModelChangedAfterMove();
 +    void testDelegateCreationRange();
-
+ 
      void typedModel();
  
-     void highlightItemGeometryChanges();
-@@ -6851,6 +6854,73 @@
+@@ -7058,6 +7060,73 @@
      }
  }
  
@@ -563,3 +576,19 @@
  QTEST_MAIN(tst_QQuickListView)
  
  #include "tst_qquicklistview.moc"
+--- a/src/quick/items/qquicklistview.cpp
++++ b/src/quick/items/qquicklistview.cpp
+@@ -2970,7 +2970,12 @@
+         }
+     } else {
+         int i = 0;
+-        int to = buffer+tempPos+size();
++        int to = 0;
++        if (delegateCreationBeginValid && delegateCreationEndValid) {
++            to = delegateCreationEnd;
++        } else {
++            to = buffer+tempPos+size();
++        }
+         for (i = 0; i < count && pos <= to; ++i) {
+             FxViewItem *item = 0;
+             if (change.isMove() && (item = currentChanges.removedItems.take(change.moveKey(modelIndex + i))))

-- 
kubuntu-devel mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/kubuntu-devel

Reply via email to