[Development] QLocale private members

John Layt jlayt at kde.org
Mon Mar 5 00:49:03 CET 2012


Hi,

In the QLocale header we have the following code:

    //private:
    // this should be private, but can't be
        struct Data {
            quint16 index;
            quint16 numberOptions;
        };
    private:
        friend struct QLocalePrivate;
        // ### We now use this field to pack an index into locale_data
        //     and NumberOptions.
        // ### Qt 5: change to a QLocaleData *d; uint numberOptions.
        union {
            void *v;
            Data p;
        };
        const QLocalePrivate *d() const;


Can anyone enlighten me about why this is organised this way and what the plan 
was for Qt5?

I'd like to clean this up for 5.0 and try have only a *d as in 5.1 we'll get 
rid of the locale_data and use libicu instead.

Cheers!

John.



More information about the Development mailing list