diff --git a/src/core/atcore.cpp b/src/core/atcore.cpp --- a/src/core/atcore.cpp +++ b/src/core/atcore.cpp @@ -304,7 +304,7 @@ if (d->lastMessage.contains("T:") || d->lastMessage.contains("B:")) { temperature().decodeTemp(message); } - emit(receivedMessage(d->lastMessage)); + emit receivedMessage(d->lastMessage); } void AtCore::setRelativePosition() @@ -414,7 +414,7 @@ d->sdCardPrinting = false; disconnect(d->tempTimer, &QTimer::timeout, this, &AtCore::sdCardPrintStatus); } - emit(stateChanged(d->printerState)); + emit stateChanged(d->printerState); } } @@ -713,7 +713,7 @@ { if (mounted != isSdMounted()) { d->sdCardMounted = mounted; - emit(sdMountChanged(d->sdCardMounted)); + emit sdMountChanged(d->sdCardMounted); } } @@ -733,13 +733,13 @@ void AtCore::appendSdCardFileList(const QString &fileName) { d->sdCardFileList.append(fileName); - emit(sdCardFileListChanged(d->sdCardFileList)); + emit sdCardFileListChanged(d->sdCardFileList); } void AtCore::clearSdCardFileList() { d->sdCardFileList.clear(); - emit(sdCardFileListChanged(d->sdCardFileList)); + emit sdCardFileListChanged(d->sdCardFileList); } void AtCore::sdDelete(const QString &fileName) diff --git a/src/core/printthread.cpp b/src/core/printthread.cpp --- a/src/core/printthread.cpp +++ b/src/core/printthread.cpp @@ -122,13 +122,13 @@ void PrintThread::endPrint() { - emit(printProgressChanged(100)); + emit printProgressChanged(100); qCDebug(PRINT_THREAD) << "atEnd"; disconnect(d->core->firmwarePlugin(), &IFirmware::readyForCommand, this, &PrintThread::processJob); disconnect(this, &PrintThread::nextCommand, d->core, &AtCore::pushCommand); disconnect(d->core, &AtCore::stateChanged, this, &PrintThread::setState); - emit(stateChanged(AtCore::FINISHEDPRINT)); - emit(stateChanged(AtCore::IDLE)); + emit stateChanged(AtCore::FINISHEDPRINT); + emit stateChanged(AtCore::IDLE); disconnect(this, &PrintThread::stateChanged, d->core, &AtCore::setState); emit finished(); @@ -140,7 +140,7 @@ d->stillSize -= d->cline.size() + 1; //remove read chars d->printProgress = float(d->totalSize - d->stillSize) * 100.0 / float(d->totalSize); qCDebug(PRINT_THREAD) << "progress:" << QString::number(d->printProgress); - emit(printProgressChanged(d->printProgress)); + emit printProgressChanged(d->printProgress); if (d->cline.startsWith(QStringLiteral(";-"))) { injectCommand(d->cline); @@ -180,7 +180,7 @@ .arg(QVariant::fromValue(newState).value()); disconnect(d->core, &AtCore::stateChanged, this, &PrintThread::setState); d->state = newState; - emit(stateChanged(d->state)); + emit stateChanged(d->state); connect(d->core, &AtCore::stateChanged, this, &PrintThread::setState, Qt::QueuedConnection); } } diff --git a/src/core/seriallayer.cpp b/src/core/seriallayer.cpp --- a/src/core/seriallayer.cpp +++ b/src/core/seriallayer.cpp @@ -87,7 +87,7 @@ // Get finished line to _byteCommands if (i < tempList.end() - 1) { d->_rByteCommands.append(*i); - emit(receivedCommand(*i)); + emit receivedCommand(*i); } else { d->_rawData.clear(); d->_rawData.append(*i); @@ -103,7 +103,7 @@ } QByteArray tmp = comm + term; write(tmp); - emit(pushedCommand(tmp)); + emit pushedCommand(tmp); } @@ -131,7 +131,7 @@ } for (const auto &comm : d->_sByteCommands) { write(comm); - emit(pushedCommand(comm)); + emit pushedCommand(comm); } d->_sByteCommands.clear(); } diff --git a/src/widgets/commandwidget.cpp b/src/widgets/commandwidget.cpp --- a/src/widgets/commandwidget.cpp +++ b/src/widgets/commandwidget.cpp @@ -37,7 +37,7 @@ //we have a few buttons to make here. Lets name this newButton so its easier to reuse auto newButton = new QPushButton(tr("Send")); connect(newButton, &QPushButton::clicked, this, [this] { - emit(commandPressed(lineCommand->text())); + emit commandPressed(lineCommand->text()); lineCommand->clear(); }); //When you have created a Row put the items into layout. @@ -56,7 +56,7 @@ newButton = new QPushButton(tr("Send")); connect(newButton, &QPushButton::clicked, this, [this] { - emit(messagePressed(lineMessage->text())); + emit messagePressed(lineMessage->text()); lineMessage->clear(); }); diff --git a/src/widgets/movementwidget.cpp b/src/widgets/movementwidget.cpp --- a/src/widgets/movementwidget.cpp +++ b/src/widgets/movementwidget.cpp @@ -33,32 +33,32 @@ newButton = new QPushButton(tr("Home All")); hBoxLayout->addWidget(newButton); connect(newButton, &QPushButton::clicked, this, [this] { - emit(homeAllPressed()); + emit homeAllPressed(); }); newButton = new QPushButton(tr("Home X")); hBoxLayout->addWidget(newButton); connect(newButton, &QPushButton::clicked, this, [this] { - emit(homeXPressed()); + emit homeXPressed(); }); newButton = new QPushButton(tr("Home Y")); hBoxLayout->addWidget(newButton); connect(newButton, &QPushButton::clicked, this, [this] { - emit(homeYPressed()); + emit homeYPressed(); }); newButton = new QPushButton(tr("Home Z")); hBoxLayout->addWidget(newButton); connect(newButton, &QPushButton::clicked, this, [this] { - emit(homeZPressed()); + emit homeZPressed(); }); mainLayout->addLayout(hBoxLayout); newButton = new QPushButton(tr("Disable Motors")); mainLayout->addWidget(newButton); connect(newButton, &QPushButton::clicked, this, [this] { - emit(disableMotorsPressed()); + emit disableMotorsPressed(); }); } @@ -74,13 +74,13 @@ connect(newButton, &QPushButton::clicked, this, [this] { if (comboMoveAxis->currentIndex() == 0) { - emit(absoluteMove(QLatin1Char('X'), sbMoveAxis->value())); + emit absoluteMove(QLatin1Char('X'), sbMoveAxis->value()); } else if (comboMoveAxis->currentIndex() == 1) { - emit(absoluteMove(QLatin1Char('Y'), sbMoveAxis->value())); + emit absoluteMove(QLatin1Char('Y'), sbMoveAxis->value()); } else if (comboMoveAxis->currentIndex() == 2) { - emit(absoluteMove(QLatin1Char('Z'), sbMoveAxis->value())); + emit absoluteMove(QLatin1Char('Z'), sbMoveAxis->value()); } }); diff --git a/src/widgets/printwidget.cpp b/src/widgets/printwidget.cpp --- a/src/widgets/printwidget.cpp +++ b/src/widgets/printwidget.cpp @@ -31,12 +31,12 @@ if (showAllControls) { buttonPrint = new QPushButton(tr("Print File")); connect(buttonPrint, &QPushButton::clicked, this, [this] { - emit(printPressed()); + emit printPressed(); }); newButton = new QPushButton(tr("Emergency Stop")); connect(newButton, &QPushButton::clicked, this, [this] { - emit(emergencyStopPressed()); + emit emergencyStopPressed(); }); hBoxLayout = new QHBoxLayout; @@ -63,7 +63,7 @@ newButton = new QPushButton(tr("Set")); connect(newButton, &QPushButton::clicked, this, [this] { - emit(printSpeedChanged(sbPrintSpeed->value())); + emit printSpeedChanged(sbPrintSpeed->value()); }); hBoxLayout = new QHBoxLayout; @@ -80,7 +80,7 @@ newButton = new QPushButton(tr("Set")); connect(newButton, &QPushButton::clicked, this, [this] { - emit(flowRateChanged(sbFlowRate->value())); + emit flowRateChanged(sbFlowRate->value()); }); hBoxLayout = new QHBoxLayout; hBoxLayout->addWidget(newLabel, 60); @@ -95,7 +95,7 @@ newButton = new QPushButton(tr("Set")); connect(newButton, &QPushButton::clicked, this, [this] { - emit(fanSpeedChanged(sbFanSpeed->value(), comboFanSelect->currentIndex())); + emit fanSpeedChanged(sbFanSpeed->value(), comboFanSelect->currentIndex()); }); hBoxLayout = new QHBoxLayout; diff --git a/src/widgets/sdwidget.cpp b/src/widgets/sdwidget.cpp --- a/src/widgets/sdwidget.cpp +++ b/src/widgets/sdwidget.cpp @@ -30,24 +30,24 @@ auto newButton = new QPushButton(tr("Get List")); hBoxLayout->addWidget(newButton); connect(newButton, &QPushButton::clicked, this, [this] { - emit(requestSdList()); + emit requestSdList(); }); newButton = new QPushButton(tr("Print Selected")); hBoxLayout->addWidget(newButton); connect(newButton, &QPushButton::clicked, this, [this] { if (listSdFiles->currentRow() != -1) { - emit(printSdFile(listSdFiles->currentItem()->text())); + emit printSdFile(listSdFiles->currentItem()->text()); } }); newButton = new QPushButton(tr("Delete Selected")); hBoxLayout->addWidget(newButton); connect(newButton, &QPushButton::clicked, this, [this] { if (listSdFiles->currentRow() != -1) { - emit(deleteSdFile(listSdFiles->currentItem()->text())); + emit deleteSdFile(listSdFiles->currentItem()->text()); listSdFiles->setCurrentRow(-1); } }); diff --git a/src/widgets/statuswidget.cpp b/src/widgets/statuswidget.cpp --- a/src/widgets/statuswidget.cpp +++ b/src/widgets/statuswidget.cpp @@ -36,7 +36,7 @@ if (showStop) { auto newButton = new QPushButton(style()->standardIcon(QStyle::SP_BrowserStop), QString()); connect(newButton, &QPushButton::clicked, this, [this] { - emit(stopPressed()); + emit stopPressed(); }); hBoxLayout->addWidget(newButton); } diff --git a/src/widgets/temperaturewidget.cpp b/src/widgets/temperaturewidget.cpp --- a/src/widgets/temperaturewidget.cpp +++ b/src/widgets/temperaturewidget.cpp @@ -36,7 +36,7 @@ auto *newButton = new QPushButton(tr("Set")); connect(newButton, &QPushButton::clicked, this, [this] { - emit(bedTempChanged(sbBedTemp->value(), checkAndWait->isChecked())); + emit bedTempChanged(sbBedTemp->value(), checkAndWait->isChecked()); }); auto *hboxLayout = new QHBoxLayout; @@ -52,7 +52,7 @@ newButton = new QPushButton(tr("Set")); connect(newButton, &QPushButton::clicked, this, [this] { - emit(extTempChanged(sbExtruderTemp->value(), comboExtruderSelect->currentIndex(), checkAndWait->isChecked())); + emit extTempChanged(sbExtruderTemp->value(), comboExtruderSelect->currentIndex(), checkAndWait->isChecked()); }); hboxLayout = new QHBoxLayout;