author | zecke <zecke> | 2002-09-25 18:15:58 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-25 18:15:58 (UTC) |
commit | c96507591791d48a6d6dad3de6c15739c84e1c93 (patch) (side-by-side diff) | |
tree | f5476860497023dd6d9e1c82c61cc6bb3f61a6da /library | |
parent | d44c455b86d6cccbc497e3e8d8aa399096eff7db (diff) | |
download | opie-c96507591791d48a6d6dad3de6c15739c84e1c93.zip opie-c96507591791d48a6d6dad3de6c15739c84e1c93.tar.gz opie-c96507591791d48a6d6dad3de6c15739c84e1c93.tar.bz2 |
ljps patch was/is correct
but for some reason TT is not using QFile
so I made it use getenv(HOME) instead
-rw-r--r-- | library/qpeapplication.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index bdf67b9..533d7bd 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -779,65 +779,69 @@ bool QPEApplication::qwsEventFilter( QWSEvent * e ) */ QPEApplication::~QPEApplication() { ungrabKeyboard(); #if defined(Q_WS_QWS) && !defined(QT_NO_COP) // Need to delete QCopChannels early, since the display will // be gone by the time we get to ~QObject(). delete sysChannel; delete pidChannel; #endif delete d; } /*! Returns <tt>$OPIEDIR/</tt>. */ QString QPEApplication::qpeDir() { const char * base = getenv( "OPIEDIR" ); if ( base ) return QString( base ) + "/"; return QString( "../" ); } /*! Returns the user's current Document directory. There is a trailing "/". .. well, it does now,, and there's no trailing '/' */ QString QPEApplication::documentDir() { - return QString( QDir::homeDirPath() + "/Documents"); + const char* base = getenv( "HOME"); + if( base ) + return QString( base ) + "/Documents"; + + return QString( "../Documents" ); } static int deforient = -1; /*! \internal */ int QPEApplication::defaultRotation() { if ( deforient < 0 ) { QString d = getenv( "QWS_DISPLAY" ); if ( d.contains( "Rot90" ) ) { deforient = 90; } else if ( d.contains( "Rot180" ) ) { deforient = 180; } else if ( d.contains( "Rot270" ) ) { deforient = 270; } else { deforient = 0; } } return deforient; } /*! \internal */ void QPEApplication::setDefaultRotation( int r ) { |