Format code

This commit is contained in:
Alex Spataru 2022-01-02 12:18:05 -05:00
parent ed806c3563
commit 6bbff5a976
5 changed files with 13 additions and 13 deletions

View File

@ -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)),

View File

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

View File

@ -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",

View File

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

View File

@ -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;