[Konsole-devel] About duplicated enumeration definitions in the code

Kurt Hindenburg kurt.hindenburg at gmail.com
Sun Mar 18 13:08:29 UTC 2012


On Fri, Mar 16, 2012 at 11:52 PM, Jekyll Wu <adaptee at gmail.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi:
>
>    There are a few duplicated enumeration definitions scattered
> around within the code. They are mostly related with profile options,
> for example:
>
>    Profile::BellModeEnum           <==>        TerminalDisplay::BellMode
>    Profile::ScrollBarPositionEnum  <==>
> TerminalDisplay::ScrollBarPosition
>    Profile::HistoryModeEnum        <==>
> HistorySizeDialog::HistoryMode
>
> Such duplication is definitely not good. What is the better way to
> eliminate those duplication ?
>
> a). Make TerminalDisplay, HistorySizeDialog, etc all #inlucde "Profile.h"
>
> b). Move those enum definition into another separate small header(like
> Enumeration.h), and all other related files #include "Enumeration.h"
>
> Hi,
  Definitely b - also can you look at using Qt QFlags if you find that
useful.

 Thanks
   Kurt


> I personally prefer b).
>
> Regards
> Jekyll
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.18 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQIcBAEBAgAGBQJPZApuAAoJEOemZ9znWXlA12QP/iKkbXpfZ5JIJemuv7HxFjcn
> xMosAZ5iuGyDJODKx+GxzeXWcn09MBdFI+HHRG6EWtCuINhfSVwoxMcspEgS+46S
> lcFEDd1GoMvTancymsGFkNdnyTekcLS9iGGudTS5MgjB1SKuJ94ui3OdsuQf2Xrz
> wgGzclywCPgLfhaX6DfQZkRqQxNI9Cbsbi8HTPb9A/RKTNK6xp+ocxory59elivn
> 4vaJPBoVHcP+nTapIEv1sQWYBeeNemSgT+e7H5yDe9PqjMfk6Q0cwtiQQbcYkh+H
> 7vQl03MrSyh6zFnrQ6Vo0uVLw86+QtUpEw24B2G5T9PUHH4a5fiUx6b1SkWWOPPt
> LfLhV/B/mog9M7MHD8li7V3/zhFcq0vKCYS1dElNJTTm7urRGtTOFTCYPRMFmcQ9
> xrGGswF4bEOLFgdz2VNBYEkqgY5lRZZdKuyeXOs3Iycsqe538XBbbxfDeuqtB4+w
> Rt9JK8Eam2OWu1GZRYFAhM4jvDMtIreIKlMy6/xZPfVDHgK0xwT9RGtllEVw2eh/
> xSJA5cFBUyIdZNRVqdiuicWBq7/H+uV65Q3pZWXxLsMI7EDIo+Qsnl/iNVGDpYDJ
> x6cyhAbD762I3TwuFbEiFuPQGhTk5OF3YzFbSfyjQKRhpntRDQa/NxTSqnCXBnyN
> zACzAVcw24edAVkbx1GN
> =o+9Z
> -----END PGP SIGNATURE-----
> _______________________________________________
> konsole-devel mailing list
> konsole-devel at kde.org
> https://mail.kde.org/mailman/listinfo/konsole-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20120318/72e59d4f/attachment.html>


More information about the konsole-devel mailing list