Mercurial > hg > svcore
diff data/fileio/CSVFileReader.cpp @ 1036:682d64f05e72
Merge
author | Chris Cannam |
---|---|
date | Mon, 02 Mar 2015 17:21:34 +0000 |
parents | 920699b6989d |
children | cc27f35aa75c |
line wrap: on
line diff
--- a/data/fileio/CSVFileReader.cpp Mon Mar 02 17:17:59 2015 +0000 +++ b/data/fileio/CSVFileReader.cpp Mon Mar 02 17:21:34 2015 +0000 @@ -26,6 +26,7 @@ #include "DataFileReaderFactory.h" #include <QFile> +#include <QFileInfo> #include <QString> #include <QRegExp> #include <QStringList> @@ -55,6 +56,7 @@ if (good) { m_device = file; + m_filename = QFileInfo(path).fileName(); } else { delete file; } @@ -263,6 +265,12 @@ model = model3; break; } + + if (model) { + if (m_filename != "") { + model->setObjectName(m_filename); + } + } } float value = 0.f;