Mercurial > hg > svapp
comparison framework/SVFileReader.cpp @ 228:67cea66bd588 debug-output
Remove most toStdString calls (no longer needed, with debug header)
author | Chris Cannam |
---|---|
date | Thu, 12 May 2011 17:31:56 +0100 |
parents | fe83e6e68683 |
children | 8c13e8219903 |
comparison
equal
deleted
inserted
replaced
219:85e59c901de9 | 228:67cea66bd588 |
---|---|
440 return false; | 440 return false; |
441 } | 441 } |
442 | 442 |
443 QString name = attributes.value("name"); | 443 QString name = attributes.value("name"); |
444 | 444 |
445 std::cerr << "SVFileReader::readModel: model name \"" << name.toStdString() << "\"" << std::endl; | 445 std::cerr << "SVFileReader::readModel: model name \"" << name << "\"" << std::endl; |
446 | 446 |
447 READ_MANDATORY(int, sampleRate, toInt); | 447 READ_MANDATORY(int, sampleRate, toInt); |
448 | 448 |
449 QString type = attributes.value("type").trimmed(); | 449 QString type = attributes.value("type").trimmed(); |
450 bool mainModel = (attributes.value("mainModel").trimmed() == "true"); | 450 bool mainModel = (attributes.value("mainModel").trimmed() == "true"); |
460 ProgressDialog dialog(tr("Opening file or URL..."), true, 2000); | 460 ProgressDialog dialog(tr("Opening file or URL..."), true, 2000); |
461 FileSource file(path, &dialog); | 461 FileSource file(path, &dialog); |
462 file.waitForStatus(); | 462 file.waitForStatus(); |
463 | 463 |
464 if (!file.isOK()) { | 464 if (!file.isOK()) { |
465 std::cerr << "SVFileReader::readModel: Failed to retrieve file \"" << path.toStdString() << "\" for wave file model: " << file.getErrorString().toStdString() << std::endl; | 465 std::cerr << "SVFileReader::readModel: Failed to retrieve file \"" << path << "\" for wave file model: " << file.getErrorString() << std::endl; |
466 } else if (!file.isAvailable()) { | 466 } else if (!file.isAvailable()) { |
467 std::cerr << "SVFileReader::readModel: Failed to retrieve file \"" << path.toStdString() << "\" for wave file model: Source unavailable" << std::endl; | 467 std::cerr << "SVFileReader::readModel: Failed to retrieve file \"" << path << "\" for wave file model: Source unavailable" << std::endl; |
468 } else { | 468 } else { |
469 | 469 |
470 file.waitForData(); | 470 file.waitForData(); |
471 | 471 |
472 size_t rate = 0; | 472 size_t rate = 0; |
1014 if (tm) { | 1014 if (tm) { |
1015 // std::cerr << "Current dataset is a text model" << std::endl; | 1015 // std::cerr << "Current dataset is a text model" << std::endl; |
1016 float height = 0.0; | 1016 float height = 0.0; |
1017 height = attributes.value("height").trimmed().toFloat(&ok); | 1017 height = attributes.value("height").trimmed().toFloat(&ok); |
1018 QString label = attributes.value("label"); | 1018 QString label = attributes.value("label"); |
1019 // std::cerr << "SVFileReader::addPointToDataset: TextModel: frame = " << frame << ", height = " << height << ", label = " << label.toStdString() << ", ok = " << ok << std::endl; | 1019 // std::cerr << "SVFileReader::addPointToDataset: TextModel: frame = " << frame << ", height = " << height << ", label = " << label << ", ok = " << ok << std::endl; |
1020 tm->addPoint(TextModel::Point(frame, height, label)); | 1020 tm->addPoint(TextModel::Point(frame, height, label)); |
1021 return ok; | 1021 return ok; |
1022 } | 1022 } |
1023 | 1023 |
1024 PathModel *pm = dynamic_cast<PathModel *>(m_currentDataset); | 1024 PathModel *pm = dynamic_cast<PathModel *>(m_currentDataset); |
1035 | 1035 |
1036 if (im) { | 1036 if (im) { |
1037 // std::cerr << "Current dataset is an image model" << std::endl; | 1037 // std::cerr << "Current dataset is an image model" << std::endl; |
1038 QString image = attributes.value("image"); | 1038 QString image = attributes.value("image"); |
1039 QString label = attributes.value("label"); | 1039 QString label = attributes.value("label"); |
1040 // std::cerr << "SVFileReader::addPointToDataset: ImageModel: frame = " << frame << ", image = " << image.toStdString() << ", label = " << label.toStdString() << ", ok = " << ok << std::endl; | 1040 // std::cerr << "SVFileReader::addPointToDataset: ImageModel: frame = " << frame << ", image = " << image << ", label = " << label << ", ok = " << ok << std::endl; |
1041 im->addPoint(ImageModel::Point(frame, image, label)); | 1041 im->addPoint(ImageModel::Point(frame, image, label)); |
1042 return ok; | 1042 return ok; |
1043 } | 1043 } |
1044 | 1044 |
1045 std::cerr << "WARNING: SV-XML: Point element found in non-point dataset" << std::endl; | 1045 std::cerr << "WARNING: SV-XML: Point element found in non-point dataset" << std::endl; |