Added support for "roaming" application data directory to MUtils::OS::known_folder() function. Use FOLDER_ROAMING_DATA enumeration value.
This commit is contained in:
parent
a9552cd6c5
commit
3916593e63
@ -93,10 +93,15 @@ typedef bool(* </td><td class="memItemRight" valign="bottom"><b>progress_ca
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
|
||||
Enumerations</h2></td></tr>
|
||||
<tr class="memitem:a62a1b72ba9a7accee438d19212785e54"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54">known_folder_t</a> { <a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54a0fb64b1e975f9ff0cc97df6e3b7f8110">FOLDER_LOCALAPPDATA</a> = 0,
|
||||
<a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54abb6f5bd0b6564b2f093f5a2d1c055183">FOLDER_PROGRAMFILES</a> = 2,
|
||||
<a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54a7c25655022efd34417acfaa11f8491b3">FOLDER_SYSTEMFOLDER</a> = 3,
|
||||
<a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54af32b4c27ec428ad2bf69d8c8802de21c">FOLDER_SYSTROOT_DIR</a> = 4
|
||||
<tr class="memitem:a62a1b72ba9a7accee438d19212785e54"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54">known_folder_t</a> { <br />
|
||||
  <a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54ab1f55647ec7567aa2160383bc26539d5">FOLDER_ROAMING_DATA</a> = 0,
|
||||
<a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54a0fb64b1e975f9ff0cc97df6e3b7f8110">FOLDER_LOCALAPPDATA</a> = 1,
|
||||
<a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54a77c4c8768676d49c26bcec33dcf23b1e">FOLDER_USER_PROFILE</a> = 2,
|
||||
<a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54abb6f5bd0b6564b2f093f5a2d1c055183">FOLDER_PROGRAMFILES</a> = 3,
|
||||
<br />
|
||||
  <a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54a7c25655022efd34417acfaa11f8491b3">FOLDER_SYSTEMFOLDER</a> = 4,
|
||||
<a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54af32b4c27ec428ad2bf69d8c8802de21c">FOLDER_SYSTROOT_DIR</a> = 5
|
||||
<br />
|
||||
}<tr class="memdesc:a62a1b72ba9a7accee438d19212785e54"><td class="mdescLeft"> </td><td class="mdescRight">This enumeration specifies "known" folder identifiers. <a href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54">More...</a><br /></td></tr>
|
||||
</td></tr>
|
||||
<tr class="separator:a62a1b72ba9a7accee438d19212785e54"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
@ -313,7 +318,11 @@ MUTILS_API void </td><td class="memItemRight" valign="bottom"><b>fatal_exit
|
||||
|
||||
<p>This enumeration specifies "known" folder identifiers. </p>
|
||||
<table class="fieldtable">
|
||||
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a62a1b72ba9a7accee438d19212785e54a0fb64b1e975f9ff0cc97df6e3b7f8110"></a>FOLDER_LOCALAPPDATA </td><td class="fielddoc"><p>Local application data (non-roaming) </p>
|
||||
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a62a1b72ba9a7accee438d19212785e54ab1f55647ec7567aa2160383bc26539d5"></a>FOLDER_ROAMING_DATA </td><td class="fielddoc"><p>Application-specific data. </p>
|
||||
</td></tr>
|
||||
<tr><td class="fieldname"><a id="a62a1b72ba9a7accee438d19212785e54a0fb64b1e975f9ff0cc97df6e3b7f8110"></a>FOLDER_LOCALAPPDATA </td><td class="fielddoc"><p>Local application data (non-roaming) </p>
|
||||
</td></tr>
|
||||
<tr><td class="fieldname"><a id="a62a1b72ba9a7accee438d19212785e54a77c4c8768676d49c26bcec33dcf23b1e"></a>FOLDER_USER_PROFILE </td><td class="fielddoc"><p>The user's profile folder. </p>
|
||||
</td></tr>
|
||||
<tr><td class="fieldname"><a id="a62a1b72ba9a7accee438d19212785e54abb6f5bd0b6564b2f093f5a2d1c055183"></a>FOLDER_PROGRAMFILES </td><td class="fielddoc"><p>Program files. </p>
|
||||
</td></tr>
|
||||
|
@ -123,10 +123,15 @@ Enumerations</h2></td></tr>
|
||||
}<tr class="memdesc:a0571c442a535da3a8541642f8cead00e"><td class="mdescLeft"> </td><td class="mdescRight">This enumeration specifies the type of the underlaying operating system. <a href="../../d1/d7d/namespace_m_utils_1_1_o_s_1_1_version.html#a0571c442a535da3a8541642f8cead00e">More...</a><br /></td></tr>
|
||||
</td></tr>
|
||||
<tr class="separator:a0571c442a535da3a8541642f8cead00e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a62a1b72ba9a7accee438d19212785e54"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54">MUtils::OS::known_folder_t</a> { <a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54a0fb64b1e975f9ff0cc97df6e3b7f8110">MUtils::OS::FOLDER_LOCALAPPDATA</a> = 0,
|
||||
<a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54abb6f5bd0b6564b2f093f5a2d1c055183">MUtils::OS::FOLDER_PROGRAMFILES</a> = 2,
|
||||
<a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54a7c25655022efd34417acfaa11f8491b3">MUtils::OS::FOLDER_SYSTEMFOLDER</a> = 3,
|
||||
<a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54af32b4c27ec428ad2bf69d8c8802de21c">MUtils::OS::FOLDER_SYSTROOT_DIR</a> = 4
|
||||
<tr class="memitem:a62a1b72ba9a7accee438d19212785e54"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54">MUtils::OS::known_folder_t</a> { <br />
|
||||
  <a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54ab1f55647ec7567aa2160383bc26539d5">MUtils::OS::FOLDER_ROAMING_DATA</a> = 0,
