summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2023-09-27 12:25:47 +0000
committerTopi Reinio <topi.reinio@qt.io>2023-10-02 21:10:59 +0000
commitb5169b5c909d06c61bdc45b09c97c05154043a24 (patch)
tree79fff874e61e31a09575ec602079505637d77590
parent8606f33641a0a2fb9926ebb604a7fc5894e5fc39 (diff)
Doc: Fix QIcon documentation
* Move \externalpage topics to external-resources.qdoc, as that command cannot be embedded in other topics. * Fix references to non-existent function fallbackIconTheme(). Pick-to: 6.6 Change-Id: I5d08206c53aea9c2d4c6fddf5d04df187b01ef53 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rw-r--r--src/gui/doc/src/external-resources.qdoc11
-rw-r--r--src/gui/image/qicon.cpp27
2 files changed, 20 insertions, 18 deletions
diff --git a/src/gui/doc/src/external-resources.qdoc b/src/gui/doc/src/external-resources.qdoc
index 67ba9f3013..16bca2475d 100644
--- a/src/gui/doc/src/external-resources.qdoc
+++ b/src/gui/doc/src/external-resources.qdoc
@@ -29,15 +29,24 @@
/*!
\externalpage https://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
- \title Icon Theme Specification
+ \title Freedesktop Icon Theme Specification
*/
/*!
+ \externalpage https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
+ \title Freedesktop Icon Naming Specification
+*/
+/*!
\externalpage https://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html#directory_layout
\title Icon Theme Specification - Directory Layout
*/
/*!
+ \externalpage https://freedesktop.org/
+ \title Freedesktop
+*/
+
+/*!
\externalpage https://www.khronos.org/vulkan/
\title Vulkan
*/
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index f95b194f02..fb356f19b2 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -599,9 +599,9 @@ QFactoryLoader *qt_iconEngineFactoryLoader()
icons: via \l addFile() and \l fromTheme().
\l addFile() is useful if you have your own custom directory structure and do
- not need to use the \l {Icon Theme Specification}{freedesktop.org Icon Theme
- Specification}. Icons created via this approach use Qt's \l {High Resolution
- Versions of Images}{"@nx" high DPI syntax}.
+ not need to use the \l {Freedesktop Icon Theme Specification}. Icons
+ created via this approach use Qt's \l {High Resolution Versions of Images}
+ {"@nx" high DPI syntax}.
Using \l fromTheme() is necessary if you plan on following the Icon Theme
Specification. To make QIcon use the high DPI version of an image, add an
@@ -1200,10 +1200,8 @@ void QIcon::setFallbackSearchPaths(const QStringList &paths)
correspond to a directory name in the themeSearchPath()
containing an \c index.theme file describing its contents.
- \externalpage http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
- \title Freedesktop Icon Theme Specification
-
- \sa themeSearchPaths(), themeName()
+ \sa themeSearchPaths(), themeName(),
+ {Freedesktop Icon Theme Specification}
*/
void QIcon::setThemeName(const QString &name)
{
@@ -1222,9 +1220,6 @@ void QIcon::setThemeName(const QString &name)
\l{Freedesktop} based systems at the moment, and the
icon theme depends on your desktop settings.
- \externalpage https://www.freedesktop.org/
- \title Freedesktop
-
\sa setThemeName(), themeSearchPaths(), fromTheme(),
hasThemeIcon()
*/
@@ -1282,7 +1277,7 @@ void QIcon::setFallbackThemeName(const QString &name)
\l{themeName()}{current icon theme}.
If the current theme does not provide an icon for \a name,
- the \l{fallbackIconTheme()}{fallback icon theme} is consulted,
+ the \l{fallbackThemeName()}{fallback icon theme} is consulted,
before falling back to looking up standalone icon files in the
\l{QIcon::fallbackSearchPaths()}{fallback icon search path}.
@@ -1301,10 +1296,8 @@ void QIcon::setFallbackThemeName(const QString &name)
to bundle a \l{setThemeName()}{compliant theme} in one of your
themeSearchPaths(), and set the appropriate themeName().
- \externalpage https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
- \title Freedesktop Icon Naming Specification
-
- \sa themeName(), fallbackIconTheme(), setThemeName(), themeSearchPaths(), fallbackSearchPaths()
+ \sa themeName(), fallbackThemeName(), setThemeName(), themeSearchPaths(), fallbackSearchPaths(),
+ {Freedesktop Icon Naming Specification}
*/
QIcon QIcon::fromTheme(const QString &name)
{
@@ -1327,7 +1320,7 @@ QIcon QIcon::fromTheme(const QString &name)
\l{themeName()}{current icon theme}.
If the current theme does not provide an icon for \a name,
- the \l{fallbackIconTheme()}{fallback icon theme} is consulted,
+ the \l{fallbackThemeName()}{fallback icon theme} is consulted,
before falling back to looking up standalone icon files in the
\l{QIcon::fallbackSearchPaths()}{fallback icon search path}.
@@ -1341,7 +1334,7 @@ QIcon QIcon::fromTheme(const QString &name)
\snippet code/src_gui_image_qicon.cpp 4
- \sa fallbackIconTheme(), fallbackSearchPaths()
+ \sa fallbackThemeName(), fallbackSearchPaths()
*/
QIcon QIcon::fromTheme(const QString &name, const QIcon &fallback)
{