summaryrefslogtreecommitdiff
path: root/library
authorllornkcor <llornkcor>2002-09-25 16:26:19 (UTC)
committer llornkcor <llornkcor>2002-09-25 16:26:19 (UTC)
commitd44c455b86d6cccbc497e3e8d8aa399096eff7db (patch) (unidiff)
tree8dd582c828f21ff11a99800159df2b982dbfcc48 /library
parenta546a6ea143da9244a06f1e40829254e8bf4dc8f (diff)
downloadopie-d44c455b86d6cccbc497e3e8d8aa399096eff7db.zip
opie-d44c455b86d6cccbc497e3e8d8aa399096eff7db.tar.gz
opie-d44c455b86d6cccbc497e3e8d8aa399096eff7db.tar.bz2
fix qpeDir() to return users dir, not qpeDir.. duh
Diffstat (limited to 'library') (more/less context) (show whitespace changes)
-rw-r--r--library/qpeapplication.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index c107a08..bdf67b9 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -783,52 +783,53 @@ QPEApplication::~QPEApplication()
783#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 783#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
784 // Need to delete QCopChannels early, since the display will 784 // Need to delete QCopChannels early, since the display will
785 // be gone by the time we get to ~QObject(). 785 // be gone by the time we get to ~QObject().
786 delete sysChannel; 786 delete sysChannel;
787 delete pidChannel; 787 delete pidChannel;
788#endif 788#endif
789 789
790 delete d; 790 delete d;
791} 791}
792 792
793/*! 793/*!
794 Returns <tt>$OPIEDIR/</tt>. 794 Returns <tt>$OPIEDIR/</tt>.
795*/ 795*/
796QString QPEApplication::qpeDir() 796QString 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*/ 808*/
808QString QPEApplication::documentDir() 809QString QPEApplication::documentDir()
809{ 810{
810 return QString( qpeDir() + "Documents"); 811 return QString( QDir::homeDirPath() + "/Documents");
811} 812}
812 813
813static int deforient = -1; 814static int deforient = -1;
814 815
815/*! 816/*!
816 \internal 817 \internal
817*/ 818*/
818int QPEApplication::defaultRotation() 819int QPEApplication::defaultRotation()
819{ 820{
820 if ( deforient < 0 ) { 821 if ( deforient < 0 ) {
821 QString d = getenv( "QWS_DISPLAY" ); 822 QString d = getenv( "QWS_DISPLAY" );
822 if ( d.contains( "Rot90" ) ) { 823 if ( d.contains( "Rot90" ) ) {
823 deforient = 90; 824 deforient = 90;
824 } 825 }
825 else if ( d.contains( "Rot180" ) ) { 826 else if ( d.contains( "Rot180" ) ) {
826 deforient = 180; 827 deforient = 180;
827 } 828 }
828 else if ( d.contains( "Rot270" ) ) { 829 else if ( d.contains( "Rot270" ) ) {
829 deforient = 270; 830 deforient = 270;
830 } 831 }
831 else { 832 else {
832 deforient = 0; 833 deforient = 0;
833 } 834 }
834 } 835 }