mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Deprecations: Add ignore deprecation warning macros
This commit is contained in:
parent
6b08ced201
commit
5e803ded5f
42 changed files with 114 additions and 148 deletions
|
|
@ -1697,11 +1697,9 @@ void CodeEditorComponent::setFont (const Font& newFont)
|
|||
{
|
||||
font = newFont;
|
||||
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4996)
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
|
||||
JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS
|
||||
charWidth = font.getStringWidthFloat ("0");
|
||||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
||||
JUCE_END_IGNORE_WARNINGS_MSVC
|
||||
JUCE_END_IGNORE_DEPRECATION_WARNINGS
|
||||
|
||||
lineHeight = roundToInt (font.getHeight());
|
||||
resized();
|
||||
|
|
|
|||
|
|
@ -63,9 +63,9 @@ namespace
|
|||
return kIOMainPortDefault;
|
||||
#endif
|
||||
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
|
||||
JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS
|
||||
return kIOMasterPortDefault;
|
||||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
||||
JUCE_END_IGNORE_DEPRECATION_WARNINGS
|
||||
}();
|
||||
|
||||
if (IOServiceGetMatchingServices (defaultPort, dict, &iter) == kIOReturnSuccess
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
namespace juce
|
||||
{
|
||||
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
|
||||
JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS
|
||||
|
||||
namespace PushNotificationsDelegateDetailsOsx
|
||||
{
|
||||
|
|
@ -534,6 +534,6 @@ private:
|
|||
PushNotifications::Settings settings;
|
||||
};
|
||||
|
||||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
||||
JUCE_END_IGNORE_DEPRECATION_WARNINGS
|
||||
|
||||
} // namespace juce
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
namespace juce
|
||||
{
|
||||
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
|
||||
JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS
|
||||
|
||||
extern NSMenu* createNSMenu (const PopupMenu&, const String& name, int topLevelMenuId,
|
||||
int topLevelIndex, bool addDelegate);
|
||||
|
|
@ -446,6 +446,6 @@ void SystemTrayIconComponent::showDropdownMenu (const PopupMenu& menu)
|
|||
pimpl->statusItemHolder->showMenu (menu);
|
||||
}
|
||||
|
||||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
||||
JUCE_END_IGNORE_DEPRECATION_WARNINGS
|
||||
|
||||
} // namespace juce
|
||||
|
|
|
|||
|
|
@ -1137,11 +1137,11 @@ private:
|
|||
// Using the non-deprecated webkit_javascript_result_get_js_value() functions seems easier
|
||||
// but returned values fail the JS_IS_VALUE() internal assertion. The example code from the
|
||||
// documentation doesn't seem to work either.
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
|
||||
JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS
|
||||
WebKitJavascriptResultUniquePtr jsResult { wk.juce_webkit_web_view_run_javascript_finish (owner->webview,
|
||||
result,
|
||||
&error) };
|
||||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
||||
JUCE_END_IGNORE_DEPRECATION_WARNINGS
|
||||
|
||||
if (jsResult == nullptr)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -197,9 +197,9 @@ struct WebViewKeyEquivalentResponder final : public ObjCClass<WebViewClass>
|
|||
if (@available (macOS 10.12, *))
|
||||
return (modifierFlags & NSEventModifierFlagDeviceIndependentFlagsMask) == NSEventModifierFlagCommand;
|
||||
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
|
||||
JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS
|
||||
return (modifierFlags & NSDeviceIndependentModifierFlagsMask) == NSCommandKeyMask;
|
||||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
||||
JUCE_END_IGNORE_DEPRECATION_WARNINGS
|
||||
}();
|
||||
|
||||
if (isCommandDown)
|
||||
|
|
@ -270,7 +270,7 @@ struct WebViewKeyEquivalentResponder final : public ObjCClass<WebViewClass>
|
|||
}
|
||||
};
|
||||
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
|
||||
JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS
|
||||
struct DownloadClickDetectorClass final : public ObjCClass<NSObject>
|
||||
{
|
||||
DownloadClickDetectorClass() : ObjCClass ("JUCEWebClickDetector_")
|
||||
|
|
@ -372,7 +372,7 @@ private:
|
|||
}
|
||||
}
|
||||
};
|
||||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
||||
JUCE_END_IGNORE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
||||
// Connects the delegate to the rest of the implementation without making WebViewDelegateClass
|
||||
|
|
@ -652,7 +652,7 @@ window.__JUCE__ = {
|
|||
|
||||
//==============================================================================
|
||||
#if JUCE_MAC
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
|
||||
JUCE_BEGIN_IGNORE_DEPRECATION_WARNINGS
|
||||
class WebBrowserComponent::Impl::Platform::WebViewImpl : public WebBrowserComponent::Impl::PlatformInterface,
|
||||
#if JUCE_MAC
|
||||
public NSViewComponent
|
||||
|
|
@ -783,7 +783,7 @@ private:
|
|||
ObjCObjectHandle<WebView*> webView;
|
||||
ObjCObjectHandle<id> clickListener;
|
||||
};
|
||||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
||||
JUCE_END_IGNORE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
||||
class WebBrowserComponent::Impl::Platform::WKWebViewImpl : public WebBrowserComponent::Impl::PlatformInterface,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue