UI: ConfUtil: Simplify setErrorMessage()

This commit is contained in:
Nodir Temirkhodjaev 2024-04-06 10:12:19 +03:00
parent 4697615cb0
commit 51474af376
2 changed files with 1 additions and 13 deletions

View File

@ -79,14 +79,6 @@ void writeConfFlags(const FirewallConf &conf, PFORT_CONF_FLAGS confFlags)
ConfUtil::ConfUtil(QObject *parent) : QObject(parent) { }
void ConfUtil::setErrorMessage(const QString &errorMessage)
{
if (m_errorMessage != errorMessage) {
m_errorMessage = errorMessage;
emit errorMessageChanged();
}
}
int ConfUtil::ruleMaxCount()
{
return FORT_CONF_RULE_MAX;

View File

@ -24,7 +24,6 @@ using chars_arr_t = QVector<qint8>;
class ConfUtil : public QObject
{
Q_OBJECT
Q_PROPERTY(QString errorMessage READ errorMessage NOTIFY errorMessageChanged)
public:
explicit ConfUtil(QObject *parent = nullptr);
@ -36,9 +35,6 @@ public:
static int ruleMaxCount();
static int zoneMaxCount();
signals:
void errorMessageChanged();
public slots:
int writeVersion(QByteArray &buf);
int writeServices(
@ -56,7 +52,7 @@ public slots:
bool loadZone(const QByteArray &buf, IpRange &ipRange);
private:
void setErrorMessage(const QString &errorMessage);
void setErrorMessage(const QString &errorMessage) { m_errorMessage = errorMessage; }
bool parseAddressGroups(const QList<AddressGroup *> &addressGroups,
addrranges_arr_t &addressRanges, longs_arr_t &addressGroupOffsets,