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 afb326f071.
Pick-to: 6.2
Change-Id: I7347c91f49ba59041f6ff35bd5a6b537d6c704d4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
bb10
parent
de9d486d2f
commit
c1643e6547
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue