From 82bf60f5058e9d8e2c0911e8a287869d0ce155e3 2012-07-27 14:10:04 From: Marek Rosa Date: 2012-07-27 14:10:04 Subject: [PATCH] Using namespace macro is now added to ui_*.h files when using designer plugin --- diff --git a/plugins/designer/qchartsplugin.cpp b/plugins/designer/qchartsplugin.cpp index 9e21800..10767bf 100644 --- a/plugins/designer/qchartsplugin.cpp +++ b/plugins/designer/qchartsplugin.cpp @@ -42,7 +42,17 @@ QString QChartsPlugin::name() const QString QChartsPlugin::includeFile() const { - return ""; + #ifdef linux + QString myNewLine = "\n"; + #endif + #ifdef WIN32 + QString myNewLine = "\n\r"; + #endif + #ifdef __APPLE__ + QString myNewLine = "\n"; + #endif + + return "" + myNewLine + "#include "; } QString QChartsPlugin::group() const diff --git a/src/chartsnamespace.h b/src/chartsnamespace.h new file mode 100644 index 0000000..1eadf62 --- /dev/null +++ b/src/chartsnamespace.h @@ -0,0 +1,28 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ + +#ifndef MACROINCLUDE_H_ +#define MACROINCLUDE_H_ + +// this is needed by the designer plugin. + +QTCOMMERCIALCHART_USE_NAMESPACE + +#endif /* MACROINCLUDE_H_ */ diff --git a/src/src.pro b/src/src.pro index c5e1780..d069318 100644 --- a/src/src.pro +++ b/src/src.pro @@ -53,11 +53,13 @@ PRIVATE_HEADERS += \ $$PWD/scroller_p.h \ $$PWD/qabstractseries_p.h \ $$PWD/chartlayout_p.h + PUBLIC_HEADERS += \ $$PWD/qchart.h \ $$PWD/qchartglobal.h \ $$PWD/qabstractseries.h \ - $$PWD/qchartview.h + $$PWD/qchartview.h \ + $$PWD/chartsnamespace.h include(animations/animations.pri) include(areachart/areachart.pri)