diff --git a/autotests/folding/test.qdocconf.fold b/autotests/folding/test.qdocconf.fold new file mode 100644 --- /dev/null +++ b/autotests/folding/test.qdocconf.fold @@ -0,0 +1,65 @@ +# Test file for qdocconf highlighting +# +# Alerts: ### TODO + +# example fragments from GammaRay: +project = "GammaRay" +description = "GammaRay User Manual" +url = https://doc.qt.io/GammaRay + +sourcedirs = . +sources.fileextensions = "*.qdoc" + +imagedirs = images + +exampledirs = ../../examples +examples.fileextensions = "*.h *.cpp *.qml" + +depends += qtcore qtnetwork qtgui qtwidgets qtqml qtquick qt3d qtwaylandcompositor + +qhp.projects = GammaRay + +qhp.GammaRay.file = gammaray-manual.qhp +qhp.GammaRay.namespace = com.kdab.GammaRay.$QT_VERSION_TAG +qhp.GammaRay.virtualFolder = gammaray +qhp.GammaRay.indexTitle = GammaRay User Manual +qhp.GammaRay.indexRoot = + +qhp.GammaRay.subprojects = manual +qhp.GammaRay.subprojects.manual.title = GammaRay User Manual +qhp.GammaRay.subprojects.manual.indexTitle = GammaRay User Manual +qhp.GammaRay.subprojects.manual.type = manual + +navigation.homepage = "GammaRay User Manual" +navigation.landingpage = "GammaRay User Manual" +buildversion = "GammaRay User Manual $QT_VERSION" + +# backward compatibility with Qt < 5.7 +macro.borderedimage = "\\div {class=\"border\"} \\image \1\n\\enddiv" + +include(gammaray-manual.qdocconf) + +HTML.stylesheets += \ + style/qt5-sidebar.html \ + style/gammaray-manual-splash-screen.png \ + style/gammaray-logo-256.png \ + +# this goes between breadcrumb and sidebar +HTML.postpostheader = \ + "\n" \ + "
\n" \ + "
\n" + +# this goes between sidebar and actual content +HTML.prologue = \ + "
\n" \ + +# selector use from qtbase: +qhp.QtCore.filterAttributes = qtcore $QT_VERSION qtrefdoc +qhp.QtCore.customFilters.Qt.name = QtCore $QT_VERSION +qhp.QtCore.customFilters.Qt.filterAttributes = qtcore $QT_VERSION +qhp.QtCore.subprojects = classes +qhp.QtCore.subprojects.classes.title = C++ Classes +qhp.QtCore.subprojects.classes.indexTitle = Qt Core C++ Classes +qhp.QtCore.subprojects.classes.selectors = class fake:headerfile +qhp.QtCore.subprojects.classes.sortPages = true diff --git a/autotests/html/test.qdocconf.html b/autotests/html/test.qdocconf.html new file mode 100644 --- /dev/null +++ b/autotests/html/test.qdocconf.html @@ -0,0 +1,72 @@ + + + +test.qdocconf + +
+# Test file for qdocconf highlighting
+#
+# Alerts: ### TODO
+
+# example fragments from GammaRay:
+project = "GammaRay"
+description = "GammaRay User Manual"
+url = https://doc.qt.io/GammaRay
+
+sourcedirs = .
+sources.fileextensions = "*.qdoc"
+
+imagedirs = images
+
+exampledirs = ../../examples
+examples.fileextensions = "*.h *.cpp *.qml"
+
+depends += qtcore qtnetwork qtgui qtwidgets qtqml qtquick qt3d qtwaylandcompositor
+
+qhp.projects = GammaRay
+
+qhp.GammaRay.file = gammaray-manual.qhp
+qhp.GammaRay.namespace = com.kdab.GammaRay.$QT_VERSION_TAG
+qhp.GammaRay.virtualFolder = gammaray
+qhp.GammaRay.indexTitle = GammaRay User Manual
+qhp.GammaRay.indexRoot =
+
+qhp.GammaRay.subprojects = manual
+qhp.GammaRay.subprojects.manual.title = GammaRay User Manual
+qhp.GammaRay.subprojects.manual.indexTitle = GammaRay User Manual
+qhp.GammaRay.subprojects.manual.type = manual
+
+navigation.homepage    = "GammaRay User Manual"
+navigation.landingpage = "GammaRay User Manual"
+buildversion = "GammaRay User Manual $QT_VERSION"
+
+# backward compatibility with Qt < 5.7
+macro.borderedimage = "\\div {class=\"border\"} \\image \1\n\\enddiv"
+
+include(gammaray-manual.qdocconf)
+
+HTML.stylesheets += \
+    style/qt5-sidebar.html \
+    style/gammaray-manual-splash-screen.png \
+    style/gammaray-logo-256.png \
+
+# this goes between breadcrumb and sidebar
+HTML.postpostheader = \
+    "</ul></div></nav>\n" \
+    "<div class=\"container\">\n" \
+    "<div class=\"row\">\n"
+
+# this goes between sidebar and actual content
+HTML.prologue = \
+    " <div class=\"content\" id=\"content\">\n" \
+
+# selector use from qtbase:
+qhp.QtCore.filterAttributes    = qtcore $QT_VERSION qtrefdoc
+qhp.QtCore.customFilters.Qt.name = QtCore $QT_VERSION
+qhp.QtCore.customFilters.Qt.filterAttributes = qtcore $QT_VERSION
+qhp.QtCore.subprojects         = classes
+qhp.QtCore.subprojects.classes.title = C++ Classes
+qhp.QtCore.subprojects.classes.indexTitle = Qt Core C++ Classes
+qhp.QtCore.subprojects.classes.selectors = class fake:headerfile
+qhp.QtCore.subprojects.classes.sortPages = true
+
diff --git a/autotests/input/test.qdocconf b/autotests/input/test.qdocconf new file mode 100644 --- /dev/null +++ b/autotests/input/test.qdocconf @@ -0,0 +1,65 @@ +# Test file for qdocconf highlighting +# +# Alerts: ### TODO + +# example fragments from GammaRay: +project = "GammaRay" +description = "GammaRay User Manual" +url = https://doc.qt.io/GammaRay + +sourcedirs = . +sources.fileextensions = "*.qdoc" + +imagedirs = images + +exampledirs = ../../examples +examples.fileextensions = "*.h *.cpp *.qml" + +depends += qtcore qtnetwork qtgui qtwidgets qtqml qtquick qt3d qtwaylandcompositor + +qhp.projects = GammaRay + +qhp.GammaRay.file = gammaray-manual.qhp +qhp.GammaRay.namespace = com.kdab.GammaRay.$QT_VERSION_TAG +qhp.GammaRay.virtualFolder = gammaray +qhp.GammaRay.indexTitle = GammaRay User Manual +qhp.GammaRay.indexRoot = + +qhp.GammaRay.subprojects = manual +qhp.GammaRay.subprojects.manual.title = GammaRay User Manual +qhp.GammaRay.subprojects.manual.indexTitle = GammaRay User Manual +qhp.GammaRay.subprojects.manual.type = manual + +navigation.homepage = "GammaRay User Manual" +navigation.landingpage = "GammaRay User Manual" +buildversion = "GammaRay User Manual $QT_VERSION" + +# backward compatibility with Qt < 5.7 +macro.borderedimage = "\\div {class=\"border\"} \\image \1\n\\enddiv" + +include(gammaray-manual.qdocconf) + +HTML.stylesheets += \ + style/qt5-sidebar.html \ + style/gammaray-manual-splash-screen.png \ + style/gammaray-logo-256.png \ + +# this goes between breadcrumb and sidebar +HTML.postpostheader = \ + "
\n" \ + "
\n" \ + "
\n" + +# this goes between sidebar and actual content +HTML.prologue = \ + "
\n" \ + +# selector use from qtbase: +qhp.QtCore.filterAttributes = qtcore $QT_VERSION qtrefdoc +qhp.QtCore.customFilters.Qt.name = QtCore $QT_VERSION +qhp.QtCore.customFilters.Qt.filterAttributes = qtcore $QT_VERSION +qhp.QtCore.subprojects = classes +qhp.QtCore.subprojects.classes.title = C++ Classes +qhp.QtCore.subprojects.classes.indexTitle = Qt Core C++ Classes +qhp.QtCore.subprojects.classes.selectors = class fake:headerfile +qhp.QtCore.subprojects.classes.sortPages = true diff --git a/autotests/reference/test.qdocconf.ref b/autotests/reference/test.qdocconf.ref new file mode 100644 --- /dev/null +++ b/autotests/reference/test.qdocconf.ref @@ -0,0 +1,65 @@ +# Test file for qdocconf highlighting
+#
+# Alerts: ### TODO
+
+# example fragments from GammaRay:
+project = "GammaRay"
+description = "GammaRay User Manual"
+url = https://doc.qt.io/GammaRay
+
+sourcedirs = .
+sources.fileextensions = "*.qdoc"
+
+imagedirs = images
+
+exampledirs = ../../examples
+examples.fileextensions = "*.h *.cpp *.qml"
+
+depends += qtcore qtnetwork qtgui qtwidgets qtqml qtquick qt3d qtwaylandcompositor
+
+qhp.projects = GammaRay
+
+qhp.GammaRay.file = gammaray-manual.qhp
+qhp.GammaRay.namespace = com.kdab.GammaRay.$QT_VERSION_TAG
+qhp.GammaRay.virtualFolder = gammaray
+qhp.GammaRay.indexTitle = GammaRay User Manual
+qhp.GammaRay.indexRoot =
+
+qhp.GammaRay.subprojects = manual
+qhp.GammaRay.subprojects.manual.title = GammaRay User Manual
+qhp.GammaRay.subprojects.manual.indexTitle = GammaRay User Manual
+qhp.GammaRay.subprojects.manual.type = manual
+
+navigation.homepage = "GammaRay User Manual"
+navigation.landingpage = "GammaRay User Manual"
+buildversion = "GammaRay User Manual $QT_VERSION"
+
+# backward compatibility with Qt < 5.7
+macro.borderedimage = "\\div {class=\"border\"} \\image \1\n\\enddiv"
+
+include(gammaray-manual.qdocconf)
+
+HTML.stylesheets += \
+ style/qt5-sidebar.html \
+ style/gammaray-manual-splash-screen.png \
+ style/gammaray-logo-256.png \
+
+# this goes between breadcrumb and sidebar
+HTML.postpostheader = \
+ "
\n" \
+ "
\"container\">\n" \
+ "
\"row\">\n"
+
+# this goes between sidebar and actual content
+HTML.prologue = \
+ "
\"content\" id=\"content\">\n" \
+
+# selector use from qtbase:
+qhp.QtCore.filterAttributes = qtcore $QT_VERSION qtrefdoc
+qhp.QtCore.customFilters.Qt.name = QtCore $QT_VERSION
+qhp.QtCore.customFilters.Qt.filterAttributes = qtcore $QT_VERSION
+qhp.QtCore.subprojects = classes
+qhp.QtCore.subprojects.classes.title = C++ Classes
+qhp.QtCore.subprojects.classes.indexTitle = Qt Core C++ Classes
+qhp.QtCore.subprojects.classes.selectors = class fake:headerfile
+qhp.QtCore.subprojects.classes.sortPages = true
diff --git a/data/syntax/qdocconf.xml b/data/syntax/qdocconf.xml new file mode 100644 --- /dev/null +++ b/data/syntax/qdocconf.xml @@ -0,0 +1,136 @@ + + + + + + alias + buildversion + Cpp + customFilters + defines + depends + description + dita + edition + endheader + exampledirs + examples + excludedirs + excludefiles + falsehoods + file + filterAttributes + headerdirs + headers + HTML + imagedirs + images + indexes + indexRoot + indexTitle + language + macro + manifestmeta + name + namespace + navigation + outputdir + outputformats + outputprefixes + outputsuffixes + project + projects + qhp + selectors + sortPages + sourcedirs + sources + sources.fileextensions + spurious + subprojects + tabsize + tagfile + title + type + url + version + versionsym + virtualFolder + + + include + + + namespace + class + qmltype + qmlclass + module + qmlmodule + doc + fake + group + example + headerfile + page + manual + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +