From 2ae2f3f719ab9316eb2addef265c78ab81327516 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 8 Jan 2012 21:59:07 -0600 Subject: Update tqt3 to support gcc visibility This closes Bug 696 --- configure | 1 + mkspecs/linux-g++/qmake.conf | 2 +- src/kernel/qapplication_x11.cpp | 4 ++-- src/kernel/qgplugin.h | 36 +++++++++------------------------ src/kernel/qtextengine_p.h | 2 +- src/tools/qglobal.h | 4 ++++ tools/designer/shared/domtool.h | 2 +- tools/designer/uilib/qwidgetfactory.cpp | 6 +++--- tools/designer/uilib/qwidgetfactory.h | 2 +- 9 files changed, 24 insertions(+), 35 deletions(-) diff --git a/configure b/configure index 00fc6f145..5db0b0ae5 100755 --- a/configure +++ b/configure @@ -1080,6 +1080,7 @@ done [ -d $outpath/src/tools ] || mkdir -p $outpath/src/tools cat > $outpath/src/tools/qconfig.cpp.new <iface(); \ } -# ifdef Q_WS_WIN -# ifdef Q_CC_BOR -# define Q_EXPORT_PLUGIN(PLUGIN) \ - Q_PLUGIN_VERIFICATION_DATA \ - Q_EXTERN_C __declspec(dllexport) \ - const char * __stdcall qt_ucm_query_verification_data() \ - { return qt_ucm_verification_data; } \ - Q_EXTERN_C __declspec(dllexport) TQUnknownInterface* \ - __stdcall ucm_instantiate() \ - Q_PLUGIN_INSTANTIATE( PLUGIN ) -# else -# define Q_EXPORT_PLUGIN(PLUGIN) \ - Q_PLUGIN_VERIFICATION_DATA \ - Q_EXTERN_C __declspec(dllexport) \ - const char *qt_ucm_query_verification_data() \ - { return qt_ucm_verification_data; } \ - Q_EXTERN_C __declspec(dllexport) TQUnknownInterface* ucm_instantiate() \ - Q_PLUGIN_INSTANTIATE( PLUGIN ) -# endif -# else -# define Q_EXPORT_PLUGIN(PLUGIN) \ +#if defined(Q_WS_WIN) && defined(Q_CC_BOR) +# define Q_STDCALL __stdcall +#else +# define Q_STDCALL +#endif + +#define Q_EXPORT_PLUGIN(PLUGIN) \ Q_PLUGIN_VERIFICATION_DATA \ - Q_EXTERN_C \ - const char *qt_ucm_query_verification_data() \ + Q_EXTERN_C Q_EXPORT \ + const char * Q_STDCALL qt_ucm_query_verification_data() \ { return qt_ucm_verification_data; } \ - Q_EXTERN_C TQUnknownInterface* ucm_instantiate() \ + Q_EXTERN_C Q_EXPORT TQUnknownInterface* Q_STDCALL ucm_instantiate() \ Q_PLUGIN_INSTANTIATE( PLUGIN ) -# endif - #endif struct TQUnknownInterface; diff --git a/src/kernel/qtextengine_p.h b/src/kernel/qtextengine_p.h index a50ce901b..4858672c5 100644 --- a/src/kernel/qtextengine_p.h +++ b/src/kernel/qtextengine_p.h @@ -292,7 +292,7 @@ private: class TQFontPrivate; -class TQTextEngine { +class Q_EXPORT TQTextEngine { public: TQTextEngine( const TQString &str, TQFontPrivate *f ); ~TQTextEngine(); diff --git a/src/tools/qglobal.h b/src/tools/qglobal.h index cf0e1e440..74dab69e6 100644 --- a/src/tools/qglobal.h +++ b/src/tools/qglobal.h @@ -887,6 +887,10 @@ class TQDataStream; # define Q_TEMPLATE_EXTERN # undef Q_DISABLE_COPY /* avoid unresolved externals */ # endif +#elif defined(Q_CC_GNU) && __GNUC__ - 0 >= 4 +# define Q_EXPORT __attribute__((visibility("default"))) +# undef QT_MAKEDLL /* ignore these for other platforms */ +# undef QT_DLL #else # undef QT_MAKEDLL /* ignore these for other platforms */ # undef QT_DLL diff --git a/tools/designer/shared/domtool.h b/tools/designer/shared/domtool.h index 5f9211b6f..e8f38b3f8 100644 --- a/tools/designer/shared/domtool.h +++ b/tools/designer/shared/domtool.h @@ -40,7 +40,7 @@ class TQDomElement; class TQDomDocument; -class DomTool : public TQt +class Q_EXPORT DomTool : public TQt { public: static TQVariant readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue ); diff --git a/tools/designer/uilib/qwidgetfactory.cpp b/tools/designer/uilib/qwidgetfactory.cpp index fcd1bf2d1..ef143d46f 100644 --- a/tools/designer/uilib/qwidgetfactory.cpp +++ b/tools/designer/uilib/qwidgetfactory.cpp @@ -120,13 +120,13 @@ static TQPluginManager *widgetInterfaceManager = 0; static TQMap *availableWidgetMap = 0; static TQStringList *availableWidgetList = 0; -TQMap *qwf_forms = 0; +Q_EXPORT TQMap *qwf_forms = 0; TQString *qwf_language = 0; -bool qwf_execute_code = TRUE; +Q_EXPORT bool qwf_execute_code = TRUE; bool qwf_stays_on_top = FALSE; TQString qwf_currFileName = ""; TQObject *qwf_form_object = 0; -TQString *qwf_plugin_dir = 0; +Q_EXPORT TQString *qwf_plugin_dir = 0; static void setupPluginDir() { diff --git a/tools/designer/uilib/qwidgetfactory.h b/tools/designer/uilib/qwidgetfactory.h index d58e9e147..bd39623e3 100644 --- a/tools/designer/uilib/qwidgetfactory.h +++ b/tools/designer/uilib/qwidgetfactory.h @@ -55,7 +55,7 @@ class TQWidget; class TQWidgetFactoryPrivate; class UibStrTable; -class TQWidgetFactory +class Q_EXPORT TQWidgetFactory { public: TQWidgetFactory(); -- cgit v1.2.1