From: Richard Heck Date: Sat, 21 Apr 2012 20:25:38 +0000 (-0400) Subject: Rename is_valid_ as validated_, which is a bit more informative. X-Git-Tag: 2.1.0beta1~1933^2~18 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=94b9da328be4dbbe510caf263aa9bf5da77e5745;p=features.git Rename is_valid_ as validated_, which is a bit more informative. --- diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 5fed8df61d..e370170a26 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -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); diff --git a/src/frontends/qt4/GuiDocument.h b/src/frontends/qt4/GuiDocument.h index 69067df6e7..4ab74c6dbf 100644 --- a/src/frontends/qt4/GuiDocument.h +++ b/src/frontends/qt4/GuiDocument.h @@ -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_; };