|
From: Tapio V. <aa...@us...> - 2011-01-12 20:09:58
|
Module: editor
Branch: master
Commit: acdf61ef9e9838680d9211cb9ea6892a0f4f746a
Author: Tapio Vierros <tap...@gm...>
Date: Wed Jan 12 22:09:16 2011 +0200
Nice MessageBox tells about song loading error.
---
editorapp.cc | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/editorapp.cc b/editorapp.cc
index 193b207..f354fee 100644
--- a/editorapp.cc
+++ b/editorapp.cc
@@ -98,12 +98,9 @@ void EditorApp::on_actionOpen_triggered()
QFileInfo finfo(fileName);
try {
song.reset(new Song(QString(finfo.path()+"/").toStdString(), finfo.fileName().toStdString()));
- VocalTrack vt = song->getVocalTrack();
noteGraph->setLyrics(song->getVocalTrack().notes);
} catch (const std::exception& e) {
- // TODO: Error handling
- std::cerr << "Error loading song: " << finfo.filePath().toStdString() << std::endl;
- std::cerr << " --> " << e.what() << std::endl;
+ QMessageBox::critical(this, tr("Error loading file!"), e.what());
}
}
|