]> git.lyx.org Git - features.git/commitdiff
Complilation fix.
authorJuergen Spitzmueller <spitz@lyx.org>
Tue, 19 May 2015 10:56:31 +0000 (12:56 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Tue, 19 May 2015 10:56:31 +0000 (12:56 +0200)
This time without unwandted po stuff.

src/frontends/qt4/GuiBox.cpp
src/frontends/qt4/GuiCharacter.cpp

index afc646281fcd6ca8fc5cc4fe01ff3e7063304b3a..c76aeaf2b5ecdccbf5121b1b9c6be08c75b146fd 100644 (file)
@@ -105,13 +105,10 @@ static QList<ColorCode> colors()
 
 namespace {
 
-struct ColorSorter
+bool ColorSorter(ColorCode lhs, ColorCode rhs)
 {
-       bool operator()(ColorCode lhs, ColorCode rhs) const {
-               return
-                       support::compare_no_case(lcolor.getGUIName(lhs), lcolor.getGUIName(rhs)) < 0;
-       }
-};
+       return support::compare_no_case(lcolor.getGUIName(lhs), lcolor.getGUIName(rhs)) < 0;
+}
 
 } // namespace anon
 
@@ -169,7 +166,7 @@ GuiBox::GuiBox(QWidget * parent) : InsetParamsWidget(parent)
 
        // the background can be uncolored while the frame cannot
        color_codes_ = colors();
-       sort(color_codes_.begin(), color_codes_.end(), ColorSorter());
+       qSort(color_codes_.begin(), color_codes_.end(), ColorSorter);
        fillComboColor(backgroundColorCO, true);
        fillComboColor(frameColorCO, false);
 
index a824df7931386ccd1e3c299fdb7cf73c59f60a2b..c673d2d9c3fff479caca1c83b01b522c39bdab85 100644 (file)
@@ -193,13 +193,10 @@ void fillComboColor(QComboBox * combo, QList<T> const & list)
 }
 
 
-struct ColorSorter
+bool ColorSorter(ColorCode lhs, ColorCode rhs)
 {
-       bool operator()(ColorCode lhs, ColorCode rhs) const {
-               return
-                       support::compare_no_case(lcolor.getGUIName(lhs), lcolor.getGUIName(rhs)) < 0;
-       }
-};
+       return support::compare_no_case(lcolor.getGUIName(lhs), lcolor.getGUIName(rhs)) < 0;
+}
 
 } // namespace anon
 
@@ -230,7 +227,7 @@ GuiCharacter::GuiCharacter(GuiView & lv)
        size   = sizeData();
        bar    = barData();
        color  = colorData();
-       sort(color.begin(), color.end(), ColorSorter());
+       qSort(color.begin(), color.end(), ColorSorter);
 
        language = languageData();
        language.prepend(LanguagePair(qt_("Reset"), "reset"));