kdemacros.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _KDE_MACROS_H_
00022 #define _KDE_MACROS_H_
00023
00024
00025 #define __KDE_HAVE_GCC_VISIBILITY "1"
00026
00041 #ifdef __KDE_HAVE_GCC_VISIBILITY
00042 #define KDE_NO_EXPORT __attribute__ ((visibility("hidden")))
00043 #define KDE_EXPORT __attribute__ ((visibility("default")))
00044 #elif defined(Q_WS_WIN)
00045 #define KDE_NO_EXPORT
00046 #define KDE_EXPORT __declspec(dllexport)
00047 #else
00048 #define KDE_NO_EXPORT
00049 #define KDE_EXPORT
00050 #endif
00051
00056 #define KDE_Q_EXPORT_PLUGIN(PLUGIN) \
00057 Q_EXTERN_C KDE_EXPORT const char* qt_ucm_query_verification_data(); \
00058 Q_EXTERN_C KDE_EXPORT QUnknownInterface* ucm_instantiate(); \
00059 Q_EXPORT_PLUGIN(PLUGIN)
00060
00066 #ifdef __GNUC__
00067 #define KDE_PACKED __attribute__((__packed__))
00068 #else
00069 #define KDE_PACKED
00070 #endif
00071
00122 #ifndef KDE_DEPRECATED
00123 #if __GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 >= 2)
00124
00125 # define KDE_DEPRECATED __attribute__ ((deprecated))
00126 #elif defined(_MSC_VER) && (_MSC_VER >= 1300)
00127
00128 # define KDE_DEPRECATED __declspec(deprecated)
00129 #else
00130 # define KDE_DEPRECATED
00131 #endif
00132 #endif
00133
00159 #if __GNUC__ - 0 >= 3
00160 # define KDE_ISLIKELY( x ) __builtin_expect(!!(x),1)
00161 # define KDE_ISUNLIKELY( x ) __builtin_expect(!!(x),0)
00162 #else
00163 # define KDE_ISLIKELY( x ) ( x )
00164 # define KDE_ISUNLIKELY( x ) ( x )
00165 #endif
00166
00179 #define RESERVE_VIRTUAL_1 \
00180 virtual void reservedVirtual1() {}
00181 #define RESERVE_VIRTUAL_2 \
00182 virtual void reservedVirtual2() {} \
00183 RESERVE_VIRTUAL_1
00184 #define RESERVE_VIRTUAL_3 \
00185 virtual void reservedVirtual3() {} \
00186 RESERVE_VIRTUAL_2
00187 #define RESERVE_VIRTUAL_4 \
00188 virtual void reservedVirtual4() {} \
00189 RESERVE_VIRTUAL_3
00190 #define RESERVE_VIRTUAL_5 \
00191 virtual void reservedVirtual5() {} \
00192 RESERVE_VIRTUAL_4
00193 #define RESERVE_VIRTUAL_6 \
00194 virtual void reservedVirtual6() {} \
00195 RESERVE_VIRTUAL_5
00196 #define RESERVE_VIRTUAL_7 \
00197 virtual void reservedVirtual7() {} \
00198 RESERVE_VIRTUAL_6
00199 #define RESERVE_VIRTUAL_8 \
00200 virtual void reservedVirtual8() {} \
00201 RESERVE_VIRTUAL_7
00202 #define RESERVE_VIRTUAL_9 \
00203 virtual void reservedVirtual9() {} \
00204 RESERVE_VIRTUAL_8
00205 #define RESERVE_VIRTUAL_10 \
00206 virtual void reservedVirtual10() {} \
00207 RESERVE_VIRTUAL_9
00208
00215 #ifdef __GNUC__
00216 #define KDE_WEAK_SYMBOL __attribute__((__weak__))
00217 #else
00218 #define KDE_WEAK_SYMBOL
00219 #endif
00220
00221 #endif
|