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