diff options
Diffstat (limited to 'pacman-c++/block.cpp')
| -rw-r--r-- | pacman-c++/block.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pacman-c++/block.cpp b/pacman-c++/block.cpp index 6383b3a..87c69a7 100644 --- a/pacman-c++/block.cpp +++ b/pacman-c++/block.cpp | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | #include "block.h" | 1 | #include "block.h" |
| 2 | #include "constants.h" | 2 | #include "constants.h" |
| 3 | #include <QtGui> | 3 | #include <QtDebug> |
| 4 | 4 | ||
| 5 | std::map<Color, QPixmap> Block::m_pixmaps; | 5 | QMap<Color, QPixmap> Block::m_pixmaps; |
| 6 | 6 | ||
| 7 | Block::Block(Color color, QGraphicsItem *parent) | 7 | Block::Block(Color color, QGraphicsItem *parent) |
| 8 | : PixmapItem(parent) | 8 | : PixmapItem(parent) |
| @@ -12,6 +12,6 @@ Block::Block(Color color, QGraphicsItem *parent) | |||
| 12 | QString pixmapName = ":/" + QString("block%1").arg(color); | 12 | QString pixmapName = ":/" + QString("block%1").arg(color); |
| 13 | m_pixmaps[color] = QPixmap(pixmapName); | 13 | m_pixmaps[color] = QPixmap(pixmapName); |
| 14 | } | 14 | } |
| 15 | setPixmap(m_pixmaps.find(color)->second); | 15 | setPixmap(m_pixmaps.find(color).value()); |
| 16 | qDebug() << "loading block w color: " << color; | 16 | qDebug() << "loading block w color: " << color; |
| 17 | } | 17 | } |
