summaryrefslogtreecommitdiff
path: root/library/qpeapplication.cpp
authorsandman <sandman>2002-10-04 00:41:19 (UTC)
committer sandman <sandman>2002-10-04 00:41:19 (UTC)
commit41e252c02eb10dcaa4622341f706b7817d6a70b2 (patch) (side-by-side diff)
tree786be18c31413b7ab5ff52c38bbb3bcdfa3fa0c8 /library/qpeapplication.cpp
parent0490713bb9cf600e14951195c58558e605063940 (diff)
downloadopie-41e252c02eb10dcaa4622341f706b7817d6a70b2.zip
opie-41e252c02eb10dcaa4622341f706b7817d6a70b2.tar.gz
opie-41e252c02eb10dcaa4622341f706b7817d6a70b2.tar.bz2
- fixed a bug in style loading
- changed the config key format for styles
Diffstat (limited to 'library/qpeapplication.cpp') (more/less context) (show 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
@@ -1220,5 +1220,10 @@ 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;
@@ -1228,5 +1233,5 @@ void QPEApplication::internalSetStyle( const QString &style )
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 ( );