<table><tr><td style="">rjvbb 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/D7995" rel="noreferrer">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>on a more serious note: your crash probably arises from this being bound to the AFMP lifetime - it won't get disconnected when the watcher gets killed. You probably want to use <tt style="background: #ebebeb; font-size: 13px;">watcher</tt> instead of <tt style="background: #ebebeb; font-size: 13px;">q</tt> as third param here.</p></blockquote>

<p>All this discussion made me forget why I created a dedicated class in the first place and think could do away with the signal/slot mechanism.</p>

<p>Correct me if I'm wrong, but that's probably not true: the dirwatcher can be fed from the main thread so we either need a locking mechanism or else we need to feed it only from the main thread.</p>

<p>Using <tt style="background: #ebebeb; font-size: 13px;">watcher</tt> as the target object should also prevent it from receiving signals after being deleted. I should have seen that myself (and it was probably a bug), doh.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D7995" rel="noreferrer">https://phabricator.kde.org/D7995</a></div></div><br /><div><strong>To: </strong>rjvbb, KDevelop, mwolff<br /><strong>Cc: </strong>aaronpuchert, arrowdodger, kfunk, dfaure, mwolff, brauch, kdevelop-devel, njensen, geetamc, Pilzschaf, akshaydeo, surgenight<br /></div>