made LMMS build for win32, coding-style fixes

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1038 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-06-01 22:35:02 +00:00
parent 8618b1474f
commit d3516cd5c5
48 changed files with 291 additions and 107 deletions

View File

@@ -47,11 +47,19 @@ configManager * configManager::s_instanceOfMe = NULL;
configManager::configManager( void ) :
m_lmmsRcFile( QDir::home().absolutePath() + "/.lmmsrc.xml" ),
m_workingDir( QDir::home().absolutePath() + "/lmms" ),
m_dataDir( qApp->applicationDirPath().section( '/', 0, -2 ) +
"/share/lmms/" ),
m_dataDir( qApp->applicationDirPath()
#ifndef BUILD_WIN32
.section( '/', 0, -2 )
#endif
+ "/share/lmms/" ),
m_artworkDir( defaultArtworkDir() ),
m_pluginDir( qApp->applicationDirPath().section( '/', 0, -2 ) +
"/lib/lmms/" ),
m_pluginDir( qApp->applicationDirPath()
#ifdef BUILD_WIN32
+ QDir::separator()
#else
.section( '/', 0, -2 ) + "/lib/lmms/"
#endif
),
m_vstDir( QDir::home().absolutePath() ),
m_flDir( QDir::home().absolutePath() )
{

View File

@@ -351,7 +351,6 @@ int main( int argc, char * * argv )
p.end();
QSplashScreen * ss = new QSplashScreen( pm );
ss->setWindowOpacity( 0.85 );
ss->setMask( splash.alphaChannel().createMaskFromColor( QColor( 0, 0, 0 ) ) );
ss->show();
qApp->processEvents();

View File

@@ -147,8 +147,13 @@ void plugin::waitForWorkerThread( void )
void plugin::getDescriptorsOfAvailPlugins( QVector<descriptor> & _plugin_descs )
{
QDir directory( configManager::inst()->pluginDir() );
#ifdef BUILD_WIN32
QFileInfoList list = directory.entryInfoList(
QStringList( "*.dll" ) );
#else
QFileInfoList list = directory.entryInfoList(
QStringList( "lib*.so" ) );
#endif
for( QFileInfoList::iterator file = list.begin();
file != list.end(); ++file )
{

View File

@@ -91,6 +91,7 @@ song::song( void ) :
m_paused( FALSE ),
m_loadingProject( FALSE ),
m_playMode( Mode_PlaySong ),
m_length( 0 ),
m_trackToPlay( NULL ),
m_patternToPlay( NULL ),
m_loopPattern( FALSE )

View File

@@ -637,8 +637,8 @@ trackContentWidget::trackContentWidget( trackView * _parent ) :
SIGNAL( positionChanged( const midiTime & ) ),
this, SLOT( changePosition( const midiTime & ) ) );
setAutoFillBackground(false);
setAttribute(Qt::WA_OpaquePaintEvent);
setAutoFillBackground( false );
setAttribute( Qt::WA_OpaquePaintEvent );
}

View File

@@ -175,7 +175,7 @@ effectListWidget::effectListWidget( QWidget * _parent ) :
for( effectKeyList::const_iterator it = m_effectKeys.begin();
it != m_effectKeys.end(); ++it )
{
plugin_names += QString( ( *it ).desc->public_name ) +
plugin_names += QString( ( *it ).desc->publicName ) +
( ( ( *it ).desc->sub_plugin_features != NULL ) ?
": " + ( *it ).name
:

View File

@@ -399,7 +399,7 @@ void mainWindow::finalize( void )
if( it->type == plugin::Tool )
{
m_toolsMenu->addAction( it->logo->pixmap(),
it->public_name );
it->publicName );
m_tools.push_back( tool::instantiate( it->name,
/*this*/NULL )->createView( this ) );
}

View File

@@ -3,7 +3,7 @@
/*
* plugin_browser.cpp - implementation of the plugin-browser
*
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -141,8 +141,7 @@ void pluginDescWidget::paintEvent( QPaintEvent * )
QFont f = pointSize<8>( p.font() );
f.setBold( TRUE );
p.setFont( f );
p.drawText( 10 + logo_size.width(), 15,
m_pluginDescriptor.public_name );
p.drawText( 10 + logo_size.width(), 15, m_pluginDescriptor.publicName );
if( height() > 24 || m_mouseOver )
{