Whole code base: various cleanups, removed SINGLE_SOURCE_COMPILE relicts

* cleaned up code and improved coding style
* removed old SINGLE_SOURCE_COMPILE macro relicts
* use QString::toUtf8() instead of QString::toAscii() wherever possible

(cherry picked from commit 0bb54199b0)
This commit is contained in:
Tobias Doerffel
2009-08-04 12:32:36 +02:00
parent f969b7d892
commit edf2d4d104
108 changed files with 99 additions and 380 deletions

View File

@@ -41,8 +41,6 @@
#include "string_pair_drag.h"
#include "mmp.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"
@@ -212,13 +210,13 @@ pluginView * audioFileProcessor::instantiateView( QWidget * _parent )
void audioFileProcessor::setAudioFile( const QString & _audio_file,
bool _rename )
bool _rename )
{
// is current channel-name equal to previous-filename??
if( _rename &&
if( _rename &&
( getInstrumentTrack()->name() ==
QFileInfo( m_sampleBuffer.audioFile() ).fileName() ||
m_sampleBuffer.audioFile() == "" ) )
m_sampleBuffer.audioFile().isEmpty() ) )
{
// then set it to new one
getInstrumentTrack()->setName( QFileInfo( _audio_file

View File

@@ -1,7 +1,7 @@
/*
* bass_booster.cpp - bass-booster-effect-plugin
*
* Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -25,8 +25,6 @@
#include "bass_booster.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"

View File

@@ -39,7 +39,6 @@
#include "tooltip.h"
#include "song.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"
extern "C"

View File

@@ -1,10 +1,10 @@
/*
* flp_import.cpp - support for importing FLP-files
*
* Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
@@ -22,7 +22,6 @@
*
*/
#include <QtXml/QDomDocument>
#include <QtGui/QApplication>
#include <QtGui/QProgressDialog>
@@ -1723,9 +1722,8 @@ p->putValue( jt->pos, value, false );
continue;
}
effectChain * ec = &engine::getFxMixer()->
getEffectChannel( it->fxChannel )->
m_fxChain;
printf("adding %s to %d\n", effName.toAscii().constData(),
getEffectChannel( it->fxChannel )->m_fxChain;
printf("adding %s to %d\n", effName.toUtf8().constData(),
it->fxChannel );
for( effectKeyList::iterator jt = effKeys.begin();
jt != effKeys.end(); ++jt )

View File

@@ -1,7 +1,7 @@
/*
* kicker.cpp - bassdrum-synthesizer
*
* Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -33,7 +33,6 @@
#include "note_play_handle.h"
#include "sweep_oscillator.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"

View File

@@ -37,13 +37,10 @@
#include "tab_bar.h"
#include "tab_button.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"
extern "C"
{

View File

@@ -38,8 +38,6 @@
#include "automation_pattern.h"
#include "controller_connection.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"

View File

@@ -44,7 +44,6 @@
#include "templates.h"
#include "tooltip.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"
#include "moc_lb302.cxx"

View File

@@ -40,7 +40,6 @@
#include "templates.h"
#include "audio_port.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"
#include "moc_lb303.cxx"

View File

@@ -39,7 +39,6 @@
#include "templates.h"
#include "tooltip.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"

View File

@@ -36,7 +36,6 @@
#include "tooltip.h"
#include "graph.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"
extern "C"

View File

@@ -22,7 +22,6 @@
*
*/
#include "patman.h"
#include <QtGui/QFileDialog>
@@ -40,7 +39,6 @@
#include "string_pair_drag.h"
#include "tooltip.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"

View File

@@ -1,5 +1,5 @@
/*
* stereo_matrix.cpp - stereo-matrix-effect-plugin
* peak_controller_effect.cpp - PeakController effect plugin
*
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail/dot/com>
*
@@ -28,8 +28,6 @@
#include "peak_controller.h"
#include "peak_controller_effect.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"

View File

@@ -1,5 +1,5 @@
/*
* stereo_matrix.h - stereo-matrix-effect-plugin
* peak_controller_effect.h - PeakController effect plugin
*
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail/dot/com>
*

View File

@@ -43,7 +43,6 @@
#include "tooltip.h"
#include "lcd_spinbox.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"

View File

@@ -40,7 +40,6 @@
#include "pixmap_button.h"
#include "tooltip.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"
#define C64_PAL_CYCLES_PER_SEC 985248

View File

@@ -1,7 +1,7 @@
/*
* spectrum_analyzer.cpp - spectrum analyzer plugin
*
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2008-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -22,11 +22,8 @@
*
*/
#include "spectrum_analyzer.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"

View File

@@ -1,7 +1,7 @@
/*
* stereo_enhancer.cpp - stereo-enhancer-effect-plugin
*
* Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -25,8 +25,6 @@
#include "stereo_enhancer.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"

View File

@@ -25,8 +25,6 @@
#include "stereo_matrix.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"

View File

@@ -22,7 +22,6 @@
*
*/
#include "mallets.h"
#include <QtCore/QDir>
@@ -36,7 +35,6 @@
#include "gui_templates.h"
#include "instrument_track.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"

View File

@@ -39,8 +39,6 @@
#include "song_editor.h"
#include "tooltip.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"

View File

@@ -22,7 +22,6 @@
*
*/
#include "vestige.h"
#include <QtGui/QDropEvent>
@@ -42,7 +41,6 @@
#include "text_float.h"
#include "tooltip.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"

View File

@@ -22,7 +22,6 @@
*
*/
#include <QtXml/QDomDocument>
#include <QtCore/QMap>
#include <QtGui/QWhatsThis>
@@ -40,7 +39,6 @@
#include "volume.h"
#include "song.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"

View File

@@ -244,7 +244,7 @@ void vstPlugin::loadSettings( const QDomElement & _this )
if( _this.hasAttribute( "chunk" ) )
{
loadChunk( QByteArray::fromBase64(
_this.attribute( "chunk" ).toAscii() ) );
_this.attribute( "chunk" ).toUtf8() ) );
}
else if( num_params > 0 )
{

View File

@@ -1,7 +1,7 @@
/*
* vst_effect.cpp - class for handling VST effect plugins
*
* Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -22,7 +22,6 @@
*
*/
#include "vst_effect.h"
#include <QtGui/QMessageBox>
@@ -31,8 +30,6 @@
#include "text_float.h"
#include "vst_subplugin_features.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"

View File

@@ -39,7 +39,6 @@
#include "string_pair_drag.h"
#include "remote_zynaddsubfx.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"
#include "moc_zynaddsubfx.cxx"