Remove reading of .notes from LTMPopup

Last vestiges of references to the old .notes file which
is now deprecated fully and replaced with a metadata tag
"Notes".

If a .notes file exists it will be read in and used to
initialize the Notes metadata tag -- this is pre-existing
functionality and not changed with this patch, which is
just related to LTM Popup.

There are no other know references to the old .notes file
left in the active code.

Fixes #179.
This commit is contained in:
Mark Liversedge
2012-01-25 08:42:06 +00:00
parent 0c89278b22
commit 12ebeef2eb

View File

@@ -235,21 +235,7 @@ LTMPopup::rideSelected()
// update summary
metrics->setText(selected[index].toString(summary, useMetricUnits));
// read notes
QString filename = main->home.absolutePath() + "/" +
QFileInfo(selected[index].getFileName()).baseName() +
".notes";
QFile notesFile(filename);
// read it in if it exists
if (notesFile.exists() && notesFile.open(QFile::ReadOnly | QFile::Text)) {
QTextStream in(&notesFile);
notes->setText(in.readAll());
notesFile.close();
} else {
notes->setText("No notes recorded.");
}
notes->setText(selected[index].getText("Notes", ""));
}
resizeEvent(NULL);
}