I had a look at the edyuk's svn link to qcumber posted by fullmetalcoder and found these (@fullmetalcoder: Hope you don't mind me posting this here
)
#ifdef _QCUMBER_BUILD_
#if (defined(QT_DLL) || defined(QT_SHARED)) && !defined(QT_PLUGIN)
#define QCUMBER_EXPORT Q_DECL_EXPORT
#else
#define QCUMBER_EXPORT
#endif
#else
#define QCUMBER_EXPORT Q_DECL_IMPORT
#endif
#ifdef _QCUMBER_BUILD_
#if (defined(QT_DLL) || defined(QT_SHARED)) && !defined(QT_PLUGIN)
#define QCUMBER_EXPORT Q_DECL_EXPORT
#else
#define QCUMBER_EXPORT
#endif
#else
#define QCUMBER_EXPORT Q_DECL_IMPORT
#endif
To copy to clipboard, switch view to plain text mode
I didn't understand this and tried searching in assistant for definition of Q_DECL_EXPORT and IMPORT but in vain. Then i looked at qglobal.h and found these macros defined to one of these based on some variable
__declspec(dllexport),__attribute__((visibility("default"))),__declspec(dllimport)
__declspec(dllexport),__attribute__((visibility("default"))),__declspec(dllimport)
To copy to clipboard, switch view to plain text mode
Again i didn't understand. Googling didn't help much either since i don't even know the basics of this.
Can someone help me understand this clearly ?
And also can you tell me how this macro helps when used like this ?
class Q_DECL_EXPORT SomeClass : BaseClass
{
..
};
class Q_DECL_EXPORT SomeClass : BaseClass
{
..
};
To copy to clipboard, switch view to plain text mode
Finally (probably to fullmetalcoder)
Why is the QCUMBER_EXPORT defined to be Q_DECL_IMPORT ? (export - import
)
Bookmarks