Windows: Remove unused function QWindowsBackingStore::rasterWindow().
It was only used to access the QWindow which can be retrieved using QPlatformBackingStore::window(), potentially causing a crash when QWindowsBackingStore::resize() was called before the window is shown. Change-Id: I7c1bfce0f2c371d5d8847fd15fd1dc760b769a8f Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
This commit is contained in:
parent
f4dd5344fb
commit
13cbcff097
@ -141,12 +141,12 @@ void QWindowsBackingStore::resize(const QSize &size, const QRegion ®ion)
|
||||
#ifndef QT_NO_DEBUG_OUTPUT
|
||||
if (QWindowsContext::verbose && lcQpaBackingStore().isDebugEnabled()) {
|
||||
qCDebug(lcQpaBackingStore)
|
||||
<< __FUNCTION__ << ' ' << rasterWindow()->window() << ' ' << size << ' ' << region
|
||||
<< __FUNCTION__ << ' ' << window() << ' ' << size << ' ' << region
|
||||
<< " from: " << (m_image.isNull() ? QSize() : m_image->image().size());
|
||||
}
|
||||
#endif
|
||||
QImage::Format format = QWindowsNativeImage::systemFormat();
|
||||
if (format == QImage::Format_RGB32 && rasterWindow()->window()->format().hasAlpha())
|
||||
if (format == QImage::Format_RGB32 && window()->format().hasAlpha())
|
||||
format = QImage::Format_ARGB32_Premultiplied;
|
||||
|
||||
QWindowsNativeImage *oldwni = m_image.data();
|
||||
@ -196,14 +196,6 @@ void QWindowsBackingStore::beginPaint(const QRegion ®ion)
|
||||
}
|
||||
}
|
||||
|
||||
QWindowsWindow *QWindowsBackingStore::rasterWindow() const
|
||||
{
|
||||
if (const QWindow *w = window())
|
||||
if (QPlatformWindow *pw = w->handle())
|
||||
return static_cast<QWindowsWindow *>(pw);
|
||||
return 0;
|
||||
}
|
||||
|
||||
HDC QWindowsBackingStore::getDC() const
|
||||
{
|
||||
if (!m_image.isNull())
|
||||
|
@ -68,8 +68,6 @@ public:
|
||||
HDC getDC() const;
|
||||
|
||||
private:
|
||||
QWindowsWindow *rasterWindow() const;
|
||||
|
||||
QScopedPointer<QWindowsNativeImage> m_image;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user