<table><tr><td style="">simgunz 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/D21971">View Revision</a></tr></table><br /><div><div><p>To sum it up, if I understand correctly:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">you agree in removing <tt style="background: #ebebeb; font-size: 13px;">DefaultLogic</tt></li>
<li class="remarkup-list-item">we can remove <tt style="background: #ebebeb; font-size: 13px;">InstantPopup</tt> given that we can use <tt style="background: #ebebeb; font-size: 13px;">KActionMenu</tt> or <tt style="background: #ebebeb; font-size: 13px;">KSelectAction</tt> to provide that use case (so no need to raise exceptions)</li>
</ul>

<p>The change to <tt style="background: #ebebeb; font-size: 13px;">ToggleActionMenu::defaultAction</tt> is required, otherwise if <tt style="background: #ebebeb; font-size: 13px;">setDefaultAction</tt> is called on action1 manually and then action2 is checked, <tt style="background: #ebebeb; font-size: 13px;">defaultAction</tt> returns action1.</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>Should be probably ok, that’s just not really “implicit”.</p></blockquote>

<p>In this case <tt style="background: #ebebeb; font-size: 13px;">setDefaultAction</tt> has the meaning of <tt style="background: #ebebeb; font-size: 13px;">suggestDefaultAction</tt>, i.e., I set the <tt style="background: #ebebeb; font-size: 13px;">textSelectionAction</tt> as a default, but then if any of the other actions are checked the default action is changed.<br />
An alternative is to keep <tt style="background: #ebebeb; font-size: 13px;">suggestDefaultAction</tt> public and make <tt style="background: #ebebeb; font-size: 13px;">setDefaultAction</tt> private. (even better I would rename <tt style="background: #ebebeb; font-size: 13px;">suggestDefaultAction</tt> > <tt style="background: #ebebeb; font-size: 13px;">setDefaultAction</tt> and <tt style="background: #ebebeb; font-size: 13px;">setDefaultAction</tt> > <tt style="background: #ebebeb; font-size: 13px;">something else</tt>)</p>

<hr class="remarkup-hr" />

<p>Thinking forward, <tt style="background: #ebebeb; font-size: 13px;">ToggleActionMenu</tt> could become just a 'mode' of <tt style="background: #ebebeb; font-size: 13px;">KActionMenu</tt>. Right?</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/D21971">https://phabricator.kde.org/D21971</a></div></div><br /><div><strong>To: </strong>davidhurka<br /><strong>Cc: </strong>ngraham, simgunz, okular-devel, johnzh, andisa, siddharthmanthan, maguirre, fbampaloukas, joaonetto, kezik, tfella, darcyshen, aacid<br /></div>