remove now unused plugin verification section and data

it should've been added even if QT_NO_PLUGIN_CHECK was defined btw, now
only ELF header is checked tho

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-11-14 15:36:36 +02:00
parent d2e041543b
commit 9e87457f4b

View file

@ -24,34 +24,22 @@
#include <QtCore/qpointer.h>
QT_BEGIN_NAMESPACE
typedef QObject *(*QtPluginInstanceFunction)();
#define Q_EXPORT_PLUGIN(PLUGIN) \
Q_EXPORT_PLUGIN2(PLUGIN, PLUGIN)
#if !defined(QT_NO_PLUGIN_CHECK)
# define Q_PLUGIN_VERIFICATION_SECTION \
__attribute__((section (".ktplugin"))) __attribute__((used)) \
static const char kt_plugin_verification_data[] = QT_VERSION_HEX_STR;
#else
# define Q_PLUGIN_VERIFICATION_SECTION
#endif
// NOTE: if you change pattern, you MUST change the pattern in
// qlibrary.cpp as well. changing the pattern will break all
// backwards compatibility as well (no old plugins will be loaded).
#define Q_EXPORT_PLUGIN2(PLUGIN, PLUGINCLASS) \
Q_PLUGIN_VERIFICATION_SECTION \
extern "C" Q_DECL_EXPORT QT_PREPEND_NAMESPACE(QObject) * kt_plugin_instance() \
{ \
static QT_PREPEND_NAMESPACE(QPointer)<QT_PREPEND_NAMESPACE(QObject)> _instance(new PLUGINCLASS); \
return _instance; \
}
extern "C" Q_DECL_EXPORT QT_PREPEND_NAMESPACE(QObject) * kt_plugin_instance() \
{ \
static QT_PREPEND_NAMESPACE(QPointer)<QT_PREPEND_NAMESPACE(QObject)> _instance(new PLUGINCLASS); \
return _instance; \
}
#define Q_EXPORT_PLUGIN(PLUGIN) Q_EXPORT_PLUGIN2(PLUGIN, PLUGIN)
QT_END_NAMESPACE
#endif // Q_PLUGIN_H