From 4864f9daf68cb9441a2aa42e861a08beb8a3e0af Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 20 May 2024 11:38:41 +0900 Subject: [PATCH] Replace KDE_Q_EXPORT_PLUGIN, KDE_PACKED and KDE_WEAK_SYMBOL with TDE_* equivalent Signed-off-by: Michele Calgaro (cherry picked from commit 0f0c5a4d07b51eb3c08c799b37b2ef4c201fb8b2) --- kimgio/pcx.h | 2 +- tdecore/kdemacros.h.cmake | 22 +++++++++++++-------- tdecore/kdemacros.h.in | 26 +++++++++++++++---------- tdeio/tdeio/kprotocolinfo.h | 6 +++--- tdestyles/highcolor/highcolor.cpp | 2 +- tdestyles/highcontrast/highcontrast.cpp | 2 +- tdestyles/keramik/keramik.cpp | 2 +- tdestyles/kthemestyle/kthemestyle.cpp | 2 +- tdestyles/light/light.cpp | 2 +- tdestyles/plastik/plastik.cpp | 2 +- tdewidgets/maketdewidgets.cpp | 2 +- 11 files changed, 41 insertions(+), 29 deletions(-) diff --git a/kimgio/pcx.h b/kimgio/pcx.h index c72b01733..40f4f8e73 100644 --- a/kimgio/pcx.h +++ b/kimgio/pcx.h @@ -98,6 +98,6 @@ class PCXHEADER // found only in PB IV/IV Plus TQ_UINT16 VScreenSize; // Vertical screen size in pixels. New field // found only in PB IV/IV Plus -} KDE_PACKED; +} TDE_PACKED; #endif // PCX_H diff --git a/tdecore/kdemacros.h.cmake b/tdecore/kdemacros.h.cmake index 2b24583f5..99886334a 100644 --- a/tdecore/kdemacros.h.cmake +++ b/tdecore/kdemacros.h.cmake @@ -50,25 +50,29 @@ #endif /** - * KDE_Q_EXPORT_PLUGIN is a workaround for Qt not being able to + * TDE_EXPORT_PLUGIN is a workaround for Qt not being able to * cope with symbol visibility. */ -#define KDE_Q_EXPORT_PLUGIN(PLUGIN) \ +#define TDE_EXPORT_PLUGIN(PLUGIN) \ TQ_EXTERN_C TDE_EXPORT const char* qt_ucm_query_verification_data(); \ TQ_EXTERN_C TDE_EXPORT TQUnknownInterface* ucm_instantiate(); \ TQ_EXPORT_PLUGIN(PLUGIN) +#define KDE_Q_EXPORT_PLUGIN TDE_EXPORT_PLUGIN + /** - * The KDE_PACKED can be used to hint the compiler that a particular + * The TDE_PACKED can be used to hint the compiler that a particular * structure or class should not contain unnecessary paddings. */ #ifdef __GNUC__ -#define KDE_PACKED __attribute__((__packed__)) +#define TDE_PACKED __attribute__((__packed__)) #else -#define KDE_PACKED +#define TDE_PACKED #endif +#define KDE_PACKED TDE_PACKED + /** * The TDE_DEPRECATED macro can be used to trigger compile-time warnings * with newer compilers when deprecated functions are used. @@ -205,15 +209,17 @@ RESERVE_VIRTUAL_9 /** - * The KDE_WEAK_SYMBOL macro can be used to tell the compiler that + * The TDE_WEAK_SYMBOL macro can be used to tell the compiler that * a particular function should be a weak symbol (that e.g. may be overriden * in another library, -Bdirect will not bind this symbol directly) */ #ifdef __GNUC__ -#define KDE_WEAK_SYMBOL __attribute__((__weak__)) +#define TDE_WEAK_SYMBOL __attribute__((__weak__)) #else -#define KDE_WEAK_SYMBOL +#define TDE_WEAK_SYMBOL #endif +#define KDE_WEAK_SYMBOL TDE_WEAK_SYMBOL + #endif /* _KDE_MACROS_H_ */ diff --git a/tdecore/kdemacros.h.in b/tdecore/kdemacros.h.in index d9c8ab598..a0d70a2fc 100644 --- a/tdecore/kdemacros.h.in +++ b/tdecore/kdemacros.h.in @@ -49,25 +49,29 @@ #endif /** - * KDE_Q_EXPORT_PLUGIN is a workaround for Qt not being able to + * TDE_EXPORT_PLUGIN is a workaround for Qt not being able to * cope with symbol visibility. */ -#define KDE_Q_EXPORT_PLUGIN(PLUGIN) \ +#define TDE_EXPORT_PLUGIN(PLUGIN) \ TQ_EXTERN_C TDE_EXPORT const char* qt_ucm_query_verification_data(); \ TQ_EXTERN_C TDE_EXPORT TQUnknownInterface* ucm_instantiate(); \ TQ_EXPORT_PLUGIN(PLUGIN) +#define KDE_Q_EXPORT_PLUGIN TDE_EXPORT_PLUGIN + /** - * The KDE_PACKED can be used to hint the compiler that a particular + * The TDE_PACKED can be used to hint the compiler that a particular * structure or class should not contain unnecessary paddings. */ #ifdef __GNUC__ -#define KDE_PACKED __attribute__((__packed__)) +#define TDE_PACKED __attribute__((__packed__)) #else -#define KDE_PACKED +#define TDE_PACKED #endif +#define KDE_PACKED TDE_PACKED + /** * The TDE_DEPRECATED macro can be used to trigger compile-time warnings * with newer compilers when deprecated functions are used. @@ -101,14 +105,14 @@ * \endcode * * \note - * It does not make much sense to use the TDE_DEPRECATED keyword for a Qt signal; + * It does not make much sense to use the TDE_DEPRECATED keyword for a TQt signal; * this is because usually get called by the class which they belong to, * and one'd assume that a class author doesn't use deprecated methods of his * own class. The only exception to this are signals which are connected to * other signals; they get invoked from moc-generated code. In any case, * printing a warning message in either case is not useful. * For slots, it can make sense (since slots can be invoked directly) but be - * aware that if the slots get triggered by a signal, the will get called from + * aware that if the slots get triggered by a signal, it will get called from * moc code as well and thus the warnings are useless. * * \par @@ -204,15 +208,17 @@ RESERVE_VIRTUAL_9 /** - * The KDE_WEAK_SYMBOL macro can be used to tell the compiler that + * The TDE_WEAK_SYMBOL macro can be used to tell the compiler that * a particular function should be a weak symbol (that e.g. may be overriden * in another library, -Bdirect will not bind this symbol directly) */ #ifdef __GNUC__ -#define KDE_WEAK_SYMBOL __attribute__((__weak__)) +#define TDE_WEAK_SYMBOL __attribute__((__weak__)) #else -#define KDE_WEAK_SYMBOL +#define TDE_WEAK_SYMBOL #endif +#define KDE_WEAK_SYMBOL TDE_WEAK_SYMBOL + #endif /* _KDE_MACROS_H_ */ diff --git a/tdeio/tdeio/kprotocolinfo.h b/tdeio/tdeio/kprotocolinfo.h index c729164ef..000a88323 100644 --- a/tdeio/tdeio/kprotocolinfo.h +++ b/tdeio/tdeio/kprotocolinfo.h @@ -98,7 +98,7 @@ public: */ static bool isKnownProtocol( const TQString& protocol ) #ifdef KPROTOCOLINFO_TDECORE - KDE_WEAK_SYMBOL + TDE_WEAK_SYMBOL #endif ; @@ -227,7 +227,7 @@ public: */ static bool isHelperProtocol( const TQString& protocol ) #ifdef KPROTOCOLINFO_TDECORE - KDE_WEAK_SYMBOL + TDE_WEAK_SYMBOL #endif ; @@ -255,7 +255,7 @@ public: */ static bool isFilterProtocol( const TQString& protocol ) #ifdef KPROTOCOLINFO_TDECORE - KDE_WEAK_SYMBOL + TDE_WEAK_SYMBOL #endif ; diff --git a/tdestyles/highcolor/highcolor.cpp b/tdestyles/highcolor/highcolor.cpp index 9cf26d102..daa88ee6c 100644 --- a/tdestyles/highcolor/highcolor.cpp +++ b/tdestyles/highcolor/highcolor.cpp @@ -79,7 +79,7 @@ class HighColorStylePlugin : public TQStylePlugin } }; -KDE_Q_EXPORT_PLUGIN( HighColorStylePlugin ) +TDE_EXPORT_PLUGIN( HighColorStylePlugin ) // --------------------------------------------------- diff --git a/tdestyles/highcontrast/highcontrast.cpp b/tdestyles/highcontrast/highcontrast.cpp index 5ef1f36d6..7646d998d 100644 --- a/tdestyles/highcontrast/highcontrast.cpp +++ b/tdestyles/highcontrast/highcontrast.cpp @@ -73,7 +73,7 @@ class HighContrastStylePlugin : public TQStylePlugin } }; -KDE_Q_EXPORT_PLUGIN (HighContrastStylePlugin) +TDE_EXPORT_PLUGIN (HighContrastStylePlugin) // --------------------------------------------------- diff --git a/tdestyles/keramik/keramik.cpp b/tdestyles/keramik/keramik.cpp index b484836ef..7285fbb15 100644 --- a/tdestyles/keramik/keramik.cpp +++ b/tdestyles/keramik/keramik.cpp @@ -93,7 +93,7 @@ public: } }; -KDE_Q_EXPORT_PLUGIN( KeramikStylePlugin ) +TDE_EXPORT_PLUGIN( KeramikStylePlugin ) // --------------------------------------------------- diff --git a/tdestyles/kthemestyle/kthemestyle.cpp b/tdestyles/kthemestyle/kthemestyle.cpp index 82772ad13..52f963d68 100644 --- a/tdestyles/kthemestyle/kthemestyle.cpp +++ b/tdestyles/kthemestyle/kthemestyle.cpp @@ -158,7 +158,7 @@ public: } }; -KDE_Q_EXPORT_PLUGIN( KThemeStylePlugin ) +TDE_EXPORT_PLUGIN( KThemeStylePlugin ) void kDrawWindowsArrow ( TQPainter *p, const TQStyleControlElementData &ceData, const TQStyle::ControlElementFlags elementFlags, const TQStyle* style, TQStyle::PrimitiveElement pe, bool down, diff --git a/tdestyles/light/light.cpp b/tdestyles/light/light.cpp index 17ecde9fc..ebf931ff7 100644 --- a/tdestyles/light/light.cpp +++ b/tdestyles/light/light.cpp @@ -58,4 +58,4 @@ TQStyle *LightStylePlugin::create(const TQString &s) return 0; } -KDE_Q_EXPORT_PLUGIN( LightStylePlugin ) +TDE_EXPORT_PLUGIN( LightStylePlugin ) diff --git a/tdestyles/plastik/plastik.cpp b/tdestyles/plastik/plastik.cpp index 5ff3b8619..ab3382b93 100644 --- a/tdestyles/plastik/plastik.cpp +++ b/tdestyles/plastik/plastik.cpp @@ -148,7 +148,7 @@ class PlastikStylePlugin : public TQStylePlugin } }; -KDE_Q_EXPORT_PLUGIN( PlastikStylePlugin ) +TDE_EXPORT_PLUGIN( PlastikStylePlugin ) // -- end -- PlastikStyle::PlastikStyle() : TDEStyle( AllowMenuTransparency, ThreeButtonScrollBar), diff --git a/tdewidgets/maketdewidgets.cpp b/tdewidgets/maketdewidgets.cpp index d890433c3..b46e6d669 100644 --- a/tdewidgets/maketdewidgets.cpp +++ b/tdewidgets/maketdewidgets.cpp @@ -104,7 +104,7 @@ static const char widgetCreate[] = " if (key == TQString::fromLatin1(\"% " return new %ImplClass%ConstructorArgs;\n"; static const char endCreate[] = " return 0;\n" "}\n" - "KDE_Q_EXPORT_PLUGIN(%PluginName)\n"; + "TDE_EXPORT_PLUGIN(%PluginName)\n"; static TDECmdLineOptions options[] =