mirror of
https://github.com/Serial-Studio/Serial-Studio.git
synced 2025-01-15 05:22:53 +08:00
Format code
This commit is contained in:
parent
ed806c3563
commit
6bbff5a976
@ -37,7 +37,7 @@ IO::DataSources::Network::Network()
|
||||
setUdpLocalPort(defaultUdpLocalPort());
|
||||
setUdpRemotePort(defaultUdpRemotePort());
|
||||
setSocketType(QAbstractSocket::TcpSocket);
|
||||
|
||||
|
||||
// clang-format off
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
|
||||
connect(&m_tcpSocket, SIGNAL(error(QAbstractSocket::SocketError)),
|
||||
|
@ -625,7 +625,7 @@ void IO::DataSources::Serial::readSettings()
|
||||
for (int i = 0; i < list.count(); ++i)
|
||||
m_baudRateList.append(list.at(i));
|
||||
|
||||
// Sort baud rate list
|
||||
// Sort baud rate list
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
|
||||
for (auto i = 0; i < m_baudRateList.count() - 1; ++i)
|
||||
{
|
||||
|
@ -251,9 +251,7 @@ StringList MQTT::Client::mqttVersions() const
|
||||
StringList MQTT::Client::sslProtocols() const
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
|
||||
return StringList {
|
||||
tr("System default"), "TLS v1.0", "TLS v1.1", "TLS v1.2"
|
||||
};
|
||||
return StringList { tr("System default"), "TLS v1.0", "TLS v1.1", "TLS v1.2" };
|
||||
#else
|
||||
return StringList {
|
||||
tr("System default"), "TLS v1.0", "TLS v1.1", "TLS v1.2",
|
||||
|
@ -182,7 +182,7 @@ void Plugins::Server::acceptConnection()
|
||||
// Connect socket signals/slots
|
||||
connect(socket, &QTcpSocket::readyRead, this, &Plugins::Server::onDataReceived);
|
||||
connect(socket, &QTcpSocket::disconnected, this, &Plugins::Server::removeConnection);
|
||||
|
||||
|
||||
// React to socket errors
|
||||
// clang-format off
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
|
||||
|
@ -604,7 +604,9 @@ QString Widgets::Terminal::vt100Processing(const QString &data)
|
||||
//---------------------------------------------------------º-----------------------------------------
|
||||
|
||||
#define QTC_ASSERT(cond, action) \
|
||||
if (Q_LIKELY(cond)) { } \
|
||||
if (Q_LIKELY(cond)) \
|
||||
{ \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
action; \
|
||||
@ -864,13 +866,13 @@ Widgets::AnsiEscapeCodeHandler::parseText(const FormattedText &input)
|
||||
{
|
||||
(code == RgbTextColor)
|
||||
? charFormat.setForeground(
|
||||
QColor(numbers.at(i + 1).toInt(),
|
||||
numbers.at(i + 2).toInt(),
|
||||
numbers.at(i + 3).toInt()))
|
||||
QColor(numbers.at(i + 1).toInt(),
|
||||
numbers.at(i + 2).toInt(),
|
||||
numbers.at(i + 3).toInt()))
|
||||
: charFormat.setBackground(
|
||||
QColor(numbers.at(i + 1).toInt(),
|
||||
numbers.at(i + 2).toInt(),
|
||||
numbers.at(i + 3).toInt()));
|
||||
QColor(numbers.at(i + 1).toInt(),
|
||||
numbers.at(i + 2).toInt(),
|
||||
numbers.at(i + 3).toInt()));
|
||||
setFormatScope(charFormat);
|
||||
}
|
||||
i += 3;
|
||||
|
Loading…
x
Reference in New Issue
Block a user