Deprecate wxGenericImageList::GetBitmapPtr()

This function was in effect deprecated since 2.5.5 (!) and it's not
finally time to do it formally and to stop using it in wxWidgets own
code.
This commit is contained in:
Vadim Zeitlin
2018-10-30 23:15:49 +01:00
parent 61e4534bd2
commit 3b5441f59e
6 changed files with 28 additions and 32 deletions

View File

@@ -112,11 +112,9 @@ bool wxNotebook::SetPageImage(size_t n, int imageId)
if (imageId >= 0)
{
wxCHECK_MSG(HasImageList(), false, "invalid notebook imagelist");
const wxBitmap* bitmap = GetImageList()->GetBitmapPtr(imageId);
if (bitmap == NULL)
return false;
const wxBitmap bitmap = GetImageList()->GetBitmap(imageId);
// set the new image:
m_qtTabWidget->setTabIcon( n, QIcon( *bitmap->GetHandle() ));
m_qtTabWidget->setTabIcon( n, QIcon( *bitmap.GetHandle() ));
}
else
{
@@ -137,8 +135,8 @@ bool wxNotebook::InsertPage(size_t n, wxWindow *page, const wxString& text,
{
if (HasImageList())
{
const wxBitmap* bitmap = GetImageList()->GetBitmapPtr(imageId);
m_qtTabWidget->insertTab( n, page->GetHandle(), QIcon( *bitmap->GetHandle() ), wxQtConvertString( text ));
const wxBitmap bitmap = GetImageList()->GetBitmap(imageId);
m_qtTabWidget->insertTab( n, page->GetHandle(), QIcon( *bitmap.GetHandle() ), wxQtConvertString( text ));
}
else
{