Fix Qt4 compatibility
This commit is contained in:
@@ -128,10 +128,21 @@ void VstEffect::openPlugin( const QString & _plugin )
|
||||
PLUGIN_NAME::getIconPixmap( "logo", 24, 24 ), 0 );
|
||||
|
||||
QMutexLocker ml( &m_pluginMutex ); Q_UNUSED( ml );
|
||||
#if QT_VERSION > 0x050000
|
||||
m_plugin.reset(new VstPlugin( _plugin ));
|
||||
#else
|
||||
{
|
||||
QSharedPointer<VstPlugin> newPlugin(new VstPlugin( _plugin ));
|
||||
std::swap(m_plugin, newPlugin);
|
||||
}
|
||||
#endif
|
||||
if( m_plugin->failed() )
|
||||
{
|
||||
#if QT_VERSION > 0x050000
|
||||
m_plugin.reset(nullptr);
|
||||
#else
|
||||
m_plugin.clear();
|
||||
#endif
|
||||
delete tf;
|
||||
collectErrorForUI( VstPlugin::tr( "The VST plugin %1 could not be loaded." ).arg( _plugin ) );
|
||||
return;
|
||||
|
||||
@@ -1077,7 +1077,11 @@ void SetupDialog::accept()
|
||||
QString::number( m_disableAutoQuit ) );
|
||||
ConfigManager::inst()->setValue( "app", "language", m_lang );
|
||||
ConfigManager::inst()->setValue( "ui", "vstembedmethod",
|
||||
#if QT_VERSION >= 0x050000
|
||||
m_vstEmbedComboBox->currentData().toString() );
|
||||
#else
|
||||
m_vstEmbedComboBox->itemData(m_vstEmbedComboBox->currentIndex()).toString() );
|
||||
#endif
|
||||
|
||||
|
||||
ConfigManager::inst()->setWorkingDir(QDir::fromNativeSeparators(m_workingDir));
|
||||
|
||||
Reference in New Issue
Block a user