]> git.lyx.org Git - features.git/commitdiff
Correct typo in method name getDescendants()
authorScott Kostyshak <skostysh@lyx.org>
Mon, 16 Dec 2019 04:36:17 +0000 (23:36 -0500)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:47 +0000 (15:48 +0200)
When used as an adjective, both variants "descendent" and
"descendant" are acceptable, but when used as a noun only
"descendant" should be used.

For a reference, see here:

https://en.wiktionary.org/wiki/descendent#Noun

src/Buffer.cpp
src/Buffer.h
src/BufferEncodings.cpp
src/BufferList.cpp
src/insets/InsetBranch.cpp

index 0c0c9dfac72a9939bc8955df357de802148603b8..6cebf5d7f6264ac03d7db0286088c14bf4e4e872 100644 (file)
@@ -3125,7 +3125,7 @@ void Buffer::getLanguages(std::set<Language const *> & langs) const
        for (ParConstIterator it = par_iterator_begin(); it != end; ++it)
                it->getLanguages(langs);
        // also children
-       ListOfBuffers clist = getDescendents();
+       ListOfBuffers clist = getDescendants();
        for (auto const & cit : clist)
                cit->getLanguages(langs);
 }
@@ -3494,7 +3494,7 @@ Buffer const * Buffer::parent() const
 
 ListOfBuffers Buffer::allRelatives() const
 {
-       ListOfBuffers lb = masterBuffer()->getDescendents();
+       ListOfBuffers lb = masterBuffer()->getDescendants();
        lb.push_front(const_cast<Buffer *>(masterBuffer()));
        return lb;
 }
@@ -3565,7 +3565,7 @@ ListOfBuffers Buffer::getChildren() const
 }
 
 
-ListOfBuffers Buffer::getDescendents() const
+ListOfBuffers Buffer::getDescendants() const
 {
        ListOfBuffers v;
        collectChildren(v, true);
@@ -4395,7 +4395,7 @@ bool Buffer::autoSave() const
 void Buffer::setExportStatus(bool e) const
 {
        d->doing_export = e;
-       ListOfBuffers clist = getDescendents();
+       ListOfBuffers clist = getDescendants();
        for (auto const & bit : clist)
                bit->d->doing_export = e;
 }
@@ -4606,7 +4606,7 @@ Buffer::ExportStatus Buffer::doExport(string const & target, bool put_in_tempdir
                else
                        errors(error_type);
                // also to the children, in case of master-buffer-view
-               ListOfBuffers clist = getDescendents();
+               ListOfBuffers clist = getDescendants();
                for (auto const & bit : clist) {
                        if (runparams.silent)
                                bit->d->errorLists[error_type].clear();
@@ -4931,7 +4931,7 @@ void Buffer::Impl::traverseErrors(TeXErrors::Errors::const_iterator err, TeXErro
                        tie(start, end) = p->texrow.getEntriesFromRow(errorRow);
                else {
                        // The error occurred in a child
-                       for (Buffer const * child : owner_->getDescendents()) {
+                       for (Buffer const * child : owner_->getDescendants()) {
                                string const child_name =
                                        DocFileName(changeExtension(child->absFileName(), "tex")).
                                        mangledFileName();
index 48ed0e7c36be7779af78124402ec07fd122e31d9..7ed9f05d748a004c1084a98f29826dbc41117f8d 100644 (file)
@@ -461,10 +461,10 @@ public:
        /// the children appear.
        ListOfBuffers getChildren() const;
 
-       /// \return a list of all descendents of this Buffer (children,
+       /// \return a list of all descendants of this Buffer (children,
        /// grandchildren, etc). this list has no duplicates and is in
        /// the order in which the children appear.
-       ListOfBuffers getDescendents() const;
+       ListOfBuffers getDescendants() const;
 
        /// Collect all relative buffers, in the order in which they appear.
        /// I.e., the "root" Buffer is first, then its first child, then any
index 82fd3dc7159906a1e98bedbbd39b15359d9b682f..0604dfbd30135737a757a8923e3181bd5ed2c359 100644 (file)
@@ -45,7 +45,7 @@ void BufferEncodings::initUnicodeMath(Buffer const & buffer, bool for_master)
                return;
 
        // Check children
-       ListOfBuffers blist = buffer.getDescendents();
+       ListOfBuffers blist = buffer.getDescendants();
        ListOfBuffers::const_iterator bit = blist.begin();
        ListOfBuffers::const_iterator const bend = blist.end();
        for (; bit != bend; ++bit)
index 3865c72c8eaf13cf9b7b004e33dd21d7145b7913..fe8caf8c1fd67489246f56afdcb1b97798661251 100644 (file)
@@ -327,7 +327,7 @@ Buffer * BufferList::getBufferFromTmp(string const & s)
                        if (suffixIs(s, master_name))
                                return buf;
                        // if not, try with the children
-                       for (Buffer * child : buf->getDescendents()) {
+                       for (Buffer * child : buf->getDescendants()) {
                                string const mangled_child_name = DocFileName(
                                        changeExtension(child->absFileName(),
                                                ".tex")).mangledFileName();
index ecce3796ce54a8350cba10a705103b1bcc2ced42..6afa0c72ea6f575491359a7949e5de09dc0e5d8c 100644 (file)
@@ -194,7 +194,7 @@ void InsetBranch::doDispatch(Cursor & cur, FuncRequest & cmd)
                // if branch exists in a descendant, update previews.
                // TODO: only needed if "Show preview" is enabled in the included inset.
                bool exists_in_desc = false;
-               for (auto const & it : buf->getDescendents()) {
+               for (auto const & it : buf->getDescendants()) {
                        if (it->params().branchlist().find(params_.branch))
                                exists_in_desc = true;
                }