Skip to content

Commit c197c2a

Browse files
committed
fix #66, Style name parsing
- (stringToStyleEnum) not working properly (contribution by @samapico)
1 parent 0262db7 commit c197c2a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Changes
22

3+
- (2025-07-15) #66, Style name parsing (stringToStyleEnum) not working properly (contribution by @samapico)
34
- (2025-05-08) #65, Support for Qt 6.9. Fix the CMakelist example
45
- (2025-04-07) Update to 6.7.2 (Updated OTF files)
56
- (2024-11-21) Update to 6.7.1, Extra Duotone styles

QtAwesome/QtAwesome.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ QIcon QtAwesome::icon(const QString& name, const QVariantMap& options)
462462

463463
if( spaceIndex > 0) {
464464
QString styleName = name.left(spaceIndex);
465-
style = stringToStyleEnum(styleName.startsWith("fa-") ? styleName.mid(3) : name);
465+
style = stringToStyleEnum(styleName.startsWith("fa-") ? styleName : "fa-" + styleName);
466466
iconName = name.mid(spaceIndex + 1);
467467
} else {
468468
iconName = name;

0 commit comments

Comments
 (0)