Community
Participate
Working Groups
Build Identifier: 20110615-0604 when developing with Qt is necessary to use the moc ( http://doc.qt.nokia.com/latest/moc.html ) which uses some keywords to identify special sections and these keywords are removed. The keywords are just empty macros. except from qobjectdef.h: # define slots # define signals protected It looks like the macros are expanded on using the function (but for example the Q_OBJECT macro is untouched). Also the formatting is changed (this seems not to be happen if no macros are used) This is not a Qt specific problem. I attached two examples. the second one does not produce valid code! Reproducible: Always Steps to Reproduce: example 1 (Qt): original class: class GotoLineWidget : public QWidget { Q_OBJECT public: GotoLineWidget(QWidget *parent = 0); ~GotoLineWidget(); void myToogleTest() { qDebug() << "I am here"; } private slots: void on_close_clicked(); void on_line_edit_textChanged(QString input_text); void on_line_edit_editingFinished(); signals: void gotoLine(int line_number); private: Ui::GotoLineWidgetClass ui; }; and after using "toogle function" on "myToogleTest": class GotoLineWidget : public QWidget { Q_OBJECT public: GotoLineWidget(QWidget *parent = 0); ~GotoLineWidget(); void myToogleTest(); private: void on_close_clicked(); void on_line_edit_textChanged(QString input_text); void on_line_edit_editingFinished(); protected: void gotoLine(int line_number); private: Ui::GotoLineWidgetClass ui; }; inline void GotoLineWidget::myToogleTest() { qDebug() << "I am here"; } example 2: #ifdef __GNUC__ // gcc emulation mode #define FINLINE __attribute__((always_inline)) #define NOINLINE __attribute__((noinline)) #else // msvc emulation mode #define FINLINE __forceinline #define NOINLINE __declspec(noinline) #endif class System { public: System(); virtual ~System(); static bool isWindows(); static bool startHelpSystem(); NOINLINE static QString getVersion(); NOINLINE static QString getRelease(); }; and in the cpp: QString System::getRelease() { return QString(_RTTUI_RELEASE_); } becomes after "toogle function": class System { public: System(); virtual ~System(); static bool isWindows(); static bool startHelpSystem(); static QString getVersion() { }static QString getRelease(); };
Fixed together with bug 363244.