Hmmm… My compilation platform is currently fixed on Ubuntu 10.04, Qt 4.5 and 4.7, and Python 2.6.5, and I can't switch at present - but I can take a guess.
The error is located at the end of the word "emit", and the error "expected unqualified-id before ‘(’ token" seems to be indicating that the word "emit" has been removed. This is what Qt does in standard non-MOC compilation - e.g. "emit mySignal()" is just converted to "mySignal()" in standard code that isn't in MOC files. It sounds like those MOC files are being compiled with incorrect flags for some reason or other.
From a quick look, the "emit" definition is set up in qobjectdefs.h (in Qt 4.7, anyway). It seems that either Q_MOC_RUN should be defined, or QT_NO_EMIT should.
Hopefully that'll give you a good start at tracking it down. It vaguely rings a bell for me, but if I ever have seen it myself, I can't remember any more details, sorry.
Cheers,
- Chris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Please try to compile with the current svn trunk version of PythonQt, I recently updated the trunk to the current PythonQt version and removed the "emit" slot from the std decorators. I guess the emit slot is the culprit for your problem.
There are various improvements and bug fixes on the trunk.
I guess I will release a PythonQt 2.1 version together with the next MeVisLab release next month.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yesterday I found this post by the QuteCsound users group which also stated trunk would compile against 4.8.1 so I checked it out and it compiled fine.
I also found this bug report in debian which had a patch for the emit issue, but I never gave it a go as I'm happy to use trunk.
Thanks again.
Paul
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello everyone,
I got this error compiling on Ubuntu 12.04:
moc_PythonQtStdDecorators.cpp: In static member function ‘static void PythonQtStdDecorators::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)’:
moc_PythonQtStdDecorators.cpp:152:25: error: expected unqualified-id before ‘(’ token
moc_PythonQtStdDecorators.cpp:153:25: error: expected unqualified-id before ‘(’ token
moc_PythonQtStdDecorators.cpp:154:25: error: expected unqualified-id before ‘(’ token
moc_PythonQtStdDecorators.cpp:155:25: error: expected unqualified-id before ‘(’ token
moc_PythonQtStdDecorators.cpp:156:25: error: expected unqualified-id before ‘(’ token
moc_PythonQtStdDecorators.cpp:157:25: error: expected unqualified-id before ‘(’ token
moc_PythonQtStdDecorators.cpp:158:26: error: expected unqualified-id before ‘(’ token
moc_PythonQtStdDecorators.cpp:159:26: error: expected unqualified-id before ‘(’ token
make: *** Error 1
Any hints ?
Thanks in adance !
Hi,
Could you post the relevant parts of that file - i.e. the qt_static_metacall function, where those errors are coming up?
- Chris
Hi,
I got the same errors when compiling with Qt 4.8.1 and Python 2.7.2+. Here is the code you asked for (line 152)
Hmmm… My compilation platform is currently fixed on Ubuntu 10.04, Qt 4.5 and 4.7, and Python 2.6.5, and I can't switch at present - but I can take a guess.
The error is located at the end of the word "emit", and the error "expected unqualified-id before ‘(’ token" seems to be indicating that the word "emit" has been removed. This is what Qt does in standard non-MOC compilation - e.g. "emit mySignal()" is just converted to "mySignal()" in standard code that isn't in MOC files. It sounds like those MOC files are being compiled with incorrect flags for some reason or other.
From a quick look, the "emit" definition is set up in qobjectdefs.h (in Qt 4.7, anyway). It seems that either Q_MOC_RUN should be defined, or QT_NO_EMIT should.
Hopefully that'll give you a good start at tracking it down. It vaguely rings a bell for me, but if I ever have seen it myself, I can't remember any more details, sorry.
Cheers,
- Chris
Please try to compile with the current svn trunk version of PythonQt, I recently updated the trunk to the current PythonQt version and removed the "emit" slot from the std decorators. I guess the emit slot is the culprit for your problem.
There are various improvements and bug fixes on the trunk.
I guess I will release a PythonQt 2.1 version together with the next MeVisLab release next month.
Hi,
Thanks Chris & Florian.
Yesterday I found this post by the QuteCsound users group which also stated trunk would compile against 4.8.1 so I checked it out and it compiled fine.
I also found this bug report in debian which had a patch for the emit issue, but I never gave it a go as I'm happy to use trunk.
Thanks again.
Paul
Nice Job !!!
Thank you very much.