From 41e252c02eb10dcaa4622341f706b7817d6a70b2 Mon Sep 17 00:00:00 2001 From: sandman Date: Fri, 04 Oct 2002 00:41:19 +0000 Subject: - fixed a bug in style loading - changed the config key format for styles --- diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 533d7bd..e92b4dd 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -1219,7 +1219,12 @@ void QPEApplication::internalSetStyle( const QString &style ) else { QStyle *sty = 0; - QString path = QPEApplication::qpeDir ( ) + "/plugins/styles/lib" + style. lower ( ) + ".so"; + QString path = QPEApplication::qpeDir ( ) + "/plugins/styles/"; + + if ( style. find ( ".so" ) > 0 ) + path += style; + else + path = path + "lib" + style. lower ( ) + ".so"; // compatibility static QLibrary *lastlib = 0; static StyleInterface *lastiface = 0; @@ -1227,7 +1232,7 @@ void QPEApplication::internalSetStyle( const QString &style ) QLibrary *lib = new QLibrary ( path ); StyleInterface *iface = 0; - if ( lib-> queryInterface ( IID_Style, ( QUnknownInterface ** ) &iface ) == QS_OK ) + if (( lib-> queryInterface ( IID_Style, ( QUnknownInterface ** ) &iface ) == QS_OK ) && iface ) sty = iface-> create ( ); if ( sty ) { -- cgit v0.9.0.2