On 2014-11-28, Simon Hausmann <simon.hausm...@theqtcompany.com> wrote: > I feel that Q_GADGET has its primary use with structures and the default > access level for those is public. I find it awkward that you currently have > to > write:
I have a lot of code in the wild using classes and Q_GADGET. Having Q_GADGET not change stuff at the end is likely ok, if Q_GADGET doesn't change accesslevel in the beginning. But doesn't Q_GADGET start with changing accesslevel to public? The only safe way is to then switch to private. class MyClass { Q_GADGET class MyPrivate; int m_myCounter; public: MyClass); } > The proposed change would have two effects: > > 1) It makes any existing code that _relies_ on Q_GADGET turning to private > suddenly expose members in structures. > > 2) On paper it breaks binary compatibility with MSVC, in the unlikely event > that somebody > a) produces a DLL and cares about binary compatibility > b) exposes bare structures > c) relies on Q_GADGET turning access permission levels to private 3) Making accesslevel public for private class members. /Sune _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development