-
Notifications
You must be signed in to change notification settings - Fork 33
/
ycm.cpp.qt.py
19 lines (16 loc) · 894 Bytes
/
ycm.cpp.qt.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# NOTE Things I marked as TODO is not nessessary means I
# will do it myself someday. It could be a suggestion
# for anyone interested in it.
# NOTE for Linux user
# Qt common flags
# The Qt pkg-config module in Gentoo is Qt4/Qt5, But in OS X it's splited into many sub-modules.
# Do the compatible work yourself if needed
QtModules = ["QtCLucene", "QtDeclarative", "QtDesignerComponents", "QtHelp", "QtNetwork", "QtScript", "QtSql", "QtTest", "QtUiTools_debug", "QtXml",
"QtCore", "QtDesigner", "QtGui", "QtMultimedia", "QtOpenGL", "QtScriptTools", "QtSvg", "QtUiTools", "QtWebKit", "QtXmlPatterns"]
from subprocess import Popen
from subprocess import PIPE
qtflags = []
# TODO just inject the flags I used but not all of them
for module in QtModules:
qtflags += Popen(['pkg-config', '--cflags'] + QtModules, stdout=PIPE).communicate()[0].split()
flags += qtflags