[Development] qt5 modules in namespaces

Denis Dzyubenko denis at ddenis.info
Tue Jan 3 18:19:47 CET 2012


Hi Thiago,

2012/1/3 Thiago Macieira <thiago.macieira at intel.com>:
> On Friday, 30 de December de 2011 14.55.55, Denis Dzyubenko wrote:
>> In qt5 modules we have exactly the same problem as in namespaced-Qt
>> itself. Hence my suggestion to solve it in the same way - I would like
>> to be able to re-use that QT_BEGIN_MOC_NAMESPACE for qt5 modules, to
>> be able to redefine it to use both Qt namespace and my modules'
>> namespace.
>
> I suggest you use your namespace at the end of your .cpp file and #include the
> moc output. This improves the compilation time, makes better code and reduces
> the need for weird changes in moc.

That's the thing - it doesn't work in some cases - if you do
in-source-tree build of the attached project. Well now thinking about
it, it is probably a bug in qmake.

Denis.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Initial-commit.patch
Type: application/octet-stream
Size: 4102 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120103/4c7d4168/attachment.obj>


More information about the Development mailing list