From 5c99c28656252b615d8e254a4bf6d37b44004f5f Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Sat, 30 Sep 2023 20:48:53 +0300 Subject: [PATCH] chore: correct typos about Dtk::Gui::DDciIcon::IconAttribute Log: --- docs/util/ddciicon.zh_CN.dox | 4 ++-- include/util/ddciicon.h | 6 +++--- src/util/ddciicon.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/util/ddciicon.zh_CN.dox b/docs/util/ddciicon.zh_CN.dox index 5da86961..9a7bcd24 100644 --- a/docs/util/ddciicon.zh_CN.dox +++ b/docs/util/ddciicon.zh_CN.dox @@ -223,7 +223,7 @@ cmake --build build | Light | 0 | | Dark | 1 | -@enum Dtk::Gui::DDciIcon::IconAttibute +@enum Dtk::Gui::DDciIcon::IconAttribute @brief DCI图标属性 @details | 键 | 值 | @@ -282,7 +282,7 @@ cmake --build build @param[in] theme 图标主题 @param[in] mode 图标模式,默认为Normal -@fn bool Dtk::Gui::DDciIcon::isSupportedAttribute(DDciIconMatchResult result, IconAttibute attr) +@fn bool Dtk::Gui::DDciIcon::isSupportedAttribute(DDciIconMatchResult result, IconAttribute attr) @brief 判断DCI图标是否支持指定属性 @param[in] result DCI图标匹配结果 @param[in] attr 图标属性 diff --git a/include/util/ddciicon.h b/include/util/ddciicon.h index bab0ef80..53b4e82c 100644 --- a/include/util/ddciicon.h +++ b/include/util/ddciicon.h @@ -76,7 +76,7 @@ class DDciIcon Light = 0, Dark = 1 }; - enum IconAttibute { + enum IconAttribute { HasPalette = 0x001 }; enum IconMatchedFlag { @@ -105,8 +105,8 @@ class DDciIcon int actualSize(int size, Theme theme, Mode mode = Normal) const; QList availableSizes(Theme theme, Mode mode = Normal) const; - bool isSupportedAttribute(DDciIconMatchResult result, IconAttibute attr) const; - static bool isSupportedAttribute(const DDciIconImage &image, IconAttibute attr); + bool isSupportedAttribute(DDciIconMatchResult result, IconAttribute attr) const; + static bool isSupportedAttribute(const DDciIconImage &image, IconAttribute attr); QPixmap pixmap(qreal devicePixelRatio, int iconSize, Theme theme, Mode mode = Normal, const DDciIconPalette &palette = DDciIconPalette()) const; diff --git a/src/util/ddciicon.cpp b/src/util/ddciicon.cpp index 57a3e135..1b6e507e 100644 --- a/src/util/ddciicon.cpp +++ b/src/util/ddciicon.cpp @@ -850,7 +850,7 @@ QList DDciIcon::availableSizes(DDciIcon::Theme theme, DDciIcon::Mode mode) return sizes; } -bool DDciIcon::isSupportedAttribute(DDciIconMatchResult result, IconAttibute attr) const +bool DDciIcon::isSupportedAttribute(DDciIconMatchResult result, IconAttribute attr) const { switch (attr) { case HasPalette: @@ -862,7 +862,7 @@ bool DDciIcon::isSupportedAttribute(DDciIconMatchResult result, IconAttibute att return false; } -bool DDciIcon::isSupportedAttribute(const DDciIconImage &image, IconAttibute attr) +bool DDciIcon::isSupportedAttribute(const DDciIconImage &image, IconAttribute attr) { if (image.isNull()) return false;