aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/syntax-highlighting/data/generators/get-Qt-classes.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/3rdparty/syntax-highlighting/data/generators/get-Qt-classes.sh')
-rw-r--r--src/libs/3rdparty/syntax-highlighting/data/generators/get-Qt-classes.sh40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/libs/3rdparty/syntax-highlighting/data/generators/get-Qt-classes.sh b/src/libs/3rdparty/syntax-highlighting/data/generators/get-Qt-classes.sh
new file mode 100644
index 0000000000..f2735c88a5
--- /dev/null
+++ b/src/libs/3rdparty/syntax-highlighting/data/generators/get-Qt-classes.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+#
+# Copyright (c) 2012-2013 by Alex Turbov
+#
+# Grab a documented (officially) class list from Qt project web site:
+# http://qt-project.org/doc/qt-${version}/classes.html
+#
+
+version=$1
+shift
+
+case "$version" in
+5*)
+ url="http://qt-project.org/doc/qt-${version}/qtdoc/classes.html"
+ ;;
+4*)
+ url="http://qt-project.org/doc/qt-${version}/classes.html"
+ ;;
+*)
+ echo "*** Error: Only Qt4 and Qt5 supported!"
+esac
+
+if [ -n "$version" ]; then
+ tmp=`mktemp`
+ wget -O $tmp "$url"
+ cat $tmp | egrep '^<dd><a href=".*\.html">.*</a></dd>$' \
+ | sed -e 's,<dd><a href=".*\.html">\(.*\)</a></dd>,<item> \1 </item>,' \
+ | grep -v 'qoutputrange'
+ rm $tmp
+else
+ cat <<EOF
+Usage:
+ $0 Qt-version
+
+Note: Only major and minor version required
+
+Example:
+ $0 4.8
+EOF
+fi