QNativeIpcKey: add implicit default ctor
Add an implicitly callable default ctor, to enable default returns, but still disallow implicit conversion whilst assigning: QNativeIpcKey k = QNativeIpcKey::Type::~~ // not allowed auto fn = []() -> QNativeIpcKey { return {}; } // allowed Change-Id: I0f8476a588b3931f0e1f41a6c3a3fd8f2eb75b93 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 08605f0d7848533bd62b9114dd0e5b175dd00aa3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
8783783cfc
commit
b2004620bd
@ -37,7 +37,11 @@ public:
|
||||
;
|
||||
static Type legacyDefaultTypeForOs() noexcept;
|
||||
|
||||
explicit constexpr QNativeIpcKey(Type type = DefaultTypeForOs) noexcept
|
||||
constexpr QNativeIpcKey() noexcept
|
||||
: QNativeIpcKey(DefaultTypeForOs)
|
||||
{}
|
||||
|
||||
explicit constexpr QNativeIpcKey(Type type) noexcept
|
||||
: d()
|
||||
{
|
||||
typeAndFlags.type = type;
|
||||
|
Loading…
x
Reference in New Issue
Block a user