Qt: Fix a handful of warnings

This commit is contained in:
Vicki Pfau 2020-08-14 18:32:19 -07:00
parent 4a28264d0c
commit a46901b909
4 changed files with 11 additions and 7 deletions

View File

@ -142,7 +142,7 @@ void FrameView::disableLayer(const QPointF& coord) {
} }
#ifdef M_CORE_GBA #ifdef M_CORE_GBA
void FrameView::updateTilesGBA(bool force) { void FrameView::updateTilesGBA(bool) {
if (m_ui.freeze->checkState() == Qt::Checked) { if (m_ui.freeze->checkState() == Qt::Checked) {
return; return;
} }
@ -285,7 +285,7 @@ void FrameView::injectGBA() {
#endif #endif
#ifdef M_CORE_GB #ifdef M_CORE_GB
void FrameView::updateTilesGB(bool force) { void FrameView::updateTilesGB(bool) {
if (m_ui.freeze->checkState() == Qt::Checked) { if (m_ui.freeze->checkState() == Qt::Checked) {
return; return;
} }
@ -314,10 +314,12 @@ void FrameView::invalidateQueue(const QSize& dims) {
#ifdef M_CORE_GBA #ifdef M_CORE_GBA
case PLATFORM_GBA: case PLATFORM_GBA:
injectGBA(); injectGBA();
break;
#endif #endif
#ifdef M_CORE_GB #ifdef M_CORE_GB
case PLATFORM_GB: case PLATFORM_GB:
injectGB(); injectGB();
break;
#endif #endif
} }
m_vl->runFrame(m_vl); m_vl->runFrame(m_vl);
@ -376,6 +378,8 @@ bool FrameView::eventFilter(QObject* obj, QEvent* event) {
pos /= m_ui.magnification->value(); pos /= m_ui.magnification->value();
disableLayer(pos); disableLayer(pos);
return true; return true;
default:
break;
} }
return false; return false;
} }

View File

@ -159,7 +159,7 @@ bool MapView::eventFilter(QObject* obj, QEvent* event) {
return true; return true;
} }
void MapView::updateTilesGBA(bool force) { void MapView::updateTilesGBA(bool) {
{ {
CoreController::Interrupter interrupter(m_controller); CoreController::Interrupter interrupter(m_controller);
int bitmap = -1; int bitmap = -1;

View File

@ -50,7 +50,7 @@ void Swatch::setColor(int index, uint32_t color) {
updateFill(index); updateFill(index);
} }
void Swatch::paintEvent(QPaintEvent* event) { void Swatch::paintEvent(QPaintEvent*) {
QPainter painter(this); QPainter painter(this);
painter.drawPixmap(QPoint(), m_backing); painter.drawPixmap(QPoint(), m_backing);
} }

View File

@ -19,12 +19,12 @@ TilePainter::TilePainter(QWidget* parent)
setTileCount(3072); setTileCount(3072);
} }
void TilePainter::paintEvent(QPaintEvent* event) { void TilePainter::paintEvent(QPaintEvent*) {
QPainter painter(this); QPainter painter(this);
painter.drawPixmap(QPoint(), m_backing); painter.drawPixmap(QPoint(), m_backing);
} }
void TilePainter::resizeEvent(QResizeEvent* event) { void TilePainter::resizeEvent(QResizeEvent*) {
int w = width() / m_size; int w = width() / m_size;
if (!w) { if (!w) {
w = 1; w = 1;