Rename is_valid_ as validated_, which is a bit more informative.

This commit is contained in:
Richard Heck 2012-04-21 16:25:38 -04:00
parent afee2488cb
commit 94b9da328b
2 changed files with 7 additions and 7 deletions

View File

@ -574,7 +574,7 @@ void PreambleModule::closeEvent(QCloseEvent * e)
/////////////////////////////////////////////////////////////////////
LocalLayout::LocalLayout() : current_id_(0), is_valid_(false)
LocalLayout::LocalLayout() : current_id_(0), validated_(false)
{
connect(locallayoutTE, SIGNAL(textChanged()), this, SLOT(textChanged()));
connect(validatePB, SIGNAL(clicked()), this, SLOT(validatePressed()));
@ -612,7 +612,7 @@ void LocalLayout::textChanged()
fromqstr(locallayoutTE->document()->toPlainText().trimmed());
if (layout.empty()) {
is_valid_ = true;
validated_ = true;
validatePB->setEnabled(false);
validLB->setText("");
convertPB->hide();
@ -620,7 +620,7 @@ void LocalLayout::textChanged()
changed();
} else if (!validatePB->isEnabled()) {
// if that's already enabled, we shouldn't need to do anything.
is_valid_ = false;
validated_ = false;
validLB->setText(message);
validatePB->setEnabled(true);
convertPB->setEnabled(false);
@ -664,9 +664,9 @@ void LocalLayout::validate() {
fromqstr(locallayoutTE->document()->toPlainText().trimmed());
if (!layout.empty()) {
TextClass::ReturnValues const ret = TextClass::validate(layout);
is_valid_ = (ret == TextClass::OK) || (ret == TextClass::OK_OLDFORMAT);
validated_ = (ret == TextClass::OK) || (ret == TextClass::OK_OLDFORMAT);
validatePB->setEnabled(false);
validLB->setText(is_valid_ ? vtext : ivtext);
validLB->setText(validated_ ? vtext : ivtext);
if (ret == TextClass::OK_OLDFORMAT) {
convertPB->show();
convertPB->setEnabled(true);

View File

@ -287,7 +287,7 @@ public:
LocalLayout();
void update(BufferParams const & params, BufferId id);
void apply(BufferParams & params);
bool isValid() const { return is_valid_; }
bool isValid() const { return validated_; }
Q_SIGNALS:
/// signal that something's changed in the Widget.
@ -303,7 +303,7 @@ private Q_SLOTS:
private:
BufferId current_id_;
bool is_valid_;
bool validated_;
};