BibleTime
btconnect.h
Go to the documentation of this file.
1 /*********
2 *
3 * In the name of the Father, and of the Son, and of the Holy Spirit.
4 *
5 * This file is part of BibleTime's source code, https://bibletime.info/
6 *
7 * Copyright 1999-2021 by the BibleTime developers.
8 * The BibleTime source code is licensed under the GNU General Public License
9 * version 2.0.
10 *
11 **********/
12 
13 #pragma once
14 
15 #include <QObject>
16 #include "btassert.h"
17 
18 
19 #ifndef NDEBUG
20 #define BT_CONNECT(...) \
21  [&,this]{ \
22  auto r(this->connect(__VA_ARGS__)); \
23  BT_ASSERT(r); \
24  return r; \
25  }()
26 #else
27 #define BT_CONNECT(...) connect(__VA_ARGS__)
28 #endif