summaryrefslogtreecommitdiff
path: root/library/qpeapplication.cpp
Side-by-side diff
Diffstat (limited to 'library/qpeapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp9
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
@@ -1218,17 +1218,22 @@ void QPEApplication::internalSetStyle( const QString &style )
#endif
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;
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 ) {
setStyle ( sty );