-rw-r--r-- | library/qpeapplication.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index f84bc0e..1534b0b 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp | |||
@@ -92,2 +92,3 @@ | |||
92 | 92 | ||
93 | #include <dlfcn.h> // for Liquid HACK | ||
93 | 94 | ||
@@ -1316,2 +1317,23 @@ void QPEApplication::internalSetStyle( const QString &style ) | |||
1316 | #endif | 1317 | #endif |
1318 | |||
1319 | // HACK for Qt2 only | ||
1320 | else if ( style == "Liquid" ) { | ||
1321 | static void *lib = 0; | ||
1322 | QStyle *sty = 0; | ||
1323 | |||
1324 | |||
1325 | if ( !lib ) { | ||
1326 | QString path = QPEApplication::qpeDir() + "/plugins/styles/" + "libliquid.so"; | ||
1327 | lib = ::dlopen ( path. local8Bit ( ), RTLD_NOW | RTLD_GLOBAL ); | ||
1328 | } | ||
1329 | if ( lib ) { | ||
1330 | void *sym = ::dlsym ( lib, "allocate" ); | ||
1331 | |||
1332 | if ( sym ) | ||
1333 | sty = ((QStyle * (*) ( )) sym ) ( ); | ||
1334 | } | ||
1335 | if ( sty ) | ||
1336 | setStyle ( sty ); | ||
1337 | } | ||
1338 | // HACK for Qt2 only | ||
1317 | #endif | 1339 | #endif |