From 4685223110585f76f047c0d77d1d178e08b9113b Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Thu, 3 Jan 2008 00:52:38 +0000 Subject: [PATCH] make dummyEffect really work in case we need it, extended copyright from 2007 to 2008 git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.3@636 0778d3d1-df1d-0410-868b-ea421aaaa00d --- ChangeLog | 10 ++++++++++ README | 2 +- include/dummy_effect.h | 28 +++++++++++++++++++++++++--- src/core/about_dialog.cpp | 4 ++-- src/core/effect.cpp | 2 +- 5 files changed, 39 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index c9fa8eaef..02e2c0a68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-01-02 Tobias Doerffel + + * include/dummy_effect.h: + * src/core/effect.cpp: + make dummyEffect really work in case we need it + + * README: + * src/core/about_dialog.cpp: + extended copyright from 2007 to 2008 + 2007-12-27 Tobias Doerffel * src/core/track_container.cpp: diff --git a/README b/README index 8b6b14b73..1adf4ec3f 100644 --- a/README +++ b/README @@ -1,7 +1,7 @@ Linux MultiMedia Studio 0.3.0 ============================== -Copyright (c) 2004-2007 by LMMS-developers +Copyright (c) 2004-2008 by LMMS-developers This program is free software; you can redistribute it and/or modify diff --git a/include/dummy_effect.h b/include/dummy_effect.h index 274c179e3..435b4ae00 100644 --- a/include/dummy_effect.h +++ b/include/dummy_effect.h @@ -1,7 +1,7 @@ /* * dummy_effect.h - effect used as fallback if an effect couldn't be loaded * - * Copyright (c) 2006 Tobias Doerffel + * Copyright (c) 2006-2008 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -27,6 +27,29 @@ #define _DUMMY_EFFECT_H #include "effect.h" +#include "effect_control_dialog.h" + + +class dummyEffectControlDialog : public effectControlDialog +{ +public: + dummyEffectControlDialog( effect * _eff ) : + effectControlDialog( NULL, _eff ) + { + } + + virtual ch_cnt_t getControlCount( void ) + { + return( 0 ); + } + + inline virtual QString nodeName( void ) const + { + return( "dummycontrols" ); + } + +} ; + class dummyEffect : public effect @@ -57,8 +80,7 @@ public: inline virtual effectControlDialog * createControlDialog( track * ) { - // TODO: setup a dummy control-dialog for not crashing LMMS - return( NULL ); + return( new dummyEffectControlDialog( this ) ); } } ; diff --git a/src/core/about_dialog.cpp b/src/core/about_dialog.cpp index 0ea952235..78b974622 100644 --- a/src/core/about_dialog.cpp +++ b/src/core/about_dialog.cpp @@ -3,7 +3,7 @@ /* * about_dialog.cpp - implementation of about-dialog * - * Copyright (c) 2004-2007 Tobias Doerffel + * Copyright (c) 2004-2008 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -73,7 +73,7 @@ aboutDialog::aboutDialog() : QLabel * about_lbl = new QLabel( tr( "LMMS - A powerful " "synthesizer-studio\n\n" - "Copyright (c) 2004-2007 " + "Copyright (c) 2004-2008 " "LMMS-Developers\n\n" "http://lmms.sourceforge.net" ) #ifndef QT4 diff --git a/src/core/effect.cpp b/src/core/effect.cpp index 75ed1244f..8bdd6ef82 100644 --- a/src/core/effect.cpp +++ b/src/core/effect.cpp @@ -44,7 +44,7 @@ effect::effect( const plugin::descriptor * _desc, const descriptor::subPluginFeatures::key * _key ) : plugin( _desc ), - m_key( *_key ), + m_key( _key ? *_key : descriptor::subPluginFeatures::key() ), m_okay( TRUE ), m_noRun( FALSE ), m_running( FALSE ),