From 4a9663a2ea12e41795ee19ad006f0a4dd95d9715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 29 Aug 2018 15:09:24 +0200 Subject: [PATCH] Platform: update deprecation warnings/errors. Consistent capitalization, add the warnings also on a file level; hide the deprecation warnings when compiling the library itself. --- src/Magnum/Platform/GlutApplication.cpp | 2 -- src/Magnum/Platform/GlutApplication.h | 17 ++++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/Magnum/Platform/GlutApplication.cpp b/src/Magnum/Platform/GlutApplication.cpp index cb11c27d9..3e29f52fa 100644 --- a/src/Magnum/Platform/GlutApplication.cpp +++ b/src/Magnum/Platform/GlutApplication.cpp @@ -37,7 +37,6 @@ namespace Magnum { namespace Platform { CORRADE_IGNORE_DEPRECATED_PUSH GlutApplication* GlutApplication::_instance = nullptr; -CORRADE_IGNORE_DEPRECATED_POP GlutApplication::GlutApplication(const Arguments& arguments): GlutApplication{arguments, Configuration{}, GLConfiguration{}} {} @@ -203,7 +202,6 @@ GlutApplication::Configuration::Configuration(): {} GlutApplication::Configuration::~Configuration() = default; -CORRADE_IGNORE_DEPRECATED_PUSH template class BasicScreen; template class BasicScreenedApplication; CORRADE_IGNORE_DEPRECATED_POP diff --git a/src/Magnum/Platform/GlutApplication.h b/src/Magnum/Platform/GlutApplication.h index ed81f6cb1..6c5fe0e27 100644 --- a/src/Magnum/Platform/GlutApplication.h +++ b/src/Magnum/Platform/GlutApplication.h @@ -26,8 +26,13 @@ */ /** @file - * @brief Class @ref Magnum::Platform::GlutApplication, macro @ref MAGNUM_GLUTAPPLICATION_MAIN() - */ +@brief Class @ref Magnum::Platform::GlutApplication, macro @ref MAGNUM_GLUTAPPLICATION_MAIN() + +@deprecated This application is based on an outdated toolkit and scheduled for + removal in a future release. Please consider switching to either + @ref Magnum::Platform::Sdl2Application or @ref Magnum::Platform::GlfwApplication + as soon as possible. +*/ #include #include @@ -44,16 +49,17 @@ #include #ifndef MAGNUM_BUILD_DEPRECATED -#error Scheduled for removal. Consider switching to Sdl2Application or GlfwApplication instead. +#error scheduled for removal, consider switching to Sdl2Application or GlfwApplication instead #endif /* I still have a test for this class and it shouldn't pollute the log there */ #ifndef _MAGNUM_DO_NOT_WARN_DEPRECATED_GLUTAPPLICATION -CORRADE_DEPRECATED_FILE("Scheduled for removal. Consider switching to Sdl2Application or GlfwApplication instead.") +CORRADE_DEPRECATED_FILE("scheduled for removal, consider switching to Sdl2Application or GlfwApplication instead") #endif namespace Magnum { namespace Platform { +CORRADE_IGNORE_DEPRECATED_PUSH /** @nosubgrouping @brief GLUT application @@ -855,11 +861,9 @@ When no other application header is included this macro is also aliased to #ifndef DOXYGEN_GENERATING_OUTPUT #ifndef MAGNUM_APPLICATION_MAIN -CORRADE_IGNORE_DEPRECATED_PUSH typedef CORRADE_DEPRECATED("scheduled for removal, consider switching to Sdl2Application or GlfwApplication instead") GlutApplication Application; typedef CORRADE_DEPRECATED("scheduled for removal, consider switching to Sdl2Application or GlfwApplication instead")BasicScreen Screen; typedef CORRADE_DEPRECATED("scheduled for removal, consider switching to Sdl2Application or GlfwApplication instead") BasicScreenedApplication ScreenedApplication; -CORRADE_IGNORE_DEPRECATED_POP #ifndef _MAGNUM_DO_NOT_WARN_DEPRECATED_GLUTAPPLICATION #define MAGNUM_APPLICATION_MAIN(className) MAGNUM_GLUTAPPLICATION_MAIN(className) #else @@ -874,7 +878,6 @@ CORRADE_IGNORE_DEPRECATED_POP #endif #endif -CORRADE_IGNORE_DEPRECATED_PUSH CORRADE_ENUMSET_OPERATORS(GlutApplication::MouseMoveEvent::Buttons) CORRADE_IGNORE_DEPRECATED_POP