From kde-devel Wed Mar 26 14:28:54 2014 From: "Denis Steckelmacher" Date: Wed, 26 Mar 2014 14:28:54 +0000 To: kde-devel Subject: Re: Review Request 117085: Add user data in Baloo::Term Message-Id: <20140326142854.25180.24648 () probe ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-devel&m=139584421117069 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============6910172205448297676==" --===============6910172205448297676== Content-Type: multipart/alternative; boundary="===============8098852708270161355==" --===============8098852708270161355== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117085/ ----------------------------------------------------------- (Updated March 26, 2014, 2:28 p.m.) Status ------ This change has been marked as submitted. Review request for Baloo. Repository: baloo Description ------- This patch adds two methods in Baloo::Term: setUserData and userData. They can be used to associate arbitrary QVariants to terms. The data is not serialized to JSON nor read back when the term is deserialized. The primary use of these two methods is to allow the user query parser to store the position and length of terms. This information is then read back by the query builder widget that uses it to syntax-highlight the queries. Other applications may want to associate data with terms, for instance to pass hints to the search stores. Diffs ----- src/core/term.cpp ec98c4a src/core/term.h 23df3f1 Diff: https://git.reviewboard.kde.org/r/117085/diff/ Testing ------- The code compiles and all the unit tests of Baloo pass ("make test" in the build directory lists 12 passing tests) Thanks, Denis Steckelmacher --===============8098852708270161355== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit
This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117085/

This change has been marked as submitted.


Review request for Baloo.
By Denis Steckelmacher.

Updated March 26, 2014, 2:28 p.m.

Repository: baloo

Description

This patch adds two methods in Baloo::Term: setUserData and userData. They can be used to associate arbitrary QVariants to terms. The data is not serialized to JSON nor read back when the term is deserialized.

The primary use of these two methods is to allow the user query parser to store the position and length of terms. This information is then read back by the query builder widget that uses it to syntax-highlight the queries. Other applications may want to associate data with terms, for instance to pass hints to the search stores.

Testing

The code compiles and all the unit tests of Baloo pass ("make test" in the build directory lists 12 passing tests)

Diffs

  • src/core/term.cpp (ec98c4a)
  • src/core/term.h (23df3f1)

View Diff

--===============8098852708270161355==-- --===============6910172205448297676== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --===============6910172205448297676==--