|
||||
<a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54a0fb64b1e975f9ff0cc97df6e3b7f8110">MUtils::OS::FOLDER_LOCALAPPDATA</a> = 1,
|
||||
<a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54a77c4c8768676d49c26bcec33dcf23b1e">MUtils::OS::FOLDER_USER_PROFILE</a> = 2,
|
||||
<a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54abb6f5bd0b6564b2f093f5a2d1c055183">MUtils::OS::FOLDER_PROGRAMFILES</a> = 3,
|
||||
<br />
|
||||
  <a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54a7c25655022efd34417acfaa11f8491b3">MUtils::OS::FOLDER_SYSTEMFOLDER</a> = 4,
|
||||
<a class="el" href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54af32b4c27ec428ad2bf69d8c8802de21c">MUtils::OS::FOLDER_SYSTROOT_DIR</a> = 5
|
||||
<br />
|
||||
}<tr class="memdesc:a62a1b72ba9a7accee438d19212785e54"><td class="mdescLeft"> </td><td class="mdescRight">This enumeration specifies "known" folder identifiers. <a href="../../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54">More...</a><br /></td></tr>
|
||||
</td></tr>
|
||||
<tr class="separator:a62a1b72ba9a7accee438d19212785e54"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
|
File diff suppressed because one or more lines are too long
@ -159,12 +159,18 @@ $(function() {
|
||||
<li>FOLDER_PROGRAMFILES
|
||||
: <a class="el" href="d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54abb6f5bd0b6564b2f093f5a2d1c055183">MUtils::OS</a>
|
||||
</li>
|
||||
<li>FOLDER_ROAMING_DATA
|
||||
: <a class="el" href="d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54ab1f55647ec7567aa2160383bc26539d5">MUtils::OS</a>
|
||||
</li>
|
||||
<li>FOLDER_SYSTEMFOLDER
|
||||
: <a class="el" href="d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54a7c25655022efd34417acfaa11f8491b3">MUtils::OS</a>
|
||||
</li>
|
||||
<li>FOLDER_SYSTROOT_DIR
|
||||
: <a class="el" href="d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54af32b4c27ec428ad2bf69d8c8802de21c">MUtils::OS</a>
|
||||
</li>
|
||||
<li>FOLDER_USER_PROFILE
|
||||
: <a class="el" href="d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54a77c4c8768676d49c26bcec33dcf23b1e">MUtils::OS</a>
|
||||
</li>
|
||||
<li>fp_parts_t
|
||||
: <a class="el" href="d3/da6/namespace_m_utils.html#a75209365a097871cb2bb8fc3a21ce14b">MUtils</a>
|
||||
</li>
|
||||
|
@ -84,12 +84,18 @@ $(function() {
|
||||
<li>FOLDER_PROGRAMFILES
|
||||
: <a class="el" href="d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54abb6f5bd0b6564b2f093f5a2d1c055183">MUtils::OS</a>
|
||||
</li>
|
||||
<li>FOLDER_ROAMING_DATA
|
||||
: <a class="el" href="d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54ab1f55647ec7567aa2160383bc26539d5">MUtils::OS</a>
|
||||
</li>
|
||||
<li>FOLDER_SYSTEMFOLDER
|
||||
: <a class="el" href="d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54a7c25655022efd34417acfaa11f8491b3">MUtils::OS</a>
|
||||
</li>
|
||||
<li>FOLDER_SYSTROOT_DIR
|
||||
: <a class="el" href="d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54af32b4c27ec428ad2bf69d8c8802de21c">MUtils::OS</a>
|
||||
</li>
|
||||
<li>FOLDER_USER_PROFILE
|
||||
: <a class="el" href="d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54a77c4c8768676d49c26bcec33dcf23b1e">MUtils::OS</a>
|
||||
</li>
|
||||
<li>NETWORK_TYPE_ERR
|
||||
: <a class="el" href="d2/df4/namespace_m_utils_1_1_o_s.html#a0005b2a3f0289c1078c9cc8ba5ccba45af3ce4c3003fa7cc9e3b774669b8ab6e9">MUtils::OS</a>
|
||||
</li>
|
||||
|
@ -16,7 +16,9 @@ var searchData=
|
||||
['flag_5fssse3',['FLAG_SSSE3',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#a5125a29c37e57656f45ad168e654fd05',1,'MUtils::CPUFetaures']]],
|
||||
['folder_5flocalappdata',['FOLDER_LOCALAPPDATA',['../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54a0fb64b1e975f9ff0cc97df6e3b7f8110',1,'MUtils::OS']]],
|
||||
['folder_5fprogramfiles',['FOLDER_PROGRAMFILES',['../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54abb6f5bd0b6564b2f093f5a2d1c055183',1,'MUtils::OS']]],
|
||||
['folder_5froaming_5fdata',['FOLDER_ROAMING_DATA',['../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54ab1f55647ec7567aa2160383bc26539d5',1,'MUtils::OS']]],
|
||||
['folder_5fsystemfolder',['FOLDER_SYSTEMFOLDER',['../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54a7c25655022efd34417acfaa11f8491b3',1,'MUtils::OS']]],
|
||||
['folder_5fsystroot_5fdir',['FOLDER_SYSTROOT_DIR',['../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54af32b4c27ec428ad2bf69d8c8802de21c',1,'MUtils::OS']]],
|
||||
['folder_5fuser_5fprofile',['FOLDER_USER_PROFILE',['../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54a77c4c8768676d49c26bcec33dcf23b1e',1,'MUtils::OS']]],
|
||||
['fp_5fparts_5ft',['fp_parts_t',['../d3/da6/namespace_m_utils.html#a75209365a097871cb2bb8fc3a21ce14b',1,'MUtils']]]
|
||||
];
|
||||
|
@ -2,6 +2,8 @@ var searchData=
|
||||
[
|
||||
['folder_5flocalappdata',['FOLDER_LOCALAPPDATA',['../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54a0fb64b1e975f9ff0cc97df6e3b7f8110',1,'MUtils::OS']]],
|
||||
['folder_5fprogramfiles',['FOLDER_PROGRAMFILES',['../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54abb6f5bd0b6564b2f093f5a2d1c055183',1,'MUtils::OS']]],
|
||||
['folder_5froaming_5fdata',['FOLDER_ROAMING_DATA',['../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54ab1f55647ec7567aa2160383bc26539d5',1,'MUtils::OS']]],
|
||||
['folder_5fsystemfolder',['FOLDER_SYSTEMFOLDER',['../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54a7c25655022efd34417acfaa11f8491b3',1,'MUtils::OS']]],
|
||||
['folder_5fsystroot_5fdir',['FOLDER_SYSTROOT_DIR',['../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54af32b4c27ec428ad2bf69d8c8802de21c',1,'MUtils::OS']]]
|
||||
['folder_5fsystroot_5fdir',['FOLDER_SYSTROOT_DIR',['../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54af32b4c27ec428ad2bf69d8c8802de21c',1,'MUtils::OS']]],
|
||||
['folder_5fuser_5fprofile',['FOLDER_USER_PROFILE',['../d2/df4/namespace_m_utils_1_1_o_s.html#a62a1b72ba9a7accee438d19212785e54a77c4c8768676d49c26bcec33dcf23b1e',1,'MUtils::OS']]]
|
||||
];
|
||||
|
@ -105,11 +105,12 @@ namespace MUtils
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FOLDER_LOCALAPPDATA = 0, ///< Local application data (non-roaming)
|
||||
FOLDER_USER_PROFILE = 1, ///< The user's profile folder
|
||||
FOLDER_PROGRAMFILES = 2, ///< Program files
|
||||
FOLDER_SYSTEMFOLDER = 3, ///< System directory
|
||||
FOLDER_SYSTROOT_DIR = 4 ///< System "root" directory
|
||||
FOLDER_ROAMING_DATA = 0, ///< Application-specific data
|
||||
FOLDER_LOCALAPPDATA = 1, ///< Local application data (non-roaming)
|
||||
FOLDER_USER_PROFILE = 2, ///< The user's profile folder
|
||||
FOLDER_PROGRAMFILES = 3, ///< Program files
|
||||
FOLDER_SYSTEMFOLDER = 4, ///< System directory
|
||||
FOLDER_SYSTROOT_DIR = 5 ///< System "root" directory
|
||||
}
|
||||
known_folder_t;
|
||||
|
||||
|
@ -704,6 +704,7 @@ const QString &MUtils::OS::known_folder(known_folder_t folder_id)
|
||||
}
|
||||
static s_folders[] =
|
||||
{
|
||||
{ 0x001a, {0x3EB685DB,0x65F9,0x4CF6,{0xA0,0x3A,0xE3,0xEF,0x65,0x72,0x9F,0x3D}} }, //CSIDL_APPDATA
|
||||
{ 0x001c, {0xF1B32785,0x6FBA,0x4FCF,{0x9D,0x55,0x7B,0x8E,0x7F,0x15,0x70,0x91}} }, //CSIDL_LOCAL_APPDATA
|
||||
{ 0x0028, {0x5E6C858F,0x0E22,0x4760,{0x9A,0xFE,0xEA,0x33,0x17,0xB6,0x71,0x73}} }, //CSIDL_PROFILE
|
||||
{ 0x0026, {0x905e63b6,0xc1bf,0x494e,{0xb2,0x9c,0x65,0xb7,0x32,0xd3,0xd2,0x1a}} }, //CSIDL_PROGRAM_FILES
|
||||
@ -715,11 +716,12 @@ const QString &MUtils::OS::known_folder(known_folder_t folder_id)
|
||||
|
||||
switch(folder_id)
|
||||
{
|
||||
case FOLDER_LOCALAPPDATA: folderId = 0; break;
|
||||
case FOLDER_USER_PROFILE: folderId = 1; break;
|
||||
case FOLDER_PROGRAMFILES: folderId = 2; break;
|
||||
case FOLDER_SYSTEMFOLDER: folderId = 3; break;
|
||||
case FOLDER_SYSTROOT_DIR: folderId = 4; break;
|
||||
case FOLDER_ROAMING_DATA: folderId = 0; break;
|
||||
case FOLDER_LOCALAPPDATA: folderId = 1; break;
|
||||
case FOLDER_USER_PROFILE: folderId = 2; break;
|
||||
case FOLDER_PROGRAMFILES: folderId = 3; break;
|
||||
case FOLDER_SYSTEMFOLDER: folderId = 4; break;
|
||||
case FOLDER_SYSTROOT_DIR: folderId = 5; break;
|
||||
default:
|
||||
qWarning("Invalid 'known' folder was requested!");
|
||||
return Internal::g_empty;
|
||||
|
Loading…
Reference in New Issue
Block a user