Message: previous - next
Month: September 2010

Re: [trinity-devel] tqt.h confusion

From: Serghei Amelian <serghei@...>
Date: Thu, 2 Sep 2010 21:11:09 +0300
On Thursday 02 September 2010 20:29:18 Timothy Pearson wrote:
> > Hello,
> >
> > I found that tqt.h is modified only at install stage.
> That is correct, however the automake/autoconf system defines USE_QT3 or
> USE_QT4 based on the Qt version specified in admin/
> The new CMake-based build system will also need to define USE_QT3 or
> USE_QT4 when it builds any of the Trinity modules.  This is to allow
> conditional code within Trinity so as to maintain build compatibility with
> both versions of Qt.

I predicted this, so i renamed tqt.h to and I generate tqt.h via 
cmake script.

> > If I define USE_QT3
> > before compilation, the compilation stop with this error:
> >
> > tqinputcontext.h:32:27: error: qinputcontext.h: No such file or directory
> >
> > This is intended behaviour? If yes, for what purpose is designed in this
> > way?
> No, that is not the intended behaviour.  Do you have the qinputcontext.h
> header file present on your system?  The old autoconf/automake system
> actively searched for the Qt headers and added the that directory to the
> include search path in the gcc flags.

qinputcontext.h seems QT4 file, I have it only in 
qtinterface/qt4/Qt/qinputcontext.h. I must to include this directory in 
include paths, even for QT3 build?

> Also please be aware that for all modules that rely on TQt, you will need
> to detect the presence of the TQt headers, and pass the "-include tqt.h"

I created a file named TQt.pc, for detecting is via pkg-config

> flag to gcc.  You should also add the TQt header directory to gcc's
> include search path.

Good to know.