<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qglobal.cpp --> <title>Obsolete Members for <QtGlobal> | Qt Core 5.12.2</title> <link rel="stylesheet" type="text/css" href="style/offline-simple.css" /> <script type="text/javascript"> document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css"); // loading style sheet breaks anchors that were jumped to before // so force jumping to anchor again setTimeout(function() { var anchor = location.hash; // need to jump to different anchor first (e.g. none) location.hash = "#"; setTimeout(function() { location.hash = anchor; }, 0); }, 0); </script> </head> <body> <div class="header" id="qtdocheader"> <div class="main"> <div class="main-rounded"> <div class="navigationbar"> <table><tr> <td >Qt 5.12</td><td ><a href="qtcore-index.html">Qt Core</a></td><td >Obsolete Members for <QtGlobal></td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right"><a href="qtcore-index.html">Qt 5.12.2 Reference Documentation</a></td> </tr></table> </div> </div> <div class="content"> <div class="line"> <div class="content mainContent"> <div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">Obsolete Members for <QtGlobal></h1> <p><b>The following members of class <a href="qtglobal.html"><QtGlobal></a> are obsolete.</b> They are provided to keep old source code working. We strongly advise against using them in new code.</p> <h2>Types</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>typedef </td><td class="memItemRight bottomAlign"><b><a href="qtglobal-obsolete.html#QtMsgHandler-typedef">QtMsgHandler</a></b></td></tr> </table></div> <h2>Functions</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>QtMsgHandler </td><td class="memItemRight bottomAlign"><b><a href="qtglobal-obsolete.html#qInstallMsgHandler">qInstallMsgHandler</a></b>(QtMsgHandler <i>handler</i>)</td></tr> <tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>int </td><td class="memItemRight bottomAlign"><b><a href="qtglobal-obsolete.html#qrand">qrand</a></b>()</td></tr> <tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code>void </td><td class="memItemRight bottomAlign"><b><a href="qtglobal-obsolete.html#qsrand">qsrand</a></b>(uint <i>seed</i>)</td></tr> </table></div> <h2>Macros</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code></td><td class="memItemRight bottomAlign"><b><a href="qtglobal-obsolete.html#QABS">QABS</a></b>(<i>n</i>)</td></tr> <tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code></td><td class="memItemRight bottomAlign"><b><a href="qtglobal-obsolete.html#QMAX">QMAX</a></b>(<i>x</i>, <i>y</i>)</td></tr> <tr><td class="memItemLeft topAlign rightAlign"> <code>(obsolete) </code></td><td class="memItemRight bottomAlign"><b><a href="qtglobal-obsolete.html#QMIN">QMIN</a></b>(<i>x</i>, <i>y</i>)</td></tr> </table></div> <h2>Type Documentation</h2> <!-- $$$QtMsgHandler --> <h3 class="fn" id="QtMsgHandler-typedef"><a name="QtMsgHandler-typedef"></a>typedef <span class="name">QtMsgHandler</span></h3> <p>This typedef is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.</p> <p>This is a typedef for a pointer to a function with the following signature:</p> <pre class="cpp"> <span class="type">void</span> myMsgHandler(<span class="type"><a href="qtglobal.html#QtMsgType-enum">QtMsgType</a></span><span class="operator">,</span> <span class="keyword">const</span> <span class="type">char</span> <span class="operator">*</span>); </pre> <p>This typedef is deprecated, you should use <a href="qtglobal.html#QtMessageHandler-typedef">QtMessageHandler</a> instead.</p> <p><b>See also </b><a href="qtglobal.html#QtMsgType-enum">QtMsgType</a>, <a href="qtglobal.html#QtMessageHandler-typedef">QtMessageHandler</a>, <a href="qtglobal-obsolete.html#qInstallMsgHandler">qInstallMsgHandler</a>(), and <a href="qtglobal.html#qInstallMessageHandler">qInstallMessageHandler</a>().</p> <!-- @@@QtMsgHandler --> <h2>Function Documentation</h2> <!-- $$$qInstallMsgHandler[overload1]$$$qInstallMsgHandlerQtMsgHandler --> <h3 class="fn" id="qInstallMsgHandler"><a name="qInstallMsgHandler"></a><span class="type"><a href="qtglobal-obsolete.html#QtMsgHandler-typedef">QtMsgHandler</a></span> <span class="name">qInstallMsgHandler</span>(<span class="type"><a href="qtglobal-obsolete.html#QtMsgHandler-typedef">QtMsgHandler</a></span> <i>handler</i>)</h3> <p>This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.</p> <p>Installs a Qt message <i>handler</i> which has been defined previously. This method is deprecated, use <a href="qtglobal.html#qInstallMessageHandler">qInstallMessageHandler</a> instead.</p> <p><b>See also </b><a href="qtglobal-obsolete.html#QtMsgHandler-typedef">QtMsgHandler</a> and <a href="qtglobal.html#qInstallMessageHandler">qInstallMessageHandler</a>().</p> <!-- @@@qInstallMsgHandler --> <!-- $$$qrand[overload1]$$$qrand --> <h3 class="fn" id="qrand"><a name="qrand"></a><span class="type">int</span> <span class="name">qrand</span>()</h3> <p>This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.</p> <p>Thread-safe version of the standard C++ <code>rand()</code> function.</p> <p>Returns a value between 0 and <code>RAND_MAX</code> (defined in <code><cstdlib></code> and <code><stdlib.h></code>), the next number in the current sequence of pseudo-random integers.</p> <p>Use <code>qsrand()</code> to initialize the pseudo-random number generator with a seed value. Seeding must be performed at least once on each thread. If that step is skipped, then the sequence will be pre-seeded with a constant value.</p> <p><b>Note: </b>This function is deprecated. In new applications, use <a href="qrandomgenerator.html">QRandomGenerator</a> instead.</p><p>This function was introduced in Qt 4.2.</p> <p><b>See also </b>qrand() and <a href="qrandomgenerator.html">QRandomGenerator</a>.</p> <!-- @@@qrand --> <!-- $$$qsrand[overload1]$$$qsranduint --> <h3 class="fn" id="qsrand"><a name="qsrand"></a><span class="type">void</span> <span class="name">qsrand</span>(<span class="type"><a href="qtglobal.html#uint-typedef">uint</a></span> <i>seed</i>)</h3> <p>This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.</p> <p>Thread-safe version of the standard C++ <code>srand()</code> function.</p> <p>Sets the argument <i>seed</i> to be used to generate a new random number sequence of pseudo random integers to be returned by <a href="qtglobal-obsolete.html#qrand">qrand</a>().</p> <p>The sequence of random numbers generated is deterministic per thread. For example, if two threads call qsrand(1) and subsequently call <a href="qtglobal-obsolete.html#qrand">qrand</a>(), the threads will get the same random number sequence.</p> <p><b>Note: </b>This function is deprecated. In new applications, use <a href="qrandomgenerator.html">QRandomGenerator</a> instead.</p><p>This function was introduced in Qt 4.2.</p> <p><b>See also </b><a href="qtglobal-obsolete.html#qrand">qrand</a>() and <a href="qrandomgenerator.html">QRandomGenerator</a>.</p> <!-- @@@qsrand --> <h2>Macro Documentation</h2> <!-- $$$QABS[overload1]$$$QABS --> <h3 class="fn" id="QABS"><a name="QABS"></a><span class="name">QABS</span>(<i>n</i>)</h3> <p>This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.</p> <p>Use <a href="qtglobal.html#qAbsx">qAbs</a>(<i>n</i>) instead.</p> <p><b>See also </b><a href="qtglobal-obsolete.html#QMIN">QMIN</a>() and <a href="qtglobal-obsolete.html#QMAX">QMAX</a>().</p> <!-- @@@QABS --> <!-- $$$QMAX[overload1]$$$QMAX --> <h3 class="fn" id="QMAX"><a name="QMAX"></a><span class="name">QMAX</span>(<i>x</i>, <i>y</i>)</h3> <p>This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.</p> <p>Use <a href="qtglobal.html#qMaxx">qMax</a>(<i>x</i>, <i>y</i>) instead.</p> <p><b>See also </b><a href="qtglobal-obsolete.html#QMIN">QMIN</a>() and <a href="qtglobal-obsolete.html#QABS">QABS</a>().</p> <!-- @@@QMAX --> <!-- $$$QMIN[overload1]$$$QMIN --> <h3 class="fn" id="QMIN"><a name="QMIN"></a><span class="name">QMIN</span>(<i>x</i>, <i>y</i>)</h3> <p>This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.</p> <p>Use <a href="qtglobal.html#qMinx">qMin</a>(<i>x</i>, <i>y</i>) instead.</p> <p><b>See also </b><a href="qtglobal-obsolete.html#QMAX">QMAX</a>() and <a href="qtglobal-obsolete.html#QABS">QABS</a>().</p> <!-- @@@QMIN --> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2019 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.<br/> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br/> Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. </p> </div> </body> </html>