[Differential] [Commented On] D4287: File templates assistant: focus first edit field on switch to new page

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Thu Jan 26 15:16:53 UTC 2017


kossebau added inline comments.

INLINE COMMENTS

> arrowdodger wrote in templateclassassistant.cpp:519
> Can't we just do `currentPage()->setFocusToFirstEditWidget()` after all those `if`s?

Good point, I forgot to ask some questions I have about this:

1. The repeated explicit calls could be avoided by making `setFocusToFirstEditWidget()` a part of the interface. What would be the best (KDevelop) style here: a) add an abstract interface which all pages would optionally implement and which would be queried here first or b) add another subclass with that abstract method added which all pages need to subclass from?
2. Would it make more sense to set the first edit widget as focus proxy to the page container? So there is no need for a special call with a given semantic `setFocusToFirstEditWidget()` here we just need to call setFocus() on the page? That approach would also mean any click in the page background would set the keyboard focus to the first edit widget, is that expected?

REPOSITORY
  R33 KDevPlatform

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: kossebau, #kdevelop
Cc: arrowdodger, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170126/a3d3def3/attachment.html>


More information about the KDevelop-devel mailing list