Commit 387137fb authored by Zach's avatar Zach
Browse files

Merge pull request #1292 from ctrlaltca/fix_compile_debug

fix compilation with gcc in paranoic mode
parents f3ee1eac 119871d1
......@@ -241,7 +241,7 @@ QSizeF DeckViewCardContainer::calculateBoundingRect(const QList<QPair<int, int>
return QSizeF(getCardTypeTextWidth() + totalWidth, totalHeight + separatorY + paddingY);
}
bool sortCardsByName(DeckViewCard * c1, DeckViewCard * c2)
bool DeckViewCardContainer::sortCardsByName(DeckViewCard * c1, DeckViewCard * c2)
{
if (c1 && c2)
return c1->getName() < c2->getName();
......@@ -264,7 +264,7 @@ void DeckViewCardContainer::rearrangeItems(const QList<QPair<int, int> > &rowsAn
QList<QString> cardTypeList = cardsByType.uniqueKeys();
QList<DeckViewCard *> row = cardsByType.values(cardTypeList[i]);
qSort( row.begin(), row.end(), sortCardsByName);
qSort( row.begin(), row.end(), DeckViewCardContainer::sortCardsByName);
for (int j = 0; j < row.size(); ++j) {
DeckViewCard *card = row[j];
card->setPos(x + (j % tempCols) * CARD_WIDTH, yUntilNow + (j / tempCols) * CARD_HEIGHT);
......
......@@ -46,6 +46,7 @@ class DeckViewCardContainer : public QGraphicsItem {
private:
static const int separatorY = 20;
static const int paddingY = 10;
static bool sortCardsByName(DeckViewCard * c1, DeckViewCard * c2);
QString name;
QList<DeckViewCard *> cards;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment