Hi again,

Sorry for the really late reply. It's been a busy couple of weeks.
So I checked out the latest cedet revision from CVS and had a look at the function you mentioned: 'semantic-ia-show-variants'. As an example, here is what is happening:

#include <QtGui/QApplication>
#include <QtCore/QPoint>

int main(int argc, char* argv[]) {
  QApplication app(argc, argv);
  QPoint point( <-- at this point do M-x semantic-ia-show-variants RET

However the command only returns a "Wrong type argument: integer-or-marker-p, nil" message.

When I try the command before opening the argument bracket, like this: QPoint point <-- at this point M-x semantic-ia-show-variants RET, a *Symbol Variants* buffers pops open with the contents:

inline QPoint point (int index)
inline QPointF pointAt (qreal t)
~~~~~*Symbol Variants*~~~~~~~

This doesn't look right. It might be a problem in my cedet configuration, but apart from this function the completion is working as expected. Also I had cleared the .semanticdb and .srecode directories before using the cedet from cvs. In case it might help here's the relevant section from the .emacs file:

(load-file "~/.emacs.d/cedet/common/cedet.el")
(require 'semantic-ia)
(require 'semantic-gcc)
(require 'semantic-sb)

;; smart completions
(setq-mode-local c-mode semanticdb-find-default-throttle
                '(project unloaded system recursive))
(setq-mode-local c++-mode semanticdb-find-default-throttle
                '(project unloaded system recursive))

(setq qt4-base-dir "/usr/include/Qt")
(semantic-add-system-include qt4-base-dir 'c++-mode)
(add-to-list 'semantic-lex-c-preprocessor-symbol-file '"/home/nparakh/include/dummy.h")
(add-to-list 'auto-mode-alist (cons qt4-base-dir 'c++-mode))
(add-to-list 'semantic-lex-c-preprocessor-symbol-file (concat qt4-base-dir "/Qt/qconfig.h"))
(add-to-list 'semantic-lex-c-preprocessor-symbol-file (concat qt4-base-dir "/Qt/qconfig-dist.h"))
(add-to-list 'semantic-lex-c-preprocessor-symbol-file (concat qt4-base-dir "/Qt/qglobal.h"))

(add-to-list 'semantic-lex-c-preprocessor-symbol-map '("Q_GUI_EXPORT" . ""))
(add-to-list 'semantic-lex-c-preprocessor-symbol-map '("Q_CORE_EXPORT" . ""))

My experience in elisp is minimal at best, but if there's anything I can do to help debug what might be going wrong, I'll gladly help.

Thanks for your time.


On Tue, Apr 27, 2010 at 6:26 AM, Eric M. Ludlam <eric@siege-engine.com> wrote:

That information is available, but not through a handy user command.  I added a short example function in semantic-ia.el and checked it in.  If you update from cvs, you can try it as:

M-x semantic-ia-show-variants RET

If this does what you want, let me know and we can figure out how to make it more accessible.


On 04/24/2010 04:16 AM, Nikhil Parakh wrote:
Hi all,

I recently started using Cedet for one of my Qt projects. After digging
around the mailing list and tinkering with options I managed to get some
nifty autocompletion working on Win7 / Qt 4.6 / emacs 23.1.50. One
feature thought, that is either missing or I haven't been able to find
yet, is some way to list all the possible overloaded constructors of a
class when I'm creating a new object.

As a simple example of what I'm talking about:

#include <QtGui/QApplication>
#include <QtGui/QPushButton>

int main(int argc, char* argv[]) {
  QApplication app(argc, argv);
  QPushButton button( <-- at this point I'd like to see a list of

I have searched for possible commands that might implement this
functionality and the closest I've come is the speedbar-analyzer mode.
Even this however, only manages to show the list of constructors for
when I'm creating an object using new, like:

QPushButton* button = new QPushButton( <-- at this point speedbar
anaylzer shows me a list of constructors

So I'm wondering is there some way to list constructors for local
objects. This to me is one of the most useful features that an IDE like
QtCreator can offer. Could there be some command to provide the list of
constructors maybe in the Completion buffer or something like that.

Thanks in advance for all the help.



Cedet-devel mailing list