<table><tr><td style="">dfaure 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/D10405" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>Yes. Well, you can't add new virtual methods, but these two already exist:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">virtual void handleInitError(int kioErrorCode, const QString &errorMsg);
virtual void handleError(KJob *job);</pre></div>

<p>I think you should be able to (ab)use the first one for this purpose.</p>

<p>(It's called "init" as opposed to "when running a kjob, later", with the assumption that these are the only two cases that can happen but it really means "when we don't have a kjob"; should have been called something more generic, I see now)</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D10405" rel="noreferrer">https://phabricator.kde.org/D10405</a></div></div><br /><div><strong>To: </strong>hein, dfaure, davidedmundson, mart, ngraham<br /><strong>Cc: </strong>Frameworks, michaelh<br /></div>