Commit Graph

3 Commits

Author SHA1 Message Date
Luca Di Sera
5c66c08bed Doc: Add DocBook version of youtube macro
QDoc allows code-expanding macros to be defined so that the user can
abstract away common code in a simple to use command.

Furthermore, macros allows for a different expansion based on the
currently generated format so that format-specific requirements can be
satisfied when required.

Due to a certain bug in QDoc, when generating the DocBook format, QDoc
would expand an HTML specific macro definition when a DocBook specific
one was not provided.

As this bug is now being fixed, the DocBook format will lose some of the
output that it was previously generating.

For example, the "\youtube" macro is defined, for HTML, so that a
youtube video can be embedded by reference.

To avoid losing the usage of "\youtube" when generating DocBook, an
equivalent version expansion of the macro is now provided for the
DocBook format.

Change-Id: Id74155f2c30b80b5f4490f8451cd8d00535806d6
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-06-14 16:18:55 +02:00
Venugopal Shivashankar
98a94cd6da Doc: Add qdoc macro for tabbed content
The macro enables tabbed content in the online style
only. It's usage must be gaurded with a conditional
block as shown in the following example to handle
the offline style usecase:

 \if(onlinedocs)
   \tab {build-qt-app}{tab-cmake}{CMake}{selected}
   \tab {build-qt-app}{tab-qmake}{qmake}{}
   \tabcontent {tab-cmake}
 \else
   \section1 Using CMake
 \endif
   CMake-specific instructions go here
 \if(onlinedocs)
   \endtabcontent
   \tabcontent {tab-qmake}
 \else
   \section1 Using qmake
 \endif
   qmake-specific instructions go here
 \if(onlinedocs)
   \endtabcontent
 \endif

Pick-to: 6.2 6.3
Change-Id: I02d50c057280a9ffea913642284e67ddcda7aa94
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2022-04-05 10:30:00 +02:00
Topi Reinio
ca8e9ff2ef Doc: Make \youtube macro work with litehtml help backend
Unlike the QTextBrowser backend, litehtml does not render elements
inside <iframe> correctly. This prevented external links to
YouTube from working in offline documentation.

Move the <iframe> to a macro override specific to online doc builds.

Pick-to: 6.0 6.0.0
Fixes: QTBUG-88975
Change-Id: Iff7828ddeed353620eaa9ac669a3e0c03749daa2
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-12-01 08:12:09 +00:00