Remove deck brew by ZeldaZach

This commit is contained in:
Fabio Bas 2015-03-26 23:08:53 +01:00
parent 8ce5c5a276
commit 839da83d2c
7 changed files with 46 additions and 25 deletions

View file

@ -35,14 +35,19 @@ AbstractPriceUpdater::AbstractPriceUpdater(const DeckList *_deck)
*
* @param _deck deck.
*/
/*
DBPriceUpdater::DBPriceUpdater(const DeckList *_deck)
: AbstractPriceUpdater(_deck)
{
}
*/
/**
* Update the prices of the cards in deckList.
*/
/*
void DBPriceUpdater::updatePrices()
{
QString base = "https://api.deckbrew.com/mtg/cards", q = "";
@ -88,7 +93,9 @@ void DBPriceUpdater::updatePrices()
requestNext();
}
*/
/*
void DBPriceUpdater::requestNext()
{
if(urls.empty())
@ -99,10 +106,12 @@ void DBPriceUpdater::requestNext()
QNetworkReply *reply = nam->get(QNetworkRequest(url));
connect(reply, SIGNAL(finished()), this, SLOT(downloadFinished()));
}
*/
/**
* Called when the download of the json file with the prices is finished.
*/
/*
void DBPriceUpdater::downloadFinished()
{
QNetworkReply *reply = static_cast<QNetworkReply *>(sender());
@ -180,11 +189,11 @@ void DBPriceUpdater::downloadFinished()
float price = edition.value("price").toMap().value("median").toString().toFloat() / 100;
//qDebug() << "card " << name << " set " << set << " price " << price << endl;
/**
* Make sure Masters Edition (MED) isn't the set, as it doesn't
* physically exist. Also check the price to see that the cheapest set
* ends up as the final price.
*/
if (set != "MED" && price > 0 && (!cardsPrice.contains(name) || cardsPrice.value(name) > price))
cardsPrice.insert(name, price);
}
@ -212,3 +221,4 @@ void DBPriceUpdater::downloadFinished()
requestNext();
}
}
*/