Hello,
I found that tqt.h is modified only at install stage. 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?
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/acinclude.m4.in.
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.
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.
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" flag to gcc. You should also add the TQt header directory to gcc's include search path.
Hope this helps some!
Tim
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/acinclude.m4.in.
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 tqt.h.in 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.
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/acinclude.m4.in.
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 tqt.h.in and I generate tqt.h via cmake script.
Works for me.
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?
It is present in my version of Qt3; see this page: http://packages.ubuntu.com/lucid/i386/libqt3-headers/filelist
I am not sure why it does not exist on your system. If it is not a generic file present on all Qt installations then you may have to let CMake search for it and conditionally remove the reference to it based on the CMake search results.
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.
-- Serghei
On Thursday 02 September 2010 22:32:39 Timothy Pearson wrote:
[...]
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?
It is present in my version of Qt3; see this page: http://packages.ubuntu.com/lucid/i386/libqt3-headers/filelist
I am not sure why it does not exist on your system. If it is not a generic file present on all Qt installations then you may have to let CMake search for it and conditionally remove the reference to it based on the CMake search results.
You right, this file is present in official Qt3 package. I guess that is missing on mine system because gentoo permit few flags which can omit some Qt modules. I will make checks, as you suggest.
On Thursday 02 September 2010 22:42:54 Serghei Amelian wrote: [...]
I am not sure why it does not exist on your system. If it is not a generic file present on all Qt installations then you may have to let CMake search for it and conditionally remove the reference to it based on the CMake search results.
You right, this file is present in official Qt3 package. I guess that is missing on mine system because gentoo permit few flags which can omit some Qt modules. I will make checks, as you suggest.
I dig a little deeper and I found that actually QInputContext class is located in qinputcontext_p.h and QInputContext is used only in Q_WS_WIN context or when QT_NO_XIM is not defined.
What you suggest to do in this case?
On Thursday 02 September 2010 22:42:54 Serghei Amelian wrote: [...]
I am not sure why it does not exist on your system. If it is not a generic file present on all Qt installations then you may have to let CMake search for it and conditionally remove the reference to it based
on
the CMake search results.
You right, this file is present in official Qt3 package. I guess that is missing on mine system because gentoo permit few flags which can omit some Qt modules. I will make checks, as you suggest.
I dig a little deeper and I found that actually QInputContext class is located in qinputcontext_p.h and QInputContext is used only in Q_WS_WIN context or when QT_NO_XIM is not defined.
What you suggest to do in this case?
I will put a conditional around the include statement in tqinputcontext.h like this
#ifndef QT_NO_XIM #include <qinputcontext.h> #endif
If you want you can try this out for me before I commit it to SVN...just modify the tqinputcontext.h file as shown and try a rebuild.
Tim
On Thursday 02 September 2010 23:39:53 Timothy Pearson wrote: [...]
I dig a little deeper and I found that actually QInputContext class is located in qinputcontext_p.h and QInputContext is used only in Q_WS_WIN context or when QT_NO_XIM is not defined.
What you suggest to do in this case?
I will put a conditional around the include statement in tqinputcontext.h like this
#ifndef QT_NO_XIM #include <qinputcontext.h> #endif
If you want you can try this out for me before I commit it to SVN...just modify the tqinputcontext.h file as shown and try a rebuild.
Not yet, i think that the real problem is not XIM support, but the existence of immqt patch. First I will try to detect the presence of these files.
On Thursday 02 September 2010 22:58:47 Serghei Amelian wrote:
On Thursday 02 September 2010 22:42:54 Serghei Amelian wrote: [...]
I am not sure why it does not exist on your system. If it is not a generic file present on all Qt installations then you may have to let CMake search for it and conditionally remove the reference to it based on the CMake search results.
You right, this file is present in official Qt3 package. I guess that is missing on mine system because gentoo permit few flags which can omit some Qt modules. I will make checks, as you suggest.
I dig a little deeper and I found that actually QInputContext class is located in qinputcontext_p.h and QInputContext is used only in Q_WS_WIN context or when QT_NO_XIM is not defined.
What you suggest to do in this case?
I compiled Qt3 with immqt support and now I have qinputcontext.h and qinputcontextfactory.h. However, I will check for presence of these files and I will exclude tqinputcontext.{h,cpp} and tqinputcontextfactory.{h,cpp} from compiling/installing, if necessary.
Maybe (sometime) we will insert something like this in these files:
#ifndef HAVE_QINPUTCONTEXT_H #error Your TQt have no qinputcontext support! #endif