From 12ebeef2eb89bcbda82fff3be37a4da1e9b16140 Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Wed, 25 Jan 2012 08:42:06 +0000 Subject: [PATCH] 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. --- src/LTMPopup.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/LTMPopup.cpp b/src/LTMPopup.cpp index bc31dc65d..093a8da26 100644 --- a/src/LTMPopup.cpp +++ b/src/LTMPopup.cpp @@ -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(¬esFile); - notes->setText(in.readAll()); - notesFile.close(); - } else { - notes->setText("No notes recorded."); - } + notes->setText(selected[index].getText("Notes", "")); } resizeEvent(NULL); }