[Freeciv-tickets] [freeciv] #45892: Ruledit: Counters tab

アーカイブの一覧に戻る
OSDN Ticket System norep****@osdn*****
Sun Jan 15 23:40:10 JST 2023


#45892: Ruledit: Counters tab

  Open Date: 2022-10-17 20:20
Last Update: 2023-01-15 23:40

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/45892
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45892

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2023-01-15 23:40 Updated by: lachu

Comment:

Reply To cazfi
In general the code looks promising already.

- Meson build is broken; update meson.build about the new files
- QRegExp is deprecated, and available to Qt6-client only via Qt5compat: https://doc.qt.io/qt-6/qregexp.html
- As there are new translatable strings in new files, update translations/ruledit/POTFILES.in
- Only "Add" and "Delete" would need to be limited to experimental builds only, I think. We can have safely have editing of the other values in normal build
- You should iterate over all counter types instead of making the assumption that there's just two specific types (assumption that would break as soon as #45489 gets implemented)
- Many unnecessary empty lines where they should not be
- Some "selected" comparison against 0 which should be nullptr
- Do not use atoi(), but something more secure, e.g., str_to_int() or str_to_uint()
- Is atoi() the reason you include cstdlib? If there's (also) some other reason, it likely needs some change (either use of some utility/ function, or C++, or Qt)
- tab_counters.h seems to have several forward declarations of Qt classes that it doesn't actually use. Didn't check if .cpp file has similar excess includes
- "#endif // FC__TAB_TECH_H" - should be ...COUNTER...
- You should check is_counter_needed() before deleting it

-TICKET-45892-S-awomir-Lach-slawek-lach.art.pl.patch(18KB)
Not sure it all have been done
I am not sure if it would compile for Qt6. I must install another container and install only Qt6 in it. But at worst... When I install Qt6 and uninstall Qt6 on OpenSUSE Tumbleweed container, it complains about Qt version is too old. I test and it requires Qt 6.0.0, but I had 6.2 on my system.
I am sure at near 100% that code formatting is good from now.

---------------------------------------------------------------------
Ticket Status:

      Reporter: cazfi
         Owner: (None)
          Type: Patches
        Status: Open
      Priority: 5 - Medium
     MileStone: 3.2.0
     Component: Ruledit and ruleup
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket details:

Ruledit should have tab for counters editing. Initial version can have as little functionality as needed to make it to provide any value at all (likely it's easy to get functionality common to most ruleset objects by simply copying, e.g., extras tab and modify that)
Any counters removal functionality (and basically adding too, as that would be unreversable action without ability to remove the counter) depends on #45041

-- 
Ticket information of Freeciv project
Freeciv Project is hosted on OSDN

Project URL: https://osdn.net/projects/freeciv/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/freeciv/ticket/45892
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45892



More information about the Freeciv-tickets mailing list
アーカイブの一覧に戻る