Improve code readability

This commit is contained in:
joshua
2021-12-19 21:05:48 +01:00
parent 57e80e7b5e
commit e2454faa36
7 changed files with 215 additions and 200 deletions

View File

@@ -84,7 +84,7 @@ void UnGroupTerminalsCommand::setUp(const QVector<QWeakPointer<RealTerminal>> &t
auto ptd_ = m_terminal_strip->physicalTerminalData(rt_);
//Physical have only one real terminal, no need to ungroup it
if (ptd_.real_terminals_vector.size() <= 1) {
if (ptd_.realTerminalCount() <= 1) {
continue;
}

View File

@@ -52,9 +52,9 @@ void SortTerminalStripCommand::sort()
int int1 =-1;
int int2 =-1;
if (arg1.real_terminals_vector.count())
if (arg1.realTerminalCount())
{
str1 = arg1.real_terminals_vector.constLast().label();
str1 = arg1.realTerminalDatas().constLast().label();
auto match = rx.match(str1);
if (match.hasMatch()) {
@@ -62,9 +62,9 @@ void SortTerminalStripCommand::sort()
}
}
if (arg2.real_terminals_vector.count())
if (arg2.realTerminalCount())
{
str2 = arg2.real_terminals_vector.constLast().label();
str2 = arg2.realTerminalDatas().constLast().label();
auto match = rx.match(str2);
if (match.hasMatch()) {

View File

@@ -23,7 +23,7 @@
#include <QVector>
class TerminalStrip;
struct PhysicalTerminalData;
class PhysicalTerminalData;
/**
* @brief The SortTerminalStripCommand class