summaryrefslogtreecommitdiff
path: root/library
Unidiff
Diffstat (limited to 'library') (more/less context) (show whitespace changes)
-rw-r--r--library/qpeapplication.cpp27
1 files changed, 20 insertions, 7 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 3efba20..0b6d56d 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -391,3 +391,3 @@ public:
391 { 391 {
392 QString path = QPEApplication::qpeDir() + "/plugins/textcodecs"; 392 QString path = QPEApplication::qpeDir() + "plugins/textcodecs";
393#ifdef Q_OS_MACX 393#ifdef Q_OS_MACX
@@ -420,3 +420,3 @@ public:
420 { 420 {
421 QString path = QPEApplication::qpeDir() + "/plugins/imagecodecs"; 421 QString path = QPEApplication::qpeDir() + "plugins/imagecodecs";
422#ifdef Q_OS_MACX 422#ifdef Q_OS_MACX
@@ -1189,7 +1189,20 @@ QString QPEApplication::qpeDir()
1189{ 1189{
1190 const char * base = getenv( "OPIEDIR" ); 1190 QString base, dir;
1191 if ( base ) 1191
1192 return QString( base ) + "/"; 1192 if (getenv( "OPIEDIR" ))
1193 base = QString(getenv("OPIEDIR")).stripWhiteSpace();
1194 if ( !base.isNull() && (base.length() > 0 )){
1195#ifdef Q_OS_WIN32
1196 QString temp(base);
1197 if (temp[(int)temp.length()-1] != QDir::separator())
1198 temp.append(QDir::separator());
1199 dir = temp;
1200#else
1201 dir = QString( base ) + "/";
1202#endif
1203 }else{
1204 dir = QString( ".." ) + QDir::separator();
1205 }
1193 1206
1194 return QString( "../" ); 1207 return dir;
1195} 1208}
@@ -1837,3 +1850,3 @@ void QPEApplication::internalSetStyle( const QString &style )
1837 QStyle *sty = 0; 1850 QStyle *sty = 0;
1838 QString path = QPEApplication::qpeDir ( ) + "/plugins/styles/"; 1851 QString path = QPEApplication::qpeDir ( ) + "plugins/styles/";
1839 1852