[Qt-interest] Qt 4.4.3 Moc parsing issue with unsigned subphrase

Werner Van Belle werner at yellowcouch.org
Thu Jan 1 19:47:47 CET 2009


Hello,

I just discovered that moc-qt4 has some very creative ways to treat
argument typenames that contain the word unsigned. For instance the
following file test.h

'class BeatGraphLabel: public QWidget
{
  Q_OBJECT
private:
public slots:
  virtual void setImage(QImage I, unsigned1 samplespercol);
};'

will with

moc-qt4 -o test.moc.cpp  test.h

result in a moc file which has a qt_metacall that contains the following
line

 case 1: setImage((*reinterpret_cast<
QImage(*)>(_a[1])),(*reinterpret_cast< uint1(*)>(_a[2]))); break;

Obviously, the second type is a mess. Interestingly, if I use the
following test2.h file

'class BeatGraphLabel: public QWidget
{
  Q_OBJECT
private:
public slots:
  virtual void setImage(unsignedQImage I, unsigned1 samplespercol);
};'

the metaobject qt_metacall contains a line

        case 0: setImage((*reinterpret_cast<
uintQImage(*)>(_a[1])),(*reinterpret_cast< uint1(*)>(_a[2]))); break;

Is there a known solution for this issue ?

Wkr,

-- 
Dr. Werner Van Belle
http://werner.yellowcouch.org/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090101/9a3f9769/attachment.bin 


More information about the Qt-interest-old mailing list