Remove some Qt4 compatibility code

This commit is contained in:
Hyunjin Song
2019-03-27 07:05:38 +09:00
parent f18efb470f
commit 4dce466873
5 changed files with 0 additions and 45 deletions

View File

@@ -41,10 +41,6 @@ public:
m_displayName( _display_name ),
m_defaultConstructed( _default_constructed )
{
#if QT_VERSION < 0x050000
connect( this, SIGNAL( dataChanged() ), this,
SLOT( thisDataChanged() ), Qt::DirectConnection );
#endif
}
virtual ~Model()
@@ -89,19 +85,6 @@ signals:
// emitted if properties of the model (e.g. ranges) have changed
void propertiesChanged();
#if QT_VERSION < 0x050000
// emitted along with dataChanged(), but with this model as an argument
// workaround for when QObject::sender() and Qt5 are unavailable
void dataChanged( Model * );
private slots:
void thisDataChanged()
{
emit dataChanged( this );
}
signals:
#endif
} ;

View File

@@ -90,13 +90,8 @@ void VstEffectControls::loadSettings( const QDomElement & _this )
knobFModel[ i ]->setInitValue(LocaleHelper::toFloat(s_dumpValues.at(2)));
}
#if QT_VERSION < 0x050000
connect( knobFModel[i], SIGNAL( dataChanged( Model * ) ),
this, SLOT( setParameter( Model * ) ), Qt::DirectConnection );
#else
connect( knobFModel[i], &FloatModel::dataChanged, this,
[this, i]() { setParameter( knobFModel[i] ); }, Qt::DirectConnection);
#endif
}
}
@@ -383,13 +378,8 @@ manageVSTEffectView::manageVSTEffectView( VstEffect * _eff, VstEffectControls *
}
FloatModel * model = m_vi->knobFModel[i];
#if QT_VERSION < 0x050000
connect( model, SIGNAL( dataChanged( Model * ) ), this,
SLOT( setParameter( Model * ) ), Qt::DirectConnection );
#else
connect( model, &FloatModel::dataChanged, this,
[this, model]() { setParameter( model ); }, Qt::DirectConnection);
#endif
vstKnobs[ i ] ->setModel( model );
}

View File

@@ -223,13 +223,8 @@ void vestigeInstrument::loadSettings( const QDomElement & _this )
knobFModel[ i ]->setInitValue(LocaleHelper::toFloat(s_dumpValues.at(2)));
}
#if QT_VERSION < 0x050000
connect( knobFModel[i], SIGNAL( dataChanged( Model * ) ),
this, SLOT( setParameter( Model * ) ), Qt::DirectConnection );
#else
connect( knobFModel[i], &FloatModel::dataChanged, this,
[this, i]() { setParameter( knobFModel[i] ); }, Qt::DirectConnection);
#endif
}
}
m_pluginMutex.unlock();
@@ -984,13 +979,8 @@ manageVestigeInstrumentView::manageVestigeInstrumentView( Instrument * _instrume
}
FloatModel * model = m_vi->knobFModel[i];
#if QT_VERSION < 0x050000
connect( model, SIGNAL( dataChanged( Model * ) ), this,
SLOT( setParameter( Model * ) ), Qt::DirectConnection );
#else
connect( model, &FloatModel::dataChanged, this,
[this, model]() { setParameter( model ); }, Qt::DirectConnection);
#endif
vstKnobs[i] ->setModel( model );
}

View File

@@ -291,10 +291,7 @@ void ZynAddSubFxInstrument::loadSettings( const QDomElement & _this )
emit settingsChanged();
}
// FIXME: Remove this check in future versions. Slots are public in Qt5+
#if QT_VERSION >= 0x050000
emit instrumentTrack()->pitchModel()->dataChanged();
#endif
}

View File

@@ -1075,12 +1075,7 @@ void SetupDialog::toggleOneInstrumentTrackWindow( bool _enabled )
void SetupDialog::vstEmbedMethodChanged()
{
#if QT_VERSION >= 0x050000
m_vstEmbedMethod = m_vstEmbedComboBox->currentData().toString();
#else
m_vstEmbedMethod = m_vstEmbedComboBox->itemData(
m_vstEmbedComboBox->currentIndex()).toString();
#endif
m_vstAlwaysOnTopCheckBox->setVisible( m_vstEmbedMethod == "none" );
}