<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/D7179" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>So removing the signal blocker indeed leads to MainWindow::activateView() being called twice on Linux (when activating a different view with the sortedDocumentList menu):</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);">void Sublime::Container::setCurrentWidget(QWidget *) widget= KTextEditor::ViewPrivate(0x2ccec10)
void Sublime::MainWindow::activateView(Sublime::View *, bool) view= KDevelop::TextView(0x2c63190) focus= true
void Sublime::Container::setCurrentWidget(QWidget *) widget= KTextEditor::ViewPrivate(0x2ccec10)
void Sublime::MainWindow::activateView(Sublime::View *, bool) view= KDevelop::TextView(0x2c63190) focus= true
void Sublime::Container::setCurrentWidget(QWidget *) widget= KTextEditor::ViewPrivate(0x2ccec10)</pre></div>

<p>So the signal blocker cannot be removed on Linux at least.</p>

<p>I wonder though, isn't there a risk anyway of these functions calling each other in a loop? Couldn't both functions just check if the given widget is already current (or given view is already the active one) and return immediately if that's the case?<br />
Removing the signal blocker would still lead to activeView() being called twice in that case, but at least the 2nd invocation shouldn't do anything in that case.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R33 KDevPlatform</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D7179" rel="noreferrer">https://phabricator.kde.org/D7179</a></div></div><br /><div><strong>To: </strong>rjvbb, KDevelop<br /><strong>Cc: </strong>kfunk, kdevelop-devel, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger<br /></div>