[vlc-devel] [PATCH 3/3] qt: fix setScreen might crash on wayland when entering fullscreen
Pierre Lamot
pierre at videolabs.io
Thu Dec 14 14:21:02 CET 2017
> Is it safe to initialize a static with non-constant expression, which is not
> even defined at load time?
>From the ISO C++:
The zero-initialization [...]. Constant initialization [...], Otherwise such a
variable is initialized the first time control passes through its declaration;
such a variable is considered initialized upon the completion of its
initialization. If the initialization exits by throwing an exception, the
initialization is not complete, so it will be tried again the next time
control enters the declaration. [... concurent / recursive init ....]
Both functions are called from the UI thread, so QGuiApplication::platformName
has been set before and concurent initialisation could not happen.
But I don't mind storing it in the class if you prefers.
--
Pierre Lamot
More information about the vlc-devel
mailing list