Merge lp:~kalikiana/u1db-qt/no.results into lp:u1db-qt

Proposed by Cris Dywan
Status: Merged
Approved by: Cris Dywan
Approved revision: 90
Merged at revision: 89
Proposed branch: lp:~kalikiana/u1db-qt/no.results
Merge into: lp:u1db-qt
Diff against target: 50 lines (+8/-8)
2 files modified
src/index.cpp (+6/-6)
tests/tst_query.qml (+2/-2)
To merge this branch: bzr merge lp:~kalikiana/u1db-qt/no.results
Reviewer Review Type Date Requested Status
Cris Dywan Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+163335@code.launchpad.net

Commit message

Shuffle Index::setExpression to ensure Index is defined

Description of the change

Shuffle Index::setExpression to ensure Index is defined

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: Approve (continuous-integration)
Revision history for this message
Cris Dywan (kalikiana) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/index.cpp'
2--- src/index.cpp 2013-04-25 13:38:33 +0000
3+++ src/index.cpp 2013-05-10 16:08:25 +0000
4@@ -146,14 +146,14 @@
5 if (m_expression == expression)
6 return;
7
8- if (m_database)
9- {
10- m_database->putIndex(m_name, expression);
11- Q_EMIT dataInvalidated();
12- }
13-
14 m_expression = expression;
15
16+ if (m_database)
17+ {
18+ m_database->putIndex(m_name, m_expression);
19+ Q_EMIT dataInvalidated();
20+ }
21+
22 Q_EMIT expressionChanged(expression);
23 }
24
25
26=== modified file 'tests/tst_query.qml'
27--- tests/tst_query.qml 2013-05-01 23:06:01 +0000
28+++ tests/tst_query.qml 2013-05-10 16:08:25 +0000
29@@ -26,6 +26,7 @@
30
31 U1db.Database {
32 id: gents
33+ path: 'aDatabaseU'
34 }
35
36 U1db.Document {
37@@ -131,12 +132,11 @@
38 function workaroundQueryAndWait (buggyQuery) {
39 var realQuery = buggyQuery.query;
40 spyDocumentsChanged.target = buggyQuery
41- buggyQuery.query = '*'
42- buggyQuery.query = realQuery;
43 spyDocumentsChanged.wait();
44 }
45
46 function test_0_wrongUse () {
47+ workaroundQueryAndWait(wrongQuery)
48 ignoreWarning('u1db: Unexpected type QVariantMap for query')
49 wrongQuery.query = { 'name': 'Ivanka' }
50 ignoreWarning('u1db: Unexpected type QObject* for query')

Subscribers

People subscribed via source and target branches

to all changes: