Merge lp:~aacid/u1db-qt/qt54 into lp:u1db-qt

Proposed by Albert Astals Cid on 2015-02-19
Status: Merged
Approved by: Christian Dywan on 2015-02-19
Approved revision: 122
Merged at revision: 122
Proposed branch: lp:~aacid/u1db-qt/qt54
Merge into: lp:u1db-qt
Diff against target: 36 lines (+9/-0)
2 files modified
src/database.cpp (+3/-0)
src/document.cpp (+6/-0)
To merge this branch: bzr merge lp:~aacid/u1db-qt/qt54
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve on 2015-02-19
Christian Dywan 2015-02-19 Approve on 2015-02-19
Review via email: mp+250282@code.launchpad.net

Commit message

Make tests pass with Qt 5.4

To post a comment you must log in.
Christian Dywan (kalikiana) wrote :

For the record, the lack of an "else" slightly bugged me, but the fact is that an empty string can be passed to putDoc and thereby contents to delete an existing document, thus I feel it's not something to tackle here as part of the fix.

Thanks a lot!

review: Approve
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/database.cpp'
--- src/database.cpp 2014-11-07 14:30:31 +0000
+++ src/database.cpp 2015-02-19 10:38:43 +0000
@@ -626,6 +626,9 @@
626 if (!initializeIfNeeded())626 if (!initializeIfNeeded())
627 return "";627 return "";
628628
629 if (contents.canConvert<QVariantMap>())
630 contents = contents.value<QVariantMap>();
631
629 ScopedTransaction t(m_db);632 ScopedTransaction t(m_db);
630633
631 QString newOrEmptyDocId(docId);634 QString newOrEmptyDocId(docId);
632635
=== modified file 'src/document.cpp'
--- src/document.cpp 2013-04-23 15:17:24 +0000
+++ src/document.cpp 2015-02-19 10:38:43 +0000
@@ -172,6 +172,9 @@
172void172void
173Document::setDefaults(QVariant defaults)173Document::setDefaults(QVariant defaults)
174{174{
175 if (defaults.canConvert<QVariantMap>())
176 defaults = defaults.value<QVariantMap>();
177
175 if (m_defaults == defaults)178 if (m_defaults == defaults)
176 return;179 return;
177180
@@ -195,6 +198,9 @@
195void198void
196Document::setContents(QVariant contents)199Document::setContents(QVariant contents)
197{200{
201 if (contents.canConvert<QVariantMap>())
202 contents = contents.value<QVariantMap>();
203
198 if (m_contents == contents)204 if (m_contents == contents)
199 return;205 return;
200206

Subscribers

People subscribed via source and target branches

to all changes: