Mercurial > hg > svcore
comparison data/fileio/CachedFile.cpp @ 691:b99dc5465b80
Seems check() is also sometimes defined on OS/X
author | Chris Cannam |
---|---|
date | Tue, 14 Jun 2011 15:28:42 +0100 |
parents | 1424aa29ae95 |
children | e802e550a1f2 |
comparison
equal
deleted
inserted
replaced
690:1424aa29ae95 | 691:b99dc5465b80 |
---|---|
78 { | 78 { |
79 Profiler p("CachedFile::CachedFile[1]"); | 79 Profiler p("CachedFile::CachedFile[1]"); |
80 | 80 |
81 SVDEBUG << "CachedFile::CachedFile: origin is \"" | 81 SVDEBUG << "CachedFile::CachedFile: origin is \"" |
82 << origin << "\"" << endl; | 82 << origin << "\"" << endl; |
83 check(); | 83 checkFile(); |
84 } | 84 } |
85 | 85 |
86 CachedFile::CachedFile(QUrl url, | 86 CachedFile::CachedFile(QUrl url, |
87 ProgressReporter *reporter, | 87 ProgressReporter *reporter, |
88 QString preferredContentType) : | 88 QString preferredContentType) : |
93 { | 93 { |
94 Profiler p("CachedFile::CachedFile[2]"); | 94 Profiler p("CachedFile::CachedFile[2]"); |
95 | 95 |
96 SVDEBUG << "CachedFile::CachedFile: url is \"" | 96 SVDEBUG << "CachedFile::CachedFile: url is \"" |
97 << url.toString() << "\"" << endl; | 97 << url.toString() << "\"" << endl; |
98 check(); | 98 checkFile(); |
99 } | 99 } |
100 | 100 |
101 CachedFile::~CachedFile() | 101 CachedFile::~CachedFile() |
102 { | 102 { |
103 } | 103 } |
113 { | 113 { |
114 return m_localFilename; | 114 return m_localFilename; |
115 } | 115 } |
116 | 116 |
117 void | 117 void |
118 CachedFile::check() | 118 CachedFile::checkFile() |
119 { | 119 { |
120 //!!! n.b. obvious race condition here if different CachedFile | 120 //!!! n.b. obvious race condition here if different CachedFile |
121 // objects for same url used in more than one thread -- need to | 121 // objects for same url used in more than one thread -- need to |
122 // lock appropriately. also consider race condition between | 122 // lock appropriately. also consider race condition between |
123 // separate instances of the program! | 123 // separate instances of the program! |