more Qt4 changes
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@548 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -167,15 +167,7 @@ void audioALSA::startProcessing( void )
|
||||
{
|
||||
if( !isRunning() )
|
||||
{
|
||||
start(
|
||||
#ifdef QT4
|
||||
QThread::HighPriority
|
||||
#else
|
||||
#if QT_VERSION >= 0x030505
|
||||
QThread::HighestPriority
|
||||
#endif
|
||||
#endif
|
||||
);
|
||||
start( QThread::HighPriority );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -65,15 +65,9 @@ audioDevice::~audioDevice()
|
||||
{
|
||||
src_delete( m_srcState );
|
||||
delete[] m_buffer;
|
||||
#ifdef QT3
|
||||
if( m_devMutex.locked() )
|
||||
{
|
||||
unlock();
|
||||
}
|
||||
#else
|
||||
|
||||
m_devMutex.tryLock();
|
||||
unlock();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,19 +30,9 @@
|
||||
|
||||
#ifdef SDL_AUDIO_SUPPORT
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QLabel>
|
||||
#include <QtGui/QLineEdit>
|
||||
|
||||
#else
|
||||
|
||||
#include <qlineedit.h>
|
||||
#include <qlabel.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "debug.h"
|
||||
#include "config_mgr.h"
|
||||
#include "gui_templates.h"
|
||||
@@ -65,19 +55,6 @@ audioSDL::audioSDL( const sample_rate_t _sample_rate, bool & _success_ful,
|
||||
* sizeof( int_sample_t );
|
||||
m_convertedBuf = new Uint8[m_convertedBuf_size];
|
||||
|
||||
/* // if device is set, we set AUDIODEV-environment-variable, so that
|
||||
// SDL can evaluate and use it
|
||||
QString dev = configManager::inst()->value( "audiosdl", "device" );
|
||||
if( dev != "" )
|
||||
{
|
||||
putenv( const_cast<char *>( ( "AUDIODEV=" + dev ).
|
||||
#ifdef QT4
|
||||
toAscii().constData() ) );
|
||||
#else
|
||||
ascii() ) );
|
||||
#endif
|
||||
}*/
|
||||
|
||||
|
||||
if( SDL_Init( SDL_INIT_AUDIO | SDL_INIT_NOPARACHUTE ) < 0 )
|
||||
{
|
||||
@@ -105,11 +82,7 @@ audioSDL::audioSDL( const sample_rate_t _sample_rate, bool & _success_ful,
|
||||
}
|
||||
m_convertEndian = ( m_audioHandle.format != actual.format );
|
||||
|
||||
#ifndef QT3
|
||||
m_stop_semaphore.acquire();
|
||||
#else
|
||||
m_stop_semaphore++;
|
||||
#endif
|
||||
|
||||
_success_ful = TRUE;
|
||||
}
|
||||
@@ -120,11 +93,8 @@ audioSDL::audioSDL( const sample_rate_t _sample_rate, bool & _success_ful,
|
||||
audioSDL::~audioSDL()
|
||||
{
|
||||
stopProcessing();
|
||||
#ifndef QT3
|
||||
m_stop_semaphore.release();
|
||||
#else
|
||||
m_stop_semaphore--;
|
||||
#endif
|
||||
|
||||
SDL_CloseAudio();
|
||||
SDL_Quit();
|
||||
delete[] m_convertedBuf;
|
||||
@@ -149,11 +119,7 @@ void audioSDL::stopProcessing( void )
|
||||
{
|
||||
if( SDL_GetAudioStatus() == SDL_AUDIO_PLAYING )
|
||||
{
|
||||
#ifndef QT3
|
||||
m_stop_semaphore.acquire();
|
||||
#else
|
||||
m_stop_semaphore++;
|
||||
#endif
|
||||
|
||||
SDL_LockAudio();
|
||||
SDL_PauseAudio( 1 );
|
||||
@@ -194,11 +160,7 @@ void audioSDL::sdlAudioCallback( Uint8 * _buf, int _len )
|
||||
if( !frames )
|
||||
{
|
||||
m_stopped = TRUE;
|
||||
#ifndef QT3
|
||||
m_stop_semaphore.release();
|
||||
#else
|
||||
m_stop_semaphore--;
|
||||
#endif
|
||||
memset( _buf, 0, _len );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -63,9 +63,6 @@ aboutDialog::aboutDialog() :
|
||||
"Copyright (c) 2004-2007 "
|
||||
"LMMS-Developers\n\n"
|
||||
"http://lmms.sourceforge.net" )
|
||||
#ifndef QT4
|
||||
, m_aboutTabs
|
||||
#endif
|
||||
);
|
||||
about_lbl->setAlignment( Qt::AlignVCenter | Qt::AlignLeft );
|
||||
about_lbl->setIndent( 30 );
|
||||
|
||||
@@ -25,17 +25,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QMessageBox>
|
||||
|
||||
#else
|
||||
|
||||
#include "qmessagebox.h"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "effect.h"
|
||||
#include "engine.h"
|
||||
#include "dummy_effect.h"
|
||||
|
||||
@@ -24,20 +24,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QLayout>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QLabel>
|
||||
|
||||
#else
|
||||
|
||||
#include <qlayout.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qlabel.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "meter_dialog.h"
|
||||
#include "embed.h"
|
||||
#include "gui_templates.h"
|
||||
|
||||
@@ -28,9 +28,7 @@
|
||||
#include "tool.h"
|
||||
#include "main_window.h"
|
||||
|
||||
#ifndef QT3
|
||||
#include <QtGui/QIcon>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -32,11 +32,6 @@
|
||||
#include "journalling_object.h"
|
||||
#include "song_editor.h"
|
||||
|
||||
#ifdef QT3
|
||||
#define value data
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
projectJournal::projectJournal( void ) :
|
||||
m_joIDs(),
|
||||
@@ -175,9 +170,4 @@ void projectJournal::clearInvalidJournallingObjects( void )
|
||||
|
||||
|
||||
|
||||
#ifdef QT3
|
||||
#undef value
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,18 +26,10 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "effect_label.h"
|
||||
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtXml/QDomElement>
|
||||
#include <QtGui/QMouseEvent>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdom.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "effect_label.h"
|
||||
#include "effect_tab_widget.h"
|
||||
#include "sample_track.h"
|
||||
#include "embed.h"
|
||||
@@ -46,9 +38,6 @@
|
||||
#include "rename_dialog.h"
|
||||
#include "main_window.h"
|
||||
|
||||
#ifndef QT3
|
||||
#include <QtGui/QMouseEvent>
|
||||
#endif
|
||||
|
||||
|
||||
effectLabel::effectLabel( const QString & _initial_name, QWidget * _parent,
|
||||
@@ -72,9 +61,9 @@ effectLabel::effectLabel( const QString & _initial_name, QWidget * _parent,
|
||||
m_effWidget = new effectTabWidget( engine::getMainWindow()->workspace(),
|
||||
m_track,
|
||||
m_track->getAudioPort() );
|
||||
#ifndef QT3
|
||||
|
||||
engine::getMainWindow()->workspace()->addWindow( m_effWidget );
|
||||
#endif
|
||||
|
||||
m_effWidget->setFixedSize( 240, 242 );
|
||||
m_effWidget->hide();
|
||||
connect( m_effWidget, SIGNAL( closed() ),
|
||||
|
||||
Reference in New Issue
Block a user