Added option for creating "pretty" file names to clean_file_name_make_pretty() function.

This commit is contained in:
LoRd_MuldeR 2017-04-09 19:09:16 +02:00
parent 5fe443cb1e
commit b91185f41e
15 changed files with 153 additions and 70 deletions

View File

@ -65,6 +65,7 @@ $(function() {
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-slots">Public Slots</a> &#124;
<a href="#signals">Signals</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
@ -96,11 +97,18 @@ Public Types</h2></td></tr>
<b>UpdateStatus_ErrorNoConnection</b> = 6,
<b>UpdateStatus_ErrorConnectionTestFailed</b> = 7,
<br />
&#160;&#160;<b>UpdateStatus_ErrorFetchUpdateInfo</b> = 8
&#160;&#160;<b>UpdateStatus_ErrorFetchUpdateInfo</b> = 8,
<b>UpdateStatus_CancelledByUser</b> = 9
<br />
}</td></tr>
<tr class="separator:aff186e28bb0b6050d9a9224657d0c6a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-slots"></a>
Public Slots</h2></td></tr>
<tr class="memitem:add6f1f5bd1dada7fc989c84e597ac4d7"><td class="memItemLeft" align="right" valign="top"><a id="add6f1f5bd1dada7fc989c84e597ac4d7"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>start</b> (Priority=InheritPriority)</td></tr>
<tr class="separator:add6f1f5bd1dada7fc989c84e597ac4d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="signals"></a>
Signals</h2></td></tr>
<tr class="memitem:a044467a6036676be8b762e92f4e0c892"><td class="memItemLeft" align="right" valign="top"><a id="a044467a6036676be8b762e92f4e0c892"></a>
@ -115,9 +123,9 @@ void&#160;</td><td class="memItemRight" valign="bottom"><b>messageLogged</b> (co
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a31feb1a3987f97b62217701ac4f5bc46"><td class="memItemLeft" align="right" valign="top"><a id="a31feb1a3987f97b62217701ac4f5bc46"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>UpdateChecker</b> (const QString &amp;binWGet, const QString &amp;binNC, const QString &amp;binGnuPG, const QString &amp;binKeys, const QString &amp;applicationId, const quint32 &amp;installedBuildNo, const bool betaUpdates, const bool testMode=false)</td></tr>
<tr class="separator:a31feb1a3987f97b62217701ac4f5bc46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4514c18f67d6b800a6102f251255cef5"><td class="memItemLeft" align="right" valign="top"><a id="a4514c18f67d6b800a6102f251255cef5"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>UpdateChecker</b> (const QString &amp;binWGet, const QString &amp;binMCat, const QString &amp;binGnuPG, const QString &amp;binKeys, const QString &amp;applicationId, const quint32 &amp;installedBuildNo, const bool betaUpdates, const bool testMode=false)</td></tr>
<tr class="separator:a4514c18f67d6b800a6102f251255cef5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50f6b68b977f213cdc812d3634519cb1"><td class="memItemLeft" align="right" valign="top"><a id="a50f6b68b977f213cdc812d3634519cb1"></a>
const int&#160;</td><td class="memItemRight" valign="bottom"><b>getUpdateStatus</b> (void) const</td></tr>
<tr class="separator:a50f6b68b977f213cdc812d3634519cb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
@ -133,6 +141,9 @@ const int&#160;</td><td class="memItemRight" valign="bottom"><b>getCurrentProgre
<tr class="memitem:afd219fb3d8223dae6a6b80765683e5b3"><td class="memItemLeft" align="right" valign="top"><a id="afd219fb3d8223dae6a6b80765683e5b3"></a>
const <a class="el" href="../../d1/d0d/class_m_utils_1_1_update_checker_info.html">UpdateCheckerInfo</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>getUpdateInfo</b> (void) const</td></tr>
<tr class="separator:afd219fb3d8223dae6a6b80765683e5b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a166ded79a9b92116db7d22cef73850fc"><td class="memItemLeft" align="right" valign="top"><a id="a166ded79a9b92116db7d22cef73850fc"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>cancel</b> (void)</td></tr>
<tr class="separator:a166ded79a9b92116db7d22cef73850fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>

View File

@ -70,29 +70,32 @@ $(function() {
<p>This is the complete list of members for <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>, including all inherited members.</p>
<table class="directory">
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>checkForUpdates</b>(void) (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>getCurrentProgress</b>(void) const (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>getMaximumProgress</b>(void) const (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>getSuccess</b>(void) const (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>getUpdateInfo</b>(void) const (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>getUpdateStatus</b>(void) const (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>messageLogged</b>(const QString &amp;text) (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"><span class="mlabel">signal</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>progressChanged</b>(const int progress) (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"><span class="mlabel">signal</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>run</b>(void) (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>cancel</b>(void) (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>checkForUpdates</b>(void) (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>getCurrentProgress</b>(void) const (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>getMaximumProgress</b>(void) const (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>getSuccess</b>(void) const (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>getUpdateInfo</b>(void) const (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>getUpdateStatus</b>(void) const (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>messageLogged</b>(const QString &amp;text) (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"><span class="mlabel">signal</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>progressChanged</b>(const int progress) (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"><span class="mlabel">signal</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>run</b>(void) (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>start</b>(Priority=InheritPriority) (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"><span class="mlabel">slot</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>statusChanged</b>(const int status) (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"><span class="mlabel">signal</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>testKnownHosts</b>(void) (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>update_status_t</b> (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>UpdateChecker</b>(const QString &amp;binWGet, const QString &amp;binNC, const QString &amp;binGnuPG, const QString &amp;binKeys, const QString &amp;applicationId, const quint32 &amp;installedBuildNo, const bool betaUpdates, const bool testMode=false) (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>UpdateStatus_CheckingConnection</b> enum value (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>UpdateStatus_CompletedNewVersionOlder</b> enum value (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>UpdateStatus_CompletedNoUpdates</b> enum value (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>UpdateStatus_CompletedUpdateAvailable</b> enum value (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>UpdateStatus_ErrorConnectionTestFailed</b> enum value (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>UpdateStatus_ErrorFetchUpdateInfo</b> enum value (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>UpdateStatus_ErrorNoConnection</b> enum value (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>UpdateStatus_FetchingUpdates</b> enum value (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>UpdateStatus_NotStartedYet</b> enum value (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>~UpdateChecker</b>(void) (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>UpdateChecker</b>(const QString &amp;binWGet, const QString &amp;binMCat, const QString &amp;binGnuPG, const QString &amp;binKeys, const QString &amp;applicationId, const quint32 &amp;installedBuildNo, const bool betaUpdates, const bool testMode=false) (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>UpdateStatus_CancelledByUser</b> enum value (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>UpdateStatus_CheckingConnection</b> enum value (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>UpdateStatus_CompletedNewVersionOlder</b> enum value (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>UpdateStatus_CompletedNoUpdates</b> enum value (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>UpdateStatus_CompletedUpdateAvailable</b> enum value (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>UpdateStatus_ErrorConnectionTestFailed</b> enum value (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>UpdateStatus_ErrorFetchUpdateInfo</b> enum value (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>UpdateStatus_ErrorNoConnection</b> enum value (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>UpdateStatus_FetchingUpdates</b> enum value (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>UpdateStatus_NotStartedYet</b> enum value (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>~UpdateChecker</b>(void) (defined in <a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a>)</td><td class="entry"><a class="el" href="../../d0/d8a/class_m_utils_1_1_update_checker.html">MUtils::UpdateChecker</a></td><td class="entry"></td></tr>
</table></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>

View File

@ -73,7 +73,7 @@ $(function() {
<div class="ttc" id="_hash_8h_html_aa9e34ac422f4e52061cb8908f922fe17"><div class="ttname"><a href="../../d2/dad/_hash_8h.html#aa9e34ac422f4e52061cb8908f922fe17">MUtils::Hash::HASH_BLAKE2_512</a></div><div class="ttdeci">static const quint16 HASH_BLAKE2_512</div><div class="ttdoc">Hash algorithm identifier. </div><div class="ttdef"><b>Definition:</b> Hash.h:42</div></div>
<div class="ttc" id="_hash_8h_html_af80dfb1569816fab7ab5ed32e6386458"><div class="ttname"><a href="../../d2/dad/_hash_8h.html#af80dfb1569816fab7ab5ed32e6386458">MUtils::Hash::HASH_KECCAK_384</a></div><div class="ttdeci">static const quint16 HASH_KECCAK_384</div><div class="ttdoc">Hash algorithm identifier. </div><div class="ttdef"><b>Definition:</b> Hash.h:45</div></div>
<div class="ttc" id="namespace_m_utils_html"><div class="ttname"><a href="../../d3/da6/namespace_m_utils.html">MUtils</a></div><div class="ttdoc">Global MUtils namespace. </div><div class="ttdef"><b>Definition:</b> CPUFeatures.h:37</div></div>
<div class="ttc" id="_global_8h_html_a8e7b4857b78f9749233e5abc96534ca8"><div class="ttname"><a href="../../d5/d3b/_global_8h.html#a8e7b4857b78f9749233e5abc96534ca8">MUTILS_NO_COPY</a></div><div class="ttdeci">#define MUTILS_NO_COPY(CLASS)</div><div class="ttdoc">Disables copy constructor and assignment operator in the specified class. This macro should be used i...</div><div class="ttdef"><b>Definition:</b> Global.h:362</div></div>
<div class="ttc" id="_global_8h_html_a8e7b4857b78f9749233e5abc96534ca8"><div class="ttname"><a href="../../d5/d3b/_global_8h.html#a8e7b4857b78f9749233e5abc96534ca8">MUTILS_NO_COPY</a></div><div class="ttdeci">#define MUTILS_NO_COPY(CLASS)</div><div class="ttdoc">Disables copy constructor and assignment operator in the specified class. This macro should be used i...</div><div class="ttdef"><b>Definition:</b> Global.h:366</div></div>
<div class="ttc" id="_hash_8h_html_a330b73d6927d6cd95892712f9396f40e"><div class="ttname"><a href="../../d2/dad/_hash_8h.html#a330b73d6927d6cd95892712f9396f40e">MUtils::Hash::create</a></div><div class="ttdeci">MUTILS_API Hash * create(const quint16 &amp;hashId, const char *const key=NULL)</div><div class="ttdoc">Create instance of a hash function. </div></div>
<div class="ttc" id="class_m_utils_1_1_hash_1_1_hash_html"><div class="ttname"><a href="../../da/db0/class_m_utils_1_1_hash_1_1_hash.html">MUtils::Hash::Hash</a></div><div class="ttdoc">This abstract class specifies the generic interface for all support hash algorithms. </div><div class="ttdef"><b>Definition:</b> Hash.h:57</div></div>
<div class="ttc" id="_hash_8h_html_ae38cda07e425eb7c745492215a48ae08"><div class="ttname"><a href="../../d2/dad/_hash_8h.html#ae38cda07e425eb7c745492215a48ae08">MUtils::Hash::HASH_KECCAK_256</a></div><div class="ttdeci">static const quint16 HASH_KECCAK_256</div><div class="ttdoc">Hash algorithm identifier. </div><div class="ttdef"><b>Definition:</b> Hash.h:44</div></div>

View File

@ -144,12 +144,12 @@ Functions</h2></td></tr>
<tr class="memitem:a4d4c545ea06892f6487f15a48808564f"><td class="memItemLeft" align="right" valign="top">MUTILS_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#a4d4c545ea06892f6487f15a48808564f">natural_string_sort</a> (QStringList &amp;list, const bool bIgnoreCase)</td></tr>
<tr class="memdesc:a4d4c545ea06892f6487f15a48808564f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sort a list of strings using "natural ordering" algorithm. <a href="#a4d4c545ea06892f6487f15a48808564f">More...</a><br /></td></tr>
<tr class="separator:a4d4c545ea06892f6487f15a48808564f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd8eb699de88edd73e47fe2e41873385"><td class="memItemLeft" align="right" valign="top">MUTILS_API QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#afd8eb699de88edd73e47fe2e41873385">clean_file_name</a> (const QString &amp;name)</td></tr>
<tr class="memdesc:afd8eb699de88edd73e47fe2e41873385"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clean up a file name string. <a href="#afd8eb699de88edd73e47fe2e41873385">More...</a><br /></td></tr>
<tr class="separator:afd8eb699de88edd73e47fe2e41873385"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad801fab93087c31d764ad15295fe3a88"><td class="memItemLeft" align="right" valign="top">MUTILS_API QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#ad801fab93087c31d764ad15295fe3a88">clean_file_path</a> (const QString &amp;path)</td></tr>
<tr class="memdesc:ad801fab93087c31d764ad15295fe3a88"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clean up a file path string. <a href="#ad801fab93087c31d764ad15295fe3a88">More...</a><br /></td></tr>
<tr class="separator:ad801fab93087c31d764ad15295fe3a88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb7783b8ecbe163501ce60dce8b6709f"><td class="memItemLeft" align="right" valign="top">MUTILS_API QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#aeb7783b8ecbe163501ce60dce8b6709f">clean_file_name</a> (const QString &amp;name, const bool &amp;pretty)</td></tr>
<tr class="memdesc:aeb7783b8ecbe163501ce60dce8b6709f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clean up a file name string. <a href="#aeb7783b8ecbe163501ce60dce8b6709f">More...</a><br /></td></tr>
<tr class="separator:aeb7783b8ecbe163501ce60dce8b6709f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb5da6435b27e10443060dd2550784f3"><td class="memItemLeft" align="right" valign="top">MUTILS_API QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#adb5da6435b27e10443060dd2550784f3">clean_file_path</a> (const QString &amp;path, const bool &amp;pretty)</td></tr>
<tr class="memdesc:adb5da6435b27e10443060dd2550784f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clean up a file path string. <a href="#adb5da6435b27e10443060dd2550784f3">More...</a><br /></td></tr>
<tr class="separator:adb5da6435b27e10443060dd2550784f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2a851b289ee66873d3a1ec86f5f34eb"><td class="memItemLeft" align="right" valign="top">MUTILS_API bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#ad2a851b289ee66873d3a1ec86f5f34eb">regexp_parse_uint32</a> (const QRegExp &amp;regexp, quint32 &amp;value)</td></tr>
<tr class="memdesc:ad2a851b289ee66873d3a1ec86f5f34eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse regular expression results. <a href="#ad2a851b289ee66873d3a1ec86f5f34eb">More...</a><br /></td></tr>
<tr class="separator:ad2a851b289ee66873d3a1ec86f5f34eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
@ -201,8 +201,8 @@ class MUTILS_API&#160;</td><td class="memItemRight" valign="bottom"><b>Taskbar7_
</div>
</div>
<a id="afd8eb699de88edd73e47fe2e41873385"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afd8eb699de88edd73e47fe2e41873385">&sect;&nbsp;</a></span>clean_file_name()</h2>
<a id="aeb7783b8ecbe163501ce60dce8b6709f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeb7783b8ecbe163501ce60dce8b6709f">&sect;&nbsp;</a></span>clean_file_name()</h2>
<div class="memitem">
<div class="memproto">
@ -211,8 +211,18 @@ class MUTILS_API&#160;</td><td class="memItemRight" valign="bottom"><b>Taskbar7_
<td class="memname">MUTILS_API QString MUtils::clean_file_name </td>
<td>(</td>
<td class="paramtype">const QString &amp;&#160;</td>
<td class="paramname"><em>name</em></td><td>)</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool &amp;&#160;</td>
<td class="paramname"><em>pretty</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
@ -221,7 +231,8 @@ class MUTILS_API&#160;</td><td class="memItemRight" valign="bottom"><b>Taskbar7_
<p>This function ensures that the given string is a valid file (or directory) name. It does so by replacing any illegal characters, i.e. any characters <em>not</em> allowed in file names (which explicitly <em>includes</em> directory separators). Furthermore, the function will trim/remove specific characters that are <em>not</em> allowed directly at the beginning or end of a file name. Finally, the function takes care of special "reserved" file names that are forbidden by the file system. You can use this function to convert user inputs into a valid file name.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">list</td><td>A read-only reference to the QString holding the original, potentially invalid file name.</td></tr>
<tr><td class="paramname">name</td><td>A read-only reference to the QString holding the original, potentially invalid file name.</td></tr>
<tr><td class="paramname">pretty</td><td>If set to <code>true</code>, the function tries to generate a "pretty" file name from the given file name. Otherwise, the function simply replaces each forbidden file name character by an underscore character.</td></tr>
</table>
</dd>
</dl>
@ -229,8 +240,8 @@ class MUTILS_API&#160;</td><td class="memItemRight" valign="bottom"><b>Taskbar7_
</div>
</div>
<a id="ad801fab93087c31d764ad15295fe3a88"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad801fab93087c31d764ad15295fe3a88">&sect;&nbsp;</a></span>clean_file_path()</h2>
<a id="adb5da6435b27e10443060dd2550784f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adb5da6435b27e10443060dd2550784f3">&sect;&nbsp;</a></span>clean_file_path()</h2>
<div class="memitem">
<div class="memproto">
@ -239,8 +250,18 @@ class MUTILS_API&#160;</td><td class="memItemRight" valign="bottom"><b>Taskbar7_
<td class="memname">MUTILS_API QString MUtils::clean_file_path </td>
<td>(</td>
<td class="paramtype">const QString &amp;&#160;</td>
<td class="paramname"><em>path</em></td><td>)</td>
<td class="paramname"><em>path</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool &amp;&#160;</td>
<td class="paramname"><em>pretty</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
@ -249,7 +270,8 @@ class MUTILS_API&#160;</td><td class="memItemRight" valign="bottom"><b>Taskbar7_
<p>This function ensures that the given string is a valid file (or directory) path. It does so by replacing any illegal characters, i.e. any characters <em>not</em> allowed in file paths. Directory separators are preserved, but they will be "canonicalized". Furthermore, in each path component, the function will trim/remove specific characters that are <em>not</em> allowed directly at the beginning or end of a path component. Finally, the function takes care of special "reserved" file names that are forbidden by the file system. You can use this function to convert user inputs into a valid file path.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">list</td><td>A read-only reference to the QString holding the original, potentially invalid file path.</td></tr>
<tr><td class="paramname">path</td><td>A read-only reference to the QString holding the original, potentially invalid file path.</td></tr>
<tr><td class="paramname">pretty</td><td>If set to <code>true</code>, the function tries to generate "pretty" file names from the given file names. Otherwise, the function simply replaces each forbidden file name character by an underscore character.</td></tr>
</table>
</dd>
</dl>

File diff suppressed because one or more lines are too long

View File

@ -165,12 +165,12 @@ Functions</h2></td></tr>
<tr class="memitem:a4d4c545ea06892f6487f15a48808564f"><td class="memItemLeft" align="right" valign="top">MUTILS_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#a4d4c545ea06892f6487f15a48808564f">MUtils::natural_string_sort</a> (QStringList &amp;list, const bool bIgnoreCase)</td></tr>
<tr class="memdesc:a4d4c545ea06892f6487f15a48808564f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sort a list of strings using "natural ordering" algorithm. <a href="../../d3/da6/namespace_m_utils.html#a4d4c545ea06892f6487f15a48808564f">More...</a><br /></td></tr>
<tr class="separator:a4d4c545ea06892f6487f15a48808564f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd8eb699de88edd73e47fe2e41873385"><td class="memItemLeft" align="right" valign="top">MUTILS_API QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#afd8eb699de88edd73e47fe2e41873385">MUtils::clean_file_name</a> (const QString &amp;name)</td></tr>
<tr class="memdesc:afd8eb699de88edd73e47fe2e41873385"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clean up a file name string. <a href="../../d3/da6/namespace_m_utils.html#afd8eb699de88edd73e47fe2e41873385">More...</a><br /></td></tr>
<tr class="separator:afd8eb699de88edd73e47fe2e41873385"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad801fab93087c31d764ad15295fe3a88"><td class="memItemLeft" align="right" valign="top">MUTILS_API QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#ad801fab93087c31d764ad15295fe3a88">MUtils::clean_file_path</a> (const QString &amp;path)</td></tr>
<tr class="memdesc:ad801fab93087c31d764ad15295fe3a88"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clean up a file path string. <a href="../../d3/da6/namespace_m_utils.html#ad801fab93087c31d764ad15295fe3a88">More...</a><br /></td></tr>
<tr class="separator:ad801fab93087c31d764ad15295fe3a88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb7783b8ecbe163501ce60dce8b6709f"><td class="memItemLeft" align="right" valign="top">MUTILS_API QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#aeb7783b8ecbe163501ce60dce8b6709f">MUtils::clean_file_name</a> (const QString &amp;name, const bool &amp;pretty)</td></tr>
<tr class="memdesc:aeb7783b8ecbe163501ce60dce8b6709f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clean up a file name string. <a href="../../d3/da6/namespace_m_utils.html#aeb7783b8ecbe163501ce60dce8b6709f">More...</a><br /></td></tr>
<tr class="separator:aeb7783b8ecbe163501ce60dce8b6709f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb5da6435b27e10443060dd2550784f3"><td class="memItemLeft" align="right" valign="top">MUTILS_API QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#adb5da6435b27e10443060dd2550784f3">MUtils::clean_file_path</a> (const QString &amp;path, const bool &amp;pretty)</td></tr>
<tr class="memdesc:adb5da6435b27e10443060dd2550784f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clean up a file path string. <a href="../../d3/da6/namespace_m_utils.html#adb5da6435b27e10443060dd2550784f3">More...</a><br /></td></tr>
<tr class="separator:adb5da6435b27e10443060dd2550784f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2a851b289ee66873d3a1ec86f5f34eb"><td class="memItemLeft" align="right" valign="top">MUTILS_API bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/da6/namespace_m_utils.html#ad2a851b289ee66873d3a1ec86f5f34eb">MUtils::regexp_parse_uint32</a> (const QRegExp &amp;regexp, quint32 &amp;value)</td></tr>
<tr class="memdesc:ad2a851b289ee66873d3a1ec86f5f34eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse regular expression results. <a href="../../d3/da6/namespace_m_utils.html#ad2a851b289ee66873d3a1ec86f5f34eb">More...</a><br /></td></tr>
<tr class="separator:ad2a851b289ee66873d3a1ec86f5f34eb"><td class="memSeparator" colspan="2">&#160;</td></tr>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -70,10 +70,10 @@ $(function() {
<h3><a id="index_c"></a>- c -</h3><ul>
<li>clean_file_name()
: <a class="el" href="d3/da6/namespace_m_utils.html#afd8eb699de88edd73e47fe2e41873385">MUtils</a>
: <a class="el" href="d3/da6/namespace_m_utils.html#aeb7783b8ecbe163501ce60dce8b6709f">MUtils</a>
</li>
<li>clean_file_path()
: <a class="el" href="d3/da6/namespace_m_utils.html#ad801fab93087c31d764ad15295fe3a88">MUtils</a>
: <a class="el" href="d3/da6/namespace_m_utils.html#adb5da6435b27e10443060dd2550784f3">MUtils</a>
</li>
<li>cpu_info_t
: <a class="el" href="d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#a8b80fb34713dbc70a63ae5cd48b0630e">MUtils::CPUFetaures</a>

View File

@ -64,10 +64,10 @@ $(function() {
: <a class="el" href="d3/da6/namespace_m_utils.html#a2275e64c3c74dea855c39b66be67f705">MUtils</a>
</li>
<li>clean_file_name()
: <a class="el" href="d3/da6/namespace_m_utils.html#afd8eb699de88edd73e47fe2e41873385">MUtils</a>
: <a class="el" href="d3/da6/namespace_m_utils.html#aeb7783b8ecbe163501ce60dce8b6709f">MUtils</a>
</li>
<li>clean_file_path()
: <a class="el" href="d3/da6/namespace_m_utils.html#ad801fab93087c31d764ad15295fe3a88">MUtils</a>
: <a class="el" href="d3/da6/namespace_m_utils.html#adb5da6435b27e10443060dd2550784f3">MUtils</a>
</li>
<li>detect()
: <a class="el" href="d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#a5f26f530b11eee62845fb45fba6a32fc">MUtils::CPUFetaures</a>

View File

@ -1,7 +1,7 @@
var searchData=
[
['clean_5ffile_5fname',['clean_file_name',['../d3/da6/namespace_m_utils.html#afd8eb699de88edd73e47fe2e41873385',1,'MUtils']]],
['clean_5ffile_5fpath',['clean_file_path',['../d3/da6/namespace_m_utils.html#ad801fab93087c31d764ad15295fe3a88',1,'MUtils']]],
['clean_5ffile_5fname',['clean_file_name',['../d3/da6/namespace_m_utils.html#aeb7783b8ecbe163501ce60dce8b6709f',1,'MUtils']]],
['clean_5ffile_5fpath',['clean_file_path',['../d3/da6/namespace_m_utils.html#adb5da6435b27e10443060dd2550784f3',1,'MUtils']]],
['count',['count',['../dd/de2/struct_m_utils_1_1_c_p_u_fetaures_1_1__cpu__info__t.html#a7861529c47568141daa37810ebb499ea',1,'MUtils::CPUFetaures::_cpu_info_t']]],
['cpu_5finfo_5ft',['cpu_info_t',['../d3/d02/namespace_m_utils_1_1_c_p_u_fetaures.html#a8b80fb34713dbc70a63ae5cd48b0630e',1,'MUtils::CPUFetaures']]],
['cpufeatures_2eh',['CPUFeatures.h',['../d2/db5/_c_p_u_features_8h.html',1,'']]],

View File

@ -1,6 +1,6 @@
var searchData=
[
['clean_5ffile_5fname',['clean_file_name',['../d3/da6/namespace_m_utils.html#afd8eb699de88edd73e47fe2e41873385',1,'MUtils']]],
['clean_5ffile_5fpath',['clean_file_path',['../d3/da6/namespace_m_utils.html#ad801fab93087c31d764ad15295fe3a88',1,'MUtils']]],
['clean_5ffile_5fname',['clean_file_name',['../d3/da6/namespace_m_utils.html#aeb7783b8ecbe163501ce60dce8b6709f',1,'MUtils']]],
['clean_5ffile_5fpath',['clean_file_path',['../d3/da6/namespace_m_utils.html#adb5da6435b27e10443060dd2550784f3',1,'MUtils']]],
['create',['create',['../d2/dad/_hash_8h.html#a330b73d6927d6cd95892712f9396f40e',1,'MUtils::Hash']]]
];

View File

@ -263,22 +263,26 @@ namespace MUtils
*
* This function ensures that the given string is a valid file (or directory) name. It does so by replacing any illegal characters, i.e. any characters *not* allowed in file names (which explicitly *includes* directory separators). Furthermore, the function will trim/remove specific characters that are *not* allowed directly at the beginning or end of a file name. Finally, the function takes care of special "reserved" file names that are forbidden by the file system. You can use this function to convert user inputs into a valid file name.
*
* \param list A read-only reference to the QString holding the original, potentially invalid file name.
* \param name A read-only reference to the QString holding the original, potentially invalid file name.
*
* \param pretty If set to `true`, the function tries to generate a "pretty" file name from the given file name. Otherwise, the function simply replaces each forbidden file name character by an underscore character.
*
* \return The function returns a QString holding a valid file name. If, however, the input string was empty or contained only white-space characters, the returned sting can be empty.
*/
MUTILS_API QString clean_file_name(const QString &name);
MUTILS_API QString clean_file_name(const QString &name, const bool &pretty);
/**
* \brief Clean up a file path string
*
* This function ensures that the given string is a valid file (or directory) path. It does so by replacing any illegal characters, i.e. any characters *not* allowed in file paths. Directory separators are preserved, but they will be "canonicalized". Furthermore, in each path component, the function will trim/remove specific characters that are *not* allowed directly at the beginning or end of a path component. Finally, the function takes care of special "reserved" file names that are forbidden by the file system. You can use this function to convert user inputs into a valid file path.
*
* \param list A read-only reference to the QString holding the original, potentially invalid file path.
* \param path A read-only reference to the QString holding the original, potentially invalid file path.
*
* \param pretty If set to `true`, the function tries to generate "pretty" file names from the given file names. Otherwise, the function simply replaces each forbidden file name character by an underscore character.
*
* \return The function returns a QString holding a valid file path. If, however, the input string was empty or contained only white-space characters, the returned sting can be empty.
*/
MUTILS_API QString clean_file_path(const QString &path);
MUTILS_API QString clean_file_path(const QString &path, const bool &pretty);
/**
* \brief Parse regular expression results

View File

@ -561,7 +561,52 @@ void MUtils::natural_string_sort(QStringList &list, const bool bIgnoreCase)
// CLEAN FILE PATH
///////////////////////////////////////////////////////////////////////////////
QString MUtils::clean_file_name(const QString &name)
static QMutex g_clean_file_name_mutex;
static QScopedPointer<const QList<QPair<QRegExp,QString>>> g_clean_file_name_regex;
static void clean_file_name_make_pretty(QString &str)
{
static const struct { const char *p; const char *r; } PATTERN[] =
{
{ "^\\s*\"([^\"]*)\"\\s*$", "\\1" }, //Remove straight double quotes around the whole string
{ "\"([^\"]*)\"", "\xE2\x80\x9C\\1\xE2\x80\x9D" }, //Replace remaining pairs of straight double quotes with opening/closing double quote
{ "^[\\\\/:]+([^\\\\/:]+.*)$", "\\1" }, //Remove leading slash, backslash and colon characters
{ "^(.*[^\\\\/:]+)[\\\\/:]+$", "\\1" }, //Remove trailing slash, backslash and colon characters
{ "(\\s*[\\\\/:]\\s*)+", " - " }, //Replace any slash, backslash or colon character that appears in the middle
{ NULL, NULL }
};
QMutexLocker locker(&g_clean_file_name_mutex);
if (g_clean_file_name_regex.isNull())
{
QScopedPointer<QList<QPair<QRegExp, QString>>> list(new QList<QPair<QRegExp, QString>>());
for (size_t i = 0; PATTERN[i].p; ++i)
{
list->append(qMakePair(QRegExp(QString::fromUtf8(PATTERN[i].p), Qt::CaseInsensitive), PATTERN[i].r ? QString::fromUtf8(PATTERN[i].r) : QString()));
}
g_clean_file_name_regex.reset(list.take());
}
bool keepOnGoing = !str.isEmpty();
while(keepOnGoing)
{
const QString prev = str;
keepOnGoing = false;
for (QList<QPair<QRegExp, QString>>::ConstIterator iter = g_clean_file_name_regex->constBegin(); iter != g_clean_file_name_regex->constEnd(); ++iter)
{
str.replace(iter->first, iter->second);
if (str.compare(prev))
{
keepOnGoing = !str.isEmpty();
break;
}
}
str = str.simplified();
}
}
QString MUtils::clean_file_name(const QString &name, const bool &pretty)
{
static const QLatin1Char REPLACEMENT_CHAR('_');
static const char FILENAME_ILLEGAL_CHARS[] = "<>:\"/\\|?*";
@ -573,11 +618,9 @@ QString MUtils::clean_file_name(const QString &name)
};
QString result(name);
if (result.contains(QLatin1Char('"')))
if (pretty)
{
QRegExp quoted("\"(.+)\"");
quoted.setMinimal(true);
result.replace(quoted, "``\\1´´");
clean_file_name_make_pretty(result);
}
for(QString::Iterator iter = result.begin(); iter != result.end(); iter++)
@ -630,7 +673,7 @@ static QPair<QString,QString> clean_file_path_get_prefix(const QString path)
return qMakePair(QString(), posixPath);
}
QString MUtils::clean_file_path(const QString &path)
QString MUtils::clean_file_path(const QString &path, const bool &pretty)
{
const QPair<QString, QString> prefix = clean_file_path_get_prefix(path);
@ -641,7 +684,7 @@ QString MUtils::clean_file_path(const QString &path)
{
continue; //handle case "c:\"
}
parts[i] = MUtils::clean_file_name(parts[i]);
parts[i] = MUtils::clean_file_name(parts[i], pretty);
}
const QString cleanPath = parts.join(QLatin1String("/"));