[wpdev-commits] wolfpack objectdef.h,1.1,1.2
Brought to you by:
rip,
thiagocorrea
From: Richard M. <dr...@us...> - 2004-10-21 19:42:39
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16560 Modified Files: objectdef.h Log Message: Excess tabs = ugly to read Index: objectdef.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/objectdef.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** objectdef.h 24 Sep 2004 04:47:37 -0000 1.1 --- objectdef.h 21 Oct 2004 19:42:24 -0000 1.2 *************** *** 36,40 **** /*! Since we are not using QObject due to memory footprint, moc won't create some nice functions ! either, we need some macro magic to get them ( or disabling some ) without doing too much mess */ --- 36,40 ---- /*! Since we are not using QObject due to memory footprint, moc won't create some nice functions ! either, we need some macro magic to get them ( or disabling some ) without doing too much mess */ *************** *** 49,79 **** # ifndef QT_NO_TEXTCODEC // full set of tr functions ! # define WP_TR_FUNCTIONS(classname) \ ! static QString tr( const char* s, const char* c = 0 ) \ ! { \ ! if ( qApp ) \ ! return qApp->translate( #classname, s, c, QApplication::DefaultCodec ); \ ! else \ ! return QString::fromLatin1( s ); \ ! } \ ! \ ! static QString trUtf8( const char* s, const char* c = 0 ) \ ! { \ ! if ( qApp ) \ ! return qApp->translate( #classname, s, c, QApplication::UnicodeUTF8 ); \ ! else \ ! return QString::fromUtf8( s ); \ ! } # else // no QTextCodec, no utf8 # define WP_TR_FUNCTIONS \ ! static QString tr( const char* s, const char* c = 0 ) \ ! { \ ! if ( qApp ) \ ! return qApp->translate( #classname, s, c, QApplication::DefaultCodec ); \ ! else \ ! return QString::fromLatin1( s ); \ ! } # endif --- 49,79 ---- # ifndef QT_NO_TEXTCODEC // full set of tr functions ! # define WP_TR_FUNCTIONS(classname) \ ! static QString tr( const char* s, const char* c = 0 ) \ ! { \ ! if ( qApp ) \ ! return qApp->translate( #classname, s, c, QApplication::DefaultCodec ); \ ! else \ ! return QString::fromLatin1( s ); \ ! } \ ! \ ! static QString trUtf8( const char* s, const char* c = 0 ) \ ! { \ ! if ( qApp ) \ ! return qApp->translate( #classname, s, c, QApplication::UnicodeUTF8 ); \ ! else \ ! return QString::fromUtf8( s ); \ ! } # else // no QTextCodec, no utf8 # define WP_TR_FUNCTIONS \ ! static QString tr( const char* s, const char* c = 0 ) \ ! { \ ! if ( qApp ) \ ! return qApp->translate( #classname, s, c, QApplication::DefaultCodec ); \ ! else \ ! return QString::fromLatin1( s ); \ ! } # endif *************** *** 83,90 **** #endif ! #define OBJECTDEF(classname) \ ! public: \ ! /*virtual const char *className() const { return #classname; }*/ \ ! WP_TR_FUNCTIONS(classname) \ private: --- 83,90 ---- #endif ! #define OBJECTDEF(classname) \ ! public: \ ! /*virtual const char *className() const { return #classname; }*/ \ ! WP_TR_FUNCTIONS(classname) \ private: |