Merge lp:~kalikiana/u1db-qt/range2 into lp:u1db-qt

Proposed by Cris Dywan
Status: Superseded
Proposed branch: lp:~kalikiana/u1db-qt/range2
Merge into: lp:u1db-qt
Diff against target: 109 lines (+5/-38)
2 files modified
src/query.cpp (+5/-33)
src/query.h (+0/-5)
To merge this branch: bzr merge lp:~kalikiana/u1db-qt/range2
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Needs Fixing
U1DB Qt developers Pending
Review via email: mp+160353@code.launchpad.net

This proposal has been superseded by a proposal from 2013-04-23.

Commit message

Remove range property for now, it's not implemented'

Description of the change

Remove range property for now, it's not implemented'

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
lp:~kalikiana/u1db-qt/range2 updated
81. By Cris Dywan

Fill in documentation for remaining C++ class methods

82. By Cris Dywan

Rename the overview - qdoc expects a page titled All Modules

83. By Cris Dywan

Fix un-closed comment in concepts.qdoc

84. By Cris Dywan

Remove redundant documentCount variable

85. By Cris Dywan

Don't bother calling 'assistant', leave it to install

86. By Cris Dywan

Remove dataIndexed and documentsAvailable signals

87. By Cris Dywan

Sort out documentation of signals and properties

88. By Cris Dywan

Merge 'Initial ground work splitting off query tests'

89. By Cris Dywan

Document Query::results property

90. By Cris Dywan

Mark up Javascript-only snippets as \code not \qml

91. By Cris Dywan

Work-around to make build fail if qdoc warns

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/query.cpp'
2--- src/query.cpp 2013-04-22 13:19:33 +0000
3+++ src/query.cpp 2013-04-23 12:44:24 +0000
4@@ -36,8 +36,7 @@
5 \inmodule U1db
6 \ingroup modules
7
8- \brief The Query class generates a filtered list of documents based on either
9- a query or a range, and using the given Index.
10+ \brief The Query class generates a filtered list of documents based on a query using the given Index.
11
12 Query can be used as a QAbstractListModel, delegates will then have access to \a docId and \a contents
13 analogous to the properties of Document.
14@@ -287,8 +286,8 @@
15 }
16
17 /*!
18- Sets the Index to use. The index must have a valid name and index expressions,
19- then either a range or query can be set.
20+ Sets the Index to use. The index must have a valid name and index expressions.
21+ If no query is set, the default is all results of the index.
22 */
23 void
24 Query::setIndex(Index* index)
25@@ -321,8 +320,8 @@
26
27
28 /*!
29- Sets a range, such as ['match', false].
30- Only one of query and range is used - setting range unsets the query.
31+ Sets a query, in one of the allowed forms such as 'value', ['value'] or [{'sub-field': 'value'].
32+ The default is equivalent to '*'.
33 */
34 void
35 Query::setQuery(QVariant query)
36@@ -330,38 +329,11 @@
37 if (m_query == query)
38 return;
39
40- if (m_range.isValid())
41- m_range = QVariant();
42-
43 m_query = query;
44 Q_EMIT queryChanged(query);
45 onDataInvalidated();
46 }
47
48-QVariant
49-Query::getRange()
50-{
51- return m_range;
52-}
53-
54-/*!
55- Sets a range, such as [['a', 'b'], ['*']].
56- Only one of query and range is used - setting range unsets the query.
57- */
58-void
59-Query::setRange(QVariant range)
60-{
61- if (m_range == range)
62- return;
63-
64- if (m_query.isValid())
65- m_query = QVariant();
66-
67- m_range = range;
68- Q_EMIT rangeChanged(range);
69- onDataInvalidated();
70-}
71-
72 QT_END_NAMESPACE_U1DB
73
74 #include "moc_query.cpp"
75
76=== modified file 'src/query.h'
77--- src/query.h 2013-04-19 11:19:43 +0000
78+++ src/query.h 2013-04-23 12:44:24 +0000
79@@ -35,7 +35,6 @@
80 Q_PROPERTY(QT_PREPEND_NAMESPACE_U1DB(Index*) index READ getIndex WRITE setIndex NOTIFY indexChanged)
81 #endif
82 Q_PROPERTY(QVariant query READ getQuery WRITE setQuery NOTIFY queryChanged)
83- Q_PROPERTY(QVariant range READ getRange WRITE setRange NOTIFY rangeChanged)
84 public:
85 Query(QObject* parent = 0);
86 ~Query() { }
87@@ -49,8 +48,6 @@
88 void setIndex(Index* index);
89 QVariant getQuery();
90 void setQuery(QVariant query);
91- QVariant getRange();
92- void setRange(QVariant range);
93
94 void generateQueryResults();
95 bool iterateQueryList(QVariant query, QString field, QString value);
96@@ -61,13 +58,11 @@
97 Q_SIGNALS:
98 void indexChanged(Index* index);
99 void queryChanged(QVariant query);
100- void rangeChanged(QVariant range);
101 private:
102 Q_DISABLE_COPY(Query)
103 Index* m_index;
104 QHash<int, QVariantMap> m_hash;
105 QVariant m_query;
106- QVariant m_range;
107
108 void onDataInvalidated();
109 };

Subscribers

People subscribed via source and target branches

to all changes: