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
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);
}
}

View File

@ -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;

View File

@ -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);
}

View File

@ -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;