<table><tr><td style="">poboiko created this revision.<br />poboiko added a reviewer: dvratil.<br />poboiko requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D29073">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Link creation was present in three places:</p>

<ol class="remarkup-list">
<li class="remarkup-list-item">Inside template <tt style="background: #ebebeb; font-size: 13px;">pagetemplate.html</tt></li>
<li class="remarkup-list-item">Inside <tt style="background: #ebebeb; font-size: 13px;">KJotsLinkDialog</tt>, the dialog to add links</li>
<li class="remarkup-list-item">Inside <tt style="background: #ebebeb; font-size: 13px;">KJotsBookmarks</tt></li>
</ol>

<p>Unify it inside <tt style="background: #ebebeb; font-size: 13px;">KJotsModel</tt>: provide a <tt style="background: #ebebeb; font-size: 13px;">UrlRole</tt> for <tt style="background: #ebebeb; font-size: 13px;">QModelIndex::data</tt>.<br />
Provide an <tt style="background: #ebebeb; font-size: 13px;">url</tt> property for <tt style="background: #ebebeb; font-size: 13px;">KJotsEntity</tt>, so it could also be used in templates.</p>

<p>Link handling was also duplicated in two places:</p>

<ol class="remarkup-list">
<li class="remarkup-list-item">Inside <tt style="background: #ebebeb; font-size: 13px;">KJotsBookmarks</tt></li>
<li class="remarkup-list-item">Inside <tt style="background: #ebebeb; font-size: 13px;">KJotsBrowser</tt></li>
</ol>

<p>Unify it too, so both classes emit a signal with <tt style="background: #ebebeb; font-size: 13px;">QUrl</tt> property, which is then caught by <tt style="background: #ebebeb; font-size: 13px;">KJotsWidget</tt><br />
(which actually gets the job done)</p></div></div><br /><div><strong>TEST PLAN</strong><div><ol class="remarkup-list">
<li class="remarkup-list-item">Navigation in the "Browser mode" works, clicking at "books", "pages" and "page headers" (which should switch to edit mode)</li>
<li class="remarkup-list-item">Bookmarks also work, they are created with fancy icons, and navigation works (both with "pages" and "books")</li>
<li class="remarkup-list-item">Link dialog creates proper links pointing where they should</li>
<li class="remarkup-list-item">External links are being opened by an external web browser</li>
</ol></div></div><br /><div><strong>BRANCH</strong><div><div>fix-bookmarks (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D29073">https://phabricator.kde.org/D29073</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/kjotsbookmarks.cpp<br />
src/kjotsbookmarks.h<br />
src/kjotsbrowser.cpp<br />
src/kjotsbrowser.h<br />
src/kjotslinkdialog.cpp<br />
src/kjotsmodel.cpp<br />
src/kjotsmodel.h<br />
src/kjotswidget.cpp<br />
src/kjotswidget.h<br />
themes/default/pagetemplate.html</div></div></div><br /><div><strong>To: </strong>poboiko, dvratil<br /><strong>Cc: </strong>kde-pim<br /></div>