##// END OF EJS Templates
Fix NOMINMAX definition...
Titta Heikkala -
r2661:e7a36c62fc79
parent child
Show More
@@ -1,95 +1,97
1 1 /****************************************************************************
2 2 **
3 3 ** Copyright (C) 2013 Digia Plc
4 4 ** All rights reserved.
5 5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 6 **
7 7 ** This file is part of the Qt Enterprise Charts Add-on.
8 8 **
9 9 ** $QT_BEGIN_LICENSE$
10 10 ** Licensees holding valid Qt Enterprise licenses may use this file in
11 11 ** accordance with the Qt Enterprise License Agreement provided with the
12 12 ** Software or, alternatively, in accordance with the terms contained in
13 13 ** a written agreement between you and Digia.
14 14 **
15 15 ** If you have questions regarding the use of this file, please use
16 16 ** contact form at http://qt.digia.com
17 17 ** $QT_END_LICENSE$
18 18 **
19 19 ****************************************************************************/
20 20
21 21 #ifndef QCHARTGLOBAL_H
22 22 #define QCHARTGLOBAL_H
23 23
24 24 #include <qglobal.h>
25 25
26 26 #define QTCOMMERCIALCHART_VERSION_STR "1.3.0"
27 27 /*
28 28 QTCOMMERCIALCHART_VERSION is (major << 16) + (minor << 8) + patch.
29 29 */
30 30 #define QTCOMMERCIALCHART_VERSION 0x010300
31 31 /*
32 32 can be used like #if (QTCOMMERCIALCHART_VERSION >= QTCOMMERCIALCHART_VERSION_CHECK(1, 1, 0))
33 33 */
34 34 #define QTCOMMERCIALCHART_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch))
35 35
36 36 #if defined(QTCOMMERCIALCHART_LIBRARY)
37 37 # define QTCOMMERCIALCHART_EXPORT Q_DECL_EXPORT
38 38 #else
39 39 # define QTCOMMERCIALCHART_EXPORT Q_DECL_IMPORT
40 40 #endif
41 41
42 42 #if defined(BUILD_PRIVATE_UNIT_TESTS) && defined(QTCOMMERCIALCHART_LIBRARY)
43 43 # define QTCOMMERCIALCHART_AUTOTEST_EXPORT Q_DECL_EXPORT
44 44 #elif defined(BUILD_PRIVATE_UNIT_TESTS) && !defined(QTCOMMERCIALCHART_LIBRARY)
45 45 # define QTCOMMERCIALCHART_AUTOTEST_EXPORT Q_DECL_IMPORT
46 46 #else
47 47 # define QTCOMMERCIALCHART_AUTOTEST_EXPORT
48 48 #endif
49 49
50 50 #ifdef QTCOMMERCIALCHART_STATICLIB
51 51 # undef QTCOMMERCIALCHART_EXPORT
52 52 # undef QTCOMMERCIALCHART_AUTOTEST_EXPORT
53 53 # define QTCOMMERCIALCHART_EXPORT
54 54 # define QTCOMMERCIALCHART_AUTOTEST_EXPORT
55 55 #endif
56 56
57 57 #define QTCOMMERCIALCHART_NAMESPACE QtCommercialChart
58 58
59 59 #ifdef QTCOMMERCIALCHART_NAMESPACE
60 60 # define QTCOMMERCIALCHART_BEGIN_NAMESPACE namespace QTCOMMERCIALCHART_NAMESPACE {
61 61 # define QTCOMMERCIALCHART_END_NAMESPACE }
62 62 # define QTCOMMERCIALCHART_USE_NAMESPACE using namespace QTCOMMERCIALCHART_NAMESPACE;
63 63 #else
64 64 # define QTCOMMERCIALCHART_BEGIN_NAMESPACE
65 65 # define QTCOMMERCIALCHART_END_NAMESPACE
66 66 # define QTCOMMERCIALCHART_USE_NAMESPACE
67 67 #endif
68 68
69 69 #if defined(DEVELOPMENT_BUILD) && !defined(QT_NO_DEBUG)
70 70 #include <stdarg.h>
71 71 #include <QDebug>
72 72
73 73 #define CHART_DEBUG chartDebug(3,__LINE__,__FILE__,__FUNCTION__)
74 74
75 75 static inline QDebug chartDebug(int numargs,...)
76 76 {
77 77 va_list valist;
78 78 va_start(valist, numargs);
79 79 //for( int i = 0 ; i < numargs; i++ )
80 80 int line = va_arg(valist, int);
81 81 char *file = va_arg(valist, char *);
82 82 char *function = va_arg(valist, char *);
83 83 va_end(valist);
84 84 return qDebug() << QString().append(function).append("(").append(file).append(":%1)").arg(line);
85 85 }
86 86 #endif
87 87
88 88 /*
89 89 On Windows min and max conflict with standard macros
90 90 */
91 91 #ifdef Q_OS_WIN
92 #ifndef NOMINMAX
92 93 #define NOMINMAX
93 94 #endif
95 #endif
94 96
95 97 #endif // QCHARTGLOBAL_H
General Comments 0
You need to be logged in to leave comments. Login now