[Development] qt5 modules in namespaces

Denis Dzyubenko denis at ddenis.info
Wed Jan 4 18:39:45 CET 2012


On Wed, Jan 4, 2012 at 2:47 PM, Denis Dzyubenko <denis at ddenis.info> wrote:
> On Tue, Jan 3, 2012 at 7:16 PM,  <marius.storm-olsen at nokia.com> wrote:
>> On 03/01/2012 12:01, ext Thiago Macieira wrote:
>>> On Tuesday, 3 de January de 2012 18.19.47, Denis Dzyubenko wrote:
>>>> 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.
>>
>> Sounds like you have an include path "bug" in your .pro file then. qmake
>> doesn't care about where that file is located. As long as you
>>     #include <moc_file.cpp>
>> qmake will remove it from the object list, thus not include it in the
>> compile.
>
> indeed sounds like a include path bug. Any ideas how I can its source?
> I assume the bug is in qmake, because it works just fine with shadow
> builds and only a problem in one particular case. See attachment to my
> previous email - I made a small example that reproduces the problem
> outside of qtjsondb.

I have no clue here. I tried looking at other solutions, like moc
command line options, or including "xx.moc" instead of "foo_xx.moc",
reading the moc and qmake source code with no luck, and after all that
I still think that my "workaround" is a viable solution.

Please provide me some guidance if you believe that my fix with
re-defining QT_BEGIN_MOC_NAMESPACE in all qt5 modules that want to (or
ought to) use custom namespace is a hack.

Denis.



More information about the Development mailing list