mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Update code to use C++14 [[deprecated]] attribute
This commit removes the various compiler-specific JUCE_DEPRECATED macros and replaces them with C++14's deprecated attribute. It also removes the JUCE_CATCH_DEPRECATED_CODE_MISUSE flag as we can rely on the override specifier catching usage of these old virtual methods, and tidies up the DOXYGEN preprocessor checks as they were inconsistent across the codebase.
This commit is contained in:
parent
a435026b24
commit
b9542ccc4c
104 changed files with 579 additions and 587 deletions
|
|
@ -2442,13 +2442,15 @@ public:
|
|||
|
||||
//==============================================================================
|
||||
#ifndef DOXYGEN
|
||||
// This method has been deprecated in favour of the setFocusContainerType() method
|
||||
// that takes a more descriptive enum.
|
||||
JUCE_DEPRECATED_WITH_BODY (void setFocusContainer (bool shouldBeFocusContainer) noexcept,
|
||||
[[deprecated ("Use the setFocusContainerType that takes a more descriptive enum.")]]
|
||||
void setFocusContainer (bool shouldBeFocusContainer) noexcept
|
||||
{
|
||||
setFocusContainerType (shouldBeFocusContainer ? FocusContainerType::keyboardFocusContainer
|
||||
: FocusContainerType::none);
|
||||
})
|
||||
}
|
||||
|
||||
[[deprecated ("Use the contains that takes a Point<int>.")]]
|
||||
void contains (int, int) = delete;
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
|
@ -2584,19 +2586,6 @@ private:
|
|||
*/
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Component)
|
||||
|
||||
//==============================================================================
|
||||
#if JUCE_CATCH_DEPRECATED_CODE_MISUSE
|
||||
// This is included here just to cause a compile error if your code is still handling
|
||||
// drag-and-drop with this method. If so, just update it to use the new FileDragAndDropTarget
|
||||
// class, which is easy (just make your class inherit from FileDragAndDropTarget, and
|
||||
// implement its methods instead of this Component method).
|
||||
virtual void filesDropped (const StringArray&, int, int) {}
|
||||
|
||||
// This is included here to cause an error if you use or overload it - it has been deprecated in
|
||||
// favour of contains (Point<int>)
|
||||
void contains (int, int) = delete;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
//==============================================================================
|
||||
/** @internal */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue