ACF $AcfVersion:0$
CSignalBlockerTest.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// Qt includes
6#include <QtCore/QObject>
7#include <QtTest/QtTest>
8
9// ACF includes
10#include <iqt/CSignalBlocker.h>
12
13// Test helper class
14class TestObject : public QObject
15{
16 Q_OBJECT
17public:
18 explicit TestObject(QObject* parent = nullptr) : QObject(parent) {}
19
20signals:
21 void testSignal();
22
23public slots:
24 void emitTestSignal() { emit testSignal(); }
25};
26
27class CSignalBlockerTest: public QObject
28{
29 Q_OBJECT
30private slots:
31 void initTestCase();
32
33 void TestBlockSingleObject();
34 void TestBlockWithChildren();
35 void TestNullPointer();
36 void TestScopeBasedBlocking();
37 void TestNestedBlockers();
38
39 void cleanupTestCase();
40};
41
TestObject(QObject *parent=nullptr)
void testSignal()