src/Macros.h

changeset 644
93dcd1a0e4bd
parent 643
a79277000830
child 698
16e6d7d87982
equal deleted inserted replaced
643:a79277000830 644:93dcd1a0e4bd
15 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */ 17 */
18 18
19 #pragma once 19 #pragma once
20
21 #ifndef __GNUC__
22 # define __attribute__(X)
23 #endif
20 24
21 // ============================================================================= 25 // =============================================================================
22 // 26 //
23 #define PROPERTY(ACCESS, TYPE, READ, WRITE, WRITETYPE) \ 27 #define PROPERTY(ACCESS, TYPE, READ, WRITE, WRITETYPE) \
24 private: \ 28 private: \
63 #define FUNCNAME __func__ 67 #define FUNCNAME __func__
64 #endif // __GNUC__ 68 #endif // __GNUC__
65 69
66 // ============================================================================= 70 // =============================================================================
67 // 71 //
68 #ifdef IN_IDE_PARSER 72 #define dvalof(A) dprint ("value of '%1' = %2\n", #A, A)
69 void dlog(void, ...) {}
70 #else
71 # ifdef DEBUG
72 # define dlog(...) log (QString (__PRETTY_FUNCTION__) + ": " __VA_ARGS__)
73 # else
74 # define dlog(...)
75 # endif // DEBUG
76 #endif // IN_IDE_PARSER
77
78 #define dvalof(A) dlog ("value of '%1' = %2\n", #A, A)
79 73
80 // ============================================================================= 74 // =============================================================================
81 // 75 //
82 // Replace assert with a version that shows a GUI dialog if possible. 76 // Replace assert with a version that shows a GUI dialog if possible.
83 // On Windows I just can't get the actual error messages otherwise. 77 // On Windows I just can't get the actual error messages otherwise.

mercurial