<table><tr><td style="">aacid added a comment.
</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/D7671" rel="noreferrer">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #8C98B8;
color: #6B748C;
font-style: italic;
margin: 4px 0 12px 0;
padding: 8px 12px;
background-color: #F8F9FC;">
<div style="font-style: normal;
padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D7671#143360" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">D7671#143360</a>, <a href="https://phabricator.kde.org/p/rkflx/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;" rel="noreferrer">@rkflx</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><blockquote style="border-left: 3px solid #8C98B8;
color: #6B748C;
font-style: italic;
margin: 4px 0 12px 0;
padding: 8px 12px;
background-color: #F8F9FC;">
<div style="font-style: normal;
padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D7671#143117" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">D7671#143117</a>, <a href="https://phabricator.kde.org/p/aacid/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;" rel="noreferrer">@aacid</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><p>It was added to make this work, and it did work at some point, i don't add code for nothing ;)</p></div>
</blockquote>
<p>Of course, and your code still works today: it fixes the rm/touch case (with <a href="https://phabricator.kde.org/D7671" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">D7671</a> not applied yet). I guess for Kate it broke in 2012 (your patch is from 2008) with the introduction of KSaveFile in <a href="https://phabricator.kde.org/R40:a188aa837b7e609a1d555414603fb8d2ed7d70fa" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">R40:a188aa8</a>. My question was more about why you went for the directory approach instead of just listening for <tt style="background: #ebebeb; font-size: 13px;">KDirWatch::created</tt>.</p></div>
</blockquote>
<p>I don't know, that was long time ago.</p>
<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>Concerning <a href="https://phabricator.kde.org/R223:f93ccd7923491c6b1412ba5cb1fe0711e44496d8" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">f93ccd7</a>, I find the part re-adding the watch for removed files is also not needed with <a href="https://phabricator.kde.org/D7671" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">D7671</a>. Will do some more testing over the weekend and maybe prepare a patch. (You can tell I'm not a fan of encoding state in bools with updates spread over the codebase. As far as I can see, in conjunction with the directory watch this led to several bugs, e.g. 384185, 234139, 321880 and maybe more.)</p></blockquote>
<p>Because there's a much better way of encoding state that using variables that encode state, right?</p>
<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>Here's my suggestion going forward:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">Independently from Okular's case, evaluate accuracy of KDirWatch autotests and docs regarding "move/rename" (currently not mentioned at all, thus to be considered undefined behaviour…) as well as directory operations in general, fix potential code bugs and doc confusions</li>
<li class="remarkup-list-item">Agree to accept <a href="https://phabricator.kde.org/D7671" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">D7671</a> in any case (reasons: code is simpler and less error-prone, fixes the issue even for users on LTS distros with old KF5 libs)</li>
<li class="remarkup-list-item">Try to revert <a href="https://phabricator.kde.org/R223:f93ccd7923491c6b1412ba5cb1fe0711e44496d8" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">f93ccd7</a> including later fixups
<br /><br />
TL;DR: Do both: Fix KDirWatch and apply <a href="https://phabricator.kde.org/D7671" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">D7671</a>.</li>
</ul></blockquote>
<p>I'm hesitant of applying something that just workarounds a library not working.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R223 Okular</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D7671" rel="noreferrer">https://phabricator.kde.org/D7671</a></div></div><br /><div><strong>To: </strong>progwolff, aacid<br /><strong>Cc: </strong>sander, rkflx, Okular, aacid<br /></div>