Hopefully fix basic text entry for Kornel. Not dealing with non-locale entry yet.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5880 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2002-12-19 18:44:31 +00:00
parent a614f76da6
commit 9ed004522e
2 changed files with 16 additions and 10 deletions

View File

@ -1,3 +1,7 @@
2002-12-19 John Levon <levon@movementarian.org>
* QLyXKeySym.C: do not attempt to compare Qt::Key_unknowns
2002-12-19 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* lyx_gui.C (getStatus): forks-show is not implemented by the qt

View File

@ -73,12 +73,10 @@ string QLyXKeySym::getSymbolName() const
{
string sym(qkey_to_string(key_));
if (sym.empty()) {
lyxerr[Debug::KEY] << "sym empty in getSymbolName()" << endl;
if (!text_.isEmpty())
sym = fromqstr(text_);
}
lyxerr[Debug::KEY] << "getSymbolName() -> " << sym << endl;
// e.g. A-Za-z, and others
if (sym.empty())
sym = fromqstr(text_);
return sym;
}
@ -107,10 +105,14 @@ bool QLyXKeySym::isText() const
bool operator==(LyXKeySym const & k1, LyXKeySym const & k2)
{
// note we ignore text_ here (non-strict ==), because
// text_ is not filled out by keymap initialisation
QLyXKeySym const & q1(static_cast<QLyXKeySym const &>(k1));
QLyXKeySym const & q2(static_cast<QLyXKeySym const &>(k2));
return static_cast<QLyXKeySym const &>(k1).key()
== static_cast<QLyXKeySym const &>(k2).key();
// we do not have enough info for a fair comparison, so return
// false. This works out OK because unknown text from Qt will
// get inserted anyway after the isText() check
if (q1.key() == Qt::Key_unknown || q2.key() == Qt::Key_unknown)
return false;
return q1.key() == q2.key();
}