Mercurial > hg > svcore
comparison data/fileio/PlaylistFileReader.cpp @ 1527:710e6250a401 zoom
Merge from default branch
author | Chris Cannam |
---|---|
date | Mon, 17 Sep 2018 13:51:14 +0100 |
parents | 48e9f538e6e9 |
children | 70e172e6cc59 |
comparison
equal
deleted
inserted
replaced
1324:d4a28d1479a8 | 1527:710e6250a401 |
---|---|
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 |