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