mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2025-01-12 16:20:25 +08:00
Fixed wrong pixmap is null test in ElidingLabel
This commit is contained in:
parent
8d14068df7
commit
0312682e07
@ -164,11 +164,11 @@ void CElidingLabel::resizeEvent(QResizeEvent *event)
|
|||||||
QSize CElidingLabel::minimumSizeHint() const
|
QSize CElidingLabel::minimumSizeHint() const
|
||||||
{
|
{
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||||
bool NoPixmap = pixmap().isNull();
|
bool HasPixmap = !pixmap().isNull();
|
||||||
#else
|
#else
|
||||||
bool NoPixmap = (pixmap() == nullptr);
|
bool HasPixmap = (pixmap() != nullptr);
|
||||||
#endif
|
#endif
|
||||||
if (NoPixmap || d->isModeElideNone())
|
if (HasPixmap || d->isModeElideNone())
|
||||||
{
|
{
|
||||||
return QLabel::minimumSizeHint();
|
return QLabel::minimumSizeHint();
|
||||||
}
|
}
|
||||||
@ -186,11 +186,11 @@ QSize CElidingLabel::minimumSizeHint() const
|
|||||||
QSize CElidingLabel::sizeHint() const
|
QSize CElidingLabel::sizeHint() const
|
||||||
{
|
{
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||||
bool NoPixmap = pixmap().isNull();
|
bool HasPixmap = !pixmap().isNull();
|
||||||
#else
|
#else
|
||||||
bool NoPixmap = (pixmap() == nullptr);
|
bool HasPixmap = (pixmap() != nullptr);
|
||||||
#endif
|
#endif
|
||||||
if (NoPixmap || d->isModeElideNone())
|
if (HasPixmap || d->isModeElideNone())
|
||||||
{
|
{
|
||||||
return QLabel::sizeHint();
|
return QLabel::sizeHint();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user