chore: fix shadowed member and signed/unsigned mismatch

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: supress unused with [[maybe_unused]]

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: unshadow ^&^& static_cast implicit return

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: deshadow and mark unused in parse task

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: mark unused in folder models

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: deshadow and mark unused with instances

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: more deshadow and unused

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: remove uneeded simicolons

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: mark unused

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>

chore: prevent shadow

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers
2023-06-30 23:51:15 -07:00
parent 98d6904e4a
commit 8d7dcdfc5b
96 changed files with 409 additions and 413 deletions

View File

@ -85,7 +85,7 @@ void ProgressDialog::on_skipButton_clicked(bool checked)
{
Q_UNUSED(checked);
if (ui->skipButton->isEnabled()) // prevent other triggers from aborting
task->abort();
m_task->abort();
}
ProgressDialog::~ProgressDialog()
@ -116,7 +116,7 @@ void ProgressDialog::updateSize()
int ProgressDialog::execWithTask(Task* task)
{
this->task = task;
this->m_task = task;
if (!task) {
qDebug() << "Programmer error: Progress dialog created with null task.";
@ -168,8 +168,8 @@ int ProgressDialog::execWithTask(std::unique_ptr<Task>& task)
bool ProgressDialog::handleImmediateResult(QDialog::DialogCode& result)
{
if (task->isFinished()) {
if (task->wasSuccessful()) {
if (m_task->isFinished()) {
if (m_task->wasSuccessful()) {
result = QDialog::Accepted;
} else {
result = QDialog::Rejected;
@ -181,12 +181,12 @@ bool ProgressDialog::handleImmediateResult(QDialog::DialogCode& result)
Task* ProgressDialog::getTask()
{
return task;
return m_task;
}
void ProgressDialog::onTaskStarted() {}
void ProgressDialog::onTaskFailed(QString failure)
void ProgressDialog::onTaskFailed([[maybe_unused]] QString failure)
{
reject();
hide();
@ -198,10 +198,10 @@ void ProgressDialog::onTaskSucceeded()
hide();
}
void ProgressDialog::changeStatus(const QString& status)
void ProgressDialog::changeStatus([[maybe_unused]] const QString& status)
{
ui->globalStatusLabel->setText(task->getStatus());
ui->globalStatusDetailsLabel->setText(task->getDetails());
ui->globalStatusLabel->setText(m_task->getStatus());
ui->globalStatusDetailsLabel->setText(m_task->getDetails());
updateSize();
}
@ -269,7 +269,7 @@ void ProgressDialog::keyPressEvent(QKeyEvent* e)
void ProgressDialog::closeEvent(QCloseEvent* e)
{
if (task && task->isRunning()) {
if (m_task && m_task->isRunning()) {
e->ignore();
} else {
QDialog::closeEvent(e);