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
1=== modified file 'src/Ubuntu/Components/Extras/Browser/history-domain-model.cpp'
2--- src/Ubuntu/Components/Extras/Browser/history-domain-model.cpp 2013-09-25 07:29:24 +0000
3+++ src/Ubuntu/Components/Extras/Browser/history-domain-model.cpp 2013-10-04 15:09:32 +0000
4@@ -79,16 +79,6 @@
5 return m_lastVisit;
6 }
7
8-const int HistoryDomainModel::count() const
9-{
10- return rowCount();
11-}
12-
13-const QUrl HistoryDomainModel::firstUrl() const
14-{
15- return data(index(0, 0), HistoryModel::Url).toUrl();
16-}
17-
18 bool HistoryDomainModel::filterAcceptsRow(int source_row, const QModelIndex& source_parent) const
19 {
20 if (m_domain.isEmpty()) {
21
22=== modified file 'src/Ubuntu/Components/Extras/Browser/history-domain-model.h'
23--- src/Ubuntu/Components/Extras/Browser/history-domain-model.h 2013-09-25 07:29:24 +0000
24+++ src/Ubuntu/Components/Extras/Browser/history-domain-model.h 2013-10-04 15:09:32 +0000
25@@ -23,7 +23,6 @@
26 #include <QtCore/QDateTime>
27 #include <QtCore/QSortFilterProxyModel>
28 #include <QtCore/QString>
29-#include <QtCore/QUrl>
30
31 class HistoryTimeframeModel;
32
33@@ -34,8 +33,6 @@
34 Q_PROPERTY(HistoryTimeframeModel* sourceModel READ sourceModel WRITE setSourceModel NOTIFY sourceModelChanged)
35 Q_PROPERTY(QString domain READ domain WRITE setDomain NOTIFY domainChanged)
36 Q_PROPERTY(QDateTime lastVisit READ lastVisit NOTIFY lastVisitChanged)
37- Q_PROPERTY(int count READ count)
38- Q_PROPERTY(QUrl firstUrl READ firstUrl)
39
40 public:
41 HistoryDomainModel(QObject* parent=0);
42@@ -48,10 +45,6 @@
43
44 const QDateTime& lastVisit() const;
45
46- const int count() const;
47-
48- const QUrl firstUrl() const;
49-
50 Q_SIGNALS:
51 void sourceModelChanged() const;
52 void domainChanged() const;
53
54=== modified file 'src/app/TimelineView.qml'
55--- src/app/TimelineView.qml 2013-10-03 10:49:02 +0000
56+++ src/app/TimelineView.qml 2013-10-04 15:09:32 +0000
57@@ -291,13 +291,9 @@
58 timeline.currentIndex = -1
59 } else {
60 domainsView.currentIndex = index
61+ timeline.currentIndex = timelineIndex
62 entriesView.domain = model.domain
63 entriesView.model = model.entries
64- if (model.entries.count === 1) {
65- historyEntryClicked(model.entries.firstUrl)
66- } else {
67- timeline.currentIndex = timelineIndex
68- }
69 }
70 }
71 }
72
73=== modified file 'tests/unittests/history-domain-model/tst_HistoryDomainModelTests.cpp'
74--- tests/unittests/history-domain-model/tst_HistoryDomainModelTests.cpp 2013-09-25 07:46:49 +0000
75+++ tests/unittests/history-domain-model/tst_HistoryDomainModelTests.cpp 2013-10-04 15:09:32 +0000
76@@ -105,18 +105,6 @@
77 model->setDomain("");
78 QCOMPARE(model->rowCount(), 2);
79 }
80-
81- void shouldExposeCountAndFirstUrl()
82- {
83- QCOMPARE(model->count(), 0);
84- QVERIFY(model->firstUrl().isEmpty());
85- history->add(QUrl("http://example.org"), "Example Domain", QUrl());
86- QCOMPARE(model->count(), 1);
87- QCOMPARE(model->firstUrl(), QUrl("http://example.org"));
88- history->add(QUrl("http://example.com"), "Example Domain", QUrl());
89- QCOMPARE(model->count(), 2);
90- QCOMPARE(model->firstUrl(), QUrl("http://example.com"));
91- }
92 };
93
94 QTEST_MAIN(HistoryDomainModelTests)

Subscribers

People subscribed via source and target branches

to status/vote changes: