Mercurial > hg > svcore
comparison data/fileio/PlaylistFileReader.cpp @ 1429:48e9f538e6e9
Untabify
| author | Chris Cannam |
|---|---|
| date | Thu, 01 Mar 2018 18:02:22 +0000 |
| parents | f5cd33909744 |
| children | 70e172e6cc59 |
comparison
equal
deleted
inserted
replaced
| 1428:87ae75da6527 | 1429:48e9f538e6e9 |
|---|---|
| 64 | 64 |
| 65 m_file = new QFile(filename); | 65 m_file = new QFile(filename); |
| 66 bool good = false; | 66 bool good = false; |
| 67 | 67 |
| 68 if (!m_file->exists()) { | 68 if (!m_file->exists()) { |
| 69 m_error = QFile::tr("File \"%1\" does not exist") | 69 m_error = QFile::tr("File \"%1\" does not exist") |
| 70 .arg(m_source.getLocation()); | 70 .arg(m_source.getLocation()); |
| 71 } else if (!m_file->open(QIODevice::ReadOnly | QIODevice::Text)) { | 71 } else if (!m_file->open(QIODevice::ReadOnly | QIODevice::Text)) { |
| 72 m_error = QFile::tr("Failed to open file \"%1\"") | 72 m_error = QFile::tr("Failed to open file \"%1\"") |
| 73 .arg(m_source.getLocation()); | 73 .arg(m_source.getLocation()); |
| 74 } else { | 74 } else { |
| 75 good = true; | 75 good = true; |
| 76 } | 76 } |
| 77 | 77 |
| 78 if (good) { | 78 if (good) { |
| 79 if (!m_source.isRemote()) { | 79 if (!m_source.isRemote()) { |
| 80 m_basedir = QFileInfo(filename).dir().canonicalPath(); | 80 m_basedir = QFileInfo(filename).dir().canonicalPath(); |
| 81 } | 81 } |
| 82 } | 82 } |
| 83 | 83 |
| 84 if (!good) { | 84 if (!good) { |
| 85 delete m_file; | 85 delete m_file; |
| 86 m_file = 0; | 86 m_file = 0; |
| 87 } | 87 } |
| 88 } | 88 } |
| 89 | 89 |
| 90 bool | 90 bool |
| 91 PlaylistFileReader::isOK() const | 91 PlaylistFileReader::isOK() const |
