Commit 9ab4dc4d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Don't use 0 as flags + port deprecated method

parent 26dddde3
......@@ -726,9 +726,9 @@ namespace Oxygen
if( c->windowId() != 0 )
{
m_sizeGrip = new SizeGrip( this );
connect( client().data(), &KDecoration2::DecoratedClient::maximizedChanged, this, &Decoration::updateSizeGripVisibility );
connect( client().data(), &KDecoration2::DecoratedClient::shadedChanged, this, &Decoration::updateSizeGripVisibility );
connect( client().data(), &KDecoration2::DecoratedClient::resizeableChanged, this, &Decoration::updateSizeGripVisibility );
connect( client().toStrongRef().data(), &KDecoration2::DecoratedClient::maximizedChanged, this, &Decoration::updateSizeGripVisibility );
connect( client().toStrongRef().data(), &KDecoration2::DecoratedClient::shadedChanged, this, &Decoration::updateSizeGripVisibility );
connect( client().toStrongRef().data(), &KDecoration2::DecoratedClient::resizeableChanged, this, &Decoration::updateSizeGripVisibility );
}
#endif
......
......@@ -39,7 +39,11 @@ namespace Oxygen
DemoWidget( parent )
{
setLayout( new QVBoxLayout() );
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
layout()->setMargin(0);
#else
layout()->setContentsMargins(0, 0, 0, 0);
#endif
QMenuBar* menuBar = new QMenuBar( this );
layout()->addWidget( menuBar );
......
......@@ -419,25 +419,25 @@ namespace Oxygen
//@{
//* qdial slab
void renderDialSlab( QPainter* p, const QRect& r, const QColor& c, const QStyleOption* option, StyleOptions opts = 0 ) const
void renderDialSlab( QPainter* p, const QRect& r, const QColor& c, const QStyleOption* option, StyleOptions opts = {} ) const
{ renderDialSlab( p, r, c, option, opts, -1, AnimationNone ); }
//* qdial slab
void renderDialSlab( QPainter*, const QRect&, const QColor&, const QStyleOption*, StyleOptions, qreal, AnimationMode ) const;
//* generic button slab
void renderButtonSlab( QPainter* p, QRect r, const QColor& c, StyleOptions opts = 0, TileSet::Tiles tiles = TileSet::Ring) const
void renderButtonSlab( QPainter* p, QRect r, const QColor& c, StyleOptions opts = {}, TileSet::Tiles tiles = TileSet::Ring) const
{ renderButtonSlab( p, r, c, opts, -1, AnimationNone, tiles ); }
//* generic button slab
void renderButtonSlab( QPainter*, QRect, const QColor&, StyleOptions, qreal, AnimationMode, TileSet::Tiles ) const;
//* generic slab
void renderSlab( QPainter* painter, const SlabRect& slab, const QColor& color, StyleOptions options = 0 ) const
void renderSlab( QPainter* painter, const SlabRect& slab, const QColor& color, StyleOptions options = {} ) const
{ renderSlab( painter, slab.rect, color, options, slab.tiles ); }
//* generic slab
void renderSlab( QPainter* painter, QRect rect, const QColor& color, StyleOptions options = 0, TileSet::Tiles tiles = TileSet::Ring) const
void renderSlab( QPainter* painter, QRect rect, const QColor& color, StyleOptions options = {}, TileSet::Tiles tiles = TileSet::Ring) const
{ renderSlab( painter, rect, color, options, -1, AnimationNone, tiles ); }
//* generic slab
......
......@@ -179,7 +179,7 @@ namespace Oxygen
void fillHole( QPainter&, const QRect&, int offset = 2 ) const;
//* generic hole
void renderHole( QPainter *painter, const QColor& color, const QRect &rect, StyleOptions options = 0, TileSet::Tiles tiles = TileSet::Ring )
void renderHole( QPainter *painter, const QColor& color, const QRect &rect, StyleOptions options = {}, TileSet::Tiles tiles = TileSet::Ring )
{ renderHole( painter, color, rect, options, -1, Oxygen::AnimationNone, tiles ); }
//* generic hole (with animated glow)
......@@ -227,11 +227,11 @@ namespace Oxygen
//@{
//* holes
TileSet hole( const QColor& color, int size = TileSet::DefaultSize, StyleOptions options = 0 )
TileSet hole( const QColor& color, int size = TileSet::DefaultSize, StyleOptions options = {} )
{ return hole( color, QColor(), size, options ); }
//* holes
TileSet hole( const QColor&, const QColor& glow, int size = TileSet::DefaultSize, StyleOptions = 0 );
TileSet hole( const QColor&, const QColor& glow, int size = TileSet::DefaultSize, StyleOptions = {} );
//@}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment