Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unused-{parameter,variable} warnings #530

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/frmmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ frmMain::frmMain(QWidget *parent) :
connect(ui->cboCommand, SIGNAL(returnPressed()), this, SLOT(onCboCommandReturnPressed()));

foreach (StyledToolButton* button, this->findChildren<StyledToolButton*>(QRegExp("cmdUser\\d"))) {
connect(button, SIGNAL(clicked(bool)), this, SLOT(onCmdUserClicked(bool)));
connect(button, SIGNAL(clicked(bool)), this, SLOT(onCmdUserClicked()));
}

// Setting up slider boxes
Expand All @@ -151,7 +151,7 @@ frmMain::frmMain(QWidget *parent) :
ui->slbFeedOverride->setCurrentValue(100);
ui->slbFeedOverride->setTitle(tr("Feed rate:"));
ui->slbFeedOverride->setSuffix("%");
connect(ui->slbFeedOverride, SIGNAL(toggled(bool)), this, SLOT(onOverridingToggled(bool)));
connect(ui->slbFeedOverride, SIGNAL(toggled(bool)), this, SLOT(onOverridingToggled()));
connect(ui->slbFeedOverride, &SliderBox::toggled, [=] {
updateProgramEstimatedTime(m_currentDrawer->viewParser()->getLineSegmentList());
});
Expand All @@ -165,7 +165,7 @@ frmMain::frmMain(QWidget *parent) :
ui->slbRapidOverride->setCurrentValue(100);
ui->slbRapidOverride->setTitle(tr("Rapid speed:"));
ui->slbRapidOverride->setSuffix("%");
connect(ui->slbRapidOverride, SIGNAL(toggled(bool)), this, SLOT(onOverridingToggled(bool)));
connect(ui->slbRapidOverride, SIGNAL(toggled(bool)), this, SLOT(onOverridingToggled()));
connect(ui->slbRapidOverride, &SliderBox::toggled, [=] {
updateProgramEstimatedTime(m_currentDrawer->viewParser()->getLineSegmentList());
});
Expand All @@ -179,7 +179,7 @@ frmMain::frmMain(QWidget *parent) :
ui->slbSpindleOverride->setCurrentValue(100);
ui->slbSpindleOverride->setTitle(tr("Spindle speed:"));
ui->slbSpindleOverride->setSuffix("%");
connect(ui->slbSpindleOverride, SIGNAL(toggled(bool)), this, SLOT(onOverridingToggled(bool)));
connect(ui->slbSpindleOverride, SIGNAL(toggled(bool)), this, SLOT(onOverridingToggled()));

m_originDrawer = new OriginDrawer();
m_codeDrawer = new GcodeDrawer();
Expand Down Expand Up @@ -3834,7 +3834,7 @@ bool frmMain::compareCoordinates(double x, double y, double z)
return ui->txtMPosX->text().toDouble() == x && ui->txtMPosY->text().toDouble() == y && ui->txtMPosZ->text().toDouble() == z;
}

void frmMain::onCmdUserClicked(bool checked)
void frmMain::onCmdUserClicked()
{
int i = sender()->objectName().right(1).toInt();

Expand All @@ -3845,7 +3845,7 @@ void frmMain::onCmdUserClicked(bool checked)
}
}

void frmMain::onOverridingToggled(bool checked)
void frmMain::onOverridingToggled()
{
ui->grpOverriding->setProperty("overrided", ui->slbFeedOverride->isChecked()
|| ui->slbRapidOverride->isChecked() || ui->slbSpindleOverride->isChecked());
Expand Down
4 changes: 2 additions & 2 deletions src/frmmain.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ private slots:
void onTableCurrentChanged(QModelIndex idx1, QModelIndex idx2);
void onConsoleResized(QSize size);
void onPanelsSizeChanged(QSize size);
void onCmdUserClicked(bool checked);
void onOverridingToggled(bool checked);
void onCmdUserClicked();
void onOverridingToggled();
void onActSendFromLineTriggered();

void on_actFileExit_triggered();
Expand Down
2 changes: 1 addition & 1 deletion src/parser/gcodeparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ PointSegment *GcodeParser::addArcPointSegment(const QVector3D &nextPoint, bool c
return ps;
}

void GcodeParser::handleMCode(float code, const QStringList &args)
void GcodeParser::handleMCode(const QStringList &args)
{
double spindleSpeed = GcodePreprocessorUtils::parseCoord(args, 'S');
if (!qIsNaN(spindleSpeed)) this->m_lastSpindleSpeed = spindleSpeed;
Expand Down
2 changes: 1 addition & 1 deletion src/parser/gcodeparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public slots:
QList<PointSegment*> m_points;

PointSegment *processCommand(const QStringList &args);
void handleMCode(float code, const QStringList &args);
void handleMCode(const QStringList &args);
PointSegment *handleGCode(float code, const QStringList &args);
PointSegment *addLinearPointSegment(const QVector3D &nextPoint, bool fastTraverse);
PointSegment *addArcPointSegment(const QVector3D &nextPoint, bool clockwise, const QStringList &args);
Expand Down
1 change: 0 additions & 1 deletion src/parser/gcodeviewparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ QList<LineSegment*> GcodeViewParse::getLinesFromParser(GcodeParser *gp, double a
QList<PointSegment*> psl = gp->getPointSegmentList();
// For a line segment list ALL arcs must be converted to lines.
double minArcLength = 0.1;
double length;

QVector3D *start, *end;
start = NULL;
Expand Down