Fix more Qt deprecation warnings (#6615)

* Add <QHash> to PluginFactory.h

* Handle one more deprecated QTextStream::endl

* Replace QLayout::setMargin with setContentsMargins

* Replace Qt::MidButton with Qt::MiddleButton

* Replace QPalette::Background with QPalette::Window

* Fix deprecation warnings in LcdFloatSpinBox
This commit is contained in:
Hyunjin Song
2023-01-18 10:16:28 +09:00
committed by GitHub
parent 158bb50816
commit f89d52fa21
36 changed files with 69 additions and 62 deletions

View File

@@ -98,7 +98,7 @@ LadspaBrowserView::LadspaBrowserView( ToolPlugin * _tool ) :
{
auto hlayout = new QHBoxLayout(this);
hlayout->setSpacing( 0 );
hlayout->setMargin( 0 );
hlayout->setContentsMargins(0, 0, 0, 0);
m_tabBar = new TabBar( this, QBoxLayout::TopToBottom );
m_tabBar->setExclusive( true );
@@ -166,7 +166,7 @@ QWidget * LadspaBrowserView::createTab( QWidget * _parent, const QString & _txt,
tab->setFixedSize( 500, 400 );
auto layout = new QVBoxLayout(tab);
layout->setSpacing( 0 );
layout->setMargin( 0 );
layout->setContentsMargins(0, 0, 0, 0);
const QString type = "<b>" + tr( "Type:" ) + "</b> ";
auto title = new QLabel(type + _txt, tab);

View File

@@ -94,7 +94,7 @@ LadspaDescription::LadspaDescription( QWidget * _parent,
auto descriptionBox = new QGroupBox(tr("Description"), this);
auto descriptionLayout = new QVBoxLayout(descriptionBox);
descriptionLayout->setSpacing( 0 );
descriptionLayout->setMargin( 0 );
descriptionLayout->setContentsMargins(0, 0, 0, 0);
m_scrollArea = new QScrollArea( descriptionBox );
descriptionLayout->addWidget( m_scrollArea );
@@ -130,7 +130,7 @@ void LadspaDescription::update( const ladspa_key_t & _key )
auto maker = new QWidget(description);
auto makerLayout = new QHBoxLayout(maker);
makerLayout->setMargin( 0 );
makerLayout->setContentsMargins(0, 0, 0, 0);
makerLayout->setSpacing( 0 );
layout->addWidget( maker );
@@ -145,7 +145,7 @@ void LadspaDescription::update( const ladspa_key_t & _key )
auto copyright = new QWidget(description);
auto copyrightLayout = new QHBoxLayout(copyright);
copyrightLayout->setMargin( 0 );
copyrightLayout->setContentsMargins(0, 0, 0, 0);
copyrightLayout->setSpacing( 0 );
layout->addWidget( copyright );

View File

@@ -47,7 +47,7 @@ LadspaPortDialog::LadspaPortDialog( const ladspa_key_t & _key )
auto vlayout = new QVBoxLayout(this);
vlayout->setSpacing( 0 );
vlayout->setMargin( 0 );
vlayout->setContentsMargins(0, 0, 0, 0);
int pc = manager->getPortCount( _key );

View File

@@ -71,7 +71,7 @@ void LadspaSubPluginFeatures::fillDescriptionWidget( QWidget * _parent,
auto maker = new QWidget(_parent);
auto l = new QHBoxLayout(maker);
l->setMargin( 0 );
l->setContentsMargins(0, 0, 0, 0);
l->setSpacing( 0 );
auto maker_label = new QLabel(maker);
@@ -85,7 +85,7 @@ void LadspaSubPluginFeatures::fillDescriptionWidget( QWidget * _parent,
auto copyright = new QWidget(_parent);
l = new QHBoxLayout( copyright );
l->setMargin( 0 );
l->setContentsMargins(0, 0, 0, 0);
l->setSpacing( 0 );
copyright->setMinimumWidth( _parent->minimumWidth() );

View File

@@ -751,7 +751,7 @@ void VstPlugin::createUI( QWidget * parent )
QHBoxLayout * l = new QHBoxLayout( helper );
QWidget * target = new QWidget( helper );
l->setSpacing( 0 );
l->setMargin( 0 );
l->setContentsMargins(0, 0, 0, 0);
l->addWidget( target );
// we've to call that for making sure, Qt created the windows