]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiKeySymbol.cpp
Use QFontMetrics information for underlines (and friends) width and position
[lyx.git] / src / frontends / qt4 / GuiKeySymbol.cpp
index b3184304cfbed55876023ecc6819befd141601d0..54a45166743f5afe59db0efb4e488fa3a358ec83 100644 (file)
@@ -64,7 +64,7 @@ static int string_to_qkey(std::string const & str)
 
        if (str == "Escape") return Qt::Key_Escape;
        if (str == "Tab") return Qt::Key_Tab;
-       if (str == "ISO_Left_Tab") return Qt::Key_Tab;
+       if (str == "ISO_Left_Tab") return Qt::Key_Backtab;
        if (str == "BackSpace") return Qt::Key_Backspace;
        if (str == "Return") return Qt::Key_Return;
        if (str == "KP_Enter") return Qt::Key_Enter; // correct ?
@@ -341,6 +341,7 @@ static int string_to_qkey(std::string const & str)
        if (str == "yacute") return Qt::Key_Yacute;
        if (str == "thorn") return Qt::Key_THORN;
        if (str == "ydiaeresis") return Qt::Key_ydiaeresis;
+       if (str == "Dead_Caron") return Qt::Key_Dead_Caron;
 
        // FIXME, correct for all these ?
        if (str == "Super_L") return Qt::Key_Super_L;
@@ -559,6 +560,7 @@ static std::string const qkey_to_string(int lkey)
        case Qt::Key_ssharp: return "ssharp";
        case Qt::Key_ydiaeresis: return "ydiaeresis";
        case Qt::Key_Bar: return "bar";
+       case Qt::Key_Dead_Caron: return "Dead_Caron";
 
        // FIXME: these ones I don't know the names of ... help !
        // what's here is basically guesses ...
@@ -670,7 +672,7 @@ char_type KeySymbol::getUCSEncoded() const
                return 0;
 
        // UTF16 has a maximum of two characters.
-       LASSERT(text_.size() <= 2, /**/);
+       LASSERT(text_.size() <= 2, return 0);
 
        if (lyxerr.debugging() && text_.size() > 1) {
                // We don't know yet how well support the full ucs4 range.
@@ -702,7 +704,7 @@ docstring const KeySymbol::print(KeyModifier mod, bool forgui) const
        if (forgui)
                str = seq.toString(QKeySequence::NativeText);
        else {
-#ifdef Q_WS_MACX
+#ifdef Q_OS_MAC
                // Qt/Mac does not use Command and friends in the
                // portable case, but the windows-like Control+x (bug 5421).
                str = seq.toString(QKeySequence::NativeText);