Skip to content

Commit d7ef87f

Browse files
felixonmars18202781743
authored andcommitted
chore: correct typos about Dtk::Gui::DDciIcon::IconAttribute
Log:
1 parent 1ede364 commit d7ef87f

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

docs/util/ddciicon.zh_CN.dox

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ cmake --build build
223223
| Light | 0 |
224224
| Dark | 1 |
225225

226-
@enum Dtk::Gui::DDciIcon::IconAttibute
226+
@enum Dtk::Gui::DDciIcon::IconAttribute
227227
@brief DCI图标属性
228228
@details
229229
| 键 | 值 |
@@ -282,7 +282,7 @@ cmake --build build
282282
@param[in] theme 图标主题
283283
@param[in] mode 图标模式,默认为Normal
284284

285-
@fn bool Dtk::Gui::DDciIcon::isSupportedAttribute(DDciIconMatchResult result, IconAttibute attr)
285+
@fn bool Dtk::Gui::DDciIcon::isSupportedAttribute(DDciIconMatchResult result, IconAttribute attr)
286286
@brief 判断DCI图标是否支持指定属性
287287
@param[in] result DCI图标匹配结果
288288
@param[in] attr 图标属性

include/util/ddciicon.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,10 @@ class DDciIcon
7777
Light = 0,
7878
Dark = 1
7979
};
80-
enum IconAttibute {
80+
D_DECL_DEPRECATED enum IconAttibute {
8181
HasPalette = 0x001
8282
};
83+
using IconAttribute = DDciIcon::IconAttibute;
8384
enum IconMatchedFlag {
8485
None = 0,
8586
DontFallbackMode = 0x01,
@@ -106,8 +107,8 @@ class DDciIcon
106107
int actualSize(int size, Theme theme, Mode mode = Normal) const;
107108

108109
QList<int> availableSizes(Theme theme, Mode mode = Normal) const;
109-
bool isSupportedAttribute(DDciIconMatchResult result, IconAttibute attr) const;
110-
static bool isSupportedAttribute(const DDciIconImage &image, IconAttibute attr);
110+
bool isSupportedAttribute(DDciIconMatchResult result, IconAttribute attr) const;
111+
static bool isSupportedAttribute(const DDciIconImage &image, IconAttribute attr);
111112

112113
QPixmap pixmap(qreal devicePixelRatio, int iconSize, Theme theme, Mode mode = Normal,
113114
const DDciIconPalette &palette = DDciIconPalette()) const;

src/util/ddciicon.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ QList<int> DDciIcon::availableSizes(DDciIcon::Theme theme, DDciIcon::Mode mode)
852852
return sizes;
853853
}
854854

855-
bool DDciIcon::isSupportedAttribute(DDciIconMatchResult result, IconAttibute attr) const
855+
bool DDciIcon::isSupportedAttribute(DDciIconMatchResult result, IconAttribute attr) const
856856
{
857857
switch (attr) {
858858
case HasPalette:
@@ -864,7 +864,7 @@ bool DDciIcon::isSupportedAttribute(DDciIconMatchResult result, IconAttibute att
864864
return false;
865865
}
866866

867-
bool DDciIcon::isSupportedAttribute(const DDciIconImage &image, IconAttibute attr)
867+
bool DDciIcon::isSupportedAttribute(const DDciIconImage &image, IconAttribute attr)
868868
{
869869
if (image.isNull())
870870
return false;

0 commit comments

Comments
 (0)