Fix build on Windows.

We added our own implementation of rand_r to make sure we use the same
as Gimp, and to make Windows work. But we need to actually use it
everywhere.

Discussion in Differential:

Differential Revision: https://phabricator.kde.org/D25267
This commit is contained in:
Martin T. H. Sandsmark 2020-04-15 09:46:54 +02:00
parent c60e77c048
commit 497b6b81bd

View File

@ -3179,7 +3179,7 @@ void XCFImageFormat::dissolveRGBPixels(QImage &image, int x, int y)
}
for (int k = 0; k < image.width(); k++) {
int rand_val = rand_r(&next) & 0xff;
int rand_val = RandomTable::rand_r(&next) & 0xff;
QRgb pixel = image.pixel(k, l);
if (rand_val > qAlpha(pixel)) {
@ -3211,7 +3211,7 @@ void XCFImageFormat::dissolveAlphaPixels(QImage &image, int x, int y)
}
for (int k = 0; k < image.width(); k++) {
int rand_val = rand_r(&next) & 0xff;
int rand_val = RandomTable::rand_r(&next) & 0xff;
uchar alpha = image.pixelIndex(k, l);
if (rand_val > alpha) {