D25420: [KFileWidget] Avoid calling slotOk right after the url changed

David Faure noreply at phabricator.kde.org
Wed Dec 4 00:06:25 GMT 2019


dfaure accepted this revision.
dfaure added a comment.
This revision is now accepted and ready to land.


  No reconstructing-call-history-via-a-boolean-member, I like this! :-)
  
  Thanks for your tests with this solution.

INLINE COMMENTS

> kdiroperator.cpp:1446
> +                emit keyEnterReturnPressed();
> +                evt->accept();
> +            }

I expected a "return true" after this line.

Otherwise the event, while marked as accepted, is still sent to the target widget, the view(). Well, I guess it doesn't do anything when there's no current index, but still, we handled the event, no point in sending it to the view, right?

accept() only stops propagation to parent widgets.
We need "return true" to stop the current "send event to the view" operation.

But yeah, I suppose it works either way, so I'm approving as is.

REPOSITORY
  R241 KIO

BRANCH
  arcpatch-D25420

REVISION DETAIL
  https://phabricator.kde.org/D25420

To: meven, #frameworks, ngraham, elvisangelaccio, dfaure
Cc: ahmadsamir, feverfew, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191204/b842652b/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list