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