summaryrefslogtreecommitdiff
path: root/library/qpeapplication.cpp
Unidiff
Diffstat (limited to 'library/qpeapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index e92b4dd..f65f3ab 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -1212,49 +1212,49 @@ void QPEApplication::internalSetStyle( const QString &style )
1212 } 1212 }
1213#endif 1213#endif
1214#ifndef QT_NO_STYLE_MOTIFPLUS 1214#ifndef QT_NO_STYLE_MOTIFPLUS
1215 else if ( style == "MotifPlus" ) { 1215 else if ( style == "MotifPlus" ) {
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/"; 1222 QString path = QPEApplication::qpeDir ( ) + "/plugins/styles/";
1223 1223
1224 if ( style. find ( ".so" ) > 0 ) 1224 if ( style. find ( ".so" ) > 0 )
1225 path += style; 1225 path += style;
1226 else 1226 else
1227 path = path + "lib" + style. lower ( ) + ".so"; // compatibility 1227 path = path + "lib" + style. lower ( ) + ".so"; // compatibility
1228 1228
1229 static QLibrary *lastlib = 0; 1229 static QLibrary *lastlib = 0;
1230 static StyleInterface *lastiface = 0; 1230 static StyleInterface *lastiface = 0;
1231 1231
1232 QLibrary *lib = new QLibrary ( path ); 1232 QLibrary *lib = new QLibrary ( path );
1233 StyleInterface *iface = 0; 1233 StyleInterface *iface = 0;
1234 1234
1235 if (( lib-> queryInterface ( IID_Style, ( QUnknownInterface ** ) &iface ) == QS_OK ) && iface ) 1235 if (( lib-> queryInterface ( IID_Style, ( QUnknownInterface ** ) &iface ) == QS_OK ) && iface )
1236 sty = iface-> create ( ); 1236 sty = iface-> style ( );
1237 1237
1238 if ( sty ) { 1238 if ( sty ) {
1239 setStyle ( sty ); 1239 setStyle ( sty );
1240 1240
1241 if ( lastiface ) 1241 if ( lastiface )
1242 lastiface-> release ( ); 1242 lastiface-> release ( );
1243 lastiface = iface; 1243 lastiface = iface;
1244 1244
1245 if ( lastlib ) { 1245 if ( lastlib ) {
1246 lastlib-> unload ( ); 1246 lastlib-> unload ( );
1247 delete lastlib; 1247 delete lastlib;
1248 } 1248 }
1249 lastlib = lib; 1249 lastlib = lib;
1250 } 1250 }
1251 else { 1251 else {
1252 if ( iface ) 1252 if ( iface )
1253 iface-> release ( ); 1253 iface-> release ( );
1254 delete lib; 1254 delete lib;
1255 1255
1256 setStyle ( new QPEStyle ( )); 1256 setStyle ( new QPEStyle ( ));
1257 } 1257 }
1258 } 1258 }
1259#endif 1259#endif
1260} 1260}