Skip to content

Commit

Permalink
Fix build for Qt 5.15
Browse files Browse the repository at this point in the history
  • Loading branch information
cschleifenbaum committed Jun 1, 2020
1 parent 34efc63 commit a7db88b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/kdmactouchbar.mm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,18 @@

QT_BEGIN_NAMESPACE

#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
NSImage *qt_mac_create_nsimage(const QIcon &icon, int defaultSize = 0);
#else
// defined in gui/painting/qcoregraphics.mm
@interface NSImage (QtExtras)
+ (instancetype)imageFromQIcon:(const QIcon &)icon
@end
NSImage *qt_mac_create_nsimage(const QIcon &icon)
{
return [NSImage imageFromQIcon:icon];
}
#endif

static QString identifierForAction(QObject *action)
{
Expand Down

0 comments on commit a7db88b

Please sign in to comment.