qchartglobal.h
79 lines
| 2.6 KiB
| text/x-c
|
CLexer
/ src / qchartglobal.h
Jani Honkonen
|
r794 | /**************************************************************************** | ||
** | ||||
** Copyright (C) 2012 Digia Plc | ||||
** All rights reserved. | ||||
** For any questions to Digia, please use contact form at http://qt.digia.com | ||||
** | ||||
** This file is part of the Qt Commercial Charts Add-on. | ||||
** | ||||
** $QT_BEGIN_LICENSE$ | ||||
** Licensees holding valid Qt Commercial licenses may use this file in | ||||
** accordance with the Qt Commercial License Agreement provided with the | ||||
** 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$ | ||||
** | ||||
****************************************************************************/ | ||||
Tero Ahola
|
r30 | #ifndef CHARTGLOBAL_H | ||
#define CHARTGLOBAL_H | ||||
#define QTCOMMERCIALCHART_VERSION_STR "1.0" | ||||
#define QTCOMMERCIALCHART_VERSION 0x01 | ||||
#if defined(QTCOMMERCIALCHART_LIBRARY) | ||||
# define QTCOMMERCIALCHART_EXPORT Q_DECL_EXPORT | ||||
#else | ||||
# define QTCOMMERCIALCHART_EXPORT Q_DECL_IMPORT | ||||
#endif | ||||
Michal Klocek
|
r1050 | |||
#if defined(BUILD_PRIVATE_UNIT_TESTS) && defined(QTCOMMERCIALCHART_LIBRARY) | ||||
Jani Honkonen
|
r1440 | # define QTCOMMERCIALCHART_AUTOTEST_EXPORT Q_DECL_EXPORT | ||
Michal Klocek
|
r1050 | #elif defined(BUILD_PRIVATE_UNIT_TESTS) && !defined(QTCOMMERCIALCHART_LIBRARY) | ||
Jani Honkonen
|
r1440 | # define QTCOMMERCIALCHART_AUTOTEST_EXPORT Q_DECL_IMPORT | ||
Michal Klocek
|
r1050 | #else | ||
Jani Honkonen
|
r1440 | # define QTCOMMERCIALCHART_AUTOTEST_EXPORT | ||
#endif | ||||
#ifdef QTCOMMERCIALCHART_STATICLIB | ||||
# undef QTCOMMERCIALCHART_EXPORT | ||||
# undef QTCOMMERCIALCHART_AUTOTEST_EXPORT | ||||
# define QTCOMMERCIALCHART_EXPORT | ||||
# define QTCOMMERCIALCHART_AUTOTEST_EXPORT | ||||
Michal Klocek
|
r1050 | #endif | ||
Tero Ahola
|
r30 | |||
#define QTCOMMERCIALCHART_NAMESPACE QtCommercialChart | ||||
#ifdef QTCOMMERCIALCHART_NAMESPACE | ||||
Jani Honkonen
|
r1440 | # define QTCOMMERCIALCHART_BEGIN_NAMESPACE namespace QTCOMMERCIALCHART_NAMESPACE { | ||
# define QTCOMMERCIALCHART_END_NAMESPACE } | ||||
# define QTCOMMERCIALCHART_USE_NAMESPACE using namespace QTCOMMERCIALCHART_NAMESPACE; | ||||
Tero Ahola
|
r30 | #else | ||
Jani Honkonen
|
r1440 | # define QTCOMMERCIALCHART_BEGIN_NAMESPACE | ||
# define QTCOMMERCIALCHART_END_NAMESPACE | ||||
# define QTCOMMERCIALCHART_USE_NAMESPACE | ||||
Tero Ahola
|
r30 | #endif | ||
Michal Klocek
|
r998 | #if defined(DEVELOPMENT_BUILD) && !defined(QT_NO_DEBUG) | ||
Michal Klocek
|
r131 | #include <stdarg.h> | ||
#include <QDebug> | ||||
Jani Honkonen
|
r1440 | #define CHART_DEBUG chartDebug(3,__LINE__,__FILE__,__FUNCTION__) | ||
Michal Klocek
|
r996 | static inline QDebug chartDebug(int numargs,...) | ||
Michal Klocek
|
r131 | { | ||
va_list valist; | ||||
va_start(valist,numargs); | ||||
//for( int i = 0 ; i < numargs; i++ ) | ||||
int line=va_arg(valist,int); | ||||
char* file=va_arg(valist,char*); | ||||
char* function=va_arg(valist,char*); | ||||
va_end(valist); | ||||
return qDebug()<<QString().append(function).append("(").append(file).append(":%1)").arg(line); | ||||
} | ||||
Michal Klocek
|
r996 | #endif | ||
Jani Honkonen
|
r1440 | |||
#endif // CHARTGLOBAL_H | ||||