mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-20 01:14:20 +00:00
macOS/iOS: Fix unguarded availability warnings
This commit is contained in:
parent
ef8ad92138
commit
eda5c696e5
27 changed files with 220 additions and 177 deletions
|
|
@ -26,7 +26,7 @@
|
|||
namespace juce
|
||||
{
|
||||
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wunguarded-availability", "-Wunguarded-availability-new", "-Wdeprecated-declarations")
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
|
||||
|
||||
extern NSMenu* createNSMenu (const PopupMenu&, const String& name, int topLevelMenuId,
|
||||
int topLevelIndex, bool addDelegate);
|
||||
|
|
@ -87,7 +87,7 @@ struct StatusItemContainer : public Timer
|
|||
};
|
||||
|
||||
//==============================================================================
|
||||
struct ButtonBasedStatusItem : public StatusItemContainer
|
||||
struct API_AVAILABLE (macos (10.10)) ButtonBasedStatusItem : public StatusItemContainer
|
||||
{
|
||||
//==============================================================================
|
||||
ButtonBasedStatusItem (SystemTrayIconComponent& iconComp, const Image& im)
|
||||
|
|
@ -384,7 +384,7 @@ public:
|
|||
//==============================================================================
|
||||
Pimpl (SystemTrayIconComponent& iconComp, const Image& im)
|
||||
{
|
||||
if (std::floor (NSFoundationVersionNumber) > NSFoundationVersionNumber10_10)
|
||||
if (@available (macOS 10.10, *))
|
||||
statusItemHolder = std::make_unique<ButtonBasedStatusItem> (iconComp, im);
|
||||
else
|
||||
statusItemHolder = std::make_unique<ViewBasedStatusItem> (iconComp, im);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue