#!/bin/sh

# list of installed modules which should be scanned
modules="QtCore QtGui QtSql QtNetwork QtOpenGL QtSvg QtScript QtUiTools QtXml"

# get the global prefix, assuming the prefix is the same for all modules (should
# be the same for common installations, I guess)
prefix=`pkg-config --variable=prefix QtCore`
include_path=$prefix/include/Qt
files=


# __linux__ and __GNUC__ mime a fake environment for Qt header checks
# to avoid warnings like
# /usr/include/QtCore/qglobal.h:173:4: Fehler: #error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com"
# /usr/include/QtCore/qglobal.h:534:4: Fehler: #error "Qt has not been tested with this compiler - talk to qt-bugs@trolltech.com"

for f in "$modules"
do
	files="$files $include_path/$f"
done

CFLAGS="-D__linux__ -D__GNUC__=4 `pkg-config --cflags $modules`" \
	geany -g qt4.c++.tags $files
