Wireshark-dev: Re: [Wireshark-dev] Qt translations when refactoring
From: Peter Wu <peter@xxxxxxxxxxxxx>
Date: Sun, 16 Jul 2017 11:18:00 +0200
On Sat, Jul 15, 2017 at 06:09:55PM -0700, Guy Harris wrote:
> On Jul 15, 2017, at 2:09 PM, Michael Mann via Wireshark-dev <wireshark-dev@xxxxxxxxxxxxx> wrote:
> 
> > I'm working on refactoring the Decode As dialog into using
> > model/view functionality (https://code.wireshark.org/review/22625).
> > The model appears to be "forced" to provide the names of the column
> > headers that are part of the "table" in the Decode As dialog.
> > Currently the names of the column headers are stored in the .ui
> > file, but with the model the data of the .ui file isn't used.  Is
> > there any reason to keep the column info in the .ui file?
> 
> None that I can think of.

As noted in the review comments, all of these column fields must be
removed when Widgets are changed into Views. See
https://doc.qt.io/qt-4.8/designer-ui-file-format.html, the column
element in specific to the Widget type:

    <xs:complexType name="Widget">
     ...
      <xs:element name="column" type="Column"  minOccurs="0" maxOccurs="unbounded" />

Keep in mind that when moving the columns to the code, you must add tr()
calls to keep strings translatable.
-- 
Kind regards,
Peter Wu
https://lekensteyn.nl