Mercurial > hg > svcore
comparison base/ResourceFinder.cpp @ 690:1424aa29ae95
Seems to be a bad idea to use plain DEBUG symbol on OS/X (system wants it)
author | Chris Cannam |
---|---|
date | Tue, 14 Jun 2011 15:26:52 +0100 |
parents | 06f13a3b9e9e |
children | 66de0ad10bb3 b867c07478be |
comparison
equal
deleted
inserted
replaced
689:573d45e9487b | 690:1424aa29ae95 |
---|---|
150 for (QStringList::const_iterator i = prefixes.begin(); | 150 for (QStringList::const_iterator i = prefixes.begin(); |
151 i != prefixes.end(); ++i) { | 151 i != prefixes.end(); ++i) { |
152 | 152 |
153 QString prefix = *i; | 153 QString prefix = *i; |
154 | 154 |
155 DEBUG << "ResourceFinder::getResourcePath: Looking up file \"" << fileName << "\" for category \"" << resourceCat << "\" in prefix \"" << prefix << "\"" << endl; | 155 SVDEBUG << "ResourceFinder::getResourcePath: Looking up file \"" << fileName << "\" for category \"" << resourceCat << "\" in prefix \"" << prefix << "\"" << endl; |
156 | 156 |
157 QString path = | 157 QString path = |
158 QString("%1%2/%3").arg(prefix).arg(resourceCat).arg(fileName); | 158 QString("%1%2/%3").arg(prefix).arg(resourceCat).arg(fileName); |
159 if (QFileInfo(path).exists() && QFileInfo(path).isReadable()) { | 159 if (QFileInfo(path).exists() && QFileInfo(path).isReadable()) { |
160 std::cerr << "Found it!" << std::endl; | 160 std::cerr << "Found it!" << std::endl; |
276 if (!path.startsWith(':')) return true; | 276 if (!path.startsWith(':')) return true; |
277 | 277 |
278 // This is the lowest-priority alternative path for this | 278 // This is the lowest-priority alternative path for this |
279 // resource, so we know that there must be no installed copy. | 279 // resource, so we know that there must be no installed copy. |
280 // Install one to the user location. | 280 // Install one to the user location. |
281 DEBUG << "ResourceFinder::unbundleResource: File " << fileName << " is bundled, un-bundling it" << endl; | 281 SVDEBUG << "ResourceFinder::unbundleResource: File " << fileName << " is bundled, un-bundling it" << endl; |
282 QString target = getResourceSavePath(resourceCat, fileName); | 282 QString target = getResourceSavePath(resourceCat, fileName); |
283 QFile file(path); | 283 QFile file(path); |
284 if (!file.copy(target)) { | 284 if (!file.copy(target)) { |
285 std::cerr << "ResourceFinder::unbundleResource: ERROR: Failed to un-bundle resource file \"" << fileName << "\" to user location \"" << target << "\"" << std::endl; | 285 std::cerr << "ResourceFinder::unbundleResource: ERROR: Failed to un-bundle resource file \"" << fileName << "\" to user location \"" << target << "\"" << std::endl; |
286 return false; | 286 return false; |