Skip to content

Commit d3a3f23

Browse files
committed
Fix warning related to use of qrand() when building against Qt 5.15
1 parent 347d31e commit d3a3f23

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/PythonQtStdDecorators.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
#include <QMetaMethod>
5959
#include <QMetaEnum>
6060
#include <QMetaProperty>
61-
#if QT_VERSION >= 0x060000
61+
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
6262
#include <QRandomGenerator>
6363
#endif
6464

@@ -109,7 +109,7 @@ public Q_SLOTS:
109109

110110
int static_Qt_qrand()
111111
{
112-
#if QT_VERSION < 0x060000
112+
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
113113
return qrand();
114114
#else
115115
return QRandomGenerator::global()->generate();
@@ -118,7 +118,7 @@ public Q_SLOTS:
118118

119119
void static_Qt_qsrand(uint a)
120120
{
121-
#if QT_VERSION < 0x060000
121+
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
122122
qsrand(a);
123123
#else
124124
QRandomGenerator::global()->seed(a);

0 commit comments

Comments
 (0)