Merge lp:~osomon/webbrowser-app/expand-all-domains-consistently into lp:webbrowser-app

Proposed by Olivier Tilloy
Status: Merged
Approved by: Günter Schwann
Approved revision: 370
Merged at revision: 373
Proposed branch: lp:~osomon/webbrowser-app/expand-all-domains-consistently
Merge into: lp:webbrowser-app
Diff against target: 94 lines (+1/-34)
4 files modified
src/Ubuntu/Components/Extras/Browser/history-domain-model.cpp (+0/-10)
src/Ubuntu/Components/Extras/Browser/history-domain-model.h (+0/-7)
src/app/TimelineView.qml (+1/-5)
tests/unittests/history-domain-model/tst_HistoryDomainModelTests.cpp (+0/-12)
To merge this branch: bzr merge lp:~osomon/webbrowser-app/expand-all-domains-consistently
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Ubuntu Phablet Team Pending
Review via email: mp+189342@code.launchpad.net

Commit message

Reverted revision 343: now all domains expand consistently in the activity view, even if they contain only one entry.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/Ubuntu/Components/Extras/Browser/history-domain-model.cpp'
--- src/Ubuntu/Components/Extras/Browser/history-domain-model.cpp 2013-09-25 07:29:24 +0000
+++ src/Ubuntu/Components/Extras/Browser/history-domain-model.cpp 2013-10-04 15:09:32 +0000
@@ -79,16 +79,6 @@
79 return m_lastVisit;79 return m_lastVisit;
80}80}
8181
82const int HistoryDomainModel::count() const
83{
84 return rowCount();
85}
86
87const QUrl HistoryDomainModel::firstUrl() const
88{
89 return data(index(0, 0), HistoryModel::Url).toUrl();
90}
91
92bool HistoryDomainModel::filterAcceptsRow(int source_row, const QModelIndex& source_parent) const82bool HistoryDomainModel::filterAcceptsRow(int source_row, const QModelIndex& source_parent) const
93{83{
94 if (m_domain.isEmpty()) {84 if (m_domain.isEmpty()) {
9585
=== modified file 'src/Ubuntu/Components/Extras/Browser/history-domain-model.h'
--- src/Ubuntu/Components/Extras/Browser/history-domain-model.h 2013-09-25 07:29:24 +0000
+++ src/Ubuntu/Components/Extras/Browser/history-domain-model.h 2013-10-04 15:09:32 +0000
@@ -23,7 +23,6 @@
23#include <QtCore/QDateTime>23#include <QtCore/QDateTime>
24#include <QtCore/QSortFilterProxyModel>24#include <QtCore/QSortFilterProxyModel>
25#include <QtCore/QString>25#include <QtCore/QString>
26#include <QtCore/QUrl>
2726
28class HistoryTimeframeModel;27class HistoryTimeframeModel;
2928
@@ -34,8 +33,6 @@
34 Q_PROPERTY(HistoryTimeframeModel* sourceModel READ sourceModel WRITE setSourceModel NOTIFY sourceModelChanged)33 Q_PROPERTY(HistoryTimeframeModel* sourceModel READ sourceModel WRITE setSourceModel NOTIFY sourceModelChanged)
35 Q_PROPERTY(QString domain READ domain WRITE setDomain NOTIFY domainChanged)34 Q_PROPERTY(QString domain READ domain WRITE setDomain NOTIFY domainChanged)
36 Q_PROPERTY(QDateTime lastVisit READ lastVisit NOTIFY lastVisitChanged)35 Q_PROPERTY(QDateTime lastVisit READ lastVisit NOTIFY lastVisitChanged)
37 Q_PROPERTY(int count READ count)
38 Q_PROPERTY(QUrl firstUrl READ firstUrl)
3936
40public:37public:
41 HistoryDomainModel(QObject* parent=0);38 HistoryDomainModel(QObject* parent=0);
@@ -48,10 +45,6 @@
4845
49 const QDateTime& lastVisit() const;46 const QDateTime& lastVisit() const;
5047
51 const int count() const;
52
53 const QUrl firstUrl() const;
54
55Q_SIGNALS:48Q_SIGNALS:
56 void sourceModelChanged() const;49 void sourceModelChanged() const;
57 void domainChanged() const;50 void domainChanged() const;
5851
=== modified file 'src/app/TimelineView.qml'
--- src/app/TimelineView.qml 2013-10-03 10:49:02 +0000
+++ src/app/TimelineView.qml 2013-10-04 15:09:32 +0000
@@ -291,13 +291,9 @@
291 timeline.currentIndex = -1291 timeline.currentIndex = -1
292 } else {292 } else {
293 domainsView.currentIndex = index293 domainsView.currentIndex = index
294 timeline.currentIndex = timelineIndex
294 entriesView.domain = model.domain295 entriesView.domain = model.domain
295 entriesView.model = model.entries296 entriesView.model = model.entries
296 if (model.entries.count === 1) {
297 historyEntryClicked(model.entries.firstUrl)
298 } else {
299 timeline.currentIndex = timelineIndex
300 }
301 }297 }
302 }298 }
303 }299 }
304300
=== modified file 'tests/unittests/history-domain-model/tst_HistoryDomainModelTests.cpp'
--- tests/unittests/history-domain-model/tst_HistoryDomainModelTests.cpp 2013-09-25 07:46:49 +0000
+++ tests/unittests/history-domain-model/tst_HistoryDomainModelTests.cpp 2013-10-04 15:09:32 +0000
@@ -105,18 +105,6 @@
105 model->setDomain("");105 model->setDomain("");
106 QCOMPARE(model->rowCount(), 2);106 QCOMPARE(model->rowCount(), 2);
107 }107 }
108
109 void shouldExposeCountAndFirstUrl()
110 {
111 QCOMPARE(model->count(), 0);
112 QVERIFY(model->firstUrl().isEmpty());
113 history->add(QUrl("http://example.org"), "Example Domain", QUrl());
114 QCOMPARE(model->count(), 1);
115 QCOMPARE(model->firstUrl(), QUrl("http://example.org"));
116 history->add(QUrl("http://example.com"), "Example Domain", QUrl());
117 QCOMPARE(model->count(), 2);
118 QCOMPARE(model->firstUrl(), QUrl("http://example.com"));
119 }
120};108};
121109
122QTEST_MAIN(HistoryDomainModelTests)110QTEST_MAIN(HistoryDomainModelTests)

Subscribers

People subscribed via source and target branches

to status/vote changes: