comparison transform/ModelTransformerFactory.cpp @ 687:06f13a3b9e9e debug-output

Convert many cerrs to DEBUGs
author Chris Cannam
date Mon, 16 May 2011 17:19:09 +0100
parents b4a8d8221eaf
children 1424aa29ae95
comparison
equal deleted inserted replaced
686:b4a8d8221eaf 687:06f13a3b9e9e
179 179
180 transformer = 180 transformer =
181 new RealTimeEffectModelTransformer(input, transform); 181 new RealTimeEffectModelTransformer(input, transform);
182 182
183 } else { 183 } else {
184 std::cerr << "ModelTransformerFactory::createTransformer: Unknown transform \"" 184 DEBUG << "ModelTransformerFactory::createTransformer: Unknown transform \""
185 << transform.getIdentifier() << "\"" << std::endl; 185 << transform.getIdentifier() << "\"" << endl;
186 return transformer; 186 return transformer;
187 } 187 }
188 188
189 if (transformer) transformer->setObjectName(transform.getIdentifier()); 189 if (transformer) transformer->setObjectName(transform.getIdentifier());
190 return transformer; 190 return transformer;
193 Model * 193 Model *
194 ModelTransformerFactory::transform(const Transform &transform, 194 ModelTransformerFactory::transform(const Transform &transform,
195 const ModelTransformer::Input &input, 195 const ModelTransformer::Input &input,
196 QString &message) 196 QString &message)
197 { 197 {
198 std::cerr << "ModelTransformerFactory::transform: Constructing transformer with input model " << input.getModel() << std::endl; 198 DEBUG << "ModelTransformerFactory::transform: Constructing transformer with input model " << input.getModel() << endl;
199 199
200 ModelTransformer *t = createTransformer(transform, input); 200 ModelTransformer *t = createTransformer(transform, input);
201 if (!t) return 0; 201 if (!t) return 0;
202 202
203 connect(t, SIGNAL(finished()), this, SLOT(transformerFinished())); 203 connect(t, SIGNAL(finished()), this, SLOT(transformerFinished()));
234 ModelTransformerFactory::transformerFinished() 234 ModelTransformerFactory::transformerFinished()
235 { 235 {
236 QObject *s = sender(); 236 QObject *s = sender();
237 ModelTransformer *transformer = dynamic_cast<ModelTransformer *>(s); 237 ModelTransformer *transformer = dynamic_cast<ModelTransformer *>(s);
238 238
239 // std::cerr << "ModelTransformerFactory::transformerFinished(" << transformer << ")" << std::endl; 239 // DEBUG << "ModelTransformerFactory::transformerFinished(" << transformer << ")" << endl;
240 240
241 if (!transformer) { 241 if (!transformer) {
242 std::cerr << "WARNING: ModelTransformerFactory::transformerFinished: sender is not a transformer" << std::endl; 242 std::cerr << "WARNING: ModelTransformerFactory::transformerFinished: sender is not a transformer" << std::endl;
243 return; 243 return;
244 } 244 }