Qt6 compatability changes
This commit is contained in:
@@ -25,8 +25,8 @@ void SupportedFeaturesQuery::init() {
|
|||||||
auto featureString = featureList.at(i);
|
auto featureString = featureList.at(i);
|
||||||
|
|
||||||
// We only care about supported features. Supported features will precede a '+' character.
|
// We only care about supported features. Supported features will precede a '+' character.
|
||||||
if (featureString[featureString.size() - 1] == "+") {
|
if (featureString[featureString.size() - 1] == '+') {
|
||||||
featureString.remove("+");
|
featureString.remove('+');
|
||||||
|
|
||||||
auto feature = gdbFeatureMapping.valueAt(featureString.toStdString());
|
auto feature = gdbFeatureMapping.valueAt(featureString.toStdString());
|
||||||
if (feature.has_value()) {
|
if (feature.has_value()) {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ void WriteRegister::init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto packetSegments = QString::fromStdString(packet).split("=");
|
auto packetSegments = QString::fromStdString(packet).split("=");
|
||||||
this->registerNumber = static_cast<int>(packetSegments.front().midRef(1).toUInt(nullptr, 16));
|
this->registerNumber = static_cast<int>(packetSegments.front().mid(1).toUInt(nullptr, 16));
|
||||||
this->registerValue = Packet::hexToData(packetSegments.back().toStdString());
|
this->registerValue = Packet::hexToData(packetSegments.back().toStdString());
|
||||||
std::reverse(this->registerValue.begin(), this->registerValue.end());
|
std::reverse(this->registerValue.begin(), this->registerValue.end());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ DualInlinePackageWidget::DualInlinePackageWidget(
|
|||||||
this->pinWidgets.reserve(targetVariant.pinDescriptorsByNumber.size());
|
this->pinWidgets.reserve(targetVariant.pinDescriptorsByNumber.size());
|
||||||
this->layout = new QVBoxLayout();
|
this->layout = new QVBoxLayout();
|
||||||
this->layout->setSpacing(8);
|
this->layout->setSpacing(8);
|
||||||
this->layout->setMargin(0);
|
this->layout->setContentsMargins(0, 0, 0, 0);
|
||||||
|
|
||||||
this->topPinLayout = new QHBoxLayout();
|
this->topPinLayout = new QHBoxLayout();
|
||||||
this->topPinLayout->setSpacing(8);
|
this->topPinLayout->setSpacing(8);
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ using namespace Bloom::Targets;
|
|||||||
PinWidget::PinWidget(QWidget* parent, const TargetPinDescriptor& pinDescriptor, const TargetVariant& targetVariant):
|
PinWidget::PinWidget(QWidget* parent, const TargetPinDescriptor& pinDescriptor, const TargetVariant& targetVariant):
|
||||||
TargetPinWidget(parent, pinDescriptor, targetVariant) {
|
TargetPinWidget(parent, pinDescriptor, targetVariant) {
|
||||||
this->layout = new QVBoxLayout();
|
this->layout = new QVBoxLayout();
|
||||||
this->layout->setMargin(0);
|
this->layout->setContentsMargins(0, 0, 0, 0);
|
||||||
this->layout->setSpacing(0);
|
this->layout->setSpacing(0);
|
||||||
|
|
||||||
this->bodyWidget = new PinBodyWidget(this, this->pinDescriptor);
|
this->bodyWidget = new PinBodyWidget(this, this->pinDescriptor);
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ using namespace Bloom::Targets;
|
|||||||
|
|
||||||
PinWidget::PinWidget(QWidget* parent, const TargetPinDescriptor& pinDescriptor, const TargetVariant& targetVariant):
|
PinWidget::PinWidget(QWidget* parent, const TargetPinDescriptor& pinDescriptor, const TargetVariant& targetVariant):
|
||||||
TargetPinWidget(parent, pinDescriptor, targetVariant) {
|
TargetPinWidget(parent, pinDescriptor, targetVariant) {
|
||||||
this->layout = new QVBoxLayout();
|
this->layout = new QBoxLayout(QBoxLayout::TopToBottom);
|
||||||
this->layout->setMargin(0);
|
this->layout->setContentsMargins(0, 0, 0, 0);
|
||||||
this->layout->setSpacing(0);
|
this->layout->setSpacing(0);
|
||||||
|
|
||||||
auto pinCountPerLayout = (targetVariant.pinDescriptorsByNumber.size() / 4);
|
auto pinCountPerLayout = (targetVariant.pinDescriptorsByNumber.size() / 4);
|
||||||
@@ -68,14 +68,14 @@ PinWidget::PinWidget(QWidget* parent, const TargetPinDescriptor& pinDescriptor,
|
|||||||
}
|
}
|
||||||
|
|
||||||
this->layout->addWidget(this->bodyWidget);
|
this->layout->addWidget(this->bodyWidget);
|
||||||
this->layout->insertSpacing(1, 3);
|
this->layout->addSpacing(3);
|
||||||
|
|
||||||
if (this->isLeftLayout || this->isRightLayout) {
|
if (this->isLeftLayout || this->isRightLayout) {
|
||||||
auto stackedLabelLayout = new QVBoxLayout();
|
auto stackedLabelLayout = new QVBoxLayout();
|
||||||
stackedLabelLayout->addWidget(this->pinNameLabel);
|
stackedLabelLayout->addWidget(this->pinNameLabel);
|
||||||
stackedLabelLayout->insertSpacing(3, 2);
|
stackedLabelLayout->addSpacing(2);
|
||||||
stackedLabelLayout->addWidget(this->pinNumberLabel);
|
stackedLabelLayout->addWidget(this->pinNumberLabel);
|
||||||
this->layout->insertSpacing(2, 4);
|
this->layout->addSpacing(4);
|
||||||
this->layout->addLayout(stackedLabelLayout);
|
this->layout->addLayout(stackedLabelLayout);
|
||||||
|
|
||||||
// Adjust the pin name label width for horizontal pins to accommodate for pin names up to 5 characters in length
|
// 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) {
|
} else if (this-isTopLayout || this->isBottomLayout) {
|
||||||
this->layout->addWidget(this->pinNumberLabel);
|
this->layout->addWidget(this->pinNumberLabel);
|
||||||
this->layout->insertSpacing(3, 2);
|
this->layout->addSpacing(2);
|
||||||
this->layout->addWidget(this->pinNameLabel);
|
this->layout->addWidget(this->pinNameLabel);
|
||||||
|
|
||||||
this->pinNameLabel->setFixedSize(PinBodyWidget::WIDTH, PinWidget::LABEL_HEIGHT - 2);
|
this->pinNameLabel->setFixedSize(PinBodyWidget::WIDTH, PinWidget::LABEL_HEIGHT - 2);
|
||||||
this->pinNumberLabel->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->addWidget(this->pinDirectionLabel);
|
||||||
|
this->layout->addStretch(1);
|
||||||
|
|
||||||
this->setLayout(this->layout);
|
this->setLayout(this->layout);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
#include <QBoxLayout>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
|
|
||||||
#include "../TargetPinWidget.hpp"
|
#include "../TargetPinWidget.hpp"
|
||||||
@@ -13,7 +14,7 @@ namespace Bloom::Widgets::InsightTargetWidgets::Qfp
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private:
|
private:
|
||||||
QVBoxLayout* layout = nullptr;
|
QBoxLayout* layout = nullptr;
|
||||||
QLabel* pinNumberLabel = nullptr;
|
QLabel* pinNumberLabel = nullptr;
|
||||||
QLabel* pinNameLabel = nullptr;
|
QLabel* pinNameLabel = nullptr;
|
||||||
QLabel* pinDirectionLabel = nullptr;
|
QLabel* pinDirectionLabel = nullptr;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ QuadFlatPackageWidget::QuadFlatPackageWidget(
|
|||||||
this->pinWidgets.reserve(targetVariant.pinDescriptorsByNumber.size());
|
this->pinWidgets.reserve(targetVariant.pinDescriptorsByNumber.size());
|
||||||
this->layout = new QVBoxLayout();
|
this->layout = new QVBoxLayout();
|
||||||
this->layout->setSpacing(0);
|
this->layout->setSpacing(0);
|
||||||
this->layout->setMargin(0);
|
this->layout->setContentsMargins(0, 0, 0, 0);
|
||||||
|
|
||||||
this->horizontalLayout = new QHBoxLayout();
|
this->horizontalLayout = new QHBoxLayout();
|
||||||
this->horizontalLayout->setSpacing(0);
|
this->horizontalLayout->setSpacing(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user