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
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue