comparison data/fileio/PlaylistFileReader.cpp @ 1599:ce185d4dd408 bqaudiostream

Merge from default branch
author Chris Cannam
date Wed, 23 Jan 2019 14:43:43 +0000
parents 70e172e6cc59
children f36fef97ac81
comparison
equal deleted inserted replaced
1598:d2555df635ec 1599:ce185d4dd408
23 23
24 #include <iostream> 24 #include <iostream>
25 25
26 PlaylistFileReader::PlaylistFileReader(QString path) : 26 PlaylistFileReader::PlaylistFileReader(QString path) :
27 m_source(path), 27 m_source(path),
28 m_file(0) 28 m_file(nullptr)
29 { 29 {
30 if (!m_source.isAvailable()) { 30 if (!m_source.isAvailable()) {
31 m_error = QFile::tr("File or URL \"%1\" could not be retrieved") 31 m_error = QFile::tr("File or URL \"%1\" could not be retrieved")
32 .arg(path); 32 .arg(path);
33 return; 33 return;
35 init(); 35 init();
36 } 36 }
37 37
38 PlaylistFileReader::PlaylistFileReader(FileSource source) : 38 PlaylistFileReader::PlaylistFileReader(FileSource source) :
39 m_source(source), 39 m_source(source),
40 m_file(0) 40 m_file(nullptr)
41 { 41 {
42 if (!m_source.isAvailable()) { 42 if (!m_source.isAvailable()) {
43 m_error = QFile::tr("File or URL \"%1\" could not be retrieved") 43 m_error = QFile::tr("File or URL \"%1\" could not be retrieved")
44 .arg(source.getLocation()); 44 .arg(source.getLocation());
45 return; 45 return;
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 = nullptr;
87 } 87 }
88 } 88 }
89 89
90 bool 90 bool
91 PlaylistFileReader::isOK() const 91 PlaylistFileReader::isOK() const
92 { 92 {
93 return (m_file != 0); 93 return (m_file != nullptr);
94 } 94 }
95 95
96 QString 96 QString
97 PlaylistFileReader::getError() const 97 PlaylistFileReader::getError() const
98 { 98 {