diff --git a/harbour/ChangeLog b/harbour/ChangeLog index da1f3adddb..f8b2f27599 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,17 @@ The license applies to all entries newer than 2009-04-28. */ +2010-06-10 23:01 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbqt/hbqt_base.cpp + + Added QVERSION() function which returns QT lib version as string. + Wrapper to QT function with the same name. + + Added QSHAREDBUILD() function which returns whether QT lib used + are shared or static. Wrapper to QT function with the same name. + - Deleted HBQT_ISSTATICLINK() which was not portable implementation. + + + contrib/hbqt/tests/qtver.prg + + Added test code to display all detecable QT version/lib information. + 2010-06-10 22:30 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * INSTALL * contrib/hbqt/hbqts.hbp diff --git a/harbour/contrib/hbqt/hbqt_base.cpp b/harbour/contrib/hbqt/hbqt_base.cpp index 203af91c35..1b1abb479c 100644 --- a/harbour/contrib/hbqt/hbqt_base.cpp +++ b/harbour/contrib/hbqt/hbqt_base.cpp @@ -54,6 +54,16 @@ #include "hbqt.h" +HB_FUNC( QVERSION ) +{ + hb_retc( qVersion() ); +} + +HB_FUNC( QSHAREDBUILD ) +{ + hb_retl( qSharedBuild() ? HB_TRUE : HB_FALSE ); +} + HB_FUNC( QT_VERSION ) { hb_retnint( QT_VERSION ); @@ -105,13 +115,4 @@ HB_FUNC( HBQT_ISEQUALGCQTPOINTER ) } } -HB_FUNC( HBQT_ISSTATICLINK ) -{ -#ifdef QT_NODLL - hb_retl( HB_TRUE ); -#else - hb_retl( HB_FALSE ); -#endif -} - #endif // #if QT_VERSION >= 0x040500 diff --git a/harbour/contrib/hbqt/tests/qtver.prg b/harbour/contrib/hbqt/tests/qtver.prg new file mode 100644 index 0000000000..3f6baf8fb2 --- /dev/null +++ b/harbour/contrib/hbqt/tests/qtver.prg @@ -0,0 +1,22 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * + * Copyright 2010 Viktor Szakats (harbour.01 syenar.hu) + * www - http://harbour-project.org + * + */ + +#include "simpleio.ch" + +PROCEDURE MAIN() + + ? "QT library used is shared:", QSHAREDBUILD() + ? "QT library version used:", QVERSION() + ? "QT library version HBQT was built against:", QT_VERSION_STR() + ? "QT library version HBQT was built against (numeric):", "0x" + hb_numtohex( QT_VERSION() ) + + RETURN