From 3f1129f79e945135828191679559da70cf4ac6fa Mon Sep 17 00:00:00 2001 From: sandman Date: Fri, 21 Jun 2002 01:23:55 +0000 Subject: Added a hack to support on-demand loading of liquid style with Qt2 Will be removed, once we switch to Qt3 --- (limited to 'library') diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index f84bc0e..1534b0b 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -90,6 +90,7 @@ #endif #include +#include // for Liquid HACK class QPEApplicationData { public: @@ -1314,6 +1315,27 @@ void QPEApplication::internalSetStyle( const QString &style ) setStyle( new QMotifPlusStyle ); } #endif + + // HACK for Qt2 only + else if ( style == "Liquid" ) { + static void *lib = 0; + QStyle *sty = 0; + + + if ( !lib ) { + QString path = QPEApplication::qpeDir() + "/plugins/styles/" + "libliquid.so"; + lib = ::dlopen ( path. local8Bit ( ), RTLD_NOW | RTLD_GLOBAL ); + } + if ( lib ) { + void *sym = ::dlsym ( lib, "allocate" ); + + if ( sym ) + sty = ((QStyle * (*) ( )) sym ) ( ); + } + if ( sty ) + setStyle ( sty ); + } + // HACK for Qt2 only #endif } -- cgit v0.9.0.2