summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2019-10-04 11:06:06 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2019-10-12 10:27:49 +0200
commite55a79b022e542a482177c2f34140c23b100b708 (patch)
tree85dd97a84a96ec238f66ed632871a38c9b59ee8a
parentb43f5ed2da868eab17881872b165ae048d8a1d88 (diff)
PNG handler: stop using volatile
I can only guess: the compression quality was declared volatile to make it survive across a setjmp/longjmp. However, executing a longjmp makes the code never touch the quality variable again, so volatile isn't needed. Change-Id: Iba1559d66200b900fbad55aa0ee3011b2407eead Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--src/gui/image/qpnghandler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index 4ab45337b0..d6caf6773a 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -174,7 +174,7 @@ public:
void setGamma(float);
bool writeImage(const QImage& img, int x, int y);
- bool writeImage(const QImage& img, volatile int compression_in, const QString &description, int x, int y);
+ bool writeImage(const QImage& img, int compression_in, const QString &description, int x, int y);
bool writeImage(const QImage& img)
{ return writeImage(img, 0, 0); }
bool writeImage(const QImage& img, int compression, const QString &description)
@@ -900,7 +900,7 @@ bool QPNGImageWriter::writeImage(const QImage& image, int off_x, int off_y)
return writeImage(image, -1, QString(), off_x, off_y);
}
-bool QPNGImageWriter::writeImage(const QImage& image, volatile int compression_in, const QString &description,
+bool QPNGImageWriter::writeImage(const QImage& image, int compression_in, const QString &description,
int off_x_in, int off_y_in)
{
QPoint offset = image.offset();