commit 8fc637103fde2d864c2104a2f491aa1fd91006c9
Author: Juergen Spitzmueller <[email protected]>
Date:   Sun May 17 16:47:40 2015 +0200

    Factor out ColorSorter to qt_helpers, to make it
    available to other dialogs as well.

diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp
index a9917e4..fd1b70e 100644
--- a/src/frontends/qt4/GuiPrefs.cpp
+++ b/src/frontends/qt4/GuiPrefs.cpp
@@ -1095,17 +1095,6 @@ void PrefScreenFonts::selectTypewriter(const QString & 
name)
 //
 /////////////////////////////////////////////////////////////////////
 
-namespace {
-
-struct ColorSorter
-{
-       bool operator()(ColorCode lhs, ColorCode rhs) const {
-               return
-                       compare_no_case(lcolor.getGUIName(lhs), 
lcolor.getGUIName(rhs)) < 0;
-       }
-};
-
-} // namespace anon
 
 PrefColors::PrefColors(GuiPreferences * form)
        : PrefModule(catLookAndFeel, N_("Colors"), form)
diff --git a/src/frontends/qt4/qt_helpers.h b/src/frontends/qt4/qt_helpers.h
index defd1a8..4b47967 100644
--- a/src/frontends/qt4/qt_helpers.h
+++ b/src/frontends/qt4/qt_helpers.h
@@ -13,7 +13,9 @@
 #ifndef QTHELPERS_H
 #define QTHELPERS_H
 
+#include "ColorSet.h"
 #include "Length.h"
+#include "support/lstrings.h"
 #include "support/qstring_helpers.h"
 #include "support/filetools.h"
 #include "qt_i18n.h"
@@ -37,6 +39,12 @@ namespace frontend {
 
 class LengthCombo;
 
+struct ColorSorter {
+       bool operator()(ColorCode lhs, ColorCode rhs) const {
+               return  support::compare_no_case(lcolor.getGUIName(lhs), 
lcolor.getGUIName(rhs)) < 0;
+       }
+};
+
 /// method to get a Length from widgets (LengthCombo)
 std::string widgetsToLength(QLineEdit const * input, LengthCombo const * 
combo);
 /// method to get a Length from widgets (QComboBox)

Reply via email to