-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 | |||
@@ -85,16 +85,17 @@ | |||
85 | // for setBacklight() | 85 | // for setBacklight() |
86 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) | 86 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) |
87 | #include <linux/fb.h> | 87 | #include <linux/fb.h> |
88 | #include <sys/types.h> | 88 | #include <sys/types.h> |
89 | #include <sys/stat.h> | 89 | #include <sys/stat.h> |
90 | #endif | 90 | #endif |
91 | #include <stdlib.h> | 91 | #include <stdlib.h> |
92 | 92 | ||
93 | #include <dlfcn.h> // for Liquid HACK | ||
93 | 94 | ||
94 | class QPEApplicationData { | 95 | class QPEApplicationData { |
95 | public: | 96 | public: |
96 | QPEApplicationData() : presstimer(0), presswidget(0), rightpressed(FALSE), | 97 | QPEApplicationData() : presstimer(0), presswidget(0), rightpressed(FALSE), |
97 | kbgrabber(0), kbregrab(FALSE), notbusysent(FALSE), preloaded(FALSE), | 98 | kbgrabber(0), kbregrab(FALSE), notbusysent(FALSE), preloaded(FALSE), |
98 | forceshow(FALSE), nomaximize(FALSE), qpe_main_widget(0), | 99 | forceshow(FALSE), nomaximize(FALSE), qpe_main_widget(0), |
99 | keep_running(TRUE) | 100 | keep_running(TRUE) |
100 | { | 101 | { |
@@ -1309,16 +1310,37 @@ void QPEApplication::internalSetStyle( const QString &style ) | |||
1309 | setStyle( new QMotifStyle ); | 1310 | setStyle( new QMotifStyle ); |
1310 | } | 1311 | } |
1311 | #endif | 1312 | #endif |
1312 | #ifndef QT_NO_STYLE_MOTIFPLUS | 1313 | #ifndef QT_NO_STYLE_MOTIFPLUS |
1313 | else if ( style == "MotifPlus" ) { | 1314 | else if ( style == "MotifPlus" ) { |
1314 | setStyle( new QMotifPlusStyle ); | 1315 | setStyle( new QMotifPlusStyle ); |
1315 | } | 1316 | } |
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 |
1318 | } | 1340 | } |
1319 | 1341 | ||
1320 | /*! | 1342 | /*! |
1321 | \internal | 1343 | \internal |
1322 | */ | 1344 | */ |
1323 | void QPEApplication::prepareForTermination(bool willrestart) | 1345 | void QPEApplication::prepareForTermination(bool willrestart) |
1324 | { | 1346 | { |