Bernhard Roider <[EMAIL PROTECTED]> writes:
| Ok, then here's the patch with const methods and mutable member
| variable. It fixes bug #3293.
The patch does a lot of small code shuffling that might change
behavior, so it porbably needs some testing. I'll leave it up to RM if
this should be applied or not.
The patch _looks_ good, I think I only found two nit-picks:
| Index: src/kbmap.C
| ===================================================================
| --- src/kbmap.C (revision 17394)
| +++ src/kbmap.C (working copy)
| @@ -141,7 +141,7 @@
| }
|
| FuncRequest func = lyxaction.lookupFunc(cmd);
| - if (func. action == LFUN_UNKNOWN_ACTION) {
| + if (func.action == LFUN_UNKNOWN_ACTION) {
| lexrc.printError("BN_BIND: Unknown LyX"
| " function `$$Token'");
| error = true;
Nice catch. This hunk should be applied right away.
| Index: src/lyxlex.C
| ===================================================================
| --- src/lyxlex.C (revision 17394)
| +++ src/lyxlex.C (working copy)
| @@ -146,13 +162,23 @@
|
| string const LyXLex::getString() const
| {
| + lastReadOk_ = pimpl_->status == LEX_DATA || pimpl_->status == LEX_TOKEN;
| +
| + if (lastReadOk_)
| return pimpl_->getString();
| +
| + return string("");
This should just be "return string();"
| }
|
|
| docstring const LyXLex::getDocString() const
| {
| - return pimpl_->getDocString();
| + lastReadOk_ = pimpl_->status == LEX_DATA || pimpl_->status == LEX_TOKEN;
| +
| + if (lastReadOk_)
| + return pimpl_->getDocString();
| +
| + return docstring(from_utf8(""));
Similar here "return docstring();"
--
Lgb