diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-07-25 13:22:54 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-07-25 13:22:54 +0000 |
commit | d41c397e7a8df19bf276c092c87bb10152a1b57b (patch) | |
tree | f7fdb682211725b16451082c198b7e8a5805e415 /vcl/unx | |
parent | 847f87f6d40d2d62437e810eeeead9fa3f8b1815 (diff) |
INTEGRATION: CWS vclshowstop05 (1.7.100); FILE MERGED
2005/07/22 13:04:34 pl 1.7.100.1: #i52326# add version check for qt minimum 3.2.2
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/kde/kdedata.cxx | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/vcl/unx/kde/kdedata.cxx b/vcl/unx/kde/kdedata.cxx index 59cbbcdf17db..e0507c8a680b 100644 --- a/vcl/unx/kde/kdedata.cxx +++ b/vcl/unx/kde/kdedata.cxx @@ -2,9 +2,9 @@ * * $RCSfile: kdedata.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: rt $ $Date: 2005-05-18 08:05:42 $ + * last change: $Author: hr $ $Date: 2005-07-25 14:22:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -261,6 +261,24 @@ void KDEData::Init() extern "C" { VCL_DLLPUBLIC SalInstance* create_SalInstance( oslModule pModule ) { + rtl::OString aVersion( qVersion() ); +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "qt version string is \"%s\"\n", aVersion.getStr() ); +#endif + sal_Int32 nIndex = 0, nMajor = 0, nMinor = 0, nMicro = 0; + nMajor = aVersion.getToken( 0, '.', nIndex ).toInt32(); + if( nIndex > 0 ) + nMinor = aVersion.getToken( 0, '.', nIndex ).toInt32(); + if( nIndex > 0 ) + nMicro = aVersion.getToken( 0, '.', nIndex ).toInt32(); + if( nMajor != 3 || nMinor < 2 || (nMinor == 2 && nMicro < 2) ) + { +#if OSL_DEBUG_LEVEL > 1 + fprintf( stderr, "unsuitable qt version %d.%d.%d\n", nMajor, nMinor, nMicro ); +#endif + return NULL; + } + KDESalInstance* pInstance = new KDESalInstance( new SalYieldMutex() ); #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "created KDESalInstance 0x%p\n", pInstance ); |