mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-01 16:05:07 +01:00
Use maybe_unused instead of Q_UNUSED
This commit is contained in:
parent
62a69e0547
commit
db0383fe0e
@ -12,9 +12,8 @@
|
||||
|
||||
namespace Camera {
|
||||
|
||||
QList<QVideoFrame::PixelFormat> QtCameraSurface::supportedPixelFormats(
|
||||
QAbstractVideoBuffer::HandleType handleType) const {
|
||||
Q_UNUSED(handleType);
|
||||
QList<QVideoFrame::PixelFormat> QtCameraSurface::supportedPixelFormats([
|
||||
[maybe_unused]] QAbstractVideoBuffer::HandleType handleType) const {
|
||||
return QList<QVideoFrame::PixelFormat>()
|
||||
<< QVideoFrame::Format_ARGB32 << QVideoFrame::Format_ARGB32_Premultiplied
|
||||
<< QVideoFrame::Format_RGB32 << QVideoFrame::Format_RGB24 << QVideoFrame::Format_RGB565
|
||||
|
@ -168,10 +168,10 @@ void ConfigureMotionTouch::UpdateUiDisplay() {
|
||||
void ConfigureMotionTouch::ConnectEvents() {
|
||||
connect(ui->motion_provider,
|
||||
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
[this](int index) { Q_UNUSED(index); UpdateUiDisplay(); });
|
||||
[this]([[maybe_unused]] int index) { UpdateUiDisplay(); });
|
||||
connect(ui->touch_provider,
|
||||
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
||||
[this](int index) { Q_UNUSED(index); UpdateUiDisplay(); });
|
||||
[this]([[maybe_unused]] int index) { UpdateUiDisplay(); });
|
||||
connect(ui->udp_test, &QPushButton::clicked, this, &ConfigureMotionTouch::OnCemuhookUDPTest);
|
||||
connect(ui->touch_calibration_config, &QPushButton::clicked, this,
|
||||
&ConfigureMotionTouch::OnConfigureTouchCalibration);
|
||||
|
@ -326,8 +326,8 @@ void ConfigureTouchFromButton::OnBindingChanged(QStandardItem* item) {
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigureTouchFromButton::OnBindingDeleted(const QModelIndex& parent, int first, int last) {
|
||||
Q_UNUSED(parent);
|
||||
void ConfigureTouchFromButton::OnBindingDeleted([[maybe_unused]] const QModelIndex& parent,
|
||||
int first, int last) {
|
||||
for (int i = first; i <= last; ++i) {
|
||||
auto ix = binding_list_model->index(i, 0);
|
||||
if (!ix.isValid()) {
|
||||
@ -514,8 +514,7 @@ void TouchScreenPreview::mouseMoveEvent(QMouseEvent* event) {
|
||||
}
|
||||
}
|
||||
|
||||
void TouchScreenPreview::leaveEvent(QEvent* event) {
|
||||
Q_UNUSED(event);
|
||||
void TouchScreenPreview::leaveEvent([[maybe_unused]] QEvent* event) {
|
||||
if (coord_label) {
|
||||
coord_label->clear();
|
||||
}
|
||||
|
@ -14,8 +14,7 @@ GPUCommandStreamItemModel::GPUCommandStreamItemModel(QObject* parent)
|
||||
&GPUCommandStreamItemModel::OnGXCommandFinishedInternal);
|
||||
}
|
||||
|
||||
int GPUCommandStreamItemModel::rowCount(const QModelIndex& parent) const {
|
||||
Q_UNUSED(parent);
|
||||
int GPUCommandStreamItemModel::rowCount([[maybe_unused]] const QModelIndex& parent) const {
|
||||
return command_count;
|
||||
}
|
||||
|
||||
|
@ -16,13 +16,11 @@ BreakPointModel::BreakPointModel(std::shared_ptr<Pica::DebugContext> debug_conte
|
||||
at_breakpoint(debug_context->at_breakpoint),
|
||||
active_breakpoint(debug_context->active_breakpoint) {}
|
||||
|
||||
int BreakPointModel::columnCount(const QModelIndex& parent) const {
|
||||
Q_UNUSED(parent);
|
||||
int BreakPointModel::columnCount([[maybe_unused]] const QModelIndex& parent) const {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int BreakPointModel::rowCount(const QModelIndex& parent) const {
|
||||
Q_UNUSED(parent);
|
||||
int BreakPointModel::rowCount([[maybe_unused]] const QModelIndex& parent) const {
|
||||
return static_cast<int>(Pica::DebugContext::Event::NumEvents);
|
||||
}
|
||||
|
||||
|
@ -57,13 +57,11 @@ public:
|
||||
|
||||
GPUCommandListModel::GPUCommandListModel(QObject* parent) : QAbstractListModel(parent) {}
|
||||
|
||||
int GPUCommandListModel::rowCount(const QModelIndex& parent) const {
|
||||
Q_UNUSED(parent);
|
||||
int GPUCommandListModel::rowCount([[maybe_unused]] const QModelIndex& parent) const {
|
||||
return static_cast<int>(pica_trace.writes.size());
|
||||
}
|
||||
|
||||
int GPUCommandListModel::columnCount(const QModelIndex& parent) const {
|
||||
Q_UNUSED(parent);
|
||||
int GPUCommandListModel::columnCount([[maybe_unused]] const QModelIndex& parent) const {
|
||||
return 4;
|
||||
}
|
||||
|
||||
@ -91,8 +89,8 @@ QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const {
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
QVariant GPUCommandListModel::headerData(int section, Qt::Orientation orientation, int role) const {
|
||||
Q_UNUSED(orientation);
|
||||
QVariant GPUCommandListModel::headerData(int section, [[maybe_unused]] Qt::Orientation orientation,
|
||||
int role) const {
|
||||
switch (role) {
|
||||
case Qt::DisplayRole: {
|
||||
switch (section) {
|
||||
|
@ -29,19 +29,17 @@ using nihstro::SwizzlePattern;
|
||||
GraphicsVertexShaderModel::GraphicsVertexShaderModel(GraphicsVertexShaderWidget* parent)
|
||||
: QAbstractTableModel(parent), par(parent) {}
|
||||
|
||||
int GraphicsVertexShaderModel::columnCount(const QModelIndex& parent) const {
|
||||
Q_UNUSED(parent);
|
||||
int GraphicsVertexShaderModel::columnCount([[maybe_unused]] const QModelIndex& parent) const {
|
||||
return 3;
|
||||
}
|
||||
|
||||
int GraphicsVertexShaderModel::rowCount(const QModelIndex& parent) const {
|
||||
Q_UNUSED(parent);
|
||||
int GraphicsVertexShaderModel::rowCount([[maybe_unused]] const QModelIndex& parent) const {
|
||||
return static_cast<int>(par->info.code.size());
|
||||
}
|
||||
|
||||
QVariant GraphicsVertexShaderModel::headerData(int section, Qt::Orientation orientation,
|
||||
QVariant GraphicsVertexShaderModel::headerData(int section,
|
||||
[[maybe_unused]] Qt::Orientation orientation,
|
||||
int role) const {
|
||||
Q_UNUSED(orientation);
|
||||
switch (role) {
|
||||
case Qt::DisplayRole: {
|
||||
if (section == 0) {
|
||||
|
@ -112,8 +112,7 @@ MicroProfileWidget::MicroProfileWidget(QWidget* parent) : QWidget(parent) {
|
||||
connect(&update_timer, &QTimer::timeout, this, qOverload<>(&MicroProfileWidget::update));
|
||||
}
|
||||
|
||||
void MicroProfileWidget::paintEvent(QPaintEvent* ev) {
|
||||
Q_UNUSED(ev);
|
||||
void MicroProfileWidget::paintEvent([[maybe_unused]] QPaintEvent* ev) {
|
||||
QPainter painter(this);
|
||||
|
||||
// The units used by Microprofile for drawing are based in pixels on a 96 dpi display.
|
||||
|
@ -754,7 +754,6 @@ void GameListPlaceholder::onUpdateThemedIcons() {
|
||||
image->setPixmap(QIcon::fromTheme(QStringLiteral("plus_folder")).pixmap(200));
|
||||
}
|
||||
|
||||
void GameListPlaceholder::mouseDoubleClickEvent(QMouseEvent* event) {
|
||||
Q_UNUSED(event);
|
||||
void GameListPlaceholder::mouseDoubleClickEvent([[maybe_unused]] QMouseEvent* event) {
|
||||
emit GameListPlaceholder::AddDirectory();
|
||||
}
|
||||
|
@ -2096,18 +2096,15 @@ void GMainWindow::OnMouseActivity() {
|
||||
ShowMouseCursor();
|
||||
}
|
||||
|
||||
void GMainWindow::mouseMoveEvent(QMouseEvent* event) {
|
||||
Q_UNUSED(event);
|
||||
void GMainWindow::mouseMoveEvent([[maybe_unused]] QMouseEvent* event) {
|
||||
OnMouseActivity();
|
||||
}
|
||||
|
||||
void GMainWindow::mousePressEvent(QMouseEvent* event) {
|
||||
Q_UNUSED(event);
|
||||
void GMainWindow::mousePressEvent([[maybe_unused]] QMouseEvent* event) {
|
||||
OnMouseActivity();
|
||||
}
|
||||
|
||||
void GMainWindow::mouseReleaseEvent(QMouseEvent* event) {
|
||||
Q_UNUSED(event);
|
||||
void GMainWindow::mouseReleaseEvent([[maybe_unused]] QMouseEvent* event) {
|
||||
OnMouseActivity();
|
||||
}
|
||||
|
||||
|
@ -4,11 +4,9 @@
|
||||
|
||||
#include "citra_qt/util/clickable_label.h"
|
||||
|
||||
ClickableLabel::ClickableLabel(QWidget* parent, Qt::WindowFlags f) : QLabel(parent) {
|
||||
Q_UNUSED(f);
|
||||
}
|
||||
ClickableLabel::ClickableLabel(QWidget* parent, [[maybe_unused]] Qt::WindowFlags f)
|
||||
: QLabel(parent) {}
|
||||
|
||||
void ClickableLabel::mouseReleaseEvent(QMouseEvent* event) {
|
||||
Q_UNUSED(event);
|
||||
void ClickableLabel::mouseReleaseEvent([[maybe_unused]] QMouseEvent* event) {
|
||||
emit clicked();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user