KRandom::random seeds qrand, but returns value from rand (kde#362161)

epel8
Rex Dieter 9 years ago
parent a488354428
commit 570eff4802

@ -0,0 +1,30 @@
From 78212436643af95779facd9593c82fb149c2213d Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Tue, 26 Apr 2016 23:41:27 +0200
Subject: [PATCH 3/3] Missing rand() -> qrand
Fixes regression introduced in 9ae6d765b37135bbfe3a8b936e5a88b8a435e424
Reviewed by Aleix
BUGS: 362161
---
src/lib/randomness/krandom.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib/randomness/krandom.cpp b/src/lib/randomness/krandom.cpp
index eef6bf6..eaff71f 100644
--- a/src/lib/randomness/krandom.cpp
+++ b/src/lib/randomness/krandom.cpp
@@ -51,7 +51,7 @@ int KRandom::random()
}
qsrand(seed);
}
- return rand();
+ return qrand();
}
QString KRandom::randomString(int length)
--
2.7.4

@ -9,7 +9,7 @@
Name: kf5-%{framework}
Version: 5.21.0
Release: 3%{?dist}
Release: 4%{?dist}
Summary: KDE Frameworks 5 Tier 1 addon with various classes on top of QtCore
License: GPLv2+ and GPLv2+
@ -24,6 +24,9 @@ URL: https://quickgit.kde.org/?p=%{framework}.git
%endif
Source0: http://download.kde.org/%{stable}/frameworks/%{versiondir}/%{framework}-%{version}.tar.xz
## upstream patches
Patch3: 0003-Missing-rand-qrand.patch
BuildRequires: extra-cmake-modules >= %{version}
BuildRequires: kf5-rpm-macros >= %{version}
BuildRequires: qt5-qtbase-devel
@ -50,7 +53,7 @@ developing applications that use %{name}.
%prep
%setup -q -n %{framework}-%{version}
%autosetup -n %{framework}-%{version} -p1
%build
@ -103,6 +106,9 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
%changelog
* Wed Apr 27 2016 Rex Dieter <rdieter@fedoraproject.org> - 5.21.0-4
- KRandom::random seeds qrand, but returns value from rand (kde#362161)
* Tue Apr 19 2016 Rex Dieter <rdieter@fedoraproject.org> - 5.21.0-3
- BR: gamin-devel for !bootstrap mode

Loading…
Cancel
Save