From 1d9d482da9d96892cac4afd3d406964b83e342d3 Mon Sep 17 00:00:00 2001 From: Nav Date: Thu, 28 Oct 2021 20:44:38 +0100 Subject: [PATCH] Explicit pointer declarations when using the auto keyword --- src/Insight/Insight.cpp | 4 ++-- .../InsightWorker/Tasks/QueryLatestVersionNumber.cpp | 2 +- .../UserInterfaces/InsightWindow/InsightWindow.cpp | 4 ++-- .../UserInterfaces/InsightWindow/UiLoader.cpp | 12 ++++++------ .../HexViewerWidget/ByteItemGraphicsScene.cpp | 2 +- .../TargetMemoryInspectionPane.cpp | 2 +- .../BitsetWidget/BitWidget.cpp | 2 +- .../BitsetWidget/BitsetWidget.cpp | 4 ++-- .../RegisterHistoryWidget/RegisterHistoryItem.cpp | 2 +- .../RegisterHistoryWidget/RegisterHistoryWidget.cpp | 8 ++++---- .../TargetRegisterInspectorWindow.cpp | 10 +++++----- .../TargetRegistersPane/RegisterGroupWidget.cpp | 6 +++--- .../Widgets/TargetRegistersPane/RegisterWidget.cpp | 6 +++--- .../TargetRegistersPaneWidget.cpp | 8 ++++---- .../TargetWidgets/DIP/DualInlinePackageWidget.cpp | 2 +- .../Widgets/TargetWidgets/QFP/PinWidget.cpp | 2 +- .../TargetWidgets/QFP/QuadFlatPackageWidget.cpp | 2 +- .../Widgets/TargetWidgets/TargetPackageWidget.cpp | 2 +- .../Widgets/TargetWidgets/TargetPinWidget.cpp | 2 +- 19 files changed, 41 insertions(+), 41 deletions(-) diff --git a/src/Insight/Insight.cpp b/src/Insight/Insight.cpp index 42a50630..5a29dc64 100644 --- a/src/Insight/Insight.cpp +++ b/src/Insight/Insight.cpp @@ -113,7 +113,7 @@ void Insight::startup() { * * This allows us to use Qt's event loop whilst still being able to process our own events. */ - auto eventDispatchTimer = new QTimer(&(this->application)); + auto* eventDispatchTimer = new QTimer(&(this->application)); QObject::connect(eventDispatchTimer, &QTimer::timeout, this, &Insight::dispatchEvents); eventDispatchTimer->start(100); @@ -163,7 +163,7 @@ void Insight::shutdown() { void Insight::checkBloomVersion() { auto currentVersionNumber = Application::VERSION; - auto versionQueryTask = new QueryLatestVersionNumber( + auto* versionQueryTask = new QueryLatestVersionNumber( currentVersionNumber ); diff --git a/src/Insight/InsightWorker/Tasks/QueryLatestVersionNumber.cpp b/src/Insight/InsightWorker/Tasks/QueryLatestVersionNumber.cpp index 80dc96bd..bf67ed6e 100644 --- a/src/Insight/InsightWorker/Tasks/QueryLatestVersionNumber.cpp +++ b/src/Insight/InsightWorker/Tasks/QueryLatestVersionNumber.cpp @@ -10,7 +10,7 @@ using namespace Bloom; void QueryLatestVersionNumber::run(TargetControllerConsole& targetControllerConsole) { - auto networkAccessManager = new QNetworkAccessManager(this); + auto* networkAccessManager = new QNetworkAccessManager(this); auto queryVersionEndpointUrl = QUrl("http://bloom.local/latest-version"); queryVersionEndpointUrl.setQuery(QUrlQuery({ {"currentVersionNumber", QString::fromStdString(this->currentVersionNumber.toString())} diff --git a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp index 0ccaadec..f03eb98d 100644 --- a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp @@ -120,7 +120,7 @@ InsightWindow::InsightWindow(InsightWorker& insightWorker): QMainWindow(nullptr) this->targetRegistersButton = this->container->findChild("target-registers-btn"); auto targetRegisterButtonLayout = this->targetRegistersButton->findChild(); - auto registersBtnLabel = new RotatableLabel(270, "Registers", this->targetRegistersButton); + auto* registersBtnLabel = new RotatableLabel(270, "Registers", this->targetRegistersButton); registersBtnLabel->setObjectName("target-registers-btn-label"); registersBtnLabel->setContentsMargins(5,0,9,0); targetRegisterButtonLayout->insertWidget(0, registersBtnLabel, 0, Qt::AlignTop); @@ -415,7 +415,7 @@ void InsightWindow::activate() { continue; } - auto variantAction = new QAction(this->variantMenu); + auto* variantAction = new QAction(this->variantMenu); variantAction->setText( QString::fromStdString(targetVariant.name + " (" + targetVariant.packageName + ")") ); diff --git a/src/Insight/UserInterfaces/InsightWindow/UiLoader.cpp b/src/Insight/UserInterfaces/InsightWindow/UiLoader.cpp index 0f988b54..26b1b0a4 100644 --- a/src/Insight/UserInterfaces/InsightWindow/UiLoader.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/UiLoader.cpp @@ -18,7 +18,7 @@ UiLoader::UiLoader(QObject* parent): QUiLoader(parent) { { "PanelWidget", [this] (QWidget* parent, const QString& name) { - auto widget = new PanelWidget(parent); + auto* widget = new PanelWidget(parent); widget->setObjectName(name); widget->setStyleSheet(parent->styleSheet()); return widget; @@ -27,7 +27,7 @@ UiLoader::UiLoader(QObject* parent): QUiLoader(parent) { { "RotatableLabel", [this] (QWidget* parent, const QString& name) { - auto widget = new RotatableLabel("", parent); + auto* widget = new RotatableLabel("", parent); widget->setObjectName(name); widget->setStyleSheet(parent->styleSheet()); return widget; @@ -36,7 +36,7 @@ UiLoader::UiLoader(QObject* parent): QUiLoader(parent) { { "ExpandingHeightScrollAreaWidget", [this] (QWidget* parent, const QString& name) { - auto widget = new ExpandingHeightScrollAreaWidget(parent); + auto* widget = new ExpandingHeightScrollAreaWidget(parent); widget->setObjectName(name); widget->setStyleSheet(parent->styleSheet()); return widget; @@ -45,7 +45,7 @@ UiLoader::UiLoader(QObject* parent): QUiLoader(parent) { { "SvgWidget", [this] (QWidget* parent, const QString& name) { - auto widget = new SvgWidget(parent); + auto* widget = new SvgWidget(parent); widget->setObjectName(name); widget->setStyleSheet(parent->styleSheet()); return widget; @@ -54,7 +54,7 @@ UiLoader::UiLoader(QObject* parent): QUiLoader(parent) { { "SvgToolButton", [this] (QWidget* parent, const QString& name) { - auto widget = new SvgToolButton(parent); + auto* widget = new SvgToolButton(parent); widget->setObjectName(name); widget->setStyleSheet(parent->styleSheet()); return widget; @@ -63,7 +63,7 @@ UiLoader::UiLoader(QObject* parent): QUiLoader(parent) { { "TargetPackageWidgetContainer", [this] (QWidget* parent, const QString& name) { - auto widget = new InsightTargetWidgets::TargetPackageWidgetContainer(parent); + auto* widget = new InsightTargetWidgets::TargetPackageWidgetContainer(parent); widget->setObjectName(name); widget->setStyleSheet(parent->styleSheet()); return widget; diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemGraphicsScene.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemGraphicsScene.cpp index ae0315cf..b14f68dd 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemGraphicsScene.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItemGraphicsScene.cpp @@ -36,7 +36,7 @@ parent(parent) { for (std::size_t i = 0; i < memorySize; i++) { const auto address = static_cast(startAddress + i); - auto byteWidget = new ByteItem(i, address, this->hoveredByteWidget); + auto* byteWidget = new ByteItem(i, address, this->hoveredByteWidget); this->byteWidgetsByAddress.insert(std::pair( address, byteWidget diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp index 2fc94c6d..bf35dec9 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/TargetMemoryInspectionPane.cpp @@ -72,7 +72,7 @@ TargetMemoryInspectionPane::TargetMemoryInspectionPane( void TargetMemoryInspectionPane::refreshMemoryValues(std::optional> callback) { this->hexViewerWidget->refreshButton->setDisabled(true); - auto readMemoryTask = new ReadTargetMemory( + auto* readMemoryTask = new ReadTargetMemory( this->targetMemoryDescriptor.type, this->targetMemoryDescriptor.addressRange.startAddress, this->targetMemoryDescriptor.size() diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitWidget.cpp index c38e8895..8d9b57ee 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitWidget.cpp @@ -17,7 +17,7 @@ BitWidget::BitWidget( ): QWidget(parent), bitIndex(bitIndex), bitNumber(bitNumber), bitset(bitset), readOnly(readOnly) { this->setFixedSize(BitWidget::WIDTH, BitWidget::HEIGHT); - auto layout = new QVBoxLayout(this); + auto* layout = new QVBoxLayout(this); layout->setSpacing(0); layout->setContentsMargins(0, 0, 0, 0); layout->setAlignment(Qt::AlignmentFlag::AlignTop); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitsetWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitsetWidget.cpp index 48f9a070..03529b80 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitsetWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/BitsetWidget/BitsetWidget.cpp @@ -13,7 +13,7 @@ using namespace Bloom::Widgets; BitsetWidget::BitsetWidget(int byteNumber, unsigned char& byte, bool readOnly, QWidget* parent): QWidget(parent), byteNumber(byteNumber), byte(byte), readOnly(readOnly) { this->setObjectName("bitset-widget"); - auto bitLayout = new QHBoxLayout(this); + auto* bitLayout = new QHBoxLayout(this); bitLayout->setSpacing(BitWidget::SPACING); bitLayout->setContentsMargins(0, 0, 0, 0); this->setContentsMargins(0, 0, 0, 0); @@ -23,7 +23,7 @@ QWidget(parent), byteNumber(byteNumber), byte(byte), readOnly(readOnly) { ); for (int bitIndex = (std::numeric_limits::digits - 1); bitIndex >= 0; bitIndex--) { - auto bitWidget = new BitWidget( + auto* bitWidget = new BitWidget( bitIndex, (this->byteNumber * 8) + bitIndex, this->bitset, diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryItem.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryItem.cpp index 89aee5be..e68b0ca1 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryItem.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryItem.cpp @@ -27,7 +27,7 @@ RegisterHistoryItem::RegisterHistoryItem( this->descriptionLayout->setText("Register Written"); this->descriptionLayout->setObjectName("description-label"); - auto subLabelLayout = new QHBoxLayout(); + auto* subLabelLayout = new QHBoxLayout(); subLabelLayout->setSpacing(0); subLabelLayout->setContentsMargins(0, 0, 0, 0); subLabelLayout->addWidget(this->valueLabel, 0, Qt::AlignmentFlag::AlignLeft); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryWidget.cpp index a2ea6465..572415fb 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/RegisterHistoryWidget/RegisterHistoryWidget.cpp @@ -71,9 +71,9 @@ RegisterHistoryWidget::RegisterHistoryWidget( this->itemContainerLayout->addWidget(this->currentItem); this->currentItem->setSelected(true); - auto separatorWidget = new QWidget(this); - auto separatorLayout = new QHBoxLayout(separatorWidget); - auto separatorLabel = new QLabel("Select an item to restore", separatorWidget); + auto* separatorWidget = new QWidget(this); + auto* separatorLayout = new QHBoxLayout(separatorWidget); + auto* separatorLabel = new QLabel("Select an item to restore", separatorWidget); separatorWidget->setFixedHeight(40); separatorWidget->setObjectName("separator-widget"); separatorLayout->setContentsMargins(0, 10, 0, 10); @@ -97,7 +97,7 @@ void RegisterHistoryWidget::selectCurrentItem() { } void RegisterHistoryWidget::addItem(const Targets::TargetMemoryBuffer& registerValue, const QDateTime& changeDate) { - auto item = new RegisterHistoryItem(registerValue, changeDate, this->itemContainer); + auto* item = new RegisterHistoryItem(registerValue, changeDate, this->itemContainer); QObject::connect(item, &Item::selected, this, &RegisterHistoryWidget::onItemSelectionChange); this->itemContainerLayout->insertWidget(2, item); } diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.cpp index e3662e31..541b099e 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.cpp @@ -139,14 +139,14 @@ TargetRegisterInspectorWindow::TargetRegisterInspectorWindow( * Each row of the BitsetWidget container should hold two BitsetWidgets. So we have a horizontal layout nested * within a vertical layout. */ - auto bitsetSingleHorizontalLayout = new QHBoxLayout(); + auto* bitsetSingleHorizontalLayout = new QHBoxLayout(); bitsetSingleHorizontalLayout->setSpacing(BitWidget::SPACING); bitsetSingleHorizontalLayout->setContentsMargins(0, 0, 0, 0); // The register value will be in MSB, which is OK for us as we present the bit widgets in MSB. auto byteNumber = static_cast(this->registerValue.size() - 1); for (std::uint32_t registerByteIndex = 0; registerByteIndex < this->registerValue.size(); registerByteIndex++) { - auto bitsetWidget = new BitsetWidget( + auto* bitsetWidget = new BitsetWidget( byteNumber, this->registerValue.at(registerByteIndex), !this->registerDescriptor.writable, @@ -308,7 +308,7 @@ void TargetRegisterInspectorWindow::updateValue() { void TargetRegisterInspectorWindow::refreshRegisterValue() { this->registerValueContainer->setDisabled(true); - auto readTargetRegisterTask = new ReadTargetRegisters({this->registerDescriptor}); + auto* readTargetRegisterTask = new ReadTargetRegisters({this->registerDescriptor}); QObject::connect( readTargetRegisterTask, @@ -340,7 +340,7 @@ void TargetRegisterInspectorWindow::refreshRegisterValue() { void TargetRegisterInspectorWindow::applyChanges() { this->registerValueContainer->setDisabled(true); const auto targetRegister = Targets::TargetRegister(this->registerDescriptor, this->registerValue); - auto writeRegisterTask = new WriteTargetRegister(targetRegister); + auto* writeRegisterTask = new WriteTargetRegister(targetRegister); QObject::connect(writeRegisterTask, &InsightWorkerTask::completed, this, [this, targetRegister] { this->registerValueContainer->setDisabled(false); @@ -354,7 +354,7 @@ void TargetRegisterInspectorWindow::applyChanges() { QObject::connect(writeRegisterTask, &InsightWorkerTask::failed, this, [this] (QString errorMessage) { this->registerValueContainer->setDisabled(false); - auto errorDialogue = new ErrorDialogue( + auto* errorDialogue = new ErrorDialogue( "Error", "Failed to update " + QString::fromStdString( this->registerDescriptor.name.value_or("") diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterGroupWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterGroupWidget.cpp index a9162d3c..e4bc3eca 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterGroupWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterGroupWidget.cpp @@ -23,7 +23,7 @@ RegisterGroupWidget::RegisterGroupWidget( this->headerWidget->setObjectName("register-group-header"); this->headerWidget->setFixedHeight(25); - auto headerLayout = new QHBoxLayout(this->headerWidget); + auto* headerLayout = new QHBoxLayout(this->headerWidget); headerLayout->setContentsMargins(5, 0, 0, 0); this->label->setText(this->name); @@ -50,7 +50,7 @@ RegisterGroupWidget::RegisterGroupWidget( headerLayout->addWidget(this->registerGroupIcon); headerLayout->addWidget(this->label); - auto bodyLayout = new QVBoxLayout(this->bodyWidget); + auto* bodyLayout = new QVBoxLayout(this->bodyWidget); bodyLayout->setContentsMargins(0, 0,0,0); bodyLayout->setSpacing(0); @@ -63,7 +63,7 @@ RegisterGroupWidget::RegisterGroupWidget( continue; } - auto registerWidget = new RegisterWidget(descriptor, insightWorker, this->bodyWidget); + auto* registerWidget = new RegisterWidget(descriptor, insightWorker, this->bodyWidget); bodyLayout->addWidget(registerWidget, 0, Qt::AlignmentFlag::AlignTop); QObject::connect( diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterWidget.cpp index cbcb1543..450006e3 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterWidget.cpp @@ -95,12 +95,12 @@ void RegisterWidget::clearInlineValue() { void RegisterWidget::contextMenuEvent(QContextMenuEvent* event) { this->setSelected(true); - auto menu = new QMenu(this); + auto* menu = new QMenu(this); menu->addAction(this->openInspectionWindowAction); menu->addAction(this->refreshValueAction); menu->addSeparator(); - auto copyMenu = new QMenu("Copy", this); + auto* copyMenu = new QMenu("Copy", this); copyMenu->addAction(this->copyValueNameAction); copyMenu->addSeparator(); copyMenu->addAction(this->copyValueDecimalAction); @@ -150,7 +150,7 @@ void RegisterWidget::openInspectionWindow() { } void RegisterWidget::refreshValue() { - auto readRegisterTask = new ReadTargetRegisters({this->descriptor}); + auto* readRegisterTask = new ReadTargetRegisters({this->descriptor}); QObject::connect( readRegisterTask, diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/TargetRegistersPaneWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/TargetRegistersPaneWidget.cpp index 2e2bacf3..7791f0d3 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/TargetRegistersPaneWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/TargetRegistersPaneWidget.cpp @@ -41,7 +41,7 @@ TargetRegistersPaneWidget::TargetRegistersPaneWidget( this->container = uiLoader.load(&targetRegistersPaneUiFile, this); this->container->setFixedSize(parent->width(), parent->maximumHeight()); - auto layout = new QVBoxLayout(this); + auto* layout = new QVBoxLayout(this); layout->setContentsMargins(0, 0, 0, 0); layout->addWidget(this->container); @@ -74,7 +74,7 @@ TargetRegistersPaneWidget::TargetRegistersPaneWidget( registerDescriptors.at(TargetRegisterType::GENERAL_PURPOSE_REGISTER).end() ); - auto generalPurposeRegisterGroupWidget = new RegisterGroupWidget( + auto* generalPurposeRegisterGroupWidget = new RegisterGroupWidget( "CPU General Purpose", this->renderedDescriptors, insightWorker, @@ -94,7 +94,7 @@ TargetRegistersPaneWidget::TargetRegistersPaneWidget( } for (const auto& [groupName, registerDescriptors] : registerDescriptorsByGroupName) { - auto registerGroupWidget = new RegisterGroupWidget( + auto* registerGroupWidget = new RegisterGroupWidget( QString::fromStdString(groupName).toUpper(), registerDescriptors, insightWorker, @@ -164,7 +164,7 @@ void TargetRegistersPaneWidget::refreshRegisterValues(std::optionalbottomPinLayout->setAlignment(Qt::AlignmentFlag::AlignHCenter); for (const auto& [targetPinNumber, targetPinDescriptor]: targetVariant.pinDescriptorsByNumber) { - auto pinWidget = new PinWidget(targetPinDescriptor, targetVariant, insightWorker, this); + auto* pinWidget = new PinWidget(targetPinDescriptor, targetVariant, insightWorker, this); this->pinWidgets.push_back(pinWidget); if (targetPinNumber <= (targetVariant.pinDescriptorsByNumber.size() / 2)) { diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.cpp index 407902e4..409f5330 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.cpp @@ -74,7 +74,7 @@ PinWidget::PinWidget( this->layout->addSpacing(3); if (this->isLeftLayout || this->isRightLayout) { - auto stackedLabelLayout = new QVBoxLayout(); + auto* stackedLabelLayout = new QVBoxLayout(); stackedLabelLayout->addWidget(this->pinNameLabel); stackedLabelLayout->addSpacing(2); stackedLabelLayout->addWidget(this->pinNumberLabel); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/QuadFlatPackageWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/QuadFlatPackageWidget.cpp index 5e806d5d..db8d76d6 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/QuadFlatPackageWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/QuadFlatPackageWidget.cpp @@ -58,7 +58,7 @@ QuadFlatPackageWidget::QuadFlatPackageWidget( const auto pinCountPerLayout = static_cast(targetVariant.pinDescriptorsByNumber.size() / 4); for (const auto& [targetPinNumber, targetPinDescriptor]: targetVariant.pinDescriptorsByNumber) { - auto pinWidget = new PinWidget(targetPinDescriptor, targetVariant, insightWorker, this); + auto* pinWidget = new PinWidget(targetPinDescriptor, targetVariant, insightWorker, this); this->pinWidgets.push_back(pinWidget); if (targetPinNumber <= pinCountPerLayout) { diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPackageWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPackageWidget.cpp index b56104a6..85b1347b 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPackageWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPackageWidget.cpp @@ -32,7 +32,7 @@ TargetPackageWidget::TargetPackageWidget( } void TargetPackageWidget::refreshPinStates(std::optional> callback) { - auto refreshTask = new RefreshTargetPinStates(this->targetVariant.id); + auto* refreshTask = new RefreshTargetPinStates(this->targetVariant.id); QObject::connect( refreshTask, &RefreshTargetPinStates::targetPinStatesRetrieved, diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPinWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPinWidget.cpp index 691ddcc5..339db072 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPinWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPinWidget.cpp @@ -35,7 +35,7 @@ void TargetPinWidget::onWidgetBodyClicked() { pinState.ioState = (pinState.ioState == TargetPinState::IoState::HIGH) ? TargetPinState::IoState::LOW : TargetPinState::IoState::HIGH; - auto setPinStateTask = new SetTargetPinState(this->pinDescriptor, pinState); + auto* setPinStateTask = new SetTargetPinState(this->pinDescriptor, pinState); QObject::connect(setPinStateTask, &InsightWorkerTask::completed, this, [this, pinState] { this->updatePinState(pinState); this->setDisabled(false);