summaryrefslogtreecommitdiff
path: root/library
authorsandman <sandman>2002-06-21 01:23:55 (UTC)
committer sandman <sandman>2002-06-21 01:23:55 (UTC)
commit3f1129f79e945135828191679559da70cf4ac6fa (patch) (side-by-side diff)
treeac5a2e4698a93a201c6bdb5bcf377e1e429c32ed /library
parent2a7407325b1607c9ee40ed3558c8549672a36ad4 (diff)
downloadopie-3f1129f79e945135828191679559da70cf4ac6fa.zip
opie-3f1129f79e945135828191679559da70cf4ac6fa.tar.gz
opie-3f1129f79e945135828191679559da70cf4ac6fa.tar.bz2
Added a hack to support on-demand loading of liquid style with Qt2
Will be removed, once we switch to Qt3
Diffstat (limited to 'library') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp22
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 @@
+#include <dlfcn.h> // for Liquid HACK
@@ -1316,2 +1317,23 @@ void QPEApplication::internalSetStyle( const QString &style )
#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