avoid initial warnings with empty sizes
This commit is contained in:
parent
b004e6d8d5
commit
901de11d1b
@ -90,6 +90,12 @@ bool Image::deferredUpdates() const
|
|||||||
return m_data->deferredUpdates;
|
return m_data->deferredUpdates;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Image::setSourceSize( const QSize& size )
|
||||||
|
{
|
||||||
|
if ( size.isEmpty() != sourceSize().isEmpty() )
|
||||||
|
QQuickImage::setSourceSize( size );
|
||||||
|
}
|
||||||
|
|
||||||
void Image::componentComplete()
|
void Image::componentComplete()
|
||||||
{
|
{
|
||||||
if ( m_data->deferredUpdates && m_data->sourceSizeAdjustment )
|
if ( m_data->deferredUpdates && m_data->sourceSizeAdjustment )
|
||||||
|
@ -49,6 +49,8 @@ class Image : public QQuickImage
|
|||||||
Q_INVOKABLE virtual bool hasWidthForHeight() const;
|
Q_INVOKABLE virtual bool hasWidthForHeight() const;
|
||||||
Q_INVOKABLE virtual qreal widthForHeight( qreal height ) const;
|
Q_INVOKABLE virtual qreal widthForHeight( qreal height ) const;
|
||||||
|
|
||||||
|
void setSourceSize( const QSize& ) override;
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void show();
|
void show();
|
||||||
void hide();
|
void hide();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user