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(); }