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
|
|
@ -238,13 +238,6 @@ private:
|
|||
const MouseInputSource* getMouseInputSourceForDrag (Component* sourceComponent, const MouseInputSource* inputSourceCausingDrag);
|
||||
bool isAlreadyDragging (Component* sourceComponent) const noexcept;
|
||||
|
||||
#if JUCE_CATCH_DEPRECATED_CODE_MISUSE
|
||||
// This is just here to cause a compile error in old code that hasn't been changed to use the new
|
||||
// version of this method.
|
||||
virtual int dragOperationStarted() { return 0; }
|
||||
virtual int dragOperationEnded() { return 0; }
|
||||
#endif
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DragAndDropContainer)
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -241,13 +241,15 @@ public:
|
|||
*/
|
||||
static const Point<float> offscreenMousePos;
|
||||
|
||||
#if ! DOXYGEN
|
||||
// This method has been deprecated and replaced with the isLongPressOrDrag() and hasMovedSignificantlySincePressed()
|
||||
// methods. If you want the same behaviour you should use isLongPressOrDrag() which accounts for the amount of time
|
||||
// that the input source has been held down for, but if you only want to know whether it has been moved use
|
||||
// hasMovedSignificantlySincePressed() instead.
|
||||
JUCE_DEPRECATED (bool hasMouseMovedSignificantlySincePressed() const noexcept);
|
||||
//==============================================================================
|
||||
#ifndef DOXYGEN
|
||||
[[deprecated ("This method has been replaced with the isLongPressOrDrag and hasMovedSignificantlySincePressed "
|
||||
"methods. If you want the same behaviour you should use isLongPressOrDrag which accounts for the "
|
||||
"amount of time that the input source has been held down for, but if you only want to know whether "
|
||||
"it has been moved use hasMovedSignificantlySincePressed instead.")]]
|
||||
bool hasMouseMovedSignificantlySincePressed() const noexcept;
|
||||
#endif
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
friend class ComponentPeer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue