lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bd8696df-72b7-fb92-d53a-edff715fe5a0@infradead.org>
Date:   Sat, 29 Aug 2020 21:54:20 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Masahiro Yamada <masahiroy@...nel.org>,
        linux-kbuild@...r.kernel.org
Cc:     Mauro Carvalho Chehab <mchehab@...nel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 06/11] kconfig: qconf: allow to edit "int", "hex",
 "string" menus in-place

On 8/29/20 1:14 AM, Masahiro Yamada wrote:
> Previously, when you double-clicked the "int", "hex", or "string" menus,
> a line-edit gadget showed up to allow you to input the value, which
> looked clumsy.
> 
> Also, it was buggy; the editor opened even if the config option was not
> editable. For example, just try to double-click CC_VERSION_TEXT, which
> has no prompt.
> 
> This commit sub-classes QStyleItemDelegate to allow users to edit
> "int", "hex", "string" menus in-place. Just double-click (or press
> the F2 key) in the data column. Then, an editor widget is placed on
> top of the item view.

The F2 key doesn't work for me. I guess that's a desktop environment
issue (I am using Xfce).

> The two methods are overridden:
> 
>  createEditor - process only when the data column is being accessed
>  and the menu is visible. Otherwise, return nullptr to disallow editing.
> 
>  setModelData - take the new data from the editor, and set it to the
>  addressed symbol. If it was successful, update all the list windows.
>  Otherwise, (the reason for the failure is possibly the input data was
>  out of range), set the old value back to the editor.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
> ---
> 
>  scripts/kconfig/qconf.cc | 93 ++++++++++++++++++++++++++++++++--------
>  scripts/kconfig/qconf.h  | 15 +++++++
>  2 files changed, 91 insertions(+), 17 deletions(-)
> 


-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