commit aad880454984b6a190f9a667619b2975dbd1b751
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Sat Mar 13 11:46:49 2021 +0100

    Backport qSort deprecation fixes
---
 src/frontends/qt4/GuiBox.cpp       |    2 +-
 src/frontends/qt4/GuiCharacter.cpp |    2 +-
 src/frontends/qt4/GuiExternal.cpp  |    2 +-
 src/frontends/qt4/GuiPrefs.cpp     |    2 +-
 src/frontends/qt4/GuiRef.cpp       |   12 ++++++------
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/frontends/qt4/GuiBox.cpp b/src/frontends/qt4/GuiBox.cpp
index 6a991b5..67a1b0c 100644
--- a/src/frontends/qt4/GuiBox.cpp
+++ b/src/frontends/qt4/GuiBox.cpp
@@ -155,7 +155,7 @@ GuiBox::GuiBox(QWidget * parent) : InsetParamsWidget(parent)
 
        // the background can be uncolored while the frame cannot
        color_codes_ = colors();
-       qSort(color_codes_.begin(), color_codes_.end(), ColorSorter);
+       sort(color_codes_.begin(), color_codes_.end(), ColorSorter);
        fillComboColor(backgroundColorCO, true);
        fillComboColor(frameColorCO, false);
 
diff --git a/src/frontends/qt4/GuiCharacter.cpp 
b/src/frontends/qt4/GuiCharacter.cpp
index 25a5db0..23b43e0 100644
--- a/src/frontends/qt4/GuiCharacter.cpp
+++ b/src/frontends/qt4/GuiCharacter.cpp
@@ -234,7 +234,7 @@ GuiCharacter::GuiCharacter(GuiView & lv)
        bar    = barData();
        strike = strikeData();
        color  = colorData();
-       qSort(color.begin(), color.end(), ColorSorter);
+       sort(color.begin(), color.end(), ColorSorter);
 
        language = languageData();
        language.prepend(LanguagePair(qt_("Default"), "reset"));
diff --git a/src/frontends/qt4/GuiExternal.cpp 
b/src/frontends/qt4/GuiExternal.cpp
index ba1c171..70bfa1e 100644
--- a/src/frontends/qt4/GuiExternal.cpp
+++ b/src/frontends/qt4/GuiExternal.cpp
@@ -207,7 +207,7 @@ GuiExternal::GuiExternal(GuiView & lv)
                localizedTemplates.insert(qt_(i1->second.guiName), 
toqstr(i1->second.lyxName));
        // Sort alphabetically by (localized) GUI name
        QStringList keys = localizedTemplates.keys();
-       qSort(keys.begin(), keys.end(), SortLocaleAware);
+       sort(keys.begin(), keys.end(), SortLocaleAware);
        for (QString & key : keys) {
                QString const value = localizedTemplates[key];
                externalCO->addItem(key, value);
diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp
index f40f8fc..5e91c62 100644
--- a/src/frontends/qt4/GuiPrefs.cpp
+++ b/src/frontends/qt4/GuiPrefs.cpp
@@ -1204,7 +1204,7 @@ PrefColors::PrefColors(GuiPreferences * form)
                        continue;
                lcolors_.push_back(lc);
        }
-       qSort(lcolors_.begin(), lcolors_.end(), ColorSorter);
+       sort(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/GuiRef.cpp b/src/frontends/qt4/GuiRef.cpp
index 6dae4b1..554cd08 100644
--- a/src/frontends/qt4/GuiRef.cpp
+++ b/src/frontends/qt4/GuiRef.cpp
@@ -471,19 +471,19 @@ void GuiRef::redoRefs()
                }
        }
        // sort categories case-intensively
-       qSort(refsCategories.begin(), refsCategories.end(),
+       sort(refsCategories.begin(), refsCategories.end(),
              caseInsensitiveLessThan /*defined above*/);
        if (noprefix)
                refsCategories.insert(0, qt_("<No prefix>"));
 
-       QString const sort = sortingCO->isEnabled() ?
+       QString const sort_method = sortingCO->isEnabled() ?
                                
sortingCO->itemData(sortingCO->currentIndex()).toString()
                                : QString();
-       if (sort == "nocase")
-               qSort(refsStrings.begin(), refsStrings.end(),
+       if (sort_method == "nocase")
+               sort(refsStrings.begin(), refsStrings.end(),
                      caseInsensitiveLessThan /*defined above*/);
-       else if (sort == "case")
-               qSort(refsStrings.begin(), refsStrings.end());
+       else if (sort_method == "case")
+               sort(refsStrings.begin(), refsStrings.end());
 
        if (groupCB->isChecked()) {
                QList<QTreeWidgetItem *> refsCats;
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to