Re: [CEDET-devel] Can't get semantic to work with Qt4
Brought to you by:
zappo
From: Eric M. L. <er...@si...> - 2014-02-20 00:14:34
|
On 02/14/2014 04:19 AM, Oleh wrote: > Hi all, > > I've copied this config from Alex Ott: > <snip> > > The reason is this definition in Qt: > > class Q_GUI_EXPORT QPushButton : public QAbstractButton > > When I remove Q_GUI_EXPORT, the completion works. > > It's defined in /usr/include/qt4/QtCore/qglobal.h which I included in > semantic-lex-c-preprocessor-symbol-file. This seems like the right thing to do. The next step is in one of your code buffers to use: M-x semantic-c-describe-environment RET and look for Q_GUI_EXPORT and see what the value is. If it isn't there, perhaps some #ifdef in qglobal.h is causing it to be skipped. When I parsed the file on my Ubuntu, the value of Q_GUI_EXPORT was nil, which is what you want. If you visit qglobal.h and start investigating, and things suddenly start working, then the file wasn't parsed originally. It is also possible that you added the preprocessor symbol file AFTER the lisp code for supporting C was loaded. If that is the case, add (semantic-c-reset-preprocessor-symbol-map) after all those add-to-list calls in your .emacs file to force the internal tables to recalculate. If you create the settings before loading the semantic C support, or use the Emacs custom system to do it, then this happens automatically. > Can someone explain to me how I can explain to semantic that > Q_GUI_EXPORT is a no-op? You can always add new entries to the list with: M-x customize-variable RET semantic-lex-c-preprocessor-symbol-map RET and adding it there. It is better to use the preprocessor symbol file as you already tried. Good Luck Eric |