on xenial help sign in
Merge from trunk
commitfbbd0a01a4ef6768d24deb947011a76bd81974db authorMichael Terry <michael.terry@canonical.com> dateFri 9 Aug 2013, 14:28 (13 years ago) parentb6829c2a90e4a0
55 files changed+800−149
Dash/ScopeView.qml+2−1 cmake/modules/Plugins.cmake+18−9 debian/changelog+60 debian/control+2−2 plugins/ListViewWithPageHeader/listviewwithpageheader.cpp+68−14 plugins/ListViewWithPageHeader/listviewwithpageheader.h+8−1 plugins/Unity/Indicators/flatmenuproxymodel.cpp+10−7 plugins/Unity/scope.cpp+3−2 po/ar.po+2−2 po/az.po+2−2 po/bg.po+2−2 po/ca.po+2−2 po/de.po+2−2 po/el.po+2−2 po/en_AU.po+2−2 po/en_GB.po+2−2 po/eo.po+2−2 po/es.po+2−2 po/fi.po+2−2 po/fo.po+2−2 po/fr.po+2−2 po/gl.po+2−2 po/he.po+2−2 po/hr.po+2−2 po/hu.po+2−2 po/hy.po+2−2 po/id.po+2−2 po/it.po+2−2 po/ja.po+2−2 po/kn.po+2−2 po/ko.po+2−2 po/ky.po+2−2 po/lv.po+2−2 po/my.po+2−2 po/nb.po+2−2 po/nl.po+2−2 po/pl.po+2−2 po/pt_BR.po+2−2 po/ro.po+2−2 po/ru.po+2−2 po/si.po+2−2 po/sl.po+2−2 po/sr.po+2−2 po/sv.po+2−2 po/te.po+2−2 po/tr.po+2−2 po/ug.po+2−2 po/uk.po+2−2 po/unity8.pot+13−21 po/update-unity-pot+1 po/zh_CN.po+2−2 po/zh_TW.po+2−2 tests/autopilot/unity8/indicators_client/tests/test_battery.py−2 tests/plugins/ListViewWithPageHeader/listviewwithpageheadertest.cpp+206−3 tests/plugins/ListViewWithPageHeader/listviewwithpageheadertestsection.cpp+325−3
Dash/ScopeView.qml+2−1
@@ -28,7 +28,8 @@ FocusScope {
2828 signal movementStarted
2929 signal positionedAtBeginning
3030
31− // FIXME delay the search so that daemons have time to settle
31+ // FIXME delay the search so that daemons have time to settle, note that
32+ // removing this will break ScopeView::test_changeScope
3233 onScopeChanged: timer.restart()
3334
3435 Timer {
cmake/modules/Plugins.cmake+18−9
@@ -1,3 +1,9 @@
1+find_program(qmlplugindump_exe qmlplugindump)
2+
3+if(NOT qmlplugindump_exe)
4+ msg(FATAL_ERROR "Could not locate qmlplugindump.")
5+endif()
6+
17# Creates target for copying and installing qmlfiles
28#
39# export_qmlfiles(plugin sub_path)
@@ -40,16 +46,19 @@ macro(export_qmlplugin PLUGIN VERSION PLUGIN_SUBPATH)
4046 set(multi_value_keywords TARGETS)
4147 cmake_parse_arguments(qmlplugin "" "" "${multi_value_keywords}" ${ARGN})
4248
43− # create the plugin.qmltypes file
44− add_custom_target(${PLUGIN}-qmltypes ALL
45− COMMAND qmlplugindump -notrelocatable ${PLUGIN} ${VERSION} ${CMAKE_BINARY_DIR}/plugins > ${CMAKE_BINARY_DIR}/plugins/${PLUGIN_SUBPATH}/plugin.qmltypes
46− )
47− add_dependencies(${PLUGIN}-qmltypes ${PLUGIN}-qmlfiles ${qmlplugin_TARGETS})
49+ # Only try to generate .qmltypes if not cross compiling
50+ if(NOT CMAKE_CROSSCOMPILING)
51+ # create the plugin.qmltypes file
52+ add_custom_target(${PLUGIN}-qmltypes ALL
53+ COMMAND ${qmlplugindump_exe} -notrelocatable ${PLUGIN} ${VERSION} ${CMAKE_BINARY_DIR}/plugins > ${CMAKE_BINARY_DIR}/plugins/${PLUGIN_SUBPATH}/plugin.qmltypes
54+ )
55+ add_dependencies(${PLUGIN}-qmltypes ${PLUGIN}-qmlfiles ${qmlplugin_TARGETS})
4856
49− # install the qmltypes file.
50− install(FILES ${CMAKE_BINARY_DIR}/plugins/${PLUGIN_SUBPATH}/plugin.qmltypes
51− DESTINATION ${SHELL_PRIVATE_LIBDIR}/qml/${PLUGIN_SUBPATH}
52− )
57+ # install the qmltypes file.
58+ install(FILES ${CMAKE_BINARY_DIR}/plugins/${PLUGIN_SUBPATH}/plugin.qmltypes
59+ DESTINATION ${SHELL_PRIVATE_LIBDIR}/qml/${PLUGIN_SUBPATH}
60+ )
61+ endif()
5362
5463 # install the additional targets
5564 install(TARGETS ${qmlplugin_TARGETS}
debian/changelog+60
@@ -1,3 +1,63 @@
1+unity8 (7.81.3+13.10.20130809.1-0ubuntu1) saucy; urgency=low
2+
3+ [ Michal Hruby ]
4+ * Set phone form factor for scope requests.
5+
6+ [ Michał Sawicz ]
7+ * Add support for plurals and update the translation template.
8+
9+ [ Ubuntu daily release ]
10+ * Automatic snapshot from revision 179
11+
12+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Fri, 09 Aug 2013 15:35:06 +0000
13+
14+unity8 (7.81.3+13.10.20130809-0ubuntu1) saucy; urgency=low
15+
16+ [ Michał Sawicz ]
17+ * Prepare unity8 for cross-building.
18+
19+ [ Ubuntu daily release ]
20+ * Automatic snapshot from revision 176
21+
22+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Fri, 09 Aug 2013 02:32:10 +0000
23+
24+unity8 (7.81.3+13.10.20130808-0ubuntu1) saucy; urgency=low
25+
26+ [ Michał Sawicz ]
27+ * Re-enable battery slider test.
28+
29+ [ Nick Dedekind ]
30+ * Workaround for non-deletion of indicator page menu items. (LP:
31+ #1183065, #1206991)
32+
33+ [ Albert Astals ]
34+ * LVPWH: Fix regression handling the sticky top section culling r166
35+ introduced the regression, this fixes it+tests.
36+ * Implement+test the maximizeVisibleArea function Tries to show as
37+ much possible of an index that is already shown on screen Will be
38+ used for the dash category expansion.
39+
40+ [ Ubuntu daily release ]
41+ * Automatic snapshot from revision 174
42+
43+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 08 Aug 2013 15:23:17 +0000
44+
45+unity8 (7.81.3+13.10.20130807-0ubuntu1) saucy; urgency=low
46+
47+ [ Michał Sawicz ]
48+ * Drop ppa:ubuntu-unity/next.
49+ * Revert revision 161 that causes issues with invalid background.
50+
51+ [ Albert Astals ]
52+ * Fix off by one in the culling condition If you are on 0 and your
53+ height is 1 and viewport starts at 1 you have to be culled since you
54+ are not visible.
55+
56+ [ Ubuntu daily release ]
57+ * Automatic snapshot from revision 168
58+
59+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 07 Aug 2013 02:32:00 +0000
60+
161unity8 (7.81.3+13.10.20130806-0ubuntu1) saucy; urgency=low
262
363 [ Michael Terry ]
debian/control+2−2
@@ -23,9 +23,9 @@ Build-Depends: cmake,
2323 libusermetricsoutput1-dev,
2424 libxcb1-dev,
2525 pkg-config,
26− python (>= 2.7),
26+ python:any (>= 2.7),
2727 python-setuptools,
28− python3,
28+ python3:any,
2929 qt5-default,
3030 qtbase5-dev,
3131 qtbase5-dev-tools,
plugins/ListViewWithPageHeader/listviewwithpageheader.cpp+68−14
@@ -160,16 +160,16 @@ ListViewWithPageHeader::ListViewWithPageHeader()
160160// m_clipItem = new QQuickRectangle(contentItem());
161161// ((QQuickRectangle*)m_clipItem)->setColor(Qt::gray);
162162
163− m_headerShowAnimation = new QQuickNumberAnimation(this);
164− m_headerShowAnimation->setEasing(QEasingCurve::OutQuad);
165− m_headerShowAnimation->setProperty("contentY");
166− m_headerShowAnimation->setDuration(200);
167− m_headerShowAnimation->setTargetObject(this);
163+ m_contentYAnimation = new QQuickNumberAnimation(this);
164+ m_contentYAnimation->setEasing(QEasingCurve::OutQuad);
165+ m_contentYAnimation->setProperty("contentY");
166+ m_contentYAnimation->setDuration(200);
167+ m_contentYAnimation->setTargetObject(this);
168168
169169 connect(this, SIGNAL(contentWidthChanged()), this, SLOT(onContentWidthChanged()));
170170 connect(this, SIGNAL(contentHeightChanged()), this, SLOT(onContentHeightChanged()));
171171 connect(this, SIGNAL(heightChanged()), this, SLOT(onHeightChanged()));
172− connect(m_headerShowAnimation, SIGNAL(stopped()), this, SLOT(onShowHeaderAnimationFinished()));
172+ connect(m_contentYAnimation, SIGNAL(stopped()), this, SLOT(onShowHeaderAnimationFinished()));
173173}
174174
175175ListViewWithPageHeader::~ListViewWithPageHeader()
@@ -374,11 +374,48 @@ void ListViewWithPageHeader::showHeader()
374374 layout();
375375 }
376376 }
377− m_headerShowAnimation->setTo(to);
378− m_headerShowAnimation->start();
377+ m_contentYAnimation->setTo(to);
378+ contentYAnimationType = ContentYAnimationShowHeader;
379+ m_contentYAnimation->start();
379380 }
380381}
381382
383+bool ListViewWithPageHeader::maximizeVisibleArea(int modelIndex)
384+{
385+ ListItem *listItem = itemAtIndex(modelIndex);
386+ if (listItem)
387+ {
388+ const auto listItemY = m_clipItem->y() + listItem->y();
389+ if (listItemY > contentY() && listItemY + listItem->height() > contentY() + height()) {
390+ // we can scroll the list up to show more stuff
391+ const auto to = qMin(listItemY, listItemY + listItem->height() - height());
392+ m_contentYAnimation->setTo(to);
393+ contentYAnimationType = ContentYAnimationMaximizeVisibleArea;
394+ m_contentYAnimation->start();
395+ } else if ((listItemY < contentY() && listItemY + listItem->height() < contentY() + height()) ||
396+ (m_topSectionItem && !listItem->m_sectionItem && listItemY - m_topSectionItem->height() < contentY() && listItemY + listItem->height() < contentY() + height()))
397+ {
398+ // we can scroll the list down to show more stuff
399+ auto realVisibleListItemY = listItemY;
400+ if (m_topSectionItem) {
401+ // If we are showing the top section sticky item and this item doesn't have a section
402+ // item we have to make sure to scroll it a bit more so that it is not underlapping
403+ // the top section sticky item
404+ bool topSectionShown = !QQuickItemPrivate::get(m_topSectionItem)->culled;
405+ if (topSectionShown && !listItem->m_sectionItem) {
406+ realVisibleListItemY -= m_topSectionItem->height();
407+ }
408+ }
409+ const auto to = qMax(realVisibleListItemY, listItemY + listItem->height() - height());
410+ m_contentYAnimation->setTo(to);
411+ contentYAnimationType = ContentYAnimationMaximizeVisibleArea;
412+ m_contentYAnimation->start();
413+ }
414+ return true;
415+ }
416+ return false;
417+}
418+
382419qreal ListViewWithPageHeader::minYExtent() const
383420{
384421// qDebug() << "ListViewWithPageHeader::minYExtent" << m_minYExtent;
@@ -400,6 +437,7 @@ void ListViewWithPageHeader::viewportMoved(Qt::Orientations orient)
400437 QQuickFlickable::viewportMoved(orient);
401438// qDebug() << "ListViewWithPageHeader::viewportMoved" << contentY();
402439 qreal diff = m_previousContentY - contentY();
440+ const bool showHeaderAnimationRunning = m_contentYAnimation->isRunning() && contentYAnimationType == ContentYAnimationShowHeader;
403441 if (m_headerItem) {
404442 auto oldHeaderItemShownHeight = m_headerItemShownHeight;
405443 if (contentY() < -m_minYExtent) {
@@ -410,16 +448,20 @@ void ListViewWithPageHeader::viewportMoved(Qt::Orientations orient)
410448 m_headerItem->setHeight(m_headerItem->implicitHeight());
411449 // We are going down (but it's not because of the rebound at the end)
412450 // (but the header was not shown by it's own position)
413− // or the header is partially shown
451+ // or the header is partially shown and we are not doing a maximizeVisibleArea either
414452 const bool scrolledUp = m_previousContentY > contentY();
415453 const bool notRebounding = contentY() + height() < contentHeight();
416454 const bool notShownByItsOwn = contentY() + diff > m_headerItem->y() + m_headerItem->height();
455+ const bool maximizeVisibleAreaRunning = m_contentYAnimation->isRunning() && contentYAnimationType == ContentYAnimationMaximizeVisibleArea;
417456
418457 if (!scrolledUp && contentY() == -m_minYExtent) {
419458 m_headerItemShownHeight = 0;
420459 m_headerItem->setY(contentY());
421− } else if ((scrolledUp && notRebounding && notShownByItsOwn) || (m_headerItemShownHeight > 0)) {
422− m_headerItemShownHeight += diff;
460+ } else if ((scrolledUp && notRebounding && notShownByItsOwn && !maximizeVisibleAreaRunning) || (m_headerItemShownHeight > 0)) {
461+ if (maximizeVisibleAreaRunning && diff > 0) // If we are maximizing and the header was shown, make sure we hide it
462+ m_headerItemShownHeight -= diff;
463+ else
464+ m_headerItemShownHeight += diff;
423465 if (contentY() == -m_minYExtent) {
424466 m_headerItemShownHeight = 0;
425467 } else {
@@ -435,7 +477,7 @@ void ListViewWithPageHeader::viewportMoved(Qt::Orientations orient)
435477 // We will be changing the clip item, need to accomadate for it
436478 // otherwise we move the firstItem down/up twice (unless the
437479 // show header animation is running, where we want to keep the viewport stable)
438− if (!m_headerShowAnimation->isRunning()) {
480+ if (!showHeaderAnimationRunning) {
439481 diff += oldHeaderItemShownHeight - m_headerItemShownHeight;
440482 } else {
441483 diff = -diff;
@@ -445,7 +487,7 @@ void ListViewWithPageHeader::viewportMoved(Qt::Orientations orient)
445487 updateClipItem();
446488 ListItem *firstItem = m_visibleItems.first();
447489 firstItem->setY(firstItem->y() + diff);
448− if (m_headerShowAnimation->isRunning()) {
490+ if (showHeaderAnimationRunning) {
449491 adjustMinYExtent();
450492 }
451493 }
@@ -1052,7 +1094,19 @@ void ListViewWithPageHeader::layout()
10521094 // Then after the loop we'll make sure that if there's another section just below it
10531095 // pushed the sticky section up to make it disappear
10541096 const qreal topSectionStickPos = m_headerItemShownHeight + contentY() - m_clipItem->y();
1055− if (topSectionStickPos <= pos) {
1097+ bool showStickySectionItem;
1098+ // We need to show the "top section sticky item" when the position at the "top" of the
1099+ // viewport is bigger than the start of the position of the first visible item
1100+ // i.e. the first visible item starts before the viewport, or when the first
1101+ // visible item starts just at the viewport start and it does not have its own section item
1102+ if (topSectionStickPos > pos) {
1103+ showStickySectionItem = true;
1104+ } else if (topSectionStickPos == pos) {
1105+ showStickySectionItem = !item->m_sectionItem;
1106+ } else {
1107+ showStickySectionItem = false;
1108+ }
1109+ if (!showStickySectionItem) {
10561110 QQuickItemPrivate::get(m_topSectionItem)->setCulled(true);
10571111 if (item->m_sectionItem) {
10581112 // This seems it should happen since why would we cull the top section
plugins/ListViewWithPageHeader/listviewwithpageheader.h+8−1
@@ -89,6 +89,11 @@ public:
8989 Q_INVOKABLE void positionAtBeginning();
9090 Q_INVOKABLE void showHeader();
9191
92+ // The index has to be created for this to try to do something
93+ // Created items are those visible and the precached ones
94+ // Returns if the item existed or not
95+ Q_INVOKABLE bool maximizeVisibleArea(int modelIndex);
96+
9297Q_SIGNALS:
9398 void modelChanged();
9499 void delegateChanged();
@@ -182,7 +187,9 @@ private:
182187 qreal m_previousContentY;
183188 qreal m_headerItemShownHeight; // The height of header shown when the header is shown outside its topmost position
184189 // i.e. it's being shown after dragging down in the middle of the list
185− QQuickNumberAnimation *m_headerShowAnimation;
190+ enum ContentYAnimationType { ContentYAnimationShowHeader, ContentYAnimationMaximizeVisibleArea };
191+ ContentYAnimationType contentYAnimationType;
192+ QQuickNumberAnimation *m_contentYAnimation;
186193
187194 QQmlComponent *m_sectionDelegate;
188195 QString m_sectionProperty;
plugins/Unity/Indicators/flatmenuproxymodel.cpp+10−7
@@ -55,31 +55,34 @@ void FlatMenuProxyModel::setSourceModel(QAbstractItemModel *source)
5555 if (source) {
5656
5757 // FIXME - not working correctly with dynamic inserts/removes
58+ // FIXME 2 - We're using Queud connections as a workaround to QTBUG-32859
59+ // The signals from qmenumodel are coming straight off the glib event loop,
60+ // which is not supported and has the effect of listview delegates not to be deleted.
5861
5962 connect(source,
6063 SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
61− SLOT(onModelAboutToBeReset()));
64+ SLOT(onModelAboutToBeReset()), Qt::QueuedConnection);
6265 connect(source,
6366 SIGNAL(rowsInserted(QModelIndex,int,int)),
64− SLOT(onModelReset()));
67+ SLOT(onModelReset()), Qt::QueuedConnection);
6568
6669 connect(source,
6770 SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
68− SLOT(onModelAboutToBeReset()));
71+ SLOT(onModelAboutToBeReset()), Qt::QueuedConnection);
6972 connect(source,
7073 SIGNAL(rowsRemoved(QModelIndex,int,int)),
71− SLOT(onModelReset()));
74+ SLOT(onModelReset()), Qt::QueuedConnection);
7275
7376 connect(source,
7477 SIGNAL(modelAboutToBeReset()),
75− SLOT(onModelAboutToBeReset()));
78+ SLOT(onModelAboutToBeReset()), Qt::QueuedConnection);
7679 connect(source,
7780 SIGNAL(modelReset()),
78− SLOT(onModelReset()));
81+ SLOT(onModelReset()), Qt::QueuedConnection);
7982
8083 connect(source,
8184 SIGNAL(statusChanged(DBusEnums::ConnectionStatus)),
82− SIGNAL(statusChanged()));
85+ SIGNAL(statusChanged()), Qt::QueuedConnection);
8386
8487 // initiliaze rowCount
8588 QModelIndex lastItem = source->index(source->rowCount() - 1, 0);
plugins/Unity/scope.cpp+3−2
@@ -36,8 +36,8 @@
3636
3737#include <libintl.h>
3838
39−Scope::Scope(QObject *parent) :
40− QObject(parent)
39+Scope::Scope(QObject *parent) : QObject(parent)
40+ , m_formFactor("phone")
4141{
4242 m_categories.reset(new Categories(this));
4343}
@@ -128,6 +128,7 @@ void Scope::setFormFactor(const QString& form_factor) {
128128 m_formFactor = form_factor;
129129 if (m_unityScope) {
130130 m_unityScope->form_factor = m_formFactor.toStdString();
131+ synchronizeStates(); // will trigger a re-search
131132 }
132133 Q_EMIT formFactorChanged();
133134 }
po/ar.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/az.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/bg.po+2−2
@@ -15,8 +15,8 @@ msgstr ""
1515"MIME-Version: 1.0\n"
1616"Content-Type: text/plain; charset=UTF-8\n"
1717"Content-Transfer-Encoding: 8bit\n"
18−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
19−"X-Generator: Launchpad (build 16718)\n"
18+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
19+"X-Generator: Launchpad (build 16723)\n"
2020
2121#: Applications/applications.js:23
2222msgid "Phone"
po/ca.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/de.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/el.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/en_AU.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/en_GB.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/eo.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/es.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/fi.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/fo.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/fr.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/gl.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/he.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/hr.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/hu.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/hy.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/id.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/it.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/ja.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/kn.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/ko.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/ky.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/lv.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/my.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/nb.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/nl.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/pl.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/pt_BR.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/ro.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/ru.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/si.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/sl.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/sr.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/sv.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/te.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/tr.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/ug.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/uk.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/unity8.pot+13−21
@@ -8,7 +8,7 @@ msgid ""
88msgstr ""
99"Project-Id-Version: unity8\n"
1010"Report-Msgid-Bugs-To: \n"
11−"POT-Creation-Date: 2013-06-26 22:58+0200\n"
11+"POT-Creation-Date: 2013-08-09 10:12+0200\n"
1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -85,7 +85,7 @@ msgstr ""
8585msgid "YouTube"
8686msgstr ""
8787
88−#: Components/PageHeader.qml:300
88+#: Components/PageHeader.qml:298
8989msgid "Recent searches"
9090msgstr ""
9191
@@ -105,23 +105,23 @@ msgstr ""
105105msgid "Available for download"
106106msgstr ""
107107
108−#: Dash/DashApps.qml:178
108+#: Dash/DashApps.qml:168
109109msgid "Apps"
110110msgstr ""
111111
112−#: Dash/DashHome.qml:40
112+#: Dash/DashHome.qml:41
113113msgid "Frequent Apps"
114114msgstr ""
115115
116−#: Dash/DashHome.qml:43
116+#: Dash/DashHome.qml:44
117117msgid "Recent Music"
118118msgstr ""
119119
120−#: Dash/DashHome.qml:46
120+#: Dash/DashHome.qml:47
121121msgid "Videos Popular Online"
122122msgstr ""
123123
124−#: Dash/DashHome.qml:175
124+#: Dash/DashHome.qml:151
125125msgid "Home"
126126msgstr ""
127127
@@ -141,7 +141,7 @@ msgstr ""
141141msgid "Top Charting"
142142msgstr ""
143143
144−#: Dash/DashMusic.qml:99
144+#: Dash/DashMusic.qml:91
145145msgid "Music"
146146msgstr ""
147147
@@ -149,7 +149,7 @@ msgstr ""
149149msgid "Popular Online"
150150msgstr ""
151151
152−#: Dash/DashVideos.qml:155
152+#: Dash/DashVideos.qml:146
153153msgid "Videos"
154154msgstr ""
155155
@@ -166,7 +166,7 @@ msgid "Author:"
166166msgstr ""
167167
168168#: Greeter/Lockscreen.qml:133
169−msgid "Emergency call"
169+msgid "Emergency Call"
170170msgstr ""
171171
172172#: Greeter/PassphraseLockscreen.qml:59
@@ -198,23 +198,15 @@ msgstr ""
198198msgid "Speaking..."
199199msgstr ""
200200
201−#: Panel/MenuContent.qml:192
202−msgid "Device"
203−msgstr ""
204−
205−#: Panel/Menus/Overview/FlightModeWidget.qml:42
206−msgid "Flight mode"
207−msgstr ""
208−
209−#: Panel/SearchIndicator.qml:26
201+#: Panel/SearchIndicator.qml:27
210202msgid "Search"
211203msgstr ""
212204
213−#: plugins/Unity/scope.cpp:268
205+#: plugins/Unity/scope.cpp:298
214206msgid "Sorry, there is nothing that matches your search."
215207msgstr ""
216208
217−#: Shell.qml:383
209+#: Shell.qml:399
218210#, qt-format
219211msgid "Please enter %1"
220212msgstr ""
po/update-unity-pot+1
@@ -20,6 +20,7 @@ xgettext \
2020 --qt --c++ \
2121 --add-comments=TRANSLATORS \
2222 --keyword=tr \
23+ --keyword=tr:1,2 \
2324 --package-name="unity8" \
2425 --copyright-holder="Canonical Ltd."
2526
po/zh_CN.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
po/zh_TW.po+2−2
@@ -14,8 +14,8 @@ msgstr ""
1414"MIME-Version: 1.0\n"
1515"Content-Type: text/plain; charset=UTF-8\n"
1616"Content-Transfer-Encoding: 8bit\n"
17−"X-Launchpad-Export-Date: 2013-07-31 06:28+0000\n"
18−"X-Generator: Launchpad (build 16718)\n"
17+"X-Launchpad-Export-Date: 2013-08-08 05:15+0000\n"
18+"X-Generator: Launchpad (build 16723)\n"
1919
2020#: Applications/applications.js:23
2121msgid "Phone"
tests/autopilot/unity8/indicators_client/tests/test_battery.py−2
@@ -87,8 +87,6 @@ class TestDisplayMenus(IndicatorsTestCase):
8787 def test_brightness_slider(self):
8888 """Test the auto-bright switch"""
8989
90− if self.input_device_class is Touch:
91− self.skipTest("Dragging is broken with Touch input (LP: #1203808).")
9290 fn_brightness_menu = lambda: self.app.select_single("SliderMenuItem", objectName="brightness");
9391 # FIXME: this should go away when we switch to indicator-power
9492 try:
tests/plugins/ListViewWithPageHeader/listviewwithpageheadertest.cpp+206−3
@@ -1245,7 +1245,7 @@ private Q_SLOTS:
12451245
12461246 lvwph->showHeader();
12471247
1248− QTRY_VERIFY(!lvwph->m_headerShowAnimation->isRunning());
1248+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
12491249 QTRY_COMPARE(lvwph->m_visibleItems.count(), 5);
12501250 QCOMPARE(lvwph->m_firstVisibleIndex, 0);
12511251 verifyItem(0, -375., 150., true);
@@ -1301,7 +1301,7 @@ private Q_SLOTS:
13011301
13021302 lvwph->showHeader();
13031303
1304− QTRY_VERIFY(!lvwph->m_headerShowAnimation->isRunning());
1304+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
13051305 QTRY_COMPARE(lvwph->m_visibleItems.count(), 4);
13061306 QCOMPARE(lvwph->m_firstVisibleIndex, 0);
13071307 verifyItem(0, -20., 150., false);
@@ -1339,7 +1339,7 @@ private Q_SLOTS:
13391339
13401340 lvwph->showHeader();
13411341
1342− QTRY_VERIFY(!lvwph->m_headerShowAnimation->isRunning());
1342+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
13431343 QTRY_VERIFY (lvwph->isAtYEnd());
13441344 }
13451345
@@ -1409,6 +1409,209 @@ private Q_SLOTS:
14091409 QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
14101410 }
14111411
1412+ void testMaximizeVisibleArea()
1413+ {
1414+ bool res = lvwph->maximizeVisibleArea(2);
1415+ QVERIFY(res);
1416+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1417+
1418+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 4);
1419+ QCOMPARE(lvwph->m_firstVisibleIndex, 0);
1420+ verifyItem(0, -158., 150., true);
1421+ verifyItem(1, -8., 200., false);
1422+ verifyItem(2, 192, 350., false);
1423+ verifyItem(3, 542, 350., true);
1424+ QCOMPARE(lvwph->m_minYExtent, 0.);
1425+ QCOMPARE(lvwph->m_clipItem->y(), 208.);
1426+ QCOMPARE(lvwph->m_clipItem->clip(), false);
1427+ QCOMPARE(lvwph->m_headerItem->y(), 0.);
1428+ QCOMPARE(lvwph->m_headerItem->height(), 50.);
1429+ QCOMPARE(lvwph->contentY(), 208.);
1430+ QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1431+ }
1432+
1433+ void testMaximizeVisibleAreaVisibleItems()
1434+ {
1435+ bool res = lvwph->maximizeVisibleArea(0);
1436+ QVERIFY(res);
1437+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1438+
1439+ verifyInitialTopPosition();
1440+
1441+ res = lvwph->maximizeVisibleArea(1);
1442+ QVERIFY(res);
1443+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1444+
1445+ verifyInitialTopPosition();
1446+ }
1447+
1448+ void testMaximizeVisibleAreaInvalidIndexes()
1449+ {
1450+ bool res = lvwph->maximizeVisibleArea(-1);
1451+ QVERIFY(!res);
1452+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1453+
1454+ verifyInitialTopPosition();
1455+
1456+ res = lvwph->maximizeVisibleArea(1000);
1457+ QVERIFY(!res);
1458+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1459+
1460+ verifyInitialTopPosition();
1461+
1462+ res = lvwph->maximizeVisibleArea(4);
1463+ QVERIFY(!res);
1464+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1465+
1466+ verifyInitialTopPosition();
1467+ }
1468+
1469+ void testMaximizeVisibleAreaBigElement()
1470+ {
1471+ model->setProperty(2, "size", 4000);
1472+ bool res = lvwph->maximizeVisibleArea(2);
1473+ QVERIFY(res);
1474+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1475+
1476+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 3);
1477+ QCOMPARE(lvwph->m_firstVisibleIndex, 0);
1478+ verifyItem(0, -350., 150., true);
1479+ verifyItem(1, -200., 200., true);
1480+ verifyItem(2, 0, 4000., false);
1481+ QCOMPARE(lvwph->m_minYExtent, 0.);
1482+ QCOMPARE(lvwph->m_clipItem->y(), 400.);
1483+ QCOMPARE(lvwph->m_clipItem->clip(), false);
1484+ QCOMPARE(lvwph->m_headerItem->y(), 0.);
1485+ QCOMPARE(lvwph->m_headerItem->height(), 50.);
1486+ QCOMPARE(lvwph->contentY(), 400.);
1487+ QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1488+ }
1489+
1490+ void testMaximizeVisibleAreaScrollDown()
1491+ {
1492+ changeContentY(250);
1493+ bool res = lvwph->maximizeVisibleArea(1);
1494+ QVERIFY(res);
1495+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1496+
1497+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 4);
1498+ QCOMPARE(lvwph->m_firstVisibleIndex, 0);
1499+ verifyItem(0, -150., 150., true);
1500+ verifyItem(1, 0., 200., false);
1501+ verifyItem(2, 200, 350., false);
1502+ verifyItem(3, 550, 350., true);
1503+ QCOMPARE(lvwph->m_minYExtent, 0.);
1504+ QCOMPARE(lvwph->m_clipItem->y(), 200.);
1505+ QCOMPARE(lvwph->m_clipItem->clip(), false);
1506+ QCOMPARE(lvwph->m_headerItem->y(), 0.);
1507+ QCOMPARE(lvwph->m_headerItem->height(), 50.);
1508+ QCOMPARE(lvwph->contentY(), 200.);
1509+ QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1510+ }
1511+
1512+ void testMaximizeVisibleAreaScrollDownBigElement()
1513+ {
1514+ model->setProperty(1, "size", 1000);
1515+ changeContentY(1150);
1516+ bool res = lvwph->maximizeVisibleArea(1);
1517+ QVERIFY(res);
1518+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1519+
1520+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 2);
1521+ QCOMPARE(lvwph->m_firstVisibleIndex, 1);
1522+ verifyItem(0, -458., 1000., false);
1523+ verifyItem(1, 542., 350., true);
1524+ QCOMPARE(lvwph->m_minYExtent, 362.5);
1525+ QCOMPARE(lvwph->m_clipItem->y(), 658.);
1526+ QCOMPARE(lvwph->m_clipItem->clip(), false);
1527+ QCOMPARE(lvwph->m_headerItem->y(), 0.);
1528+ QCOMPARE(lvwph->m_headerItem->height(), 50.);
1529+ QCOMPARE(lvwph->contentY(), 658.);
1530+ QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1531+ }
1532+
1533+ void testMaximizeVisibleAreaBigElementInTheMiddle()
1534+ {
1535+ model->setProperty(1, "size", 1000);
1536+ changeContentY(650);
1537+
1538+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 2);
1539+ QCOMPARE(lvwph->m_firstVisibleIndex, 1);
1540+ verifyItem(0, -450., 1000., false);
1541+ verifyItem(1, 550., 350., true);
1542+ QCOMPARE(lvwph->m_minYExtent, 525.);
1543+ QCOMPARE(lvwph->m_clipItem->y(), 650.);
1544+ QCOMPARE(lvwph->m_clipItem->clip(), false);
1545+ QCOMPARE(lvwph->m_headerItem->y(), 0.);
1546+ QCOMPARE(lvwph->m_headerItem->height(), 50.);
1547+ QCOMPARE(lvwph->contentY(), 650.);
1548+ QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1549+
1550+ bool res = lvwph->maximizeVisibleArea(1);
1551+ QVERIFY(res);
1552+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1553+
1554+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 2);
1555+ QCOMPARE(lvwph->m_firstVisibleIndex, 1);
1556+ verifyItem(0, -450., 1000., false);
1557+ verifyItem(1, 550., 350., true);
1558+ QCOMPARE(lvwph->m_minYExtent, 525.);
1559+ QCOMPARE(lvwph->m_clipItem->y(), 650.);
1560+ QCOMPARE(lvwph->m_clipItem->clip(), false);
1561+ QCOMPARE(lvwph->m_headerItem->y(), 0.);
1562+ QCOMPARE(lvwph->m_headerItem->height(), 50.);
1563+ QCOMPARE(lvwph->contentY(), 650.);
1564+ QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1565+ }
1566+
1567+ void testMaximizeVisibleAreaTopWithHalfPageHeader()
1568+ {
1569+ changeContentY(430);
1570+ changeContentY(-30);
1571+
1572+ bool res = lvwph->maximizeVisibleArea(1);
1573+ QVERIFY(res);
1574+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1575+
1576+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 4);
1577+ QCOMPARE(lvwph->m_firstVisibleIndex, 0);
1578+ verifyItem(0, -150., 150., true);
1579+ verifyItem(1, 0., 200., false);
1580+ verifyItem(2, 200, 350., false);
1581+ verifyItem(3, 550, 350., true);
1582+ QCOMPARE(lvwph->m_minYExtent, 0.);
1583+ QCOMPARE(lvwph->m_clipItem->y(), 200.);
1584+ QCOMPARE(lvwph->m_clipItem->clip(), false);
1585+ QCOMPARE(lvwph->m_headerItem->y(), 0.);
1586+ QCOMPARE(lvwph->m_headerItem->height(), 50.);
1587+ QCOMPARE(lvwph->contentY(), 200.);
1588+ QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1589+ }
1590+
1591+ void testMaximizeVisibleAreaBottomWithHalfPageHeader()
1592+ {
1593+ changeContentY(430);
1594+ changeContentY(-30);
1595+
1596+ bool res = lvwph->maximizeVisibleArea(3);
1597+ QVERIFY(res);
1598+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1599+
1600+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 4);
1601+ QCOMPARE(lvwph->m_firstVisibleIndex, 1);
1602+ verifyItem(0, -358., 200., true);
1603+ verifyItem(1, -158., 350., false);
1604+ verifyItem(2, 192, 350., false);
1605+ verifyItem(3, 542, 350., true);
1606+ QCOMPARE(lvwph->m_minYExtent, 162.5);
1607+ QCOMPARE(lvwph->m_clipItem->y(), 558.);
1608+ QCOMPARE(lvwph->m_clipItem->clip(), false);
1609+ QCOMPARE(lvwph->m_headerItem->y(), 0.);
1610+ QCOMPARE(lvwph->m_headerItem->height(), 50.);
1611+ QCOMPARE(lvwph->contentY(), 558.);
1612+ QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1613+ }
1614+
14121615private:
14131616 QQuickView *view;
14141617 ListViewWithPageHeader *lvwph;
tests/plugins/ListViewWithPageHeader/listviewwithpageheadertestsection.cpp+325−3
@@ -1506,7 +1506,7 @@ private Q_SLOTS:
15061506
15071507 lvwph->showHeader();
15081508
1509− QTRY_VERIFY(!lvwph->m_headerShowAnimation->isRunning());
1509+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
15101510 QTRY_COMPARE(lvwph->m_visibleItems.count(), 3);
15111511 QCOMPARE(lvwph->m_firstVisibleIndex, 0);
15121512 verifyItem(0, -20., 190., false, "Agressive", true);
@@ -1565,7 +1565,7 @@ private Q_SLOTS:
15651565
15661566 lvwph->showHeader();
15671567
1568− QTRY_VERIFY(!lvwph->m_headerShowAnimation->isRunning());
1568+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
15691569 QTRY_COMPARE(lvwph->m_visibleItems.count(), 4);
15701570 QCOMPARE(lvwph->m_firstVisibleIndex, 0);
15711571 verifyItem(0, -375., 190., true, "Agressive", true);
@@ -1607,7 +1607,7 @@ private Q_SLOTS:
16071607
16081608 lvwph->showHeader();
16091609
1610− QTRY_VERIFY(!lvwph->m_headerShowAnimation->isRunning());
1610+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
16111611 QTRY_VERIFY (lvwph->isAtYEnd());
16121612 }
16131613
@@ -1711,6 +1711,328 @@ private Q_SLOTS:
17111711 QVERIFY(QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
17121712 }
17131713
1714+ void testSectionItemCullOnFirstSectionItemTopEdge()
1715+ {
1716+ changeContentY(50);
1717+
1718+ verifyItem(0, 0., 190., false, "Agressive", false);
1719+ verifyItem(1, 190., 240., false, "Regular", false);
1720+ verifyItem(2, 430., 390., false, "Mild", false);
1721+ QCOMPARE(lvwph->m_minYExtent, 0.);
1722+ QCOMPARE(lvwph->m_clipItem->y(), 50.);
1723+ QCOMPARE(lvwph->m_clipItem->clip(), false);
1724+ QCOMPARE(lvwph->m_headerItem->y(), 0.);
1725+ QCOMPARE(lvwph->m_headerItem->height(), 50.);
1726+ QCOMPARE(lvwph->contentY(), 50.);
1727+ QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1728+ QVERIFY(QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1729+ }
1730+
1731+ void testSectionItemCullOnSecondSectionItemTopEdge()
1732+ {
1733+ QMetaObject::invokeMethod(model, "insertItem", Q_ARG(QVariant, 0), Q_ARG(QVariant, 50), Q_ARG(QVariant, "Agressive"));
1734+ QMetaObject::invokeMethod(model, "insertItem", Q_ARG(QVariant, 0), Q_ARG(QVariant, 50), Q_ARG(QVariant, "Agressive"));
1735+
1736+ changeContentY(140);
1737+
1738+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 5);
1739+ QCOMPARE(lvwph->m_firstVisibleIndex, 0);
1740+ verifyItem(0, -90., 90., true, "Agressive", true);
1741+ verifyItem(1, 0., 50., false, QString(), false);
1742+ verifyItem(2, 50., 150., false, QString(), false);
1743+ verifyItem(3, 200., 240., false, "Regular", false);
1744+ verifyItem(4, 440., 390., false, "Mild", false);
1745+ QCOMPARE(lvwph->m_minYExtent, 0.);
1746+ QCOMPARE(lvwph->m_clipItem->y(), 140.);
1747+ QCOMPARE(lvwph->m_clipItem->clip(), false);
1748+ QCOMPARE(lvwph->m_headerItem->y(), 0.);
1749+ QCOMPARE(lvwph->m_headerItem->height(), 50.);
1750+ QCOMPARE(lvwph->contentY(), 140.);
1751+ QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1752+ QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1753+ QCOMPARE(section(lvwph->m_topSectionItem), QString("Agressive"));
1754+ QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 0);
1755+ QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
1756+ }
1757+
1758+ void testMaximizeVisibleArea()
1759+ {
1760+ bool res = lvwph->maximizeVisibleArea(2);
1761+ QVERIFY(res);
1762+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1763+
1764+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 4);
1765+ QCOMPARE(lvwph->m_firstVisibleIndex, 0);
1766+ verifyItem(0, -278., 190., true, "Agressive", true);
1767+ verifyItem(1, -88., 240., false, "Regular", true);
1768+ verifyItem(2, 152, 390., false, "Mild", false);
1769+ verifyItem(3, 542, 390., true, "Bold", true);
1770+ QCOMPARE(lvwph->m_minYExtent, 0.);
1771+ QCOMPARE(lvwph->m_clipItem->y(), 328.);
1772+ QCOMPARE(lvwph->m_clipItem->clip(), false);
1773+ QCOMPARE(lvwph->m_headerItem->y(), 0.);
1774+ QCOMPARE(lvwph->m_headerItem->height(), 50.);
1775+ QCOMPARE(lvwph->contentY(), 328.);
1776+ QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1777+ QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1778+ QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));
1779+ QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 1);
1780+ QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
1781+ }
1782+
1783+ void testMaximizeVisibleAreaVisibleItems()
1784+ {
1785+ bool res = lvwph->maximizeVisibleArea(0);
1786+ QVERIFY(res);
1787+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1788+
1789+ verifyInitialTopPosition();
1790+
1791+ res = lvwph->maximizeVisibleArea(1);
1792+ QVERIFY(res);
1793+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1794+
1795+ verifyInitialTopPosition();
1796+ }
1797+
1798+ void testMaximizeVisibleAreaInvalidIndexes()
1799+ {
1800+ bool res = lvwph->maximizeVisibleArea(-1);
1801+ QVERIFY(!res);
1802+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1803+
1804+ verifyInitialTopPosition();
1805+
1806+ res = lvwph->maximizeVisibleArea(1000);
1807+ QVERIFY(!res);
1808+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1809+
1810+ verifyInitialTopPosition();
1811+
1812+ res = lvwph->maximizeVisibleArea(3);
1813+ QVERIFY(!res);
1814+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1815+
1816+ verifyInitialTopPosition();
1817+ }
1818+
1819+ void testMaximizeVisibleAreaBigElement()
1820+ {
1821+ model->setProperty(2, "size", 4000);
1822+ verifyItem(2, 480, 4040., false, "Mild", false);
1823+
1824+ bool res = lvwph->maximizeVisibleArea(2);
1825+ QVERIFY(res);
1826+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1827+
1828+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 3);
1829+ QCOMPARE(lvwph->m_firstVisibleIndex, 0);
1830+ verifyItem(0, -430., 190., true, "Agressive", true);
1831+ verifyItem(1, -240., 240., true, "Regular", true);
1832+ verifyItem(2, 0, 4040., false, "Mild", false);
1833+ QCOMPARE(lvwph->m_minYExtent, 0.);
1834+ QCOMPARE(lvwph->m_clipItem->y(), 480.);
1835+ QCOMPARE(lvwph->m_clipItem->clip(), false);
1836+ QCOMPARE(lvwph->m_headerItem->y(), 0.);
1837+ QCOMPARE(lvwph->m_headerItem->height(), 50.);
1838+ QCOMPARE(lvwph->contentY(), 480.);
1839+ QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1840+ QVERIFY(QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1841+ }
1842+
1843+ void testMaximizeVisibleAreaScrollDown()
1844+ {
1845+ changeContentY(350);
1846+ bool res = lvwph->maximizeVisibleArea(1);
1847+ QVERIFY(res);
1848+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1849+
1850+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 4);
1851+ QCOMPARE(lvwph->m_firstVisibleIndex, 0);
1852+ verifyItem(0, -190., 190., true, "Agressive", true);
1853+ verifyItem(1, 0., 240., false, "Regular", false);
1854+ verifyItem(2, 240, 390., false, "Mild", false);
1855+ verifyItem(3, 630, 390., true, "Bold", true);
1856+ QCOMPARE(lvwph->m_minYExtent, 0.);
1857+ QCOMPARE(lvwph->m_clipItem->y(), 240.);
1858+ QCOMPARE(lvwph->m_clipItem->clip(), false);
1859+ QCOMPARE(lvwph->m_headerItem->y(), 0.);
1860+ QCOMPARE(lvwph->m_headerItem->height(), 50.);
1861+ QCOMPARE(lvwph->contentY(), 240.);
1862+ QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1863+ QVERIFY(QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1864+ }
1865+
1866+ void testMaximizeVisibleAreaScrollDownBigElement()
1867+ {
1868+ model->setProperty(1, "size", 1000);
1869+ changeContentY(1150);
1870+ bool res = lvwph->maximizeVisibleArea(1);
1871+ QVERIFY(res);
1872+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1873+
1874+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 2);
1875+ QCOMPARE(lvwph->m_firstVisibleIndex, 1);
1876+ verifyItem(0, -498., 1040., false, "Regular", true);
1877+ verifyItem(1, 542., 390., true, "Mild", true);
1878+ QCOMPARE(lvwph->m_minYExtent, 1250/3.);
1879+ QCOMPARE(lvwph->m_clipItem->y(), 738.);
1880+ QCOMPARE(lvwph->m_clipItem->clip(), false);
1881+ QCOMPARE(lvwph->m_headerItem->y(), 0.);
1882+ QCOMPARE(lvwph->m_headerItem->height(), 50.);
1883+ QCOMPARE(lvwph->contentY(), 738.);
1884+ QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1885+ QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1886+ QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));
1887+ QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 1);
1888+ QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
1889+ }
1890+
1891+ void testMaximizeVisibleAreaBigElementInTheMiddle()
1892+ {
1893+ model->setProperty(1, "size", 1000);
1894+ changeContentY(650);
1895+
1896+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 2);
1897+ QCOMPARE(lvwph->m_firstVisibleIndex, 1);
1898+ verifyItem(0, -410., 1040., false, "Regular", true);
1899+ verifyItem(1, 630., 390., true, "Mild", true);
1900+ QCOMPARE(lvwph->m_minYExtent, 525.);
1901+ QCOMPARE(lvwph->m_clipItem->y(), 650.);
1902+ QCOMPARE(lvwph->m_clipItem->clip(), false);
1903+ QCOMPARE(lvwph->m_headerItem->y(), 0.);
1904+ QCOMPARE(lvwph->m_headerItem->height(), 50.);
1905+ QCOMPARE(lvwph->contentY(), 650.);
1906+ QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1907+ QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1908+ QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));
1909+ QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 1);
1910+ QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
1911+
1912+ bool res = lvwph->maximizeVisibleArea(1);
1913+ QVERIFY(res);
1914+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1915+
1916+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 2);
1917+ QCOMPARE(lvwph->m_firstVisibleIndex, 1);
1918+ verifyItem(0, -410., 1040., false, "Regular", true);
1919+ verifyItem(1, 630., 390., true, "Mild", true);
1920+ QCOMPARE(lvwph->m_minYExtent, 525.);
1921+ QCOMPARE(lvwph->m_clipItem->y(), 650.);
1922+ QCOMPARE(lvwph->m_clipItem->clip(), false);
1923+ QCOMPARE(lvwph->m_headerItem->y(), 0.);
1924+ QCOMPARE(lvwph->m_headerItem->height(), 50.);
1925+ QCOMPARE(lvwph->contentY(), 650.);
1926+ QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1927+ QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1928+ QCOMPARE(section(lvwph->m_topSectionItem), QString("Regular"));
1929+ QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 1);
1930+ QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
1931+ }
1932+
1933+ void testMaximizeVisibleAreaTopWithHalfPageHeader()
1934+ {
1935+ changeContentY(430);
1936+ changeContentY(-30);
1937+
1938+ bool res = lvwph->maximizeVisibleArea(1);
1939+ QVERIFY(res);
1940+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1941+
1942+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 4);
1943+ QCOMPARE(lvwph->m_firstVisibleIndex, 0);
1944+ verifyItem(0, -190., 190., true, "Agressive", true);
1945+ verifyItem(1, 0., 240., false, "Regular", false);
1946+ verifyItem(2, 240, 390., false, "Mild", false);
1947+ verifyItem(3, 630, 390., true, "Bold", true);
1948+ QCOMPARE(lvwph->m_minYExtent, 0.);
1949+ QCOMPARE(lvwph->m_clipItem->y(), 240.);
1950+ QCOMPARE(lvwph->m_clipItem->clip(), false);
1951+ QCOMPARE(lvwph->m_headerItem->y(), 0.);
1952+ QCOMPARE(lvwph->m_headerItem->height(), 50.);
1953+ QCOMPARE(lvwph->contentY(), 240.);
1954+ QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1955+ QVERIFY(QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1956+ }
1957+
1958+ void testMaximizeVisibleAreaBottomWithHalfPageHeader()
1959+ {
1960+ changeContentY(430);
1961+ changeContentY(-30);
1962+
1963+ bool res = lvwph->maximizeVisibleArea(3);
1964+ QVERIFY(res);
1965+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1966+
1967+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 4);
1968+ QCOMPARE(lvwph->m_firstVisibleIndex, 1);
1969+ verifyItem(0, -478., 240., true, "Regular", true);
1970+ verifyItem(1, -238., 390., false, "Mild", true);
1971+ verifyItem(2, 152, 390., false, "Bold", false);
1972+ verifyItem(3, 542, 350., true, QString(), true);
1973+ QCOMPARE(lvwph->m_minYExtent, 152.5);
1974+ QCOMPARE(lvwph->m_clipItem->y(), 718.);
1975+ QCOMPARE(lvwph->m_clipItem->clip(), false);
1976+ QCOMPARE(lvwph->m_headerItem->y(), 0.);
1977+ QCOMPARE(lvwph->m_headerItem->height(), 50.);
1978+ QCOMPARE(lvwph->contentY(), 718.);
1979+ QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
1980+ QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
1981+ QCOMPARE(section(lvwph->m_topSectionItem), QString("Mild"));
1982+ QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 2);
1983+ QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
1984+ }
1985+
1986+ void testMaximizeVisibleAreaTopSecondSectionItemStickySection()
1987+ {
1988+ QMetaObject::invokeMethod(model, "insertItem", Q_ARG(QVariant, 0), Q_ARG(QVariant, 100), Q_ARG(QVariant, "Agressive"));
1989+ changeContentY(250);
1990+ bool res = lvwph->maximizeVisibleArea(1);
1991+ QVERIFY(res);
1992+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
1993+
1994+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 4);
1995+ QCOMPARE(lvwph->m_firstVisibleIndex, 0);
1996+ verifyItem(0, -100., 140., false, "Agressive", true);
1997+ verifyItem(1, 40., 150., false, QString(), true);
1998+ verifyItem(2, 190, 240., false, "Regular", false);
1999+ verifyItem(3, 430, 390., false, "Mild", false);
2000+ QCOMPARE(lvwph->m_minYExtent, 0.);
2001+ QCOMPARE(lvwph->m_clipItem->y(), 150.);
2002+ QCOMPARE(lvwph->m_clipItem->clip(), false);
2003+ QCOMPARE(lvwph->m_headerItem->y(), 0.);
2004+ QCOMPARE(lvwph->m_headerItem->height(), 50.);
2005+ QCOMPARE(lvwph->contentY(), 150.);
2006+ QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
2007+ QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
2008+ QCOMPARE(section(lvwph->m_topSectionItem), QString("Agressive"));
2009+ QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 0);
2010+ QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
2011+
2012+ changeContentY(20);
2013+ res = lvwph->maximizeVisibleArea(1);
2014+ QVERIFY(res);
2015+ QTRY_VERIFY(!lvwph->m_contentYAnimation->isRunning());
2016+
2017+ QTRY_COMPARE(lvwph->m_visibleItems.count(), 4);
2018+ QCOMPARE(lvwph->m_firstVisibleIndex, 0);
2019+ verifyItem(0, -100., 140., false, "Agressive", true);
2020+ verifyItem(1, 40., 150., false, QString(), true);
2021+ verifyItem(2, 190, 240., false, "Regular", false);
2022+ verifyItem(3, 430, 390., false, "Mild", false);
2023+ QCOMPARE(lvwph->m_minYExtent, 0.);
2024+ QCOMPARE(lvwph->m_clipItem->y(), 150.);
2025+ QCOMPARE(lvwph->m_clipItem->clip(), false);
2026+ QCOMPARE(lvwph->m_headerItem->y(), 0.);
2027+ QCOMPARE(lvwph->m_headerItem->height(), 50.);
2028+ QCOMPARE(lvwph->contentY(), 150.);
2029+ QCOMPARE(lvwph->m_headerItemShownHeight, 0.);
2030+ QVERIFY(!QQuickItemPrivate::get(lvwph->m_topSectionItem)->culled);
2031+ QCOMPARE(section(lvwph->m_topSectionItem), QString("Agressive"));
2032+ QCOMPARE(sectionDelegateIndex(lvwph->m_topSectionItem), 0);
2033+ QCOMPARE(lvwph->m_topSectionItem->y(), 0.);
2034+ }
2035+
17142036private:
17152037 QQuickView *view;
17162038 ListViewWithPageHeader *lvwph;