Explicit pointer declarations when using the auto keyword
This commit is contained in:
@@ -40,7 +40,7 @@ DualInlinePackageWidget::DualInlinePackageWidget(
|
||||
this->bottomPinLayout->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)) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -58,7 +58,7 @@ QuadFlatPackageWidget::QuadFlatPackageWidget(
|
||||
|
||||
const auto pinCountPerLayout = static_cast<int>(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) {
|
||||
|
||||
@@ -32,7 +32,7 @@ TargetPackageWidget::TargetPackageWidget(
|
||||
}
|
||||
|
||||
void TargetPackageWidget::refreshPinStates(std::optional<std::function<void(void)>> callback) {
|
||||
auto refreshTask = new RefreshTargetPinStates(this->targetVariant.id);
|
||||
auto* refreshTask = new RefreshTargetPinStates(this->targetVariant.id);
|
||||
QObject::connect(
|
||||
refreshTask,
|
||||
&RefreshTargetPinStates::targetPinStatesRetrieved,
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user