-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 | |||
@@ -795,33 +795,37 @@ QPEApplication::~QPEApplication() | |||
795 | */ | 795 | */ |
796 | QString QPEApplication::qpeDir() | 796 | QString QPEApplication::qpeDir() |
797 | { | 797 | { |
798 | const char * base = getenv( "OPIEDIR" ); | 798 | const char * base = getenv( "OPIEDIR" ); |
799 | if ( base ) | 799 | if ( base ) |
800 | return QString( base ) + "/"; | 800 | return QString( base ) + "/"; |
801 | 801 | ||
802 | return QString( "../" ); | 802 | return QString( "../" ); |
803 | } | 803 | } |
804 | 804 | ||
805 | /*! | 805 | /*! |
806 | Returns the user's current Document directory. There is a trailing "/". | 806 | Returns the user's current Document directory. There is a trailing "/". |
807 | .. well, it does now,, and there's no trailing '/' | 807 | .. well, it does now,, and there's no trailing '/' |
808 | */ | 808 | */ |
809 | QString QPEApplication::documentDir() | 809 | QString QPEApplication::documentDir() |
810 | { | 810 | { |
811 | return QString( QDir::homeDirPath() + "/Documents"); | 811 | const char* base = getenv( "HOME"); |
812 | if( base ) | ||
813 | return QString( base ) + "/Documents"; | ||
814 | |||
815 | return QString( "../Documents" ); | ||
812 | } | 816 | } |
813 | 817 | ||
814 | static int deforient = -1; | 818 | static int deforient = -1; |
815 | 819 | ||
816 | /*! | 820 | /*! |
817 | \internal | 821 | \internal |
818 | */ | 822 | */ |
819 | int QPEApplication::defaultRotation() | 823 | int QPEApplication::defaultRotation() |
820 | { | 824 | { |
821 | if ( deforient < 0 ) { | 825 | if ( deforient < 0 ) { |
822 | QString d = getenv( "QWS_DISPLAY" ); | 826 | QString d = getenv( "QWS_DISPLAY" ); |
823 | if ( d.contains( "Rot90" ) ) { | 827 | if ( d.contains( "Rot90" ) ) { |
824 | deforient = 90; | 828 | deforient = 90; |
825 | } | 829 | } |
826 | else if ( d.contains( "Rot180" ) ) { | 830 | else if ( d.contains( "Rot180" ) ) { |
827 | deforient = 180; | 831 | deforient = 180; |