@@ -1,79 +1,88 | |||||
1 | /**************************************************************************** |
|
1 | /**************************************************************************** | |
2 | ** |
|
2 | ** | |
3 | ** Copyright (C) 2012 Digia Plc |
|
3 | ** Copyright (C) 2012 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 Commercial Charts Add-on. |
|
7 | ** This file is part of the Qt Commercial Charts Add-on. | |
8 | ** |
|
8 | ** | |
9 | ** $QT_BEGIN_LICENSE$ |
|
9 | ** $QT_BEGIN_LICENSE$ | |
10 | ** Licensees holding valid Qt Commercial licenses may use this file in |
|
10 | ** Licensees holding valid Qt Commercial licenses may use this file in | |
11 | ** accordance with the Qt Commercial License Agreement provided with the |
|
11 | ** accordance with the Qt Commercial 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 | #define QTCOMMERCIALCHART_VERSION_STR "1.0" |
|
24 | #include <qglobal.h> | |
25 | #define QTCOMMERCIALCHART_VERSION 0x01 |
|
25 | ||
|
26 | #define QTCOMMERCIALCHART_VERSION_STR "1.2.0" | |||
|
27 | /* | |||
|
28 | QTCOMMERCIALCHART_VERSION is (major << 16) + (minor << 8) + patch. | |||
|
29 | */ | |||
|
30 | #define QTCOMMERCIALCHART_VERSION 0x010200 | |||
|
31 | /* | |||
|
32 | can be used like #if (QTCOMMERCIALCHART_VERSION >= QTCOMMERCIALCHART_VERSION_CHECK(1, 1, 0)) | |||
|
33 | */ | |||
|
34 | #define QTCOMMERCIALCHART_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch)) | |||
26 |
|
35 | |||
27 | #if defined(QTCOMMERCIALCHART_LIBRARY) |
|
36 | #if defined(QTCOMMERCIALCHART_LIBRARY) | |
28 | # define QTCOMMERCIALCHART_EXPORT Q_DECL_EXPORT |
|
37 | # define QTCOMMERCIALCHART_EXPORT Q_DECL_EXPORT | |
29 | #else |
|
38 | #else | |
30 | # define QTCOMMERCIALCHART_EXPORT Q_DECL_IMPORT |
|
39 | # define QTCOMMERCIALCHART_EXPORT Q_DECL_IMPORT | |
31 | #endif |
|
40 | #endif | |
32 |
|
41 | |||
33 | #if defined(BUILD_PRIVATE_UNIT_TESTS) && defined(QTCOMMERCIALCHART_LIBRARY) |
|
42 | #if defined(BUILD_PRIVATE_UNIT_TESTS) && defined(QTCOMMERCIALCHART_LIBRARY) | |
34 | # define QTCOMMERCIALCHART_AUTOTEST_EXPORT Q_DECL_EXPORT |
|
43 | # define QTCOMMERCIALCHART_AUTOTEST_EXPORT Q_DECL_EXPORT | |
35 | #elif defined(BUILD_PRIVATE_UNIT_TESTS) && !defined(QTCOMMERCIALCHART_LIBRARY) |
|
44 | #elif defined(BUILD_PRIVATE_UNIT_TESTS) && !defined(QTCOMMERCIALCHART_LIBRARY) | |
36 | # define QTCOMMERCIALCHART_AUTOTEST_EXPORT Q_DECL_IMPORT |
|
45 | # define QTCOMMERCIALCHART_AUTOTEST_EXPORT Q_DECL_IMPORT | |
37 | #else |
|
46 | #else | |
38 | # define QTCOMMERCIALCHART_AUTOTEST_EXPORT |
|
47 | # define QTCOMMERCIALCHART_AUTOTEST_EXPORT | |
39 | #endif |
|
48 | #endif | |
40 |
|
49 | |||
41 | #ifdef QTCOMMERCIALCHART_STATICLIB |
|
50 | #ifdef QTCOMMERCIALCHART_STATICLIB | |
42 | # undef QTCOMMERCIALCHART_EXPORT |
|
51 | # undef QTCOMMERCIALCHART_EXPORT | |
43 | # undef QTCOMMERCIALCHART_AUTOTEST_EXPORT |
|
52 | # undef QTCOMMERCIALCHART_AUTOTEST_EXPORT | |
44 | # define QTCOMMERCIALCHART_EXPORT |
|
53 | # define QTCOMMERCIALCHART_EXPORT | |
45 | # define QTCOMMERCIALCHART_AUTOTEST_EXPORT |
|
54 | # define QTCOMMERCIALCHART_AUTOTEST_EXPORT | |
46 | #endif |
|
55 | #endif | |
47 |
|
56 | |||
48 | #define QTCOMMERCIALCHART_NAMESPACE QtCommercialChart |
|
57 | #define QTCOMMERCIALCHART_NAMESPACE QtCommercialChart | |
49 |
|
58 | |||
50 | #ifdef QTCOMMERCIALCHART_NAMESPACE |
|
59 | #ifdef QTCOMMERCIALCHART_NAMESPACE | |
51 | # define QTCOMMERCIALCHART_BEGIN_NAMESPACE namespace QTCOMMERCIALCHART_NAMESPACE { |
|
60 | # define QTCOMMERCIALCHART_BEGIN_NAMESPACE namespace QTCOMMERCIALCHART_NAMESPACE { | |
52 | # define QTCOMMERCIALCHART_END_NAMESPACE } |
|
61 | # define QTCOMMERCIALCHART_END_NAMESPACE } | |
53 | # define QTCOMMERCIALCHART_USE_NAMESPACE using namespace QTCOMMERCIALCHART_NAMESPACE; |
|
62 | # define QTCOMMERCIALCHART_USE_NAMESPACE using namespace QTCOMMERCIALCHART_NAMESPACE; | |
54 | #else |
|
63 | #else | |
55 | # define QTCOMMERCIALCHART_BEGIN_NAMESPACE |
|
64 | # define QTCOMMERCIALCHART_BEGIN_NAMESPACE | |
56 | # define QTCOMMERCIALCHART_END_NAMESPACE |
|
65 | # define QTCOMMERCIALCHART_END_NAMESPACE | |
57 | # define QTCOMMERCIALCHART_USE_NAMESPACE |
|
66 | # define QTCOMMERCIALCHART_USE_NAMESPACE | |
58 | #endif |
|
67 | #endif | |
59 |
|
68 | |||
60 | #if defined(DEVELOPMENT_BUILD) && !defined(QT_NO_DEBUG) |
|
69 | #if defined(DEVELOPMENT_BUILD) && !defined(QT_NO_DEBUG) | |
61 | #include <stdarg.h> |
|
70 | #include <stdarg.h> | |
62 | #include <QDebug> |
|
71 | #include <QDebug> | |
63 |
|
72 | |||
64 | #define CHART_DEBUG chartDebug(3,__LINE__,__FILE__,__FUNCTION__) |
|
73 | #define CHART_DEBUG chartDebug(3,__LINE__,__FILE__,__FUNCTION__) | |
65 |
|
74 | |||
66 | static inline QDebug chartDebug(int numargs,...) |
|
75 | static inline QDebug chartDebug(int numargs,...) | |
67 | { |
|
76 | { | |
68 | va_list valist; |
|
77 | va_list valist; | |
69 | va_start(valist,numargs); |
|
78 | va_start(valist,numargs); | |
70 | //for( int i = 0 ; i < numargs; i++ ) |
|
79 | //for( int i = 0 ; i < numargs; i++ ) | |
71 | int line=va_arg(valist,int); |
|
80 | int line=va_arg(valist,int); | |
72 | char* file=va_arg(valist,char*); |
|
81 | char* file=va_arg(valist,char*); | |
73 | char* function=va_arg(valist,char*); |
|
82 | char* function=va_arg(valist,char*); | |
74 | va_end(valist); |
|
83 | va_end(valist); | |
75 | 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); | |
76 | } |
|
85 | } | |
77 | #endif |
|
86 | #endif | |
78 |
|
87 | |||
79 | #endif // QCHARTGLOBAL_H |
|
88 | #endif // QCHARTGLOBAL_H |
General Comments 0
You need to be logged in to leave comments.
Login now