From f003b347917769a96cc27766b755a91693da869a Mon Sep 17 00:00:00 2001 From: Paul Giblock Date: Fri, 6 Jun 2008 08:55:59 +0000 Subject: [PATCH] Fix minor bug and compile time warnings git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1082 0778d3d1-df1d-0410-868b-ea421aaaa00d --- ChangeLog | 9 +++++++-- include/automatable_model.h | 4 ++-- include/effect_lib.h | 2 +- plugins/triple_oscillator/triple_oscillator.cpp | 2 +- src/core/lfo_controller.cpp | 7 ++++--- src/gui/controller_connection_dialog.cpp | 4 ++-- src/gui/widgets/tempo_sync_knob.cpp | 2 +- 7 files changed, 18 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index dd53117f2..535f6bb44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2008-06-05 Paul Giblock +2008-06-06 Paul Giblock * include/knob.h: * include/automatable_slider.h: @@ -46,7 +46,12 @@ * plugins/stk/mallets/mallets.cpp: * plugins/triple_oscillator/triple_oscillator.h: * plugins/triple_oscillator/triple_oscillator.cpp: - Update plugins to use displayName for children + - Update plugins to use displayName for child widgets + - Still need to do this to all of LMMS core + + * include/effect_lib.h: + * src/core/lfo_controller.cpp: + Fix compile time warnings 2008-06-05 Tobias Doerffel diff --git a/include/automatable_model.h b/include/automatable_model.h index 0cbd451ef..689200d33 100644 --- a/include/automatable_model.h +++ b/include/automatable_model.h @@ -285,10 +285,10 @@ private: float m_step; float m_range; - // most objects will need this temporarily + // most objects will need this temporarily (until sampleExact is standard) float m_oldValue; - bool m_journalEntryReady; QString m_displayName; + bool m_journalEntryReady; typedef QVector autoModelVector; autoModelVector m_linkedModels; diff --git a/include/effect_lib.h b/include/effect_lib.h index a06b93edc..382c3c7c2 100644 --- a/include/effect_lib.h +++ b/include/effect_lib.h @@ -448,7 +448,7 @@ namespace effectLib // Lou's Hack void setWideCoeff( const float _wideCoeff ) { - m_wideCoeff = _wideCoeff; + m_wideCoeff = static_cast( _wideCoeff ); } int getWideCoeff() diff --git a/plugins/triple_oscillator/triple_oscillator.cpp b/plugins/triple_oscillator/triple_oscillator.cpp index 85abf8ee8..3b60713db 100644 --- a/plugins/triple_oscillator/triple_oscillator.cpp +++ b/plugins/triple_oscillator/triple_oscillator.cpp @@ -87,7 +87,7 @@ oscillatorObject::oscillatorObject( model * _parent, track * _track, int _idx ) tr( "Osc %1 wave shape" ).arg( _idx+1 ) ), m_modulationAlgoModel( oscillator::SignalMix, 0, oscillator::NumModulationAlgos-1, this, - tr( "Modulation type " ).arg( _idx+1 ) ), + tr( "Modulation type %1" ).arg( _idx+1 ) ), m_sampleBuffer( new sampleBuffer ), m_volumeLeft( 0.0f ), diff --git a/src/core/lfo_controller.cpp b/src/core/lfo_controller.cpp index 823262cf2..b4a2b7139 100644 --- a/src/core/lfo_controller.cpp +++ b/src/core/lfo_controller.cpp @@ -87,8 +87,9 @@ float lfoController::value( int _offset ) // The new duration in frames // (Samples/Second) / (periods/second) = (Samples/cycle) - int newDuration = engine::getMixer()->processingSampleRate() / - m_lfoSpeedModel.value(); + int newDuration = static_cast( + engine::getMixer()->processingSampleRate() / + m_lfoSpeedModel.value() ); m_phaseOffset = m_lfoPhaseModel.value() * newDuration / 360.0; @@ -103,7 +104,7 @@ float lfoController::value( int _offset ) // where we SHOULD be according to new frequency // (factor*Samples) = Samples - int newFrameOffset = phase * newDuration; + int newFrameOffset = static_cast( phase * newDuration ); // recalc // (Samples - (Samples-Samples)) = Samples diff --git a/src/gui/controller_connection_dialog.cpp b/src/gui/controller_connection_dialog.cpp index 01410a177..1e2021770 100644 --- a/src/gui/controller_connection_dialog.cpp +++ b/src/gui/controller_connection_dialog.cpp @@ -118,11 +118,11 @@ controllerConnectionDialog::controllerConnectionDialog( QWidget * _parent, const automatableModel * _target_model ) : QDialog( _parent ), - m_controller( NULL ), - m_midiController( NULL ), m_readablePorts( NULL ), m_midiAutoDetect( FALSE ), + m_controller( NULL ), m_targetModel( _target_model ) + m_midiController( NULL ), { setWindowIcon( embed::getIconPixmap( "setup_audio" ) ); setWindowTitle( tr( "Connection Settings" ) ); diff --git a/src/gui/widgets/tempo_sync_knob.cpp b/src/gui/widgets/tempo_sync_knob.cpp index 492797875..671867d37 100644 --- a/src/gui/widgets/tempo_sync_knob.cpp +++ b/src/gui/widgets/tempo_sync_knob.cpp @@ -42,7 +42,7 @@ tempoSyncKnobModel::tempoSyncKnobModel( const float _val, const float _min, const float _max, const float _step, const float _scale, ::model * _parent, - const QString & _display_name = QString::null ) : + const QString & _display_name ) : knobModel( _val, _min, _max, _step, _parent, _display_name ), m_tempoSyncMode( SyncNone ), m_tempoLastSyncMode( SyncNone ),