[bt-devel] Qt Only

Greg Hellings greg.hellings at gmail.com
Mon Feb 23 00:18:11 MST 2009


Gary,

Quick issue with CMakeLists.txt - when I run cmake it reports an error
on line 92 where you didn't close a {} pair on the first variable.
Adding that in makes it configure properly on my Mac, which has no KDE
installed and Qt 4.4.1.  Also, chtmlexportrendering.cpp and
cbtconfig.cpp and bibletime.cpp all report warnings during build, but
no errors.

Currently the build stops at cswordsetupinstallsourcesdialog.h when it
can't find sword/installmgr.h, which is thoroughly entrenched right in
the middle of my sword include files.  Not sure why it's not finding
that particular file - any ideas?

--Greg

On Sun, Feb 22, 2009 at 9:19 PM, Gary Holmlund <gary.holmlund at gmail.com> wrote:
> Gary Holmlund wrote:
>>
>> I have checked in the Qt only version. I believe it is complete except for
>> command line options not working.
>>
>> I have tried to remove the KDE parts of the CMakeLists.txt but I have not
>> been successful. If there is someone more knowledgeable about cmake  issues
>> I would appreciate help looking at it. I am attaching my modified version.
>> It compiles everything but fails at link time.
>>
>> BibleTime compiles correctly with the currently checked in  CMakeList.txt,
>> but  still requires your  computer to have  KDE libraries.
>>
>> Gary
>
> The CMakeList.txt file does not have any KDE in it now. We should be ready
> to compile for window or mac.
>
> I figured out the CMakeList.txt issues.  There are two ways for a Qt class
> to compile the extra signal/slots code that is generated by the moc process.
> The first includes the extra code adding a #include "<filename>.moc"
> statement to each cpp file using signals/slots. The second is to have the
> extra code generated as a cpp file and compile it separate from the Qt
> class. In the CMakeList.txt file the QT4_AUTOMOC statement is used if you
> have the first way and the QT4_WRAP_CPP is used for the second way. In
> BibleTime sources we have a mixture for Qt class that use both ways. The
> cmake KDE macros handle a mixture of both cases. With the cmake Qt macros
> you must choose one or the other.
>
> I changed numerous cpp files to add an include moc entry and used the
> QT4_AUTOMOC macro. This was the simpler case because it does not require us
> to maintain a list of the .h files that need to be moc'ed.
>
> So as a general rule if you are creating a new class that uses signals/slots
> (has a Q_OBJECT line) in the header, you should put a include moc line in
> the cpp file. Example:
>
> ----- btactioncollection.h -----------
>       (lines removed)
> class BtActionCollection : public QObject
> {
>  Q_OBJECT
> public:
>   BtActionCollection(QObject* parent);
>       (lines removed)
> ---------------------------------------
>
> ----- btactioncollection.cpp ---------
>       (lines removed)
> #include "btactioncollection.h"
> #include "btactioncollection.moc"
>
> BtActionCollection::BtActionCollection(QObject* parent)
>   : QObject(parent)
> {
> }
>      (lines removed)
> ---------------------------------------
>
> Gary
>
>
> _______________________________________________
> bt-devel mailing list
> bt-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/bt-devel
>



More information about the bt-devel mailing list