chartconfig_p.h
91 lines
| 2.3 KiB
| text/x-c
|
CLexer
/ src / chartconfig_p.h
|
r794 | /**************************************************************************** | ||
** | ||||
|
r2432 | ** Copyright (C) 2013 Digia Plc | ||
|
r794 | ** All rights reserved. | ||
** For any questions to Digia, please use contact form at http://qt.digia.com | ||||
** | ||||
|
r2574 | ** This file is part of the Qt Enterprise Charts Add-on. | ||
|
r794 | ** | ||
** $QT_BEGIN_LICENSE$ | ||||
|
r2574 | ** Licensees holding valid Qt Enterprise licenses may use this file in | ||
** accordance with the Qt Enterprise License Agreement provided with the | ||||
|
r794 | ** Software or, alternatively, in accordance with the terms contained in | ||
** a written agreement between you and Digia. | ||||
** | ||||
** If you have questions regarding the use of this file, please use | ||||
** contact form at http://qt.digia.com | ||||
** $QT_END_LICENSE$ | ||||
** | ||||
****************************************************************************/ | ||||
|
r1366 | // W A R N I N G | ||
// ------------- | ||||
// | ||||
|
r2574 | // This file is not part of the Qt Enterprise Chart API. It exists purely as an | ||
|
r1366 | // implementation detail. This header file may change from version to | ||
// version without notice, or even be removed. | ||||
// | ||||
// We mean it. | ||||
|
r969 | #ifndef CHARTCONFIG_H | ||
#define CHARTCONFIG_H | ||||
|
r719 | |||
#include "qchartglobal.h" | ||||
|
r996 | |||
|
r808 | #ifdef Q_CC_MSVC | ||
// There is a problem with jom.exe currently. It does not seem to understand QMAKE_EXTRA_TARGETS properly. | ||||
// This is the case at least with shadow builds. | ||||
// http://qt-project.org/wiki/jom | ||||
|
r998 | #undef DEVELOPMENT_BUILD | ||
|
r996 | #endif | ||
|
r998 | #ifndef DEVELOPMENT_BUILD | ||
|
r2522 | #ifdef Q_OS_ANDROID | ||
// Android builds do not have __DATE__ | ||||
const char *buildTime = __TIME__; | ||||
#else | ||||
|
r996 | const char *buildTime = __TIME__" "__DATE__; | ||
|
r2522 | #endif | ||
|
r808 | const char *gitHead = "unknown"; | ||
#else | ||||
|
r719 | #include "qchartversion_p.h" | ||
|
r808 | #endif | ||
|
r719 | |||
QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||||
|
r2097 | class ChartConfig | ||
{ | ||||
|
r719 | private: | ||
|
r2097 | ChartConfig() { | ||
#if defined(DEVELOPMENT_BUILD) && !defined(QT_NO_DEBUG) | ||||
qDebug() << "buildTime" << buildTime; | ||||
qDebug() << "gitHead" << gitHead; | ||||
#endif | ||||
|
r719 | m_instance = this; | ||
} | ||||
public: | ||||
|
r2104 | static ChartConfig *instance() { | ||
|
r2097 | if (!m_instance) { | ||
m_instance = new ChartConfig(); | ||||
|
r719 | } | ||
return m_instance; | ||||
} | ||||
|
r2097 | QString compilationTime() { | ||
|
r2504 | return QString(buildTime); | ||
|
r719 | } | ||
|
r2097 | QString compilationHead() { | ||
|
r2504 | return QString(gitHead); | ||
|
r719 | } | ||
private: | ||||
|
r2104 | static ChartConfig *m_instance; | ||
|
r719 | }; | ||
|
r2104 | ChartConfig *ChartConfig::m_instance = 0; | ||
|
r719 | |||
QTCOMMERCIALCHART_END_NAMESPACE | ||||
|
r967 | |||
#endif | ||||