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

Ahmad Samir noreply at phabricator.kde.org
Tue Dec 3 16:36:01 GMT 2019


ahmadsamir added a comment.


  In D25420#571483 <https://phabricator.kde.org/D25420#571483>, @dfaure wrote:
  
  > So after a double-click, activated() is emitted, the boolean is set, and much later some Key_Enter event that should have been emitted, gets eaten?
  >
  > Wouldn't an event filter on the QAbstractItemView solve your problem? Then you can catch the Return key before QAbstractItemView sees it, and call _k_slotActivated yourself, and decide whether to emit returnPressed as well?
  >
  > I hope this makes sense, if not I can dig further later, I'm in a bit of a rush right now.
  >
  > I'm actually wondering *when* we want KDirOperator to emit returnPressed at all. When the current index isn't a directory, I assume?
  
  
  Digging around in git history I found this:
  https://cgit.kde.org/kdelibs.git/commit/?id=81e69464329ddad59600dde5a1a27f58a0b91188
  with a detailed/great commit message.
  
  I think there should be a set of rules for kfilewidget in the API docs, so that future behaviour changes in this, rather tricky, area are aware of the various "requirements" involved.
  
  And, of course, more unit tests like the one in D19824 <https://phabricator.kde.org/D19824>... :D

REPOSITORY
  R241 KIO

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/20191203/90d3bc00/attachment.html>


More information about the Kde-frameworks-devel mailing list