diff --git a/src/DebugServers/GdbRsp/CommandPackets/SupportedFeaturesQuery.cpp b/src/DebugServers/GdbRsp/CommandPackets/SupportedFeaturesQuery.cpp index 3ddb28f6..31f6eea3 100644 --- a/src/DebugServers/GdbRsp/CommandPackets/SupportedFeaturesQuery.cpp +++ b/src/DebugServers/GdbRsp/CommandPackets/SupportedFeaturesQuery.cpp @@ -25,8 +25,8 @@ void SupportedFeaturesQuery::init() { auto featureString = featureList.at(i); // We only care about supported features. Supported features will precede a '+' character. - if (featureString[featureString.size() - 1] == "+") { - featureString.remove("+"); + if (featureString[featureString.size() - 1] == '+') { + featureString.remove('+'); auto feature = gdbFeatureMapping.valueAt(featureString.toStdString()); if (feature.has_value()) { diff --git a/src/DebugServers/GdbRsp/CommandPackets/WriteRegister.cpp b/src/DebugServers/GdbRsp/CommandPackets/WriteRegister.cpp index 48057e14..c599ee0a 100644 --- a/src/DebugServers/GdbRsp/CommandPackets/WriteRegister.cpp +++ b/src/DebugServers/GdbRsp/CommandPackets/WriteRegister.cpp @@ -18,7 +18,7 @@ void WriteRegister::init() { } auto packetSegments = QString::fromStdString(packet).split("="); - this->registerNumber = static_cast(packetSegments.front().midRef(1).toUInt(nullptr, 16)); + this->registerNumber = static_cast(packetSegments.front().mid(1).toUInt(nullptr, 16)); this->registerValue = Packet::hexToData(packetSegments.back().toStdString()); std::reverse(this->registerValue.begin(), this->registerValue.end()); } diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/DualInlinePackageWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/DualInlinePackageWidget.cpp index ec62c48e..344f7018 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/DualInlinePackageWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/DualInlinePackageWidget.cpp @@ -34,7 +34,7 @@ DualInlinePackageWidget::DualInlinePackageWidget( this->pinWidgets.reserve(targetVariant.pinDescriptorsByNumber.size()); this->layout = new QVBoxLayout(); this->layout->setSpacing(8); - this->layout->setMargin(0); + this->layout->setContentsMargins(0, 0, 0, 0); this->topPinLayout = new QHBoxLayout(); this->topPinLayout->setSpacing(8); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/PinWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/PinWidget.cpp index 755d23cc..06bf6c50 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/PinWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/DIP/PinWidget.cpp @@ -14,7 +14,7 @@ using namespace Bloom::Targets; PinWidget::PinWidget(QWidget* parent, const TargetPinDescriptor& pinDescriptor, const TargetVariant& targetVariant): TargetPinWidget(parent, pinDescriptor, targetVariant) { this->layout = new QVBoxLayout(); - this->layout->setMargin(0); + this->layout->setContentsMargins(0, 0, 0, 0); this->layout->setSpacing(0); this->bodyWidget = new PinBodyWidget(this, this->pinDescriptor); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.cpp index 8dd99e94..45c62f3c 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.cpp @@ -13,8 +13,8 @@ using namespace Bloom::Targets; PinWidget::PinWidget(QWidget* parent, const TargetPinDescriptor& pinDescriptor, const TargetVariant& targetVariant): TargetPinWidget(parent, pinDescriptor, targetVariant) { - this->layout = new QVBoxLayout(); - this->layout->setMargin(0); + this->layout = new QBoxLayout(QBoxLayout::TopToBottom); + this->layout->setContentsMargins(0, 0, 0, 0); this->layout->setSpacing(0); auto pinCountPerLayout = (targetVariant.pinDescriptorsByNumber.size() / 4); @@ -68,14 +68,14 @@ PinWidget::PinWidget(QWidget* parent, const TargetPinDescriptor& pinDescriptor, } this->layout->addWidget(this->bodyWidget); - this->layout->insertSpacing(1, 3); + this->layout->addSpacing(3); if (this->isLeftLayout || this->isRightLayout) { auto stackedLabelLayout = new QVBoxLayout(); stackedLabelLayout->addWidget(this->pinNameLabel); - stackedLabelLayout->insertSpacing(3, 2); + stackedLabelLayout->addSpacing(2); stackedLabelLayout->addWidget(this->pinNumberLabel); - this->layout->insertSpacing(2, 4); + this->layout->addSpacing(4); this->layout->addLayout(stackedLabelLayout); // Adjust the pin name label width for horizontal pins to accommodate for pin names up to 5 characters in length @@ -84,15 +84,16 @@ PinWidget::PinWidget(QWidget* parent, const TargetPinDescriptor& pinDescriptor, } else if (this-isTopLayout || this->isBottomLayout) { this->layout->addWidget(this->pinNumberLabel); - this->layout->insertSpacing(3, 2); + this->layout->addSpacing(2); this->layout->addWidget(this->pinNameLabel); this->pinNameLabel->setFixedSize(PinBodyWidget::WIDTH, PinWidget::LABEL_HEIGHT - 2); this->pinNumberLabel->setFixedSize(PinBodyWidget::WIDTH, PinWidget::LABEL_HEIGHT - 2); } - this->layout->insertSpacing(5, 2); + this->layout->addSpacing(2); this->layout->addWidget(this->pinDirectionLabel); + this->layout->addStretch(1); this->setLayout(this->layout); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.hpp index ccff0c31..b2d21e91 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/PinWidget.hpp @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include "../TargetPinWidget.hpp" @@ -13,7 +14,7 @@ namespace Bloom::Widgets::InsightTargetWidgets::Qfp { Q_OBJECT private: - QVBoxLayout* layout = nullptr; + QBoxLayout* layout = nullptr; QLabel* pinNumberLabel = nullptr; QLabel* pinNameLabel = nullptr; QLabel* pinDirectionLabel = nullptr; diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/QuadFlatPackageWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/QuadFlatPackageWidget.cpp index f5c1d206..c1983be7 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/QuadFlatPackageWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/QFP/QuadFlatPackageWidget.cpp @@ -32,7 +32,7 @@ QuadFlatPackageWidget::QuadFlatPackageWidget( this->pinWidgets.reserve(targetVariant.pinDescriptorsByNumber.size()); this->layout = new QVBoxLayout(); this->layout->setSpacing(0); - this->layout->setMargin(0); + this->layout->setContentsMargins(0, 0, 0, 0); this->horizontalLayout = new QHBoxLayout(); this->horizontalLayout->setSpacing(0);