mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-08-11 20:29:47 +08:00
Ref T125, allow to use std::function with CSlot
This commit is contained in:
committed by
Mathew Sutcliffe
parent
d4b027b6bd
commit
8d72fe5285
@@ -30,8 +30,9 @@ namespace BlackMiscTest
|
||||
CSlot<void(const QString &)> slot1 = { obj, &QObject::setObjectName };
|
||||
QVERIFY2(slot1, "Slot has valid object and function - can be called.");
|
||||
|
||||
CSlot<void(const QString &)> slot2 = { static_cast<QObject*>(nullptr), &QObject::setObjectName };
|
||||
QVERIFY2(!slot2, "Slot has an invalid pointer - cannot be called.");
|
||||
// KB 8/17 T125, CSlot can no longer be constructed with null object
|
||||
// CSlot<void(const QString &)> slot2 = { static_cast<QObject*>(nullptr), &QObject::setObjectName };
|
||||
// QVERIFY2(!slot2, "Slot has an invalid pointer - cannot be called.");
|
||||
|
||||
CSlot<void(const QString &)> slot3;
|
||||
QVERIFY2(!slot3, "Slot has an invalid pointer and invalid function - cannot be called.");
|
||||
|
||||
Reference in New Issue
Block a user