Fix a deprecation warning in qt_renderercommon.cpp
This commit is contained in:
@@ -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.));
|
||||||
|
Reference in New Issue
Block a user