Skip to content

Commit

Permalink
Doc: Fix qt_import_plugins snippet to use Qt6::
Browse files Browse the repository at this point in the history
The documentation text uses Qt6:: instead of Qt::, so let's
also use that in the shown snippet. This is also the style
we promote for targets in other documentation pages.

While at it, print the target names consistently in monospace
font.

Pick-to: 6.7
Change-Id: Ia4d67bad2790d6688ef8d5b4103453c5c40877bc
Reviewed-by: Joerg Bornemann <[email protected]>
(cherry picked from commit e836f87)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
  • Loading branch information
kkoehne authored and Qt Cherry-pick Bot committed Sep 19, 2024
1 parent 3eecf66 commit 9a8835c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/corelib/doc/snippets/cmake-macros/examples.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ qt_generate_moc(main.cpp main.moc TARGET myapp)

#! [qt_import_plugins]
qt_add_executable(myapp main.cpp)
target_link_libraries(myapp Qt::Gui Qt::Sql)
target_link_libraries(myapp Qt6::Gui Qt6::Sql)
qt_import_plugins(myapp
INCLUDE Qt::QCocoaIntegrationPlugin
EXCLUDE Qt::QMinimalIntegrationPlugin
INCLUDE_BY_TYPE imageformats Qt::QGifPlugin Qt::QJpegPlugin
INCLUDE Qt6::QCocoaIntegrationPlugin
EXCLUDE Qt6::QMinimalIntegrationPlugin
INCLUDE_BY_TYPE imageformats Qt6::QGifPlugin Qt6::QJpegPlugin
EXCLUDE_BY_TYPE sqldrivers
)
#! [qt_import_plugins]
Expand Down
2 changes: 1 addition & 1 deletion src/corelib/doc/src/cmake/qt_import_plugins.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ In the snippet above, the following occurs with the executable \c myapp:
\li The \c Qt6::QMinimalIntegrationPlugin plugin is
excluded from being automatically imported into myapp.
\li The default list of plugins for \c imageformats is
overridden to only include Qt6::QGifPlugin and Qt6::QJpegPlugin.
overridden to only include \c Qt6::QGifPlugin and \c Qt6::QJpegPlugin.
\li All \c sqldrivers plugins are excluded from automatic importing.
\endlist

Expand Down

0 comments on commit 9a8835c

Please sign in to comment.