Browse Source

Platform: clarify what happens to the view in Configuration::setTitle().

next
Vladimír Vondruš 2 months ago
parent
commit
458a21953f
  1. 4
      src/Magnum/Platform/GlfwApplication.h
  2. 4
      src/Magnum/Platform/Sdl2Application.h

4
src/Magnum/Platform/GlfwApplication.h

@ -1870,6 +1870,10 @@ class GlfwApplication::Configuration {
* @return Reference to self (for method chaining) * @return Reference to self (for method chaining)
* *
* Default is @cpp "Magnum GLFW Application" @ce. * Default is @cpp "Magnum GLFW Application" @ce.
* @note The function makes a copy of the view if it's not not global
* or null-terminated, use the
* @link Corrade::Containers::Literals::StringLiterals::operator""_s() Containers::Literals::operator""_s() @endlink
* literal to prevent that where possible.
*/ */
Configuration& setTitle(Containers::StringView title) { Configuration& setTitle(Containers::StringView title) {
_title = Containers::String::nullTerminatedGlobalView(title); _title = Containers::String::nullTerminatedGlobalView(title);

4
src/Magnum/Platform/Sdl2Application.h

@ -2603,6 +2603,10 @@ class Sdl2Application::Configuration {
* expected to be set by the HTML markup. However, it's possible * expected to be set by the HTML markup. However, it's possible
* to change the page title later (for example in response to * to change the page title later (for example in response to
* application state change) using @ref setWindowTitle(). * application state change) using @ref setWindowTitle().
* @note The function makes a copy of the view if it's not not global
* or null-terminated, use the
* @link Corrade::Containers::Literals::StringLiterals::operator""_s() Containers::Literals::operator""_s() @endlink
* literal to prevent that where possible.
*/ */
#if !defined(CORRADE_TARGET_EMSCRIPTEN) && !defined(CORRADE_TARGET_IOS) #if !defined(CORRADE_TARGET_EMSCRIPTEN) && !defined(CORRADE_TARGET_IOS)
Configuration& setTitle(const Containers::StringView title) { Configuration& setTitle(const Containers::StringView title) {

Loading…
Cancel
Save