From f0c7ef50f7a7348f57c5c1518c8c7084b0aae479 Mon Sep 17 00:00:00 2001 From: Srivats P Date: Sat, 11 Dec 2021 13:40:44 +0530 Subject: [PATCH] Rename FieldEdit::setMask as FieldEdit::setMaskMode --- client/fieldedit.cpp | 14 +++++++------- client/fieldedit.h | 4 ++-- client/findreplace.cpp | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/client/fieldedit.cpp b/client/fieldedit.cpp index bc049e5..bc9cb10 100644 --- a/client/fieldedit.cpp +++ b/client/fieldedit.cpp @@ -35,25 +35,25 @@ void FieldEdit::setType(FieldType type) switch (type_) { case kUInt64: setValidator(&uint64Validator_); - if (isMask_) + if (isMaskMode_) setText("0xFFFFFFFFFFFFFFFF"); break; case kMacAddress: setValidator(&macValidator_); setPlaceholderText("00:00:00:00:00:00"); - if (isMask_) + if (isMaskMode_) setText("FF:FF:FF:FF:FF:FF"); break; case kIp4Address: setValidator(&ip4Validator_); setPlaceholderText("0.0.0.0"); - if (isMask_) + if (isMaskMode_) setText("255.255.255.255"); break; case kIp6Address: setValidator(&ip6Validator_); setPlaceholderText("::"); - if (isMask_) + if (isMaskMode_) setText("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF"); break; default: @@ -68,14 +68,14 @@ void FieldEdit::setRange(quint64 min, quint64 max) uint64Validator_.setRange(min, max); if (type_ == kUInt64) { setPlaceholderText(QString("%1 - %2").arg(min).arg(max)); - if (isMask_) + if (isMaskMode_) setText(QString::number(max, 16).toUpper().prepend("0x")); } } -void FieldEdit::setMask(bool isMask) +void FieldEdit::setMaskMode(bool maskMode) { - isMask_ = isMask; + isMaskMode_ = maskMode; } QString FieldEdit::text() const diff --git a/client/fieldedit.h b/client/fieldedit.h index 25ab70f..baeb139 100644 --- a/client/fieldedit.h +++ b/client/fieldedit.h @@ -42,13 +42,13 @@ public: void setType(FieldType type); void setRange(quint64 min, quint64 max); - void setMask(bool isMask); // FIXME: rename + void setMaskMode(bool maskMode); QString text() const; private: FieldType type_{kUInt64}; - bool isMask_{false}; + bool isMaskMode_{false}; IPv4AddressValidator ip4Validator_; IPv6AddressValidator ip6Validator_; diff --git a/client/findreplace.cpp b/client/findreplace.cpp index ef2a1a5..125b105 100644 --- a/client/findreplace.cpp +++ b/client/findreplace.cpp @@ -34,8 +34,8 @@ FindReplaceDialog::FindReplaceDialog(Action *action, QWidget *parent) { setupUi(this); - findMask->setMask(true); - replaceMask->setMask(true); + findMask->setMaskMode(true); + replaceMask->setMaskMode(true); // Keep things simple and don't use mask(s) (default) useFindMask->setChecked(false);