Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
d3333dca
Commit
d3333dca
authored
Jun 05, 2020
by
Patrick José Pereira
Browse files
QGCTemporaryFile: Remove deprecated qrand
Signed-off-by:
Patrick José Pereira
<
patrickelectric@gmail.com
>
parent
4f57cbfd
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/QGCTemporaryFile.cc
View file @
d3333dca
...
...
@@ -18,6 +18,7 @@
#include
"QGCTemporaryFile.h"
#include
<QDir>
#include
<QRandomGenerator>
#include
<QStandardPaths>
QGCTemporaryFile
::
QGCTemporaryFile
(
const
QString
&
fileTemplate
,
QObject
*
parent
)
:
...
...
@@ -40,7 +41,7 @@ bool QGCTemporaryFile::open(QFile::OpenMode openMode)
do
{
QString
uniqueStr
;
for
(
int
i
=
0
;
i
<
6
;
i
++
)
{
uniqueStr
+=
rgDigits
[
qrand
()
%
10
];
uniqueStr
+=
rgDigits
[
QRandomGenerator
::
global
()
->
generate
()
%
10
];
}
if
(
_template
.
contains
(
"XXXXXX"
))
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment