Qt6 compatability changes

This commit is contained in:
Nav
2021-08-18 22:51:15 +01:00
parent 29ab3aa3b8
commit 01c20339f3
7 changed files with 16 additions and 14 deletions

View File

@@ -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()) {

View File

@@ -18,7 +18,7 @@ void WriteRegister::init() {
}
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());
std::reverse(this->registerValue.begin(), this->registerValue.end());
}