Fix a deprecation warning in qt_renderercommon.cpp

This commit is contained in:
Alexander Babikov
2023-11-18 00:20:50 +05:00
parent af4df47282
commit d07160aef2

View File

@@ -147,8 +147,10 @@ void RendererCommon::drawStatusBarIcons(QPainter* painter)
if (label) { if (label) {
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
const QPixmap pixmap = label->pixmap(); const QPixmap pixmap = label->pixmap();
#elif QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
const QPixmap pixmap = label->pixmap(Qt::ReturnByValue);
#else #else
const QPixmap pixmap = label->pixmap() ? *label->pixmap() : QPixmap(); const QPixmap pixmap = (label->pixmap() ? *label->pixmap() : QPixmap());
#endif #endif
if (!pixmap.isNull()) { if (!pixmap.isNull()) {
painter->setBrush(QColor::fromRgbF(0, 0, 0, 1.)); painter->setBrush(QColor::fromRgbF(0, 0, 0, 1.));