Changeset 425 for trunk/src/corelib/io/qsettings.cpp
- Timestamp:
- Dec 14, 2009, 9:16:37 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/corelib/io/qsettings.cpp
r25 r425 1136 1136 windowsConfigPath(CSIDL_COMMON_APPDATA) + QDir::separator()); 1137 1137 #elif defined(Q_OS_OS2) 1138 /* Though this code is very similar to the following #else statment, 1139 * we have to do it separately for OS/2 and leave the original code 1140 * intact since QDir::separator() returns ":" on Mac OS X while "/" is 1141 * actually used in the #else below. */ 1138 /* Though this code is very similar to the following #else block, the 1139 * definition of the "absolute path" is different on OS/2 (see 1140 * isRelativePath() in qfsfileengine_os2.cpp) so take it into account)*/ 1142 1141 QString userPath; 1143 QString env = Q Latin1String(getenv("XDG_CONFIG_HOME"));1142 QString env = Qgetenv("XDG_CONFIG_HOME")); 1144 1143 if (env.isEmpty()) { 1145 1144 userPath = homePath; 1146 1145 userPath += QDir::separator(); 1147 1146 userPath += QLatin1String(".config"); 1148 } else if (QDir::isAbsolutePath(env)) {1149 userPath = env;1150 1147 } else { 1151 userPath = homePath; 1152 userPath += QDir::separator(); 1153 userPath += env; 1154 } 1155 userPath += QDir::separator(); 1148 userPath = QDir::cleanPath(QDir(homePath).absoluteFilePath(env)); 1149 } 1150 userPath = QDir::cleanPath(userPath) + QLatin1Char('/'); 1156 1151 1157 1152 pathHash->insert(pathHashKey(QSettings::IniFormat, QSettings::UserScope), userPath); … … 2386 2381 \o \c{%HOME%\.config\MySoft\Star Runner.ini} 2387 2382 \o \c{%HOME%\.config\MySoft.ini} 2388 \o \c{ <boot_drv>:\OS2\xdg\MySoft\Star Runner.ini}2389 \o \c{ <boot_drv>:\OS2\xdg\MySoft.ini}2383 \o \c{\xdg\MySoft\Star Runner.ini} 2384 \o \c{\xdg\MySoft.ini} 2390 2385 \endlist 2391 2386 … … 3470 3465 \row \o{1,2} Mac OS X \o{1,2} IniFormat \o UserScope \o \c $HOME/.config 3471 3466 \row \o SystemScope \o \c /etc/xdg 3472 \row \o{1,2} OS/2 \o{1,2} IniFormat \o UserScope \o \c $HOME\.config3473 \row \o SystemScope \o \c <boot_drv>:\OS2\xdg3467 \row \o{1,2} OS/2 \o{1,2} IniFormat \o UserScope \o \c \.config 3468 \row \o SystemScope \o \c \xdg 3474 3469 \endtable 3475 3470 … … 3477 3472 $HOME/Settings) can be overridden by the user by setting the 3478 3473 \c XDG_CONFIG_HOME environment variable. The default SystemScope 3479 paths on Unix, Mac OS X (\c /etc/xdg) and OS/2 (\c <boot_drv>:\OS2\xdg) can3480 beoverridden when building the Qt library using the \c configure script's3474 paths on Unix, Mac OS X (\c /etc/xdg) and OS/2 (\c 3475 overridden when building the Qt library using the \c configure script's 3481 3476 \c 3482 3477 --sysconfdir flag (see QLibraryInfo for details).
Note:
See TracChangeset
for help on using the changeset viewer.