Skip to content

Commit 4df4a7f

Browse files
committed
correct building under qt6
1 parent 85a391e commit 4df4a7f

2 files changed

Lines changed: 8 additions & 13 deletions

File tree

omodsim/connectiondetails.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -189,20 +189,17 @@ DECLARE_ENUM_STRINGS(QSerialPort::Parity,
189189
{ QSerialPort::EvenParity, "EVEN" },
190190
{ QSerialPort::OddParity, "ODD" },
191191
{ QSerialPort::SpaceParity, "SPACE" },
192-
{ QSerialPort::MarkParity, "MARK" },
193-
{ QSerialPort::UnknownParity,"UNKNOWN" }
192+
{ QSerialPort::MarkParity, "MARK" }
194193
)
195194
DECLARE_ENUM_STRINGS(QSerialPort::StopBits,
196195
{ QSerialPort::OneStop, "1" },
197196
{ QSerialPort::OneAndHalfStop, "1.5" },
198-
{ QSerialPort::TwoStop, "2" },
199-
{ QSerialPort::UnknownStopBits, "UNKNOWN" },
200-
)
197+
{ QSerialPort::TwoStop, "2" }
198+
)
201199
DECLARE_ENUM_STRINGS(QSerialPort::FlowControl,
202200
{ QSerialPort::NoFlowControl, "NO" },
203201
{ QSerialPort::HardwareControl, "HARDWARE" },
204-
{ QSerialPort::SoftwareControl, "SOFTWARE" },
205-
{ QSerialPort::UnknownFlowControl, "UNKNOWN" },
202+
{ QSerialPort::SoftwareControl, "SOFTWARE" }
206203
)
207204

208205
///

omodsim/controls/jscriptcontrol.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -442,23 +442,21 @@ QXmlStreamReader& operator>>(QXmlStreamReader& xml, JScriptControl* ctrl)
442442

443443
if (xml.isStartElement() && xml.name() == QLatin1String("JScriptControl")) {
444444
while (xml.readNextStartElement()) {
445-
const QStringRef name = xml.name();
446-
447-
if (name == QLatin1String("Script")) {
445+
if (xml.name() == QLatin1String("Script")) {
448446
const QString scriptText = xml.readElementText(QXmlStreamReader::IncludeChildElements);
449447
ctrl->setScript(scriptText);
450448
}
451-
else if (name == QLatin1String("VerticalSplitter")) {
449+
else if (xml.name() == QLatin1String("VerticalSplitter")) {
452450
const QByteArray state = QByteArray::fromBase64(xml.readElementText().toLatin1());
453451
if (!state.isEmpty())
454452
ctrl->ui->verticalSplitter->restoreState(state);
455453
}
456-
else if (name == QLatin1String("HorizontalSplitter")) {
454+
else if (xml.name() == QLatin1String("HorizontalSplitter")) {
457455
const QByteArray state = QByteArray::fromBase64(xml.readElementText().toLatin1());
458456
if (!state.isEmpty())
459457
ctrl->ui->horizontalSplitter->restoreState(state);
460458
}
461-
else if (name == QLatin1String("AutoComplete")) {
459+
else if (xml.name() == QLatin1String("AutoComplete")) {
462460
const QXmlStreamAttributes attrs = xml.attributes();
463461
if (attrs.hasAttribute("Enabled")) {
464462
const bool enabled = stringToBool(attrs.value("Enabled").toString());

0 commit comments

Comments
 (0)