on xenial help sign in
Poors man solution to the crash
9f02dd3Albert Astals
plugins/ListViewWithPageHeader/listviewwithpageheader.cpp+4−8
@@ -1196,15 +1196,11 @@ void ListViewWithPageHeader::layout()
1196 }
1196 }
1197 }
1197 }
1198 QQmlContext *context = QQmlEngine::contextForObject(item->m_item)->parentContext();
1198 QQmlContext *context = QQmlEngine::contextForObject(item->m_item)->parentContext();
1199− if (context) {
1200− const qreal clipFrom = visibleFrom + (!item->m_sectionItem && m_topSectionItem && !QQuickItemPrivate::get(m_topSectionItem)->culled ? m_topSectionItem->height() : 0);
1199+ const qreal clipFrom = visibleFrom + (!item->m_sectionItem && m_topSectionItem && !QQuickItemPrivate::get(m_topSectionItem)->culled ? m_topSectionItem->height() : 0);
1201− if (!cull && pos < clipFrom) {
1200+ if (!cull && pos < clipFrom) {
1202− context->setContextProperty(QLatin1String("heightToClip"), clipFrom - pos);
1201+ context->setContextProperty(QLatin1String("heightToClip"), clipFrom - pos);
1203− } else {
1204− context->setContextProperty(QLatin1String("heightToClip"), QVariant::fromValue<int>(0));
1205− }
1206 } else {
1202 } else {
1207− qWarning() << "ListViewWithPageHeader::layout::No context for item found, if you see this outside tests please report";
1203+ context->setContextProperty(QLatin1String("heightToClip"), QVariant::fromValue<int>(0));
1208 }
1204 }
1209// qDebug() << "ListViewWithPageHeader::layout" << item->m_item;
1205// qDebug() << "ListViewWithPageHeader::layout" << item->m_item;
1210 pos += item->height();
1206 pos += item->height();
tests/qmltests/Dash/tst_DashContent.qml+9−2
@@ -123,10 +123,17 @@ Item {
123 clear_scope_status();
123 clear_scope_status();
124 dashContent.visible = true;
124 dashContent.visible = true;
125
125
126− scopesModel.clear();
127− // wait for dash to empty scopes.
128 var dashContentList = findChild(dashContent, "dashContentList");
126 var dashContentList = findChild(dashContent, "dashContentList");
129 verify(dashContentList != undefined);
127 verify(dashContentList != undefined);
128+ // TODO For Qt 5.2 remove this wait
129+ // and the tryCompare and see if it still crashes when
130+ // looping the test
131+ wait(1000);
132+ if (dashContentList.currentItem !== null) {
133+ tryCompare(dashContentList.currentItem, "moving", false);
134+ }
135+ scopesModel.clear();
136+ // wait for dash to empty scopes.
130 tryCompare(dashContentList, "count", 0);
137 tryCompare(dashContentList, "count", 0);
131 }
138 }
132
139