mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 16:32:16 -07:00
Clean up some unnecessary classes in logging statements.
This commit is contained in:
parent
40d34e0f21
commit
839e241370
5 changed files with 34 additions and 34 deletions
|
|
@ -89,7 +89,7 @@ void PictureLoader::getPixmap(QPixmap &pixmap, CardInfoPtr card, QSize size)
|
|||
}
|
||||
|
||||
// add the card to the load queue
|
||||
qCDebug(PictureLoaderLog) << "PictureLoader: Enqueuing " << card->getName() << " for " << card->getPixmapCacheKey();
|
||||
qCDebug(PictureLoaderLog) << "Enqueuing " << card->getName() << " for " << card->getPixmapCacheKey();
|
||||
getInstance().worker->enqueueImageLoad(card);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ void PictureLoaderWorker::processLoadQueue()
|
|||
QString correctedCardName = cardBeingLoaded.getCard()->getCorrectedName();
|
||||
|
||||
qCDebug(PictureLoaderWorkerLog).nospace()
|
||||
<< "PictureLoader: [card: " << cardName << " set: " << setName << "]: Trying to load picture";
|
||||
<< "[card: " << cardName << " set: " << setName << "]: Trying to load picture";
|
||||
|
||||
if (CardDatabaseManager::getInstance()->isProviderIdForPreferredPrinting(
|
||||
cardName, cardBeingLoaded.getCard()->getPixmapCacheKey())) {
|
||||
|
|
@ -90,7 +90,7 @@ void PictureLoaderWorker::processLoadQueue()
|
|||
}
|
||||
}
|
||||
|
||||
qCDebug(PictureLoaderWorkerLog).nospace() << "PictureLoader: [card: " << cardName << " set: " << setName
|
||||
qCDebug(PictureLoaderWorkerLog).nospace() << "[card: " << cardName << " set: " << setName
|
||||
<< "]: No custom picture, trying to download";
|
||||
cardsToDownload.append(cardBeingLoaded);
|
||||
cardBeingLoaded.clear();
|
||||
|
|
@ -134,20 +134,20 @@ bool PictureLoaderWorker::cardImageExistsOnDisk(QString &setName, QString &corre
|
|||
imgReader.setFileName(_picsPath);
|
||||
if (imgReader.read(&image)) {
|
||||
qCDebug(PictureLoaderWorkerLog).nospace()
|
||||
<< "PictureLoader: [card: " << correctedCardname << " set: " << setName << "]: Picture found on disk.";
|
||||
<< "[card: " << correctedCardname << " set: " << setName << "]: Picture found on disk.";
|
||||
imageLoaded(cardBeingLoaded.getCard(), image);
|
||||
return true;
|
||||
}
|
||||
imgReader.setFileName(_picsPath + ".full");
|
||||
if (imgReader.read(&image)) {
|
||||
qCDebug(PictureLoaderWorkerLog).nospace() << "PictureLoader: [card: " << correctedCardname
|
||||
qCDebug(PictureLoaderWorkerLog).nospace() << "[card: " << correctedCardname
|
||||
<< " set: " << setName << "]: Picture.full found on disk.";
|
||||
imageLoaded(cardBeingLoaded.getCard(), image);
|
||||
return true;
|
||||
}
|
||||
imgReader.setFileName(_picsPath + ".xlhq");
|
||||
if (imgReader.read(&image)) {
|
||||
qCDebug(PictureLoaderWorkerLog).nospace() << "PictureLoader: [card: " << correctedCardname
|
||||
qCDebug(PictureLoaderWorkerLog).nospace() << "[card: " << correctedCardname
|
||||
<< " set: " << setName << "]: Picture.xlhq found on disk.";
|
||||
imageLoaded(cardBeingLoaded.getCard(), image);
|
||||
return true;
|
||||
|
|
@ -177,7 +177,7 @@ void PictureLoaderWorker::startNextPicDownload()
|
|||
} else {
|
||||
QUrl url(picUrl);
|
||||
qCDebug(PictureLoaderWorkerLog).nospace()
|
||||
<< "PictureLoader: [card: " << cardBeingDownloaded.getCard()->getCorrectedName()
|
||||
<< "[card: " << cardBeingDownloaded.getCard()->getCorrectedName()
|
||||
<< " set: " << cardBeingDownloaded.getSetName() << "]: Trying to fetch picture from url "
|
||||
<< url.toDisplayString();
|
||||
makeRequest(url);
|
||||
|
|
@ -196,7 +196,7 @@ void PictureLoaderWorker::picDownloadFailed()
|
|||
mutex.unlock();
|
||||
} else {
|
||||
qCDebug(PictureLoaderWorkerLog).nospace()
|
||||
<< "PictureLoader: [card: " << cardBeingDownloaded.getCard()->getCorrectedName()
|
||||
<< "[card: " << cardBeingDownloaded.getCard()->getCorrectedName()
|
||||
<< " set: " << cardBeingDownloaded.getSetName() << "]: Picture NOT found, "
|
||||
<< (picDownload ? "download failed" : "downloads disabled")
|
||||
<< ", no more url combinations to try: BAILING OUT";
|
||||
|
|
@ -218,7 +218,7 @@ QNetworkReply *PictureLoaderWorker::makeRequest(const QUrl &url)
|
|||
QUrl cachedRedirect = getCachedRedirect(url);
|
||||
if (!cachedRedirect.isEmpty()) {
|
||||
qCDebug(PictureLoaderWorkerLog).nospace()
|
||||
<< "PictureLoader: [card: " << cardBeingDownloaded.getCard()->getCorrectedName()
|
||||
<< "[card: " << cardBeingDownloaded.getCard()->getCorrectedName()
|
||||
<< " set: " << cardBeingDownloaded.getSetName() << "]: Using cached redirect for " << url.toDisplayString()
|
||||
<< " to " << cachedRedirect.toDisplayString();
|
||||
return makeRequest(cachedRedirect); // Use the cached redirect
|
||||
|
|
@ -243,7 +243,7 @@ QNetworkReply *PictureLoaderWorker::makeRequest(const QUrl &url)
|
|||
|
||||
cacheRedirect(url, redirectUrl);
|
||||
qCDebug(PictureLoaderWorkerLog).nospace()
|
||||
<< "PictureLoader: [card: " << cardBeingDownloaded.getCard()->getCorrectedName()
|
||||
<< "[card: " << cardBeingDownloaded.getCard()->getCorrectedName()
|
||||
<< " set: " << cardBeingDownloaded.getSetName() << "]: Caching redirect from " << url.toDisplayString()
|
||||
<< " to " << redirectUrl.toDisplayString();
|
||||
}
|
||||
|
|
@ -323,7 +323,7 @@ void PictureLoaderWorker::picDownloadFinished(QNetworkReply *reply)
|
|||
if (reply->error()) {
|
||||
if (isFromCache) {
|
||||
qCDebug(PictureLoaderWorkerLog).nospace()
|
||||
<< "PictureLoader: [card: " << cardBeingDownloaded.getCard()->getName()
|
||||
<< "[card: " << cardBeingDownloaded.getCard()->getName()
|
||||
<< " set: " << cardBeingDownloaded.getSetName() << "]: Removing corrupted cache file for url "
|
||||
<< reply->url().toDisplayString() << " and retrying (" << reply->errorString() << ")";
|
||||
|
||||
|
|
@ -332,7 +332,7 @@ void PictureLoaderWorker::picDownloadFinished(QNetworkReply *reply)
|
|||
makeRequest(reply->url());
|
||||
} else {
|
||||
qCDebug(PictureLoaderWorkerLog).nospace()
|
||||
<< "PictureLoader: [card: " << cardBeingDownloaded.getCard()->getName()
|
||||
<< "[card: " << cardBeingDownloaded.getCard()->getName()
|
||||
<< " set: " << cardBeingDownloaded.getSetName() << "]: " << (picDownload ? "Download" : "Cache search")
|
||||
<< " failed for url " << reply->url().toDisplayString() << " (" << reply->errorString() << ")";
|
||||
|
||||
|
|
@ -350,7 +350,7 @@ void PictureLoaderWorker::picDownloadFinished(QNetworkReply *reply)
|
|||
statusCode == 308) {
|
||||
QUrl redirectUrl = reply->header(QNetworkRequest::LocationHeader).toUrl();
|
||||
qCDebug(PictureLoaderWorkerLog).nospace()
|
||||
<< "PictureLoader: [card: " << cardBeingDownloaded.getCard()->getName()
|
||||
<< "[card: " << cardBeingDownloaded.getCard()->getName()
|
||||
<< " set: " << cardBeingDownloaded.getSetName() << "]: following "
|
||||
<< (isFromCache ? "cached redirect" : "redirect") << " to " << redirectUrl.toDisplayString();
|
||||
makeRequest(redirectUrl);
|
||||
|
|
@ -363,7 +363,7 @@ void PictureLoaderWorker::picDownloadFinished(QNetworkReply *reply)
|
|||
|
||||
if (imageIsBlackListed(picData)) {
|
||||
qCDebug(PictureLoaderWorkerLog).nospace()
|
||||
<< "PictureLoader: [card: " << cardBeingDownloaded.getCard()->getName()
|
||||
<< "[card: " << cardBeingDownloaded.getCard()->getName()
|
||||
<< " set: " << cardBeingDownloaded.getSetName()
|
||||
<< "]: Picture found, but blacklisted, will consider it as not found";
|
||||
|
||||
|
|
@ -399,7 +399,7 @@ void PictureLoaderWorker::picDownloadFinished(QNetworkReply *reply)
|
|||
logSuccessMessage = true;
|
||||
} else {
|
||||
qCDebug(PictureLoaderWorkerLog).nospace()
|
||||
<< "PictureLoader: [card: " << cardBeingDownloaded.getCard()->getName()
|
||||
<< "[card: " << cardBeingDownloaded.getCard()->getName()
|
||||
<< " set: " << cardBeingDownloaded.getSetName() << "]: Possible " << (isFromCache ? "cached" : "downloaded")
|
||||
<< " picture at " << reply->url().toDisplayString() << " could not be loaded: " << reply->errorString();
|
||||
|
||||
|
|
@ -408,7 +408,7 @@ void PictureLoaderWorker::picDownloadFinished(QNetworkReply *reply)
|
|||
|
||||
if (logSuccessMessage) {
|
||||
qCDebug(PictureLoaderWorkerLog).nospace()
|
||||
<< "PictureLoader: [card: " << cardBeingDownloaded.getCard()->getName()
|
||||
<< "[card: " << cardBeingDownloaded.getCard()->getName()
|
||||
<< " set: " << cardBeingDownloaded.getSetName() << "]: Image successfully "
|
||||
<< (isFromCache ? "loaded from cached" : "downloaded from") << " url " << reply->url().toDisplayString();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -582,7 +582,7 @@ LoadStatus CardDatabase::loadCardDatabase(const QString &path)
|
|||
}
|
||||
|
||||
int msecs = startTime.msecsTo(QTime::currentTime());
|
||||
qCDebug(CardDatabaseLoadingLog) << "[CardDatabase] loadCardDatabase(): Path =" << path
|
||||
qCDebug(CardDatabaseLoadingLog) << "Path =" << path
|
||||
<< "Status =" << tempLoadStatus << "Cards =" << cards.size()
|
||||
<< "Sets =" << sets.size() << QString("%1ms").arg(msecs);
|
||||
|
||||
|
|
@ -593,7 +593,7 @@ LoadStatus CardDatabase::loadCardDatabases()
|
|||
{
|
||||
reloadDatabaseMutex->lock();
|
||||
|
||||
qCDebug(CardDatabaseLoadingLog) << "CardDatabase::loadCardDatabases start";
|
||||
qCDebug(CardDatabaseLoadingLog) << "Started";
|
||||
|
||||
clear(); // remove old db
|
||||
|
||||
|
|
@ -627,10 +627,10 @@ LoadStatus CardDatabase::loadCardDatabases()
|
|||
|
||||
if (loadStatus == Ok) {
|
||||
checkUnknownSets(); // update deck editors, etc
|
||||
qCDebug(CardDatabaseLoadingSuccessOrFailureLog) << "CardDatabase::loadCardDatabases success";
|
||||
qCDebug(CardDatabaseLoadingSuccessOrFailureLog) << "Success";
|
||||
emit cardDatabaseLoadingFinished();
|
||||
} else {
|
||||
qCDebug(CardDatabaseLoadingSuccessOrFailureLog) << "CardDatabase::loadCardDatabases failed";
|
||||
qCDebug(CardDatabaseLoadingSuccessOrFailureLog) << "Failed";
|
||||
emit cardDatabaseLoadingFailed(); // bring up the settings dialog
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@
|
|||
|
||||
bool CockatriceXml3Parser::getCanParseFile(const QString &fileName, QIODevice &device)
|
||||
{
|
||||
qCDebug(CockatriceXml3Log) << "[CockatriceXml3Parser] Trying to parse: " << fileName;
|
||||
qCDebug(CockatriceXml3Log) << "Trying to parse: " << fileName;
|
||||
|
||||
if (!fileName.endsWith(".xml", Qt::CaseInsensitive)) {
|
||||
qCDebug(CockatriceXml3Log) << "[CockatriceXml3Parser] Parsing failed: wrong extension";
|
||||
qCDebug(CockatriceXml3Log) << "Parsing failed: wrong extension";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -28,12 +28,12 @@ bool CockatriceXml3Parser::getCanParseFile(const QString &fileName, QIODevice &d
|
|||
if (version == COCKATRICE_XML3_TAGVER) {
|
||||
return true;
|
||||
} else {
|
||||
qCDebug(CockatriceXml3Log) << "[CockatriceXml3Parser] Parsing failed: wrong version" << version;
|
||||
qCDebug(CockatriceXml3Log) << "Parsing failed: wrong version" << version;
|
||||
return false;
|
||||
}
|
||||
|
||||
} else {
|
||||
qCDebug(CockatriceXml3Log) << "[CockatriceXml3Parser] Parsing failed: wrong element tag" << xml.name();
|
||||
qCDebug(CockatriceXml3Log) << "Parsing failed: wrong element tag" << xml.name();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -59,7 +59,7 @@ void CockatriceXml3Parser::parseFile(QIODevice &device)
|
|||
loadCardsFromXml(xml);
|
||||
} else if (!name.isEmpty()) {
|
||||
qCDebug(CockatriceXml3Log)
|
||||
<< "[CockatriceXml3Parser] Unknown item" << name << ", trying to continue anyway";
|
||||
<< "Unknown item" << name << ", trying to continue anyway";
|
||||
xml.skipCurrentElement();
|
||||
}
|
||||
}
|
||||
|
|
@ -95,7 +95,7 @@ void CockatriceXml3Parser::loadSetsFromXml(QXmlStreamReader &xml)
|
|||
QDate::fromString(xml.readElementText(QXmlStreamReader::IncludeChildElements), Qt::ISODate);
|
||||
} else if (!name.isEmpty()) {
|
||||
qCDebug(CockatriceXml3Log)
|
||||
<< "[CockatriceXml3Parser] Unknown set property" << name << ", trying to continue anyway";
|
||||
<< "Unknown set property" << name << ", trying to continue anyway";
|
||||
xml.skipCurrentElement();
|
||||
}
|
||||
}
|
||||
|
|
@ -266,7 +266,7 @@ void CockatriceXml3Parser::loadCardsFromXml(QXmlStreamReader &xml)
|
|||
}
|
||||
} else if (!xmlName.isEmpty()) {
|
||||
qCDebug(CockatriceXml3Log)
|
||||
<< "[CockatriceXml3Parser] Unknown card property" << xmlName << ", trying to continue anyway";
|
||||
<< "Unknown card property" << xmlName << ", trying to continue anyway";
|
||||
xml.skipCurrentElement();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@
|
|||
|
||||
bool CockatriceXml4Parser::getCanParseFile(const QString &fileName, QIODevice &device)
|
||||
{
|
||||
qCDebug(CockatriceXml4Log) << "[CockatriceXml4Parser] Trying to parse: " << fileName;
|
||||
qCDebug(CockatriceXml4Log) << "Trying to parse: " << fileName;
|
||||
|
||||
if (!fileName.endsWith(".xml", Qt::CaseInsensitive)) {
|
||||
qCDebug(CockatriceXml4Log) << "[CockatriceXml4Parser] Parsing failed: wrong extension";
|
||||
qCDebug(CockatriceXml4Log) << "Parsing failed: wrong extension";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -28,12 +28,12 @@ bool CockatriceXml4Parser::getCanParseFile(const QString &fileName, QIODevice &d
|
|||
if (version == COCKATRICE_XML4_TAGVER) {
|
||||
return true;
|
||||
} else {
|
||||
qCDebug(CockatriceXml4Log) << "[CockatriceXml4Parser] Parsing failed: wrong version" << version;
|
||||
qCDebug(CockatriceXml4Log) << "Parsing failed: wrong version" << version;
|
||||
return false;
|
||||
}
|
||||
|
||||
} else {
|
||||
qCDebug(CockatriceXml4Log) << "[CockatriceXml4Parser] Parsing failed: wrong element tag" << xml.name();
|
||||
qCDebug(CockatriceXml4Log) << "Parsing failed: wrong element tag" << xml.name();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -59,7 +59,7 @@ void CockatriceXml4Parser::parseFile(QIODevice &device)
|
|||
loadCardsFromXml(xml);
|
||||
} else if (!xmlName.isEmpty()) {
|
||||
qCDebug(CockatriceXml4Log)
|
||||
<< "[CockatriceXml4Parser] Unknown item" << xmlName << ", trying to continue anyway";
|
||||
<< "Unknown item" << xmlName << ", trying to continue anyway";
|
||||
xml.skipCurrentElement();
|
||||
}
|
||||
}
|
||||
|
|
@ -98,7 +98,7 @@ void CockatriceXml4Parser::loadSetsFromXml(QXmlStreamReader &xml)
|
|||
priority = xml.readElementText(QXmlStreamReader::IncludeChildElements).toShort();
|
||||
} else if (!xmlName.isEmpty()) {
|
||||
qCDebug(CockatriceXml4Log)
|
||||
<< "[CockatriceXml4Parser] Unknown set property" << xmlName << ", trying to continue anyway";
|
||||
<< "Unknown set property" << xmlName << ", trying to continue anyway";
|
||||
xml.skipCurrentElement();
|
||||
}
|
||||
}
|
||||
|
|
@ -232,7 +232,7 @@ void CockatriceXml4Parser::loadCardsFromXml(QXmlStreamReader &xml)
|
|||
}
|
||||
} else if (!xmlName.isEmpty()) {
|
||||
qCDebug(CockatriceXml4Log)
|
||||
<< "[CockatriceXml4Parser] Unknown card property" << xmlName << ", trying to continue anyway";
|
||||
<< "Unknown card property" << xmlName << ", trying to continue anyway";
|
||||
xml.skipCurrentElement();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue