Base: split export/import macros from FCConfig.h and move them to FCGlobal.h

The FCGlobal.h can be included in a Global.h header file of an extension module.

The reason is that some IDEs (e.g. QtCreator) fails to detect the export/import macros when only defined in the PreCompiled.h files and thus raise a parser warning.
This commit is contained in:
wmayer
2021-09-14 16:40:30 +02:00
parent 2abe1611f7
commit a40d37a980
44 changed files with 327 additions and 67 deletions

View File

@@ -18,6 +18,8 @@
#ifndef IMAGEBASE_H
#define IMAGEBASE_H
#include <Mod/Image/ImageGlobal.h>
namespace Image
{

View File

@@ -27,6 +27,7 @@
#include <App/GeoFeature.h>
#include <App/PropertyFile.h>
#include <App/PropertyUnits.h>
#include <Mod/Image/ImageGlobal.h>
namespace Image
{

View File

@@ -25,6 +25,7 @@
#else
#include "GLImageBox.h"
#endif
#include <Mod/Image/ImageGlobal.h>
class QSlider;
class QAction;

View File

@@ -25,6 +25,7 @@
#define IMAGE_ViewProviderImagePlane_H
#include <Gui/ViewProviderGeometryObject.h>
#include <Mod/Image/ImageGlobal.h>
class SoCoordinate3;
class SoDrawStyle;
@@ -48,12 +49,12 @@ public:
void attach(App::DocumentObject *pcObject);
void setDisplayMode(const char* ModeName);
std::vector<std::string> getDisplayModes() const;
void updateData(const App::Property*);
private:
bool loadSvg(const char*, float x, float y, QImage& img);
protected:
void updateData(const App::Property*);
private:
bool loadSvg(const char*, float x, float y, QImage& img);
protected:
SoCoordinate3 * pcCoords;
SoTexture2 * texture;
};

View File

@@ -25,6 +25,7 @@
#define IMAGE_WORKBENCH_H
#include <Gui/Workbench.h>
#include <Mod/Image/ImageGlobal.h>
namespace ImageGui {

View File

@@ -0,0 +1,32 @@
/***************************************************************************
* Copyright (c) Imetric 4D Imaging Sarl *
* *
* Author: Werner Mayer *
* *
***************************************************************************/
#include <FCGlobal.h>
#ifndef IMAGE_GLOBAL_H
#define IMAGE_GLOBAL_H
// Image
#ifndef ImageExport
#ifdef Image_EXPORTS
# define ImageExport FREECAD_DECL_EXPORT
#else
# define ImageExport FREECAD_DECL_IMPORT
#endif
#endif
// ImageGui
#ifndef ImageGuiExport
#ifdef ImageGui_EXPORTS
# define ImageGuiExport FREECAD_DECL_EXPORT
#else
# define ImageGuiExport FREECAD_DECL_IMPORT
#endif
#endif
#endif //IMAGE_GLOBAL_H