From a46901b90980c82d4ccc63c8daf2746ec64dd670 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Fri, 14 Aug 2020 18:32:19 -0700 Subject: [PATCH] Qt: Fix a handful of warnings --- src/platform/qt/FrameView.cpp | 10 +++++++--- src/platform/qt/MapView.cpp | 2 +- src/platform/qt/Swatch.cpp | 2 +- src/platform/qt/TilePainter.cpp | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/platform/qt/FrameView.cpp b/src/platform/qt/FrameView.cpp index 0b97fbd6c..c32e1f9c8 100644 --- a/src/platform/qt/FrameView.cpp +++ b/src/platform/qt/FrameView.cpp @@ -142,7 +142,7 @@ void FrameView::disableLayer(const QPointF& coord) { } #ifdef M_CORE_GBA -void FrameView::updateTilesGBA(bool force) { +void FrameView::updateTilesGBA(bool) { if (m_ui.freeze->checkState() == Qt::Checked) { return; } @@ -285,7 +285,7 @@ void FrameView::injectGBA() { #endif #ifdef M_CORE_GB -void FrameView::updateTilesGB(bool force) { +void FrameView::updateTilesGB(bool) { if (m_ui.freeze->checkState() == Qt::Checked) { return; } @@ -314,10 +314,12 @@ void FrameView::invalidateQueue(const QSize& dims) { #ifdef M_CORE_GBA case PLATFORM_GBA: injectGBA(); + break; #endif #ifdef M_CORE_GB case PLATFORM_GB: injectGB(); + break; #endif } m_vl->runFrame(m_vl); @@ -376,6 +378,8 @@ bool FrameView::eventFilter(QObject* obj, QEvent* event) { pos /= m_ui.magnification->value(); disableLayer(pos); return true; + default: + break; } return false; } @@ -462,4 +466,4 @@ QString FrameView::LayerId::readable() const { return typeStr; } return tr("%1 %2").arg(typeStr).arg(index); -} \ No newline at end of file +} diff --git a/src/platform/qt/MapView.cpp b/src/platform/qt/MapView.cpp index 46b6ab814..5771b83ac 100644 --- a/src/platform/qt/MapView.cpp +++ b/src/platform/qt/MapView.cpp @@ -159,7 +159,7 @@ bool MapView::eventFilter(QObject* obj, QEvent* event) { return true; } -void MapView::updateTilesGBA(bool force) { +void MapView::updateTilesGBA(bool) { { CoreController::Interrupter interrupter(m_controller); int bitmap = -1; diff --git a/src/platform/qt/Swatch.cpp b/src/platform/qt/Swatch.cpp index 366b981bb..3eb85d780 100644 --- a/src/platform/qt/Swatch.cpp +++ b/src/platform/qt/Swatch.cpp @@ -50,7 +50,7 @@ void Swatch::setColor(int index, uint32_t color) { updateFill(index); } -void Swatch::paintEvent(QPaintEvent* event) { +void Swatch::paintEvent(QPaintEvent*) { QPainter painter(this); painter.drawPixmap(QPoint(), m_backing); } diff --git a/src/platform/qt/TilePainter.cpp b/src/platform/qt/TilePainter.cpp index 127b31058..4e0490f36 100644 --- a/src/platform/qt/TilePainter.cpp +++ b/src/platform/qt/TilePainter.cpp @@ -19,12 +19,12 @@ TilePainter::TilePainter(QWidget* parent) setTileCount(3072); } -void TilePainter::paintEvent(QPaintEvent* event) { +void TilePainter::paintEvent(QPaintEvent*) { QPainter painter(this); painter.drawPixmap(QPoint(), m_backing); } -void TilePainter::resizeEvent(QResizeEvent* event) { +void TilePainter::resizeEvent(QResizeEvent*) { int w = width() / m_size; if (!w) { w = 1;