[Qt-interest] [Build] Using -qtnamespace

Thiago Macieira thiago at kde.org
Wed Mar 24 19:37:32 CET 2010


Em Quarta-feira 24 Março 2010, às 17:46:56, Rush Manbert escreveu:
> On Mar 24, 2010, at 12:12 AM, Thiago Macieira wrote:
> > $ git tag --contains 49a56b22b572b1167098e5f96a84e30cdc64f38c
> > v4.6.1
> > v4.6.2
> 
> Thank you very much.
> 
> I'm curious, and trying to learn how to solve my own Qt problems more
> effectively. How did you dig up the git tag, and could I have done the
> same?
> 
> I found QTBUG-6495, but don't see the tag value there

Ok, here's what I did:

Your original email said:
> The build fails with the error message "Integer constant is too large for
> 'long' type". I tracked it down to the header file
> src/gui/kernel/qt_mac_p.h
> which contains this code:
> 
> #if defined(QT_NAMESPACE) && defined(QT_NAMESPACE_MAC_CRC)
> // Take the CRC we generated at configure time. This may result in a
> // collision with another value If that is the case, please change the
> value // here to something other than 'Cute'.
> const UInt32 kEventClassQt = QT_NAMESPACE_MAC_CRC;
> #else
> const UInt32 kEventClassQt = 'Cute';
> #endif

I knew that I had seen this issue before. A quick search of 
QT_NAMESPACE_MAC_CRC revealed that it's set in configure:

$ grep QT_NAMESPACE_MAC_CRC configure
    QT_NAMESPACE_MAC_CRC=`"$mactests/crc.test" "$XQMAKESPEC" "$QMAKE_CONFIG" 
$OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/crc $QT_NAMESPACE $L_FLAGS 
$I_FLAGS $l_FLAGS`

And since I knew this issue had been fixed, I just looked at all changes to 
that crc test:

$ git log config.tests/mac/crc*
commit da19e7f6b6b822f7a473c4eb2dff001a3434353a
Author: Jason McDonald <jason.mcdonald at nokia.com>
Date:   Thu Jan 7 00:02:09 2010 +1000

    Update copyright year to 2010
    
    Reviewed-by: Trust Me

commit 49a56b22b572b1167098e5f96a84e30cdc64f38c
Author: Denis Dzyubenko <denis.dzyubenko at nokia.com>
Date:   Fri Dec 4 15:49:34 2009 +0100

    Fixed calculating CRC32 on 64bit platforms
    
    When compiling on a 64bit machine we should make sure that we won't 
overflow
    the 32bit CRC value because of casting signed int to unsigned long.
    
    Reviewed-by: Thiago

This also explains why I had seen this issue before: I was the one who 
reviewed the change that fixed it.

Then all I had to do was check which tags contain the commit that fixed the 
issue:

$ git tag --contains 49a56b22b572b1167098e5f96a84e30cdc64f38c
v4.6.1
v4.6.1-maemo5-beta1
v4.6.2
v4.6.2-maemo5
v4.7.0-tp1

(My workstation in the office has more tags than my laptop at home)
-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100324/7fb8d139/attachment.bin 


More information about the Qt-interest-old mailing list