[V2][Qt4] Patches for Improvements

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[V2][Qt4] Patches for Improvements

Juergen Hunold
Hi !

The attached file contains a patch for improved Qt4 support.
Features (maybe commit message )

1. Better qmake compatibility by adding the necessary defines for each
Qt library. E.g. qmake defines QT_CORE_LIB when generating makefiles
for a project using QtCore, QT_GUI_LIB for QtGui and so on.
2. Added support for QtTestLib, the Qt Test Framework ( Qt 4.1)
3. Added support for QtAssistantClient, Qt Integrated Help System
4. Better readability by adding explicit comments (# usage-requirements)
and having one line per setting).
5. Add support for "moc-and-include header" by
5a. duplication of the "moccable-cpp" hack for headers.
5b. copy&change of "moc-h-generator" to "moc-inc-generator"
5c. renaming of the "moc.cpp" action  to "moc.inc" and rearringing
documentation.

Remarks:
1.  This might be needed on NT for dllexport/dllimport statements. Qt
defines QT_BUILD_CORE_LIB when building QtCore and QT_CORE_LIB when
using it, so this asymmetrie might be relevant. I can't spent any time
on NT right now, sorry.

2. QtTest has some cool features for testing Qt itself. And can be used
with Boost.Build V2 test runner ;-)

3. Was simply missing. I'm working on QtDesigner but need some time for
getting it right.

4. For me,  lines like "alias a : : : : <define>a ;" are extremely hard
to read. I just get confused by the lots of colons, must always count
them and remember where i am. This smells of write-only code ;-)
alias a
   : #sources
   : #requirements
   : #default-build
   : #usage-requierements
     <define>a
   ;

is much more readable.
Btw. Why can I write

project
  : usage-requirements
        <define>a
  ;
and get an error when trying something like

alias a
  : usage-requirements
        <define>a
  ;

as a more verbose alternative.

5. Needed to compile Qt4 itself.
Drop me a note for a tarball and qt4.jam patch to compile Qt-4.1.0 and
4.1.1-snapshots with V2 on Linux. Work in (slow) progress.
These hacks using "cast" are ugly, but I don't have the time to work on
a more qmake like approach.

Yours,

Jürgen

--
* Dipl.-Math. Jürgen Hunold  ! Ingenieurgesellschaft für
* voice: ++49 511 262926 57  ! Verkehrs- und Eisenbahnwesen mbH  
* fax  : ++49 511 262926 99  ! Lister Straße 15
* [hidden email]          ! www.ive-mbh.de

_______________________________________________
Boost-build mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-build

qt4.jam.diff (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [V2][Qt4] Patches for Improvements

Vladimir Prus
Hi Juergen,

> The attached file contains a patch for improved Qt4 support.

The patch is comitted, thank you!

> Features (maybe commit message )
>
> 1. Better qmake compatibility by adding the necessary defines for each
> Qt library. E.g. qmake defines QT_CORE_LIB when generating makefiles
> for a project using QtCore, QT_GUI_LIB for QtGui and so on.
> 2. Added support for QtTestLib, the Qt Test Framework ( Qt 4.1)
> 3. Added support for QtAssistantClient, Qt Integrated Help System
> 4. Better readability by adding explicit comments (# usage-requirements)
> and having one line per setting).
> 5. Add support for "moc-and-include header" by

Does it mean that you have a header that includes .moc file resulting from
procesing of that header? That's cool.

> 4. For me,  lines like "alias a : : : : <define>a ;" are extremely hard
> to read. I just get confused by the lots of colons, must always count
> them and remember where i am. This smells of write-only code ;-)
> alias a
>
>    : #sources
>    : #requirements
>    : #default-build
>    : #usage-requierements
>
>      <define>a
>    ;
>
> is much more readable.
> Btw. Why can I write
>
> project
>
>   : usage-requirements
>
> <define>a
>   ;
> and get an error when trying something like
>
> alias a
>
>   : usage-requirements
>
> <define>a
>   ;
>
> as a more verbose alternative.

Because the target syntax was copied mostly-as-is from V1, while syntax for
project was explicitly designed. I agree such a change will be desirable, but
it will take some time because it will requires tweaking all rules.

>
> 5. Needed to compile Qt4 itself.
> Drop me a note for a tarball and qt4.jam patch to compile Qt-4.1.0 and
> 4.1.1-snapshots with V2 on Linux. Work in (slow) progress.
> These hacks using "cast" are ugly, but I don't have the time to work on
> a more qmake like approach.

I'd be willing to try building Qt with V2, for sure!

- Volodya
_______________________________________________
Boost-build mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: [V2][Qt4] Patches for Improvements

Juergen Hunold
Hi Volodya !

On Friday 27 January 2006 10:14, Vladimir Prus wrote:

> > The attached file contains a patch for improved Qt4 support.
>
> The patch is comitted, thank you!

Good.
> > Features (maybe commit message )
> >
> > 1. Better qmake compatibility by adding the necessary defines for each
> > Qt library. E.g. qmake defines QT_CORE_LIB when generating makefiles
> > for a project using QtCore, QT_GUI_LIB for QtGui and so on.

But I messed up Qt3Support ;-((. Please find a new patch attached which
corrects QT_COMPAT_LIB to QT_QT3SUPPORT_LIB.
Sorry, but I have only one Qt3Support based "simple" example ...


> > 5. Add support for "moc-and-include header" by
>
> Does it mean that you have a header that includes .moc file resulting from
> procesing of that header? That's cool.

It's not mine, the Qt sources work with them. And no, they include the moc'ed
file in the _source_ , some files even include both (moc'ed cpp and moc'ed
header ) . Otherwise, it would be quite hard not to violate the ODR or some
other c++ contraints..

[ alias syntax vs. project syntax ]

> Because the target syntax was copied mostly-as-is from V1, while syntax for
> project was explicitly designed. I agree such a change will be desirable,
> but it will take some time because it will requires tweaking all rules.

Good to hear that it is only backwards compatibility in this case.
But don't push this, it would be nice to replace V1 first.

> > 5. Needed to compile Qt4 itself.
> > Drop me a note for a tarball and qt4.jam patch to compile Qt-4.1.0 and
> > 4.1.1-snapshots with V2 on Linux. Work in (slow) progress.
> > These hacks using "cast" are ugly, but I don't have the time to work on
> > a more qmake like approach.
>
> I'd be willing to try building Qt with V2, for sure!

I'll put the thing together and send it via private email.

Yours,

Jürgen

--
* Dipl.-Math. Jürgen Hunold  ! Ingenieurgesellschaft für
* voice: ++49 511 262926 57  ! Verkehrs- und Eisenbahnwesen mbH  
* fax  : ++49 511 262926 99  ! Lister Straße 15
* [hidden email]          ! www.ive-mbh.de

_______________________________________________
Boost-build mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-build

qt3support.diff (890 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [V2][Qt4] Patches for Improvements

Vladimir Prus
On Monday 30 January 2006 11:30, Jürgen Hunold wrote:

> > > Features (maybe commit message )
> > >
> > > 1. Better qmake compatibility by adding the necessary defines for each
> > > Qt library. E.g. qmake defines QT_CORE_LIB when generating makefiles
> > > for a project using QtCore, QT_GUI_LIB for QtGui and so on.
>
> But I messed up Qt3Support ;-((. Please find a new patch attached which
> corrects QT_COMPAT_LIB to QT_QT3SUPPORT_LIB.
> Sorry, but I have only one Qt3Support based "simple" example ...

Thanks, comitted.

- Volodya

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build