← Back to team overview

uonedb-qt team mailing list archive

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

 

Christian Dywan has proposed merging lp:~kalikiana/u1db-qt/range2 into lp:u1db-qt.

Commit message:
Remove range property for now, it's not implemented

Requested reviews:
  Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot): continuous-integration
  U1DB Qt developers (uonedb-qt)

For more details, see:
https://code.launchpad.net/~kalikiana/u1db-qt/range2/+merge/160357

Remove range property for now, it's not implemented
-- 
https://code.launchpad.net/~kalikiana/u1db-qt/range2/+merge/160357
Your team U1DB Qt developers is requested to review the proposed merge of lp:~kalikiana/u1db-qt/range2 into lp:u1db-qt.
=== modified file 'src/query.cpp'
--- src/query.cpp	2013-04-23 12:50:30 +0000
+++ src/query.cpp	2013-04-23 12:52:34 +0000
@@ -36,8 +36,7 @@
     \inmodule U1db
     \ingroup modules
 
-    \brief The Query class generates a filtered list of documents based on either
-    a query or a range, and using the given Index.
+    \brief The Query class generates a filtered list of documents based on a query using the given Index.
 
     Query can be used as a QAbstractListModel, delegates will then have access to \a docId and \a contents
     analogous to the properties of Document.
@@ -278,8 +277,8 @@
 }
 
 /*!
-    Sets the Index to use. The index must have a valid name and index expressions,
-    then either a range or query can be set.
+    Sets the Index to use. The index must have a valid name and index expressions.
+    If no query is set, the default is all results of the index.
  */
 void
 Query::setIndex(Index* index)
@@ -312,8 +311,8 @@
 
 
 /*!
-    Sets a range, such as ['match', false].
-    Only one of query and range is used - setting range unsets the query.
+    Sets a query, in one of the allowed forms such as 'value', ['value'] or [{'sub-field': 'value'].
+    The default is equivalent to '*'.
  */
 void
 Query::setQuery(QVariant query)
@@ -321,14 +320,12 @@
     if (m_query == query)
         return;
 
-    if (m_range.isValid())
-        m_range = QVariant();
-
     m_query = query;
     Q_EMIT queryChanged(query);
     onDataInvalidated();
 }
 
+<<<<<<< TREE
 QVariant
 Query::getRange()
 {
@@ -359,6 +356,8 @@
     return m_results;
 }
 
+=======
+>>>>>>> MERGE-SOURCE
 QT_END_NAMESPACE_U1DB
 
 #include "moc_query.cpp"

=== modified file 'src/query.h'
--- src/query.h	2013-04-22 13:26:42 +0000
+++ src/query.h	2013-04-23 12:52:34 +0000
@@ -35,8 +35,11 @@
     Q_PROPERTY(QT_PREPEND_NAMESPACE_U1DB(Index*) index READ getIndex WRITE setIndex NOTIFY indexChanged)
 #endif
     Q_PROPERTY(QVariant query READ getQuery WRITE setQuery NOTIFY queryChanged)
+<<<<<<< TREE
     Q_PROPERTY(QVariant range READ getRange WRITE setRange NOTIFY rangeChanged)
     Q_PROPERTY(QList<QVariant> results READ getResults NOTIFY resultsChanged)
+=======
+>>>>>>> MERGE-SOURCE
 public:
     Query(QObject* parent = 0);
     ~Query() { }
@@ -50,9 +53,12 @@
     void setIndex(Index* index);
     QVariant getQuery();
     void setQuery(QVariant query);
+<<<<<<< TREE
     QVariant getRange();
     void setRange(QVariant range);
     Q_INVOKABLE QList<QVariant> getResults();
+=======
+>>>>>>> MERGE-SOURCE
 
     void generateQueryResults();
     bool iterateQueryList(QVariant query, QString field, QString value);
@@ -63,14 +69,16 @@
 Q_SIGNALS:
     void indexChanged(Index* index);
     void queryChanged(QVariant query);
+<<<<<<< TREE
     void rangeChanged(QVariant range);
     void resultsChanged(QList<QVariant> results);
+=======
+>>>>>>> MERGE-SOURCE
 private:
     Q_DISABLE_COPY(Query)
     Index* m_index;
     QList<QVariant> m_results;
     QVariant m_query;
-    QVariant m_range;
 
     void onDataInvalidated();
 };


Follow ups