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
Pick-to: 6.6
Change-Id: I0f8476a588b3931f0e1f41a6c3a3fd8f2eb75b93
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
bb10
parent
ba95594ea2
commit
08605f0d78
|
|
@ -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…
Reference in New Issue