Wireshark mailing list archives

Re: Qt translations when refactoring


From: Peter Wu <peter () lekensteyn nl>
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 () wireshark org> 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
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: