diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2018-11-19 11:22:35 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2019-01-29 10:14:21 +0000 |
commit | 5c84373d8d60a8b13df1fcdcd77480736952c095 (patch) | |
tree | 1bc6648f64a8b31b9407d359ca715164f30718e6 /tests/auto/blackbox/tst_blackboxqt.cpp | |
parent | 1cf4e24eb45498570b4302d25be90c0aa2923450 (diff) |
Qt: Allow users to explicitly tag files as mocable
This is helpful for declaring a QObject-derived class via a macro, in
which case the moc scanner will not help.
Fixes: QBS-1410
Change-Id: I19ee30eac670228686b5528888159220cf39abd3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests/auto/blackbox/tst_blackboxqt.cpp')
-rw-r--r-- | tests/auto/blackbox/tst_blackboxqt.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/blackbox/tst_blackboxqt.cpp b/tests/auto/blackbox/tst_blackboxqt.cpp index 6c013d918..128c61133 100644 --- a/tests/auto/blackbox/tst_blackboxqt.cpp +++ b/tests/auto/blackbox/tst_blackboxqt.cpp @@ -145,6 +145,13 @@ void TestBlackboxQt::dbusInterfaces() QCOMPARE(runQbs(), 0); } +void TestBlackboxQt::forcedMoc() +{ + QDir::setCurrent(testDataDir + "/forced-moc"); + QCOMPARE(runQbs(QbsRunParameters("run")), 0); + QVERIFY2(m_qbsStderr.contains("Hello from slot"), m_qbsStderr.constData()); +} + void TestBlackboxQt::includedMocCpp() { QDir::setCurrent(testDataDir + "/included-moc-cpp"); |