On 17-5-2011 21:37, venom00 wrote:
>> But... I think there are quite some places where we can pimp LyX a
>> bit and maybe we can use it in more places as you say.
> 
> Very well!
>  
>>> Is there a reason for which the moc_ file is included at 
>> the end? I've spent an
>>> hour (in cmake's lyx_automoc & friends) to understand why 
>> the moc_ file was not
>>> created for the new file. In my little experience (with 
>> qmake) you don't need to
>>> do that. Maybe we should write it to /src/frontends/qt4/README.
>>
>> The moc file is not created because you put the code in support.
>> Classes in support are not moc'ed by default by autotools. There
>> is only an exception for SystemcallPrivate.h:
>>
>> src/support/Makefile.am:
>>
>>   MOCHEADER = SystemcallPrivate.h
>>
>>   MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp)
>>
>>   CLEANFILES += $(MOCEDFILES)
>>   BUILT_SOURCES += $(MOCEDFILES)
>>
>>   moc_%.cpp: %.h
>>      $(MOC4) -o $@ $<
>>
>>   liblyxsupport_a_DEPENDENCIES = $(MOCEDFILES)
> 
> Mmmh, I've moved the class in src/frontend/qt4 with the same results. The
> solution was (both for src/frontend/qt4 and src/support) adding #include
> "moc_fancylineedit.cpp" in fancylineedit.cpp, at least for CMake, see [1]. If
> I'm correct CMake ignores src/support/Makefile.am, so maybe my solution won't
> work with other build systems.

Mmmh, now I'm starting to get confused about your question. Are
you asking why you have to include the moc_* files or why the
moc_* file was not created for fancylineedit ? The creation of
the moc_* file is not trigged by including it.

You should either add moc_fancylineedit.cpp to fancylineedit.cpp or
separately build and link moc_fancylineedit.cpp. As we do not add
them to the msvc project file, we have to include the moc_* files
in the *.cpp files.

> I'm a bit confused by all the build systems we're using.

We're using autotools and CMake. As CMake is cross-platform and
autotools is not, we need CMake for Windows. The tendency is now
to at least make CMake do all the thing autotools can do and to
make it the default build system for all platforms.

> Thanks for the quick reply ;) Have you tried the patch what do you think of 
> the
> result?

No not yet, I'm busy with other things right now. And I have to think again
how I'm gonna apply a patch to my tree.


Vincent

Reply via email to