* LVSL: call waitpid(...) when closing plugin - fixes zombie processes
* VST-effect: finally made VST-effect plugin work * core: when rendering from command-line, only create a QCoreApplication - needs further work * Singerbot: integrated patches from William Steidtmann <billstei/at/hbci/dot/com> which makes Singerbot at least compile - doesn't seem to work yet though git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@997 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -65,7 +65,7 @@ inline void loadTranslation( const QString & _tname,
|
||||
|
||||
t->load( name, _dir );
|
||||
|
||||
qApp->installTranslator( t );
|
||||
QCoreApplication::instance()->installTranslator( t );
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,21 @@ int main( int argc, char * * argv )
|
||||
}
|
||||
#endif
|
||||
|
||||
QApplication app( argc, argv );
|
||||
bool core_only = FALSE;
|
||||
|
||||
for( int i = 1; i < argc; ++i )
|
||||
{
|
||||
if( argc > i && ( QString( argv[i] ) == "--render" ||
|
||||
QString( argv[i] ) == "-r" ) )
|
||||
{
|
||||
core_only = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
QCoreApplication * app = core_only ?
|
||||
new QCoreApplication( argc, argv ) :
|
||||
new QApplication( argc, argv ) ;
|
||||
|
||||
QString file_to_load, render_out;
|
||||
|
||||
@@ -294,7 +308,7 @@ int main( int argc, char * * argv )
|
||||
QApplication::setStyle( new lmmsStyle() );
|
||||
|
||||
// set palette
|
||||
QPalette pal = app.palette();
|
||||
QPalette pal = qApp->palette();
|
||||
//pal.setColor( QPalette::Background, QColor( 72, 76 ,88 ) );
|
||||
pal.setColor( QPalette::Background, QColor( 72, 76, 88 ) );
|
||||
//pal.setColor( QPalette::Background, QColor( 127, 134 ,154 ) );
|
||||
@@ -315,7 +329,7 @@ int main( int argc, char * * argv )
|
||||
pal.setColor( QPalette::ButtonText, QColor( 255, 255, 255 ) );
|
||||
pal.setColor( QPalette::Highlight, QColor( 224, 224, 224 ) );
|
||||
pal.setColor( QPalette::HighlightedText, QColor( 0, 0, 0 ) );
|
||||
app.setPalette( pal );
|
||||
qApp->setPalette( pal );
|
||||
|
||||
|
||||
// init splash screen
|
||||
@@ -383,7 +397,7 @@ int main( int argc, char * * argv )
|
||||
r->startProcessing();
|
||||
}
|
||||
|
||||
return( app.exec() );
|
||||
return( app->exec() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -76,30 +76,36 @@ void trackContainer::loadSettings( const QDomElement & _this )
|
||||
static QProgressDialog * pd = NULL;
|
||||
bool was_null = ( pd == NULL );
|
||||
int start_val = 0;
|
||||
if( pd == NULL )
|
||||
if( engine::hasGUI() )
|
||||
{
|
||||
pd = new QProgressDialog( tr( "Loading project..." ),
|
||||
if( pd == NULL )
|
||||
{
|
||||
pd = new QProgressDialog( tr( "Loading project..." ),
|
||||
tr( "Cancel" ), 0,
|
||||
_this.childNodes().count() );
|
||||
pd->setWindowModality( Qt::ApplicationModal );
|
||||
pd->setWindowTitle( tr( "Please wait..." ) );
|
||||
pd->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
start_val = pd->value();
|
||||
pd->setMaximum( pd->maximum() + _this.childNodes().count() );
|
||||
pd->setWindowModality( Qt::ApplicationModal );
|
||||
pd->setWindowTitle( tr( "Please wait..." ) );
|
||||
pd->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
start_val = pd->value();
|
||||
pd->setMaximum( pd->maximum() + _this.childNodes().count() );
|
||||
}
|
||||
}
|
||||
|
||||
QDomNode node = _this.firstChild();
|
||||
while( !node.isNull() )
|
||||
{
|
||||
pd->setValue( pd->value() + 1 );
|
||||
qApp->processEvents( QEventLoop::AllEvents, 100 );
|
||||
|
||||
if( pd->wasCanceled() )
|
||||
if( pd != NULL )
|
||||
{
|
||||
break;
|
||||
pd->setValue( pd->value() + 1 );
|
||||
QCoreApplication::instance()->processEvents(
|
||||
QEventLoop::AllEvents, 100 );
|
||||
if( pd->wasCanceled() )
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( node.isElement() &&
|
||||
@@ -114,12 +120,14 @@ void trackContainer::loadSettings( const QDomElement & _this )
|
||||
// mainWindow::restoreWidgetState( this, _this );
|
||||
|
||||
|
||||
pd->setValue( start_val + _this.childNodes().count() );
|
||||
|
||||
if( was_null )
|
||||
if( pd != NULL )
|
||||
{
|
||||
delete pd;
|
||||
pd = NULL;
|
||||
pd->setValue( start_val + _this.childNodes().count() );
|
||||
if( was_null )
|
||||
{
|
||||
delete pd;
|
||||
pd = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -226,9 +226,8 @@ void effectRackView::addEffect( void )
|
||||
update();
|
||||
|
||||
// Find the effectView, and show the controls
|
||||
for( QVector<effectView *>::iterator vit =
|
||||
m_effectViews.begin();
|
||||
vit != m_effectViews.end(); ++vit )
|
||||
for( QVector<effectView *>::iterator vit = m_effectViews.begin();
|
||||
vit != m_effectViews.end(); ++vit )
|
||||
{
|
||||
if( ( *vit )->getEffect() == fx )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user