Mercurial > hg > svcore
comparison base/ResourceFinder.cpp @ 687:06f13a3b9e9e debug-output
Convert many cerrs to DEBUGs
author | Chris Cannam |
---|---|
date | Mon, 16 May 2011 17:19:09 +0100 |
parents | b4a8d8221eaf |
children | 1424aa29ae95 |
comparison
equal
deleted
inserted
replaced
686:b4a8d8221eaf | 687:06f13a3b9e9e |
---|---|
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 std::cerr << "ResourceFinder::getResourcePath: Looking up file \"" << fileName << "\" for category \"" << resourceCat << "\" in prefix \"" << prefix << "\"" << std::endl; | 155 DEBUG << "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 std::cerr << "ResourceFinder::unbundleResource: File " << fileName << " is bundled, un-bundling it" << std::endl; | 281 DEBUG << "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; |