]> git.lyx.org Git - features.git/commitdiff
Fix compilation with qt 4.2: QString::operator[] returns a QCharRef,
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 26 Feb 2010 14:46:42 +0000 (14:46 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 26 Feb 2010 14:46:42 +0000 (14:46 +0000)
which is supposedly like a QChar... except that some methods like isUpper
were forgotten in the process.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33580 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/Menus.cpp

index 11f59fbe6d8acb28c5fdc7d0b405b971f6a425b9..2407bacbffa41990a6bbf6dd3962ef3908b97be3 100644 (file)
@@ -783,9 +783,9 @@ void MenuDefinition::expandLanguageSelector(Buffer const * buf)
                bool success = false;
                // try capitals first
                for (int i = 0; i < label.size(); ++i) {
-                       if (!label[i].isUpper())
+                       QChar const ch = label[i];
+                       if (!ch.isUpper())
                                continue;
-                       QString const ch = QString(label[i]);
                        if (!accelerators.contains(ch, Qt::CaseInsensitive)) {
                                label = label + toqstr("|") + ch;
                                accelerators.append(ch);