-rw-r--r-- | library/qpeapplication.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 533d7bd..e92b4dd 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp | |||
@@ -1216,21 +1216,26 @@ void QPEApplication::internalSetStyle( const QString &style ) | |||
1216 | setStyle( new QMotifPlusStyle ); | 1216 | setStyle( new QMotifPlusStyle ); |
1217 | } | 1217 | } |
1218 | #endif | 1218 | #endif |
1219 | 1219 | ||
1220 | else { | 1220 | else { |
1221 | QStyle *sty = 0; | 1221 | QStyle *sty = 0; |
1222 | QString path = QPEApplication::qpeDir ( ) + "/plugins/styles/lib" + style. lower ( ) + ".so"; | 1222 | QString path = QPEApplication::qpeDir ( ) + "/plugins/styles/"; |
1223 | |||
1224 | if ( style. find ( ".so" ) > 0 ) | ||
1225 | path += style; | ||
1226 | else | ||
1227 | path = path + "lib" + style. lower ( ) + ".so"; // compatibility | ||
1223 | 1228 | ||
1224 | static QLibrary *lastlib = 0; | 1229 | static QLibrary *lastlib = 0; |
1225 | static StyleInterface *lastiface = 0; | 1230 | static StyleInterface *lastiface = 0; |
1226 | 1231 | ||
1227 | QLibrary *lib = new QLibrary ( path ); | 1232 | QLibrary *lib = new QLibrary ( path ); |
1228 | StyleInterface *iface = 0; | 1233 | StyleInterface *iface = 0; |
1229 | 1234 | ||
1230 | if ( lib-> queryInterface ( IID_Style, ( QUnknownInterface ** ) &iface ) == QS_OK ) | 1235 | if (( lib-> queryInterface ( IID_Style, ( QUnknownInterface ** ) &iface ) == QS_OK ) && iface ) |
1231 | sty = iface-> create ( ); | 1236 | sty = iface-> create ( ); |
1232 | 1237 | ||
1233 | if ( sty ) { | 1238 | if ( sty ) { |
1234 | setStyle ( sty ); | 1239 | setStyle ( sty ); |
1235 | 1240 | ||
1236 | if ( lastiface ) | 1241 | if ( lastiface ) |