Some Qt magic macros cause problems for the C++ code parser in Eclipse and it shows "Syntax error" on some lines in the editor. Some problematic macros: e.g Q_OBJECT, Q_SIGNALS, Q_SLOTS, SLOT(), SIGNAL(). Other problems are skipped classes in the Qt includes because of the export macros before the class names: e.g Q_NETWORK_EXPORT breaks QUdpSocket, QTcpSocket etc.
Solution:
- Add the following preprocessor symbols in Project/Properties/C/C++ Include Paths and Symbols with "Add Preprocessor Symbol..." button one by one:
Q_SLOTS=
Q_OBJECT=
Q_SIGNALS=public
SIGNAL(a)="sallala"
SLOT(a)="sallala"
Q_CORE_EXPORT=
Q_NETWORK_EXPORT=
Q_DISABLE_COPY(a)=public:
Voilá, works. This preprocessor symbols affect only the code parser and the syntax checks in the C++ editor.
PS: If somebody knows about additional preprocessor symbols what is worth to add, please write in the comments.
2012. július 18., szerda
2012. július 8., vasárnap
Nagy meténglevelek
Nálam a meténg itt északon ahelyett, hogy hosszanti nőne, nagy leveleket növeszt.
Published with Blogger-droid v2.0.6
2012. július 5., csütörtök
Random deadlocks in Plasma Desktop (KDE)
I experienced random deadlocks of the KDE Plasma Desktop in Ubuntu Natty and Oneiric. The desktop was frozen caused by the gmail-plasmoid. The workaround was to change the "Fetching mechanism" in the gmail-plasmoid's settings to KDE from python on the Misc. tab.
Feliratkozás:
Bejegyzések (Atom)