Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.7.0
-
None
-
ff870dbf9106f2bbb2cf64f5aa35fc5917e5f4f2
Description
When compiling KDE/kdeutil/kcalc with Qt 4.7 branch (SHA 2fccc31367b207cff68de063d9f3d55a993cde42 ), I get the following error due to a misparsed slot declaration:
/local/build/KDE/kdeutils/kcalc/kcalc.moc: In member function 'virtual int KCalculator::qt_metacall(QMetaObject::Call, int, void**)':
/local/build/KDE/kdeutils/kcalc/kcalc.moc:248: error: duplicate 'const'
/local/build/KDE/kdeutils/kcalc/kcalc.moc:248: error: ISO C++ forbids declaration of 'type name' with no type
/local/build/KDE/kdeutils/kcalc/kcalc.moc:248: error: expected '>' before 'science_ant'
/local/build/KDE/kdeutils/kcalc/kcalc.moc:248: error: expected '(' before 'science_ant'
/local/build/KDE/kdeutils/kcalc/kcalc.moc:248: error: expected primary-expression before ')' token
/local/build/KDE/kdeutils/kcalc/kcalc.moc:248: error: 'science_ant' was not declared in this scope
Looking at the generated kcalc.moc file, the generated call is:
case 63: slotChooseScientificConst0((*reinterpret_cast< const const science_ant>(_a[1]))); break;
which is wrongly generated from source kcalc.h line:
void slotChooseScientificConst0(struct science_constant const &);
The relevant part is the misparsed "science_constant" name, which is parsed by moc as "const science_ant".
This bug is probably caused by commit 78e1a866ba5d594233db80f7aab88331db237d3a or b881d8fb99972f1bd04ab4c84843cc8d43ddbeed (I cannot really tell, because I did not regenerate the moc since some time)