qt: Fix compilation with Qt 5

This commit is contained in:
Cacodemon345
2022-02-16 14:37:09 +06:00
parent c577aa85f2
commit 611486cb71

View File

@@ -119,7 +119,11 @@ void RendererCommon::drawStatusBarIcons(QPainter* painter)
QLabel* label = qobject_cast<QLabel*>(main_window->ui->statusbar->children()[i]);
if (label)
{
auto pixmap = label->pixmap(Qt::ReturnByValue);
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
const QPixmap pixmap = label->pixmap();
#else
const QPixmap pixmap = *label->pixmap();
#endif
if (!pixmap.isNull())
{
painter->setBrush(QColor(0, 0, 0, 255));