mirror of
https://github.com/tnodir/fort
synced 2024-11-15 05:46:03 +00:00
UI: ConfUtil: Simplify setErrorMessage()
This commit is contained in:
parent
4697615cb0
commit
51474af376
@ -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;
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user