Am Samstag 14 November 2015, 21:34:43 schrieb Scott Kostyshak: > On Sat, Nov 14, 2015 at 04:31:55PM -0800, Pavel Sanda wrote: > > Scott Kostyshak wrote: > > > Dear all, > > > > > > If you have time, please download the LyX 2.2.0alpha1 tar and test that > > > > > it compiles/installs as expected. It is located here: > > Monolithic build seems to be broken: > I can reproduce but I'm not sure how to fix it. Should I do a git > bisect?
This probably points to http://www.lyx.org/trac/changeset/7f1d33efc1d0b4302875706ba85d42c2a8f35a67/lyxgit/ Please try the attached patch. Jürgen > > Scott
diff --git a/src/frontends/qt4/GuiBox.cpp b/src/frontends/qt4/GuiBox.cpp index 0999039..e4d4256 100644 --- a/src/frontends/qt4/GuiBox.cpp +++ b/src/frontends/qt4/GuiBox.cpp @@ -103,16 +103,6 @@ static QList<ColorCode> colors() } -namespace { - -bool ColorSorter(ColorCode lhs, ColorCode rhs) -{ - return support::compare_no_case(lcolor.getGUIName(lhs), lcolor.getGUIName(rhs)) < 0; -} - -} // namespace anon - - GuiBox::GuiBox(QWidget * parent) : InsetParamsWidget(parent) { setupUi(this); diff --git a/src/frontends/qt4/GuiCharacter.cpp b/src/frontends/qt4/GuiCharacter.cpp index c673d2d..e016876 100644 --- a/src/frontends/qt4/GuiCharacter.cpp +++ b/src/frontends/qt4/GuiCharacter.cpp @@ -192,12 +192,6 @@ void fillComboColor(QComboBox * combo, QList<T> const & list) combo->addItem(qt_("Reset"), "inherit"); } - -bool ColorSorter(ColorCode lhs, ColorCode rhs) -{ - return support::compare_no_case(lcolor.getGUIName(lhs), lcolor.getGUIName(rhs)) < 0; -} - } // namespace anon GuiCharacter::GuiCharacter(GuiView & lv) diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp index a076402..2c99dee 100644 --- a/src/frontends/qt4/GuiPrefs.cpp +++ b/src/frontends/qt4/GuiPrefs.cpp @@ -1115,19 +1115,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) { @@ -1164,7 +1151,7 @@ PrefColors::PrefColors(GuiPreferences * form) continue; lcolors_.push_back(lc); } - sort(lcolors_.begin(), lcolors_.end(), ColorSorter()); + qSort(lcolors_.begin(), lcolors_.end(), ColorSorter); vector<ColorCode>::const_iterator cit = lcolors_.begin(); vector<ColorCode>::const_iterator const end = lcolors_.end(); for (; cit != end; ++cit) { diff --git a/src/frontends/qt4/qt_helpers.cpp b/src/frontends/qt4/qt_helpers.cpp index 4eacaca..c1294e5 100644 --- a/src/frontends/qt4/qt_helpers.cpp +++ b/src/frontends/qt4/qt_helpers.cpp @@ -213,6 +213,12 @@ QString formatLocFPNumber(double d) } +bool ColorSorter(ColorCode lhs, ColorCode rhs) +{ + return compare_no_case(lcolor.getGUIName(lhs), lcolor.getGUIName(rhs)) < 0; +} + + void setValid(QWidget * widget, bool valid) { if (valid) { diff --git a/src/frontends/qt4/qt_helpers.h b/src/frontends/qt4/qt_helpers.h index fcdcd53..d4afc78 100644 --- a/src/frontends/qt4/qt_helpers.h +++ b/src/frontends/qt4/qt_helpers.h @@ -13,6 +13,7 @@ #ifndef QTHELPERS_H #define QTHELPERS_H +#include "ColorSet.h" #include "Length.h" #include "support/qstring_helpers.h" #include "support/filetools.h" @@ -73,6 +74,9 @@ void doubleToWidget(QLineEdit * input, std::string const & value, */ QString formatLocFPNumber(double d); +/// Method to sort colors by GUI name in combo widgets +bool ColorSorter(ColorCode lhs, ColorCode rhs); + /// colors a widget red if invalid void setValid(QWidget * widget, bool valid);