summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2021-08-12 08:11:31 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-08-13 10:16:44 +0000
commit90fbbbf54768f3ddd39fe3f376565ecaaf11b8c3 (patch)
tree8c8e2441ea4cd25a4ae42115236b90721e4782b0
parent994d8ba359b638592cd00157c35bd163c3121ac1 (diff)
Remove unused internal flag in QImage
The "locked" flag was only added for a particular use in the Freetype font engine in 070d9c00c488a5ee6811f04170cf488ead79bf80,but that usage was refactored away long ago in afb326f07109da0035112e6f56e683e37b8a5d72. Change-Id: I7347c91f49ba59041f6ff35bd5a6b537d6c704d4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit c1643e65470ec63e740f9d6815a3d90ae6460741) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/gui/image/qimage.cpp11
-rw-r--r--src/gui/image/qimage_p.h1
2 files changed, 3 insertions, 9 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 9875881623..19f07652d2 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -84,11 +84,6 @@ QT_BEGIN_NAMESPACE
// for valid QImage's, where height() cannot be 0. Therefore disable the warning.
QT_WARNING_DISABLE_MSVC(4723)
-static inline bool isLocked(QImageData *data)
-{
- return data != nullptr && data->is_locked;
-}
-
#if defined(Q_CC_DEC) && defined(__alpha) && (__DECCXX_VER-0 >= 50190001)
#pragma message disable narrowptr
#endif
@@ -119,7 +114,7 @@ QImageData::QImageData()
dpmx(qt_defaultDpiX() * 100 / qreal(2.54)),
dpmy(qt_defaultDpiY() * 100 / qreal(2.54)),
offset(0, 0), own_data(true), ro_data(false), has_alpha_clut(false),
- is_cached(false), is_locked(false), cleanupFunction(nullptr), cleanupInfo(nullptr),
+ is_cached(false), cleanupFunction(nullptr), cleanupInfo(nullptr),
paintEngine(nullptr)
{
}
@@ -1047,7 +1042,7 @@ QImage::QImage(const char * const xpm[])
QImage::QImage(const QImage &image)
: QPaintDevice()
{
- if (image.paintingActive() || isLocked(image.d)) {
+ if (image.paintingActive()) {
d = nullptr;
image.copy().swap(*this);
} else {
@@ -1079,7 +1074,7 @@ QImage::~QImage()
QImage &QImage::operator=(const QImage &image)
{
- if (image.paintingActive() || isLocked(image.d)) {
+ if (image.paintingActive()) {
operator=(image.copy());
} else {
if (image.d)
diff --git a/src/gui/image/qimage_p.h b/src/gui/image/qimage_p.h
index a2c50adc43..8326ac518c 100644
--- a/src/gui/image/qimage_p.h
+++ b/src/gui/image/qimage_p.h
@@ -93,7 +93,6 @@ struct Q_GUI_EXPORT QImageData { // internal image data
uint ro_data : 1;
uint has_alpha_clut : 1;
uint is_cached : 1;
- uint is_locked : 1;
QImageCleanupFunction cleanupFunction;
void* cleanupInfo;