We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 85a391e commit 4df4a7fCopy full SHA for 4df4a7f
2 files changed
omodsim/connectiondetails.h
@@ -189,20 +189,17 @@ DECLARE_ENUM_STRINGS(QSerialPort::Parity,
189
{ QSerialPort::EvenParity, "EVEN" },
190
{ QSerialPort::OddParity, "ODD" },
191
{ QSerialPort::SpaceParity, "SPACE" },
192
- { QSerialPort::MarkParity, "MARK" },
193
- { QSerialPort::UnknownParity,"UNKNOWN" }
+ { QSerialPort::MarkParity, "MARK" }
194
)
195
DECLARE_ENUM_STRINGS(QSerialPort::StopBits,
196
{ QSerialPort::OneStop, "1" },
197
{ QSerialPort::OneAndHalfStop, "1.5" },
198
- { QSerialPort::TwoStop, "2" },
199
- { QSerialPort::UnknownStopBits, "UNKNOWN" },
200
- )
+ { QSerialPort::TwoStop, "2" }
+)
201
DECLARE_ENUM_STRINGS(QSerialPort::FlowControl,
202
{ QSerialPort::NoFlowControl, "NO" },
203
{ QSerialPort::HardwareControl, "HARDWARE" },
204
- { QSerialPort::SoftwareControl, "SOFTWARE" },
205
- { QSerialPort::UnknownFlowControl, "UNKNOWN" },
+ { QSerialPort::SoftwareControl, "SOFTWARE" }
206
207
208
///
omodsim/controls/jscriptcontrol.cpp
@@ -442,23 +442,21 @@ QXmlStreamReader& operator>>(QXmlStreamReader& xml, JScriptControl* ctrl)
442
443
if (xml.isStartElement() && xml.name() == QLatin1String("JScriptControl")) {
444
while (xml.readNextStartElement()) {
445
- const QStringRef name = xml.name();
446
-
447
- if (name == QLatin1String("Script")) {
+ if (xml.name() == QLatin1String("Script")) {
448
const QString scriptText = xml.readElementText(QXmlStreamReader::IncludeChildElements);
449
ctrl->setScript(scriptText);
450
}
451
- else if (name == QLatin1String("VerticalSplitter")) {
+ else if (xml.name() == QLatin1String("VerticalSplitter")) {
452
const QByteArray state = QByteArray::fromBase64(xml.readElementText().toLatin1());
453
if (!state.isEmpty())
454
ctrl->ui->verticalSplitter->restoreState(state);
455
456
- else if (name == QLatin1String("HorizontalSplitter")) {
+ else if (xml.name() == QLatin1String("HorizontalSplitter")) {
457
458
459
ctrl->ui->horizontalSplitter->restoreState(state);
460
461
- else if (name == QLatin1String("AutoComplete")) {
+ else if (xml.name() == QLatin1String("AutoComplete")) {
462
const QXmlStreamAttributes attrs = xml.attributes();
463
if (attrs.hasAttribute("Enabled")) {
464
const bool enabled = stringToBool(attrs.value("Enabled").toString());
0 commit comments