Emacs: Qt support (semantic).

master
Pierre Neidhardt 2013-05-30 10:26:49 +02:00
parent 4da23fda5d
commit e2fc119b81
1 changed files with 18 additions and 0 deletions

View File

@ -642,3 +642,21 @@ properly escaped with double-quotes in case it has spaces."
'(progn
;; Change .pdf association directly within the alist
(setcdr (assoc "\\.pdf\\'" org-file-apps) "zathura --fork %s")))
;;==============================================================================
;; Qt semantic support
;;==============================================================================
;; Qt base directory, meaning the directory where the 'Qt' directory can be found.
;; Adapt accordingly.
(setq qt4-base-dir "/usr/include/qt4")
(setq qt4-gui-dir (concat qt4-base-dir "/QtGui"))
(semantic-add-system-include qt4-base-dir 'c++-mode)
(semantic-add-system-include qt4-gui-dir 'c++-mode)
(add-to-list 'auto-mode-alist (cons qt4-base-dir 'c++-mode))
(add-hook
'c++-mode-hook
(lambda ()
(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-large.h"))
(add-to-list 'semantic-lex-c-preprocessor-symbol-file (concat qt4-base-dir "/Qt/qglobal.h"))))