View Single Post
Old 08-25-2025, 07:23 PM   #592
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,893
Karma: 6120478
Join Date: Nov 2009
Device: many
Given it is only one enum and given PyQt5/Qt5 has no further development and therefore the enum will never be changed, your approach seems like the simplest and best.

That said, PyQt5 had a long life. Are there any earlier versions of this enum in Qt5 that changed? Maybe eyeball the history of the Qt source file that defines the Qt5 enum on github to see if it ever changed over its life. If not, you should be golden.

Update: It did change very early in Qt 5.0 from the final Qt 4.x series as per:
https://github.com/qt/qtbase/commit/...41ecc95fa976e9

But since that change happened to make Qt 5.0.0 you should be quite safe.

Here is the enum as stated in Qt 5.15.x. You should be good to go.

Code:
   enum BoundaryReason {
        NotAtBoundary = 0,
        BreakOpportunity = 0x1f,
        StartOfItem = 0x20,
        EndOfItem = 0x40,
        MandatoryBreak = 0x80,
        SoftHyphen = 0x100
    };

Last edited by KevinH; 08-25-2025 at 07:45 PM.
KevinH is online now   Reply With Quote