<span class="hl kwc">virtual</span> QExplicitlySharedDataPointer<span class="hl opt"><</span>Storage<span class="hl opt">::</span>Data<span class="hl opt">></span> <span class="hl kwd">query</span><span class="hl opt">(</span>QString <span class="hl kwb">const</span> <span class="hl opt">&</span> name<span class="hl opt">)</span> <span class="hl kwb">const</span> <span class="hl opt">=</span> <span class="hl num">0</span><span class="hl opt">;</span></pre>
+ <p>The <tt>query()</tt> method returns an explicitly shared shared data pointer, which has the following advantages:</p>
+ <ul>
+ <li>The same data object is shared between multiple modules and if a module changes attributes in the data object, these
+ changes are immediately seen by any other modules;</li>
+ <li>No need to worry about ownership -- the shared data object is deleted when the last module stops using it;</li>
+ <li>The <tt>query()</tt> method can return an empty shared data pointer to indicate that no data objects with the
+ given name exist.</tt>
+ </ul>
+
+ <p>The drawback is that if a module needs a local copy of the data object, it has to use the <tt>QExplicitlySharedDataPointer::detach()</tt> method to create a deep copy of the data object.</p>
+
<p>The specification also mentions partial matches where entering "fa" would offer "facebook.com" if it exists. This could be done by
using the <tt>QCompleter</tt> class that provides auto completion in Qt widgets like <tt>QLineEdit</tt> and <tt>QComboBox</tt>. The
<tt>QCompleter<tt> class needs a <tt>QAbstractItemModel</tt> for the auto completion word list and we can provide it