Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Changes

- (2025-08-28) #67, Update to Font Awesome 7, added Pro+ icon support
- (2025-07-15) #66, Style name parsing (stringToStyleEnum) not working properly (contribution by @samapico)
- (2025-05-08) #65, Support for Qt 6.9. Fix the CMakelist example
- (2025-04-07) Update to 6.7.2 (Updated OTF files)
Expand Down
9 changes: 3 additions & 6 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
MIT License
===========
# MIT License

Copyright 2013-2025 [Blommers IT](https://blommersit.nl). All Rights Reserved.
Copyright 2013-2025 [Ribit Software by Blommers IT](https://blommersit.nl). All Rights Reserved.
Author [Rick Blommers](mailto:rick@blommersit.nl)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
Expand All @@ -16,9 +15,7 @@ THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRI
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Font Awesome License
====================
## Font Awesome License

[https://github.com/FortAwesome/Font-Awesome](https://github.com/FortAwesome/Font-Awesome)

Expand Down
140 changes: 109 additions & 31 deletions QtAwesome/QtAwesome.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* MIT Licensed
*
* Copyright 2013-2024 - Reliable Bits Software by Blommers IT. All Rights Reserved.
* Copyright 2013-2025 - Ribit Software by Blommers IT. All Rights Reserved.
* Author Rick Blommers
*/

Expand All @@ -27,7 +27,9 @@
// Initializing namespaces need to happen outside a namespace
static void qtawesome_init_resources()
{
#ifdef FONT_AWESOME_PRO
#if defined(FONT_AWESOME_PRO_PLUS)
Q_INIT_RESOURCE(QtAwesomeProPlus);
#elif defined(FONT_AWESOME_PRO)
Q_INIT_RESOURCE(QtAwesomePro);
#else
Q_INIT_RESOURCE(QtAwesomeFree);
Expand Down Expand Up @@ -211,31 +213,49 @@ class QtAwesomeIconPainterIconEngine : public QIconEngine

//---------------------------------------------------------------------------------------

const QString QtAwesome::FA_BRANDS_FONT_FILENAME = "Font Awesome 6 Brands-Regular-400.otf";
#ifdef FONT_AWESOME_PRO
const QString QtAwesome::FA_DUOTONE_FONT_FILENAME = "pro/Font Awesome 6 Duotone-Solid-900.otf"; // DEPRECATED, use FA_DUOTONE_SOLID_FONT_FILENAME
const QString QtAwesome::FA_DUOTONE_SOLID_FONT_FILENAME = "pro/Font Awesome 6 Duotone-Solid-900.otf";
const QString QtAwesome::FA_DUOTONE_REGULAR_FONT_FILENAME = "pro/Font Awesome 6 Duotone-Regular-400.otf";
const QString QtAwesome::FA_DUOTONE_LIGHT_FONT_FILENAME = "pro/Font Awesome 6 Duotone-Light-300.otf";
const QString QtAwesome::FA_DUOTONE_THIN_FONT_FILENAME = "pro/Font Awesome 6 Duotone-Thin-100.otf";

const QString QtAwesome::FA_SOLID_FONT_FILENAME = "pro/Font Awesome 6 Pro-Solid-900.otf";
const QString QtAwesome::FA_REGULAR_FONT_FILENAME = "pro/Font Awesome 6 Pro-Regular-400.otf";
const QString QtAwesome::FA_LIGHT_FONT_FILENAME = "pro/Font Awesome 6 Pro-Light-300.otf";
const QString QtAwesome::FA_THIN_FONT_FILENAME = "pro/Font Awesome 6 Pro-Thin-100.otf";

const QString QtAwesome::FA_SHARP_SOLID_FONT_FILENAME = "pro/Font Awesome 6 Sharp-Solid-900.otf";
const QString QtAwesome::FA_SHARP_REGULAR_FONT_FILENAME = "pro/Font Awesome 6 Sharp-Regular-400.otf";
const QString QtAwesome::FA_SHARP_LIGHT_FONT_FILENAME = "pro/Font Awesome 6 Sharp-Light-300.otf";
const QString QtAwesome::FA_SHARP_THIN_FONT_FILENAME = "pro/Font Awesome 6 Sharp-Thin-100.otf";

const QString QtAwesome::FA_SHARP_DUOTONE_SOLID_FONT_FILENAME = "pro/Font Awesome 6 Sharp Duotone-Solid-900.otf";
const QString QtAwesome::FA_SHARP_DUOTONE_REGULAR_FONT_FILENAME = "pro/Font Awesome 6 Sharp Duotone-Regular-400.otf";
const QString QtAwesome::FA_SHARP_DUOTONE_LIGHT_FONT_FILENAME = "pro/Font Awesome 6 Sharp Duotone-Light-300.otf";
const QString QtAwesome::FA_SHARP_DUOTONE_THIN_FONT_FILENAME = "pro/Font Awesome 6 Sharp Duotone-Thin-100.otf";
const QString QtAwesome::FA_BRANDS_FONT_FILENAME = "Font Awesome 7 Brands-Regular-400.otf";

#if defined(FONT_AWESOME_PRO)
const QString QtAwesome::FA_DUOTONE_FONT_FILENAME = "pro/Font Awesome 7 Duotone-Solid-900.otf"; // DEPRECATED, use FA_DUOTONE_SOLID_FONT_FILENAME
const QString QtAwesome::FA_DUOTONE_SOLID_FONT_FILENAME = "pro/Font Awesome 7 Duotone-Solid-900.otf";
const QString QtAwesome::FA_DUOTONE_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Duotone-Regular-400.otf";
const QString QtAwesome::FA_DUOTONE_LIGHT_FONT_FILENAME = "pro/Font Awesome 7 Duotone-Light-300.otf";
const QString QtAwesome::FA_DUOTONE_THIN_FONT_FILENAME = "pro/Font Awesome 7 Duotone-Thin-100.otf";

const QString QtAwesome::FA_SOLID_FONT_FILENAME = "pro/Font Awesome 7 Pro-Solid-900.otf";
const QString QtAwesome::FA_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Pro-Regular-400.otf";
const QString QtAwesome::FA_LIGHT_FONT_FILENAME = "pro/Font Awesome 7 Pro-Light-300.otf";
const QString QtAwesome::FA_THIN_FONT_FILENAME = "pro/Font Awesome 7 Pro-Thin-100.otf";

const QString QtAwesome::FA_SHARP_SOLID_FONT_FILENAME = "pro/Font Awesome 7 Sharp-Solid-900.otf";
const QString QtAwesome::FA_SHARP_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Sharp-Regular-400.otf";
const QString QtAwesome::FA_SHARP_LIGHT_FONT_FILENAME = "pro/Font Awesome 7 Sharp-Light-300.otf";
const QString QtAwesome::FA_SHARP_THIN_FONT_FILENAME = "pro/Font Awesome 7 Sharp-Thin-100.otf";

const QString QtAwesome::FA_SHARP_DUOTONE_SOLID_FONT_FILENAME = "pro/Font Awesome 7 Sharp Duotone-Solid-900.otf";
const QString QtAwesome::FA_SHARP_DUOTONE_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Sharp Duotone-Regular-400.otf";
const QString QtAwesome::FA_SHARP_DUOTONE_LIGHT_FONT_FILENAME = "pro/Font Awesome 7 Sharp Duotone-Light-300.otf";
const QString QtAwesome::FA_SHARP_DUOTONE_THIN_FONT_FILENAME = "pro/Font Awesome 7 Sharp Duotone-Thin-100.otf";

#ifdef FONT_AWESOME_PRO_PLUS

const QString QtAwesome::FA_CHISEL_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Chisel-Regular-400";
const QString QtAwesome::FA_ETCH_SOLID_FONT_FILENAME = "pro/Font Awesome 7 Etch-Solid-900.otf";
const QString QtAwesome::FA_JELLY_DUOTONE_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Jelly Duo-Regular-400.otf";
const QString QtAwesome::FA_JELLY_FILL_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Jelly Fill-Regular-400";
const QString QtAwesome::FA_JELLY_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Jelly-Regular-400.otf";
const QString QtAwesome::FA_NOTDOG_DUOTONE_SOLID_FONT_FILENAME = "pro/Font Awesome 7 Notdog Duo-Solid-900.otf";
const QString QtAwesome::FA_NOTDOG_SOLID_FONT_FILENAME = "pro/Font Awesome 7 Notdog-Solid-900.otf";
const QString QtAwesome::FA_SLAB_PRESS_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Slab Press-Regular-400.otf";
const QString QtAwesome::FA_SLAB_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Slab-Regular-400.otf";
const QString QtAwesome::FA_THUMBPRINT_LIGHT_FONT_FILENAME = "pro/Font Awesome 7 Thumbprint-Light-300.otf";
const QString QtAwesome::FA_WHITEBOARD_SEMIBOLD_FONT_FILENAME = "pro/Font Awesome 7 Whiteboard-Semibold-600.otf";

#endif

#else
const QString QtAwesome::FA_REGULAR_FONT_FILENAME = "Font Awesome 6 Free-Regular-400.otf";
const QString QtAwesome::FA_SOLID_FONT_FILENAME = "Font Awesome 6 Free-Solid-900.otf";
const QString QtAwesome::FA_REGULAR_FONT_FILENAME = "Font Awesome 7 Free-Regular-400.otf";
const QString QtAwesome::FA_SOLID_FONT_FILENAME = "Font Awesome 7 Free-Solid-900.otf";
#endif

/// The default icon colors
Expand Down Expand Up @@ -270,6 +290,20 @@ QtAwesome::QtAwesome(QObject* parent)
_fontDetails.insert(fa::fa_sharp_duotone_thin, QtAwesomeFontData(FA_SHARP_DUOTONE_THIN_FONT_FILENAME, FA_SHARP_DUOTONE_THIN_FONT_WEIGHT));
#endif

#ifdef FONT_AWESOME_PRO_PLUS
_fontDetails.insert(fa::fa_chisel_regular, QtAwesomeFontData(FA_CHISEL_REGULAR_FONT_FILENAME, FA_CHISEL_REGULAR_FONT_WEIGHT));
_fontDetails.insert(fa::fa_etch_solid, QtAwesomeFontData(FA_ETCH_SOLID_FONT_FILENAME, FA_ETCH_SOLID_FONT_WEIGHT));
_fontDetails.insert(fa::fa_jelly_regular, QtAwesomeFontData(FA_JELLY_REGULAR_FONT_FILENAME, FA_JELLY_REGULAR_FONT_WEIGHT));
_fontDetails.insert(fa::fa_jelly_duotone_regular, QtAwesomeFontData(FA_JELLY_DUOTONE_REGULAR_FONT_FILENAME, FA_JELLY_DUOTONE_REGULAR_FONT_WEIGHT));
_fontDetails.insert(fa::fa_jelly_fill_regular, QtAwesomeFontData(FA_JELLY_FILL_REGULAR_FONT_FILENAME, FA_JELLY_FILL_REGULAR_FONT_WEIGHT));
_fontDetails.insert(fa::fa_notdog_duotone_solid, QtAwesomeFontData(FA_NOTDOG_DUOTONE_SOLID_FONT_FILENAME, FA_NOTDOG_DUOTONE_SOLID_FONT_WEIGHT));
_fontDetails.insert(fa::fa_notdog_solid, QtAwesomeFontData(FA_NOTDOG_SOLID_FONT_FILENAME, FA_NOTDOG_SOLID_FONT_WEIGHT));
_fontDetails.insert(fa::fa_slab_press_regular, QtAwesomeFontData(FA_SLAB_PRESS_REGULAR_FONT_FILENAME, FA_SLAB_REGULAR_FONT_WEIGHT));
_fontDetails.insert(fa::fa_slab_regular, QtAwesomeFontData(FA_SLAB_REGULAR_FONT_FILENAME, FA_SLAB_REGULAR_FONT_WEIGHT));
_fontDetails.insert(fa::fa_thumbprint_light, QtAwesomeFontData(FA_THUMBPRINT_LIGHT_FONT_FILENAME, FA_THUMBPRINT_LIGHT_FONT_WEIGHT));
_fontDetails.insert(fa::fa_whiteboard_semibold, QtAwesomeFontData(FA_WHITEBOARD_SEMIBOLD_FONT_FILENAME, FA_WHITEBOARD_SEMIBOLD_FONT_WEIGHT));
#endif

#ifdef USE_COLOR_SCHEME
// support dark/light mode
QObject::connect(QApplication::styleHints(), &QStyleHints::colorSchemeChanged, this, [this](Qt::ColorScheme colorScheme){
Expand Down Expand Up @@ -311,18 +345,18 @@ QtAwesome::~QtAwesome()
qDeleteAll(_namedCodepointsList);
}

/// a specialized init function so font-awesome is loaded and initialized
/// this method return true on success, it will return false if the fnot cannot be initialized
/// A specialized init function so font-awesome is loaded and initialized
/// This method return true on success, it will return false if the font cannot be initialized
/// To initialize QtAwesome with font-awesome you need to call this method
bool QtAwesome::initFontAwesome()
{
bool success = true;
// The macro below internally calls "qInitResources_QtAwesome()". this initializes
// the resource system. For a .pri project this isn't required, but when building and using a
// static library the resource need to initialized first.
///
// I've checked th qInitResource_* code and calling this method mutliple times shouldn't be any problem
// (More info about this subject: http://qt-project.org/wiki/QtResources)
//
// I've checked th qInitResource_* code and calling this method multiple times shouldn't be any problem
// (More info about this subject: <http://qt-project.org/wiki/QtResources>)
qtawesome_init_resources();

for (QtAwesomeFontData &fd : _fontDetails) {
Expand Down Expand Up @@ -376,6 +410,20 @@ bool QtAwesome::initFontAwesome()
_namedCodepointsByStyle.insert(fa::fa_sharp_duotone_regular, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_sharp_duotone_light, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_sharp_duotone_thin, _namedCodepointsByStyle.value(fa::fa_solid));

#ifdef FONT_AWESOME_PRO_PLUS
_namedCodepointsByStyle.insert(fa::fa_chisel_regular, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_etch_solid, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_jelly_regular, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_jelly_duotone_regular, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_jelly_fill_regular, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_notdog_duotone_solid, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_notdog_solid, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_slab_press_regular, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_slab_regular, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_thumbprint_light, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_whiteboard_semibold, _namedCodepointsByStyle.value(fa::fa_solid));
#endif
#else
addToNamedCodePoints(fa::fa_regular, faRegularFreeIconArray, sizeof(faRegularFreeIconArray)/sizeof(QtAwesomeNamedIcon));
#endif
Expand Down Expand Up @@ -560,7 +608,23 @@ int QtAwesome::stringToStyleEnum(const QString style) const
else if (style == "fa-sharp-duotone-regular") return fa::fa_sharp_duotone_regular;
else if (style == "fa-sharp-duotone-light") return fa::fa_sharp_duotone_light;
else if (style == "fa-sharp-duotone-thin") return fa::fa_sharp_duotone_thin;

#ifdef FONT_AWESOME_PRO_PLUS
else if (style == "fa-chisel") return fa::fa_chisel_regular;
else if (style == "fa-etch") return fa::fa_etch_solid;
else if (style == "fa-jelly") return fa::fa_jelly_regular;
else if (style == "fa-jelly-duo") return fa::fa_jelly_duotone_regular;
else if (style == "fa-jelly-fill") return fa::fa_jelly_fill_regular;
else if (style == "fa-notdog") return fa::fa_notdog_solid;
else if (style == "fa-notdog-duo") return fa::fa_notdog_duotone_solid;
else if (style == "fa-slab") return fa::fa_slab_regular;
else if (style == "fa-slab-press") return fa::fa_slab_press_regular;
else if (style == "fa-thumbprint") return fa::fa_thumbprint_light;
else if (style == "fa-whiteboard") return fa::fa_whiteboard_semibold;
#endif
#endif


return fa::fa_solid;
}

Expand All @@ -586,7 +650,21 @@ const QString QtAwesome::styleEnumToString(int style) const
case fa::fa_sharp_duotone_regular: return "fa-sharp-duotone-regular";
case fa::fa_sharp_duotone_light: return "fa-sharp-duotone-light";
case fa::fa_sharp_duotone_thin: return "fa-sharp-duotone-thin";

#ifdef FONT_AWESOME_PRO_PLUS
case fa::fa_etch_solid: return "fa-chisel";
case fa::fa_jelly_regular: return "fa-jelly";
case fa::fa_jelly_duotone_regular: return "fa-jelly-duo";
case fa::fa_jelly_fill_regular: return "fa-jelly-fill";
case fa::fa_notdog_solid: return "fa-notdog";
case fa::fa_notdog_duotone_solid: return "fa-notdog-duo";
case fa::fa_slab_regular: return "fa-slab";
case fa::fa_slab_press_regular: return "fa-slab-press";
case fa::fa_thumbprint_light: return "fa-thumbprint";
case fa::fa_whiteboard_semibold: return "fa-whiteboard";
#endif
#endif

}
return "fa-solid";
}
Expand Down
58 changes: 57 additions & 1 deletion QtAwesome/QtAwesome.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* MIT Licensed
*
* Copyright 2013-2024 - Reliable Bits Software by Blommers IT. All Rights Reserved.
* Copyright 2013-2025 - Ribit Software by Blommers IT. All Rights Reserved.
* Author Rick Blommers
*/

Expand All @@ -16,18 +16,25 @@
#include <QRect>
#include <QVariantMap>

// Having font awesome pro+ also means the usage of Font awesome pro
#ifdef FONT_AWESOME_PRO_PLUS
#define FONT_AWESOME_PRO
#endif

#include "QtAwesomeAnim.h"

/// A list of all icon-names with the codepoint (unicode-value) on the right
/// You can use the names on the page http://fortawesome.github.io/Font-Awesome/design.html
#include "QtAwesomeEnumGenerated.h"


namespace fa {

/// A list of all style-names
enum fa_styles {
fa_solid = 0,
fa_regular = 1,

#ifdef FONT_AWESOME_PRO
fa_light = 3,
fa_thin = 4,
Expand All @@ -48,6 +55,27 @@ enum fa_styles {
fa_sharp_duotone_light = 15,
fa_sharp_duotone_thin = 16,
#endif

#ifdef FONT_AWESOME_PRO_PLUS
fa_chisel_regular = 17,

fa_etch_solid = 18,

fa_jelly_regular = 19,
fa_jelly_duotone_regular = 20,
fa_jelly_fill_regular = 21,

fa_notdog_duotone_solid = 22,
fa_notdog_solid = 23,

fa_slab_press_regular = 24,
fa_slab_regular = 25,

fa_thumbprint_light = 26,

fa_whiteboard_semibold = 27,
#endif

fa_brands = 2
};

Expand Down Expand Up @@ -137,6 +165,34 @@ Q_OBJECT
static const QFont::Weight FA_SHARP_DUOTONE_THIN_FONT_WEIGHT = QFont::ExtraLight;
#endif

#ifdef FONT_AWESOME_PRO_PLUS

static const QString FA_CHISEL_REGULAR_FONT_FILENAME; // fa-chisel fa-regular
static const QString FA_ETCH_SOLID_FONT_FILENAME; // fa-etch fa-solid
static const QString FA_JELLY_REGULAR_FONT_FILENAME; // fa-jelly fa-regular
static const QString FA_JELLY_DUOTONE_REGULAR_FONT_FILENAME; // fa-jelly-duo fa-regular
static const QString FA_JELLY_FILL_REGULAR_FONT_FILENAME; // fa-jelly-fill fa-regular
static const QString FA_NOTDOG_DUOTONE_SOLID_FONT_FILENAME; // fa-notdog-duo fa-solid
static const QString FA_NOTDOG_SOLID_FONT_FILENAME; // fa-notdog fa-solid
static const QString FA_SLAB_PRESS_REGULAR_FONT_FILENAME; // fa-slab-press fa-regular
static const QString FA_SLAB_REGULAR_FONT_FILENAME; // fa-slab fa-regular
static const QString FA_THUMBPRINT_LIGHT_FONT_FILENAME; // fa-thumbprint fa-light
static const QString FA_WHITEBOARD_SEMIBOLD_FONT_FILENAME; // fa-whiteboard fa-semibold

static const QFont::Weight FA_CHISEL_REGULAR_FONT_WEIGHT = QFont::Normal;
static const QFont::Weight FA_ETCH_SOLID_FONT_WEIGHT = QFont::Black;
static const QFont::Weight FA_JELLY_REGULAR_FONT_WEIGHT = QFont::Normal;
static const QFont::Weight FA_JELLY_DUOTONE_REGULAR_FONT_WEIGHT = QFont::Normal;
static const QFont::Weight FA_JELLY_FILL_REGULAR_FONT_WEIGHT = QFont::Normal;
static const QFont::Weight FA_NOTDOG_DUOTONE_SOLID_FONT_WEIGHT = QFont::Black;
static const QFont::Weight FA_NOTDOG_SOLID_FONT_WEIGHT = QFont::Black;
static const QFont::Weight FA_SLAB_PRESS_REGULAR_FONT_WEIGHT = QFont::Normal;
static const QFont::Weight FA_SLAB_REGULAR_FONT_WEIGHT = QFont::Normal;
static const QFont::Weight FA_THUMBPRINT_LIGHT_FONT_WEIGHT = QFont::Light;
static const QFont::Weight FA_WHITEBOARD_SEMIBOLD_FONT_WEIGHT = QFont::DemiBold;
#endif


public:

explicit QtAwesome(QObject* parent = nullptr);
Expand Down
11 changes: 9 additions & 2 deletions QtAwesome/QtAwesome.pri
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ defineReplace( resourcesForConfig ){
return($$PWD/QtAwesome$$eval($$1).qrc)
}

options = $$find(CONFIG, fontAwesomePro) $$find(CONFIG, fontAwesomeFree)
count(options, 0) { error("fontAwesomePro or fontAwesomeFree should be defined") }
options = $$find(CONFIG, fontAweomeProPlus) $$find(CONFIG, fontAwesomePro) $$find(CONFIG, fontAwesomeFree)
count(options, 0) { error("fontAwesomeProPlus, fontAwesomePro or fontAwesomeFree should be defined") }
count(options, 2) { error("fontAwesomePro and fontAwesomeFree were defined, only one config is accepted") }

INCLUDEPATH += $$PWD
Expand All @@ -18,6 +18,13 @@ HEADERS += $$PWD/QtAwesome.h \
$$PWD/QtAwesomeStringGenerated.h


CONFIG( fontAwesomeProPlus ){
config = ProPlus
RESOURCES += $$resourcesForConfig(config)
DEFINES += FONT_AWESOME_PRO_PLUS=1
!build_pass:message(using font awesome pro+)
}

CONFIG( fontAwesomePro ){
config = Pro
RESOURCES += $$resourcesForConfig(config)
Expand Down
1 change: 1 addition & 0 deletions QtAwesome/QtAwesome.pro
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ CONFIG += staticlib c++11
QT += widgets

# only one option must be enabled
#CONFIG += fontAwesomeProPlus
#CONFIG += fontAwesomePro
CONFIG += fontAwesomeFree
include(QtAwesome.pri)
Expand Down
2 changes: 0 additions & 2 deletions QtAwesome/QtAwesomeAnim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ QtAwesomeAnimation::QtAwesomeAnimation(QWidget *parentWidget, int interval, int
, step_(step)
, angle_(0.0f)
{

}

void QtAwesomeAnimation::setup(QPainter &painter, const QRect &rect)
Expand All @@ -38,7 +37,6 @@ void QtAwesomeAnimation::setup(QPainter &painter, const QRect &rect)
}
}


void QtAwesomeAnimation::update()
{
angle_ += step_;
Expand Down
1 change: 0 additions & 1 deletion QtAwesome/QtAwesomeAnim.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ namespace fa {
int interval_;
int step_;
float angle_;

};
} // namespace fa

Expand Down
Loading
Loading