diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-10-06 00:03:44 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-10-06 00:03:44 -0500 |
commit | 16e2c768d6dc1f1694af13a9ff69c3a22f4c248c (patch) | |
tree | 35410ba4111064aa5f767af1c8410b0d6a84ca46 /src/tools | |
parent | 6e8d2d256bf19fd906e2caad3e54f107733464bb (diff) | |
download | tqt3-16e2c768d6dc1f1694af13a9ff69c3a22f4c248c.tar.gz tqt3-16e2c768d6dc1f1694af13a9ff69c3a22f4c248c.zip |
Automated update from Qt3
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/qsettings.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/tools/qsettings.cpp b/src/tools/qsettings.cpp index 4dd056d0e..9c70bf02d 100644 --- a/src/tools/qsettings.cpp +++ b/src/tools/qsettings.cpp @@ -39,6 +39,7 @@ **********************************************************************/ #include "qplatformdefs.h" +#include <stdlib.h> // POSIX Large File Support redefines open -> open64 static inline int qt_open( const char *pathname, int flags, mode_t mode ) @@ -468,7 +469,19 @@ TQSettingsPrivate::TQSettingsPrivate( TQSettings::Format format ) Q_UNUSED( format ); #endif - TQString appSettings(TQDir::homeDirPath() + "/.qt/"); + TQString home; + home = getenv("TQT_HOME_DIR"); + if ( !home.isEmpty() ) { + home += "/"; + TQFileInfo i( home + "qtrc" ); + if ( !i.isReadable() ) { + home = TQDir::homeDirPath() + "/.qt/"; + } + } else { + home = TQDir::homeDirPath() + "/.qt/"; + } + TQString appSettings(home); + TQString defPath; #ifdef Q_WS_WIN #ifdef Q_OS_TEMP @@ -517,6 +530,16 @@ TQSettingsPrivate::TQSettingsPrivate( TQSettings::Format format ) if ( !!defPath ) searchPaths.append(defPath); + + TQString system; + system = getenv("TQT_SYSTEM_DIR"); + if ( !system.isEmpty() && system[0] == '/') { + TQFileInfo i( system + "/qtrc" ); + if ( i.isReadable() ) { + searchPaths.append(system); + } + } + searchPaths.append(dir.path()); } |