Make wxWindowDisabler ctors explicit
Implicitly converting a bool or a wxWindow pointer to this class makes no sense and shouldn't be allowed, so don't allow it.
This commit is contained in:
@@ -730,10 +730,10 @@ class WXDLLIMPEXP_CORE wxWindowDisabler
|
|||||||
public:
|
public:
|
||||||
// this ctor conditionally disables all windows: if the argument is false,
|
// this ctor conditionally disables all windows: if the argument is false,
|
||||||
// it doesn't do anything
|
// it doesn't do anything
|
||||||
wxWindowDisabler(bool disable = true);
|
explicit wxWindowDisabler(bool disable = true);
|
||||||
|
|
||||||
// ctor disables all windows except winToSkip
|
// ctor disables all windows except winToSkip
|
||||||
wxWindowDisabler(wxWindow *winToSkip);
|
explicit wxWindowDisabler(wxWindow *winToSkip);
|
||||||
|
|
||||||
// dtor enables back all windows disabled by the ctor
|
// dtor enables back all windows disabled by the ctor
|
||||||
~wxWindowDisabler();
|
~wxWindowDisabler();
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public:
|
|||||||
|
|
||||||
@since 2.9.0
|
@since 2.9.0
|
||||||
*/
|
*/
|
||||||
wxWindowDisabler(bool disable = true);
|
explicit wxWindowDisabler(bool disable = true);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Disables all top level windows of the applications with the exception
|
Disables all top level windows of the applications with the exception
|
||||||
@@ -98,7 +98,7 @@ public:
|
|||||||
or wxFRAME_NO_TASKBAR style when creating the window that will remain
|
or wxFRAME_NO_TASKBAR style when creating the window that will remain
|
||||||
enabled.
|
enabled.
|
||||||
*/
|
*/
|
||||||
wxWindowDisabler(wxWindow* winToSkip);
|
explicit wxWindowDisabler(wxWindow* winToSkip);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Reenables the windows disabled by the constructor.
|
Reenables the windows disabled by the constructor.
|
||||||
|
|||||||
Reference in New Issue
Block a user