> If you turn automoc on, it tries to guess which moc files need to be
> generated
> and which ones are #included by way of regular expressions too. If you don't
> like that, don't use automoc.
Ok, I see, thanks.
If cmake/automoc uses the same basic search and if there is no interest/plans
in
On Tuesday, 1 September 2020 14:17:50 PDT Bernhard Lindner wrote:
> Anyway, how does cmake behave regarding the described moc target detection
> problem? Does it work smarter than qmake?
If you turn automoc on, it tries to guess which moc files need to be generated
and which ones are #included by
Hi Thiago!
> > Well, what about coming cmake in Qt6? I assume Qt Creator will support cmake
> > based projects for application developers. Do you see a chance to fix the
> > problem using the new tool set?
>
> Qt Creator has supported CMake for 10 years or more. Building Qt applications
> with C
On Tuesday, 1 September 2020 12:29:29 PDT Bernhard Lindner wrote:
> Well, what about coming cmake in Qt6? I assume Qt Creator will support cmake
> based projects for application developers. Do you see a chance to fix the
> problem using the new tool set?
Qt Creator has supported CMake for 10 years
Hi Thiago!
> Correct, qmake does not preprocess, but it does try to guess what your
> dependencies are. This is not restricted to moc outputs: any #include found
> that match a source file is automatically removed from the list of targets to
> build too.
Oh my! :-(
> A more correct way to do
On Monday, 31 August 2020 09:31:17 PDT Bernhard Lindner wrote:
> It appears to me that qmake is looking for "#include "moc_module.cpp"" using
> some simple regular expression which does not take any conditional
> compilation into account. Is this correct?
Correct, qmake does not preprocess, but it
Hi!
> Add to your module.cpp:
>
> #include "moc_module.cpp"
>
> This is recommended anyway, regardless of your problem. Always #include the
> module output for your headers in your corresponding .cpp files.
I tried a variant of the above using C++17 __has_include:
#if __has_include("moc_mo
Il 27/08/20 20:46, Bernhard Lindner ha scritto:
This is recommended anyway, regardless of your problem. Always #include the
module output for your headers in your corresponding .cpp files.
Can you explain that general recommendation? It seems to me that such includes
are only
useful in special
Hi Thiago!
> Add to your module.cpp:
>
> #include "moc_module.cpp"
Works well, thank you!
> This is recommended anyway, regardless of your problem. Always #include the
> module output for your headers in your corresponding .cpp files.
Can you explain that general recommendation? It seems to m
On Wednesday, 26 August 2020 12:40:31 PDT Bernhard Lindner wrote:
> Hi!
>
> Currently I am facing a problem with a Qt Creator managed Qt 5 project.
>
> The projects consists of a lot of modules and implements a special but
> useful file concept. Each module has 3 files:
>module.hpp - Public t
Hi!
> I wonder how clients of the class declared in the .hpp file can use that
> class at all.
> Unless I am missing something, they won’t be able to (at least not in the
> general case)
> unless they also include the .inl file.
Depends from what part of the module API you want to use. E.g. if
On Thu, Aug 27, 2020 at 5:43 AM Bernhard Lindner <
priv...@bernhard-lindner.de> wrote:
> > You might also use a custom extra compiler -- that still invokes moc,
> > but for each foo.h also tells moc to include foo.inl, bar.h -> bar.inl,
> > and so on...
>
> Hm, I see. Has something like that been
Hi Bernhard,
I use plain .pro and .pri files with qmake to Visual Studio projects.
Moc has a feature that prevents the output files being treated as
separate compiles - if it finds the include in the relevant module
.cpp. It works really well for us with thousands of modules. I not
sure ho
> On 27 Aug 2020, at 14:42, Bernhard Lindner
> wrote:
>
> Hi!
>
>> Can you make an example of your structure (what's exactly in each of the
>> three files)? It's not entirely clear.
>
> Ok, I attached an example of a module containing some pseudo code. Please
> tell me if you
> need more inf
Hi!
> Can you make an example of your structure (what's exactly in each of the
> three files)? It's not entirely clear.
Ok, I attached an example of a module containing some pseudo code. Please tell
me if you
need more information.
> You might also use a custom extra compiler -- that still inv
Hi,
Can you make an example of your structure (what's exactly in each of the
three files)? It's not entirely clear.
Il 27/08/20 13:26, Bernhard Lindner ha scritto:
Hm. I am not sure I get it. That is a global option, right? I have a LOT of
modules, each
with a different name. When adding an
Hi!
> > I added all .hpp file names to the .pro file using Qt Creator. All moc
> > relevant
> > .hpp files are parsed fine by moc and a moc_module.cpp file is generated for
> > each module as usual.
>
> Have you tried adding the .inl files to HEADERS instead?
Yes. But it didn't work. Even more
> -Ursprüngliche Nachricht-
> Von: Interest Im Auftrag von Bernhard
> Lindner
> Gesendet: Mittwoch, 26. August 2020 21:41
> An: interest@qt-project.org
> Betreff: [Interest] Three-file modules vs. moc
>
> Hi!
>
> Currently I am facing a problem with a Qt Creator managed Qt 5 project.
>
18 matches
Mail list logo