]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiSymbols.cpp
Use QFontMetrics information for underlines (and friends) width and position
[lyx.git] / src / frontends / qt4 / GuiSymbols.cpp
index c9305042ee6d03a8fce69280f0c86d1ecb4d62d4..6ccecf52411a4777fe8b2fc30938ac44a03656fb 100644 (file)
@@ -176,7 +176,7 @@ QString getBlock(char_type c)
 
        // guessing was wrong so far. do a real search.
        int i = 0;
-       while (c > unicode_blocks[i].end && i < no_blocks)
+       while (i < no_blocks && c > unicode_blocks[i].end)
                ++i;
        if (i == no_blocks)
                return QString();
@@ -199,7 +199,7 @@ class GuiSymbols::Model : public QAbstractItemModel
 {
 public:
        Model(GuiSymbols * parent)
-               : QAbstractItemModel(parent), parent_(parent)
+               : QAbstractItemModel(parent)
        {}
 
        QModelIndex index(int row, int column, QModelIndex const &) const
@@ -257,8 +257,7 @@ public:
 
 private:
        friend class GuiSymbols;
-       GuiSymbols * parent_;
-       
+
        QList<char_type> symbols_;
 };