##// END OF EJS Templates
iOS compilation fix...
Tomi Korpipää -
r2698:9dcd2a7c347e
parent child
Show More
@@ -1,91 +1,91
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2014 Digia Plc
3 ** Copyright (C) 2014 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 // W A R N I N G
21 // W A R N I N G
22 // -------------
22 // -------------
23 //
23 //
24 // This file is not part of the Qt Enterprise Chart API. It exists purely as an
24 // This file is not part of the Qt Enterprise Chart API. It exists purely as an
25 // implementation detail. This header file may change from version to
25 // implementation detail. This header file may change from version to
26 // version without notice, or even be removed.
26 // version without notice, or even be removed.
27 //
27 //
28 // We mean it.
28 // We mean it.
29
29
30 #ifndef CHARTCONFIG_H
30 #ifndef CHARTCONFIG_H
31 #define CHARTCONFIG_H
31 #define CHARTCONFIG_H
32
32
33 #include "qchartglobal.h"
33 #include "qchartglobal.h"
34
34
35 #ifdef Q_CC_MSVC
35 #ifdef Q_CC_MSVC
36 // There is a problem with jom.exe currently. It does not seem to understand QMAKE_EXTRA_TARGETS properly.
36 // There is a problem with jom.exe currently. It does not seem to understand QMAKE_EXTRA_TARGETS properly.
37 // This is the case at least with shadow builds.
37 // This is the case at least with shadow builds.
38 // http://qt-project.org/wiki/jom
38 // http://qt-project.org/wiki/jom
39 #undef DEVELOPMENT_BUILD
39 #undef DEVELOPMENT_BUILD
40 #endif
40 #endif
41
41
42 #ifndef DEVELOPMENT_BUILD
42 #ifndef DEVELOPMENT_BUILD
43 #ifdef Q_OS_ANDROID
43 #if defined (Q_OS_ANDROID) || defined (Q_OS_IOS)
44 // Android builds do not have __DATE__
44 // Android builds do not have __DATE__
45 const char *buildTime = __TIME__;
45 const char *buildTime = __TIME__;
46 #else
46 #else
47 const char *buildTime = __TIME__" "__DATE__;
47 const char *buildTime = __TIME__" "__DATE__;
48 #endif
48 #endif
49 const char *gitHead = "unknown";
49 const char *gitHead = "unknown";
50 #else
50 #else
51 #include "qchartversion_p.h"
51 #include "qchartversion_p.h"
52 #endif
52 #endif
53
53
54 QTCOMMERCIALCHART_BEGIN_NAMESPACE
54 QTCOMMERCIALCHART_BEGIN_NAMESPACE
55
55
56 class ChartConfig
56 class ChartConfig
57 {
57 {
58 private:
58 private:
59 ChartConfig() {
59 ChartConfig() {
60 #if defined(DEVELOPMENT_BUILD) && !defined(QT_NO_DEBUG)
60 #if defined(DEVELOPMENT_BUILD) && !defined(QT_NO_DEBUG)
61 qDebug() << "buildTime" << buildTime;
61 qDebug() << "buildTime" << buildTime;
62 qDebug() << "gitHead" << gitHead;
62 qDebug() << "gitHead" << gitHead;
63 #endif
63 #endif
64 m_instance = this;
64 m_instance = this;
65 }
65 }
66 public:
66 public:
67 static ChartConfig *instance() {
67 static ChartConfig *instance() {
68 if (!m_instance) {
68 if (!m_instance) {
69 m_instance = new ChartConfig();
69 m_instance = new ChartConfig();
70 }
70 }
71 return m_instance;
71 return m_instance;
72 }
72 }
73
73
74 QString compilationTime() {
74 QString compilationTime() {
75 return QString(buildTime);
75 return QString(buildTime);
76 }
76 }
77
77
78 QString compilationHead() {
78 QString compilationHead() {
79 return QString(gitHead);
79 return QString(gitHead);
80 }
80 }
81
81
82 private:
82 private:
83 static ChartConfig *m_instance;
83 static ChartConfig *m_instance;
84 };
84 };
85
85
86
86
87 ChartConfig *ChartConfig::m_instance = 0;
87 ChartConfig *ChartConfig::m_instance = 0;
88
88
89 QTCOMMERCIALCHART_END_NAMESPACE
89 QTCOMMERCIALCHART_END_NAMESPACE
90
90
91 #endif
91 #endif
General Comments 0
You need to be logged in to leave comments. Login now