Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Akonadi
Commits
6e3071bc
Commit
6e3071bc
authored
Sep 11, 2021
by
Laurent Montel
😁
Browse files
Port qrand
parent
eae60c6b
Pipeline
#80023
canceled with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
autotests/libs/fakesession.cpp
View file @
6e3071bc
...
...
@@ -8,8 +8,8 @@
#include
"job.h"
#include
"private/protocol_p.h"
#include
"session_p.h"
#include
<QCoreApplication>
#include
<QRandomGenerator>
#include
<QTimer>
using
namespace
std
::
chrono_literals
;
class
FakeSessionPrivate
:
public
SessionPrivate
...
...
@@ -30,7 +30,7 @@ public:
if
(
!
id
.
isEmpty
())
{
sessionId
=
id
;
}
else
{
sessionId
=
QCoreApplication
::
instance
()
->
applicationName
().
toUtf8
()
+
'-'
+
QByteArray
::
number
(
qrand
(
));
sessionId
=
QCoreApplication
::
instance
()
->
applicationName
().
toUtf8
()
+
'-'
+
QByteArray
::
number
(
QRandomGenerator
::
global
()
->
bounded
(
1
,
RAND_MAX
));
}
connected
=
false
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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