mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 13:48:59 +00:00
Backport qSort deprecation fixes
This commit is contained in:
parent
935e51837d
commit
aad8804549
@ -155,7 +155,7 @@ GuiBox::GuiBox(QWidget * parent) : InsetParamsWidget(parent)
|
|||||||
|
|
||||||
// the background can be uncolored while the frame cannot
|
// the background can be uncolored while the frame cannot
|
||||||
color_codes_ = colors();
|
color_codes_ = colors();
|
||||||
qSort(color_codes_.begin(), color_codes_.end(), ColorSorter);
|
sort(color_codes_.begin(), color_codes_.end(), ColorSorter);
|
||||||
fillComboColor(backgroundColorCO, true);
|
fillComboColor(backgroundColorCO, true);
|
||||||
fillComboColor(frameColorCO, false);
|
fillComboColor(frameColorCO, false);
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ GuiCharacter::GuiCharacter(GuiView & lv)
|
|||||||
bar = barData();
|
bar = barData();
|
||||||
strike = strikeData();
|
strike = strikeData();
|
||||||
color = colorData();
|
color = colorData();
|
||||||
qSort(color.begin(), color.end(), ColorSorter);
|
sort(color.begin(), color.end(), ColorSorter);
|
||||||
|
|
||||||
language = languageData();
|
language = languageData();
|
||||||
language.prepend(LanguagePair(qt_("Default"), "reset"));
|
language.prepend(LanguagePair(qt_("Default"), "reset"));
|
||||||
|
@ -207,7 +207,7 @@ GuiExternal::GuiExternal(GuiView & lv)
|
|||||||
localizedTemplates.insert(qt_(i1->second.guiName), toqstr(i1->second.lyxName));
|
localizedTemplates.insert(qt_(i1->second.guiName), toqstr(i1->second.lyxName));
|
||||||
// Sort alphabetically by (localized) GUI name
|
// Sort alphabetically by (localized) GUI name
|
||||||
QStringList keys = localizedTemplates.keys();
|
QStringList keys = localizedTemplates.keys();
|
||||||
qSort(keys.begin(), keys.end(), SortLocaleAware);
|
sort(keys.begin(), keys.end(), SortLocaleAware);
|
||||||
for (QString & key : keys) {
|
for (QString & key : keys) {
|
||||||
QString const value = localizedTemplates[key];
|
QString const value = localizedTemplates[key];
|
||||||
externalCO->addItem(key, value);
|
externalCO->addItem(key, value);
|
||||||
|
@ -1204,7 +1204,7 @@ PrefColors::PrefColors(GuiPreferences * form)
|
|||||||
continue;
|
continue;
|
||||||
lcolors_.push_back(lc);
|
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 cit = lcolors_.begin();
|
||||||
vector<ColorCode>::const_iterator const end = lcolors_.end();
|
vector<ColorCode>::const_iterator const end = lcolors_.end();
|
||||||
for (; cit != end; ++cit) {
|
for (; cit != end; ++cit) {
|
||||||
|
@ -471,19 +471,19 @@ void GuiRef::redoRefs()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// sort categories case-intensively
|
// sort categories case-intensively
|
||||||
qSort(refsCategories.begin(), refsCategories.end(),
|
sort(refsCategories.begin(), refsCategories.end(),
|
||||||
caseInsensitiveLessThan /*defined above*/);
|
caseInsensitiveLessThan /*defined above*/);
|
||||||
if (noprefix)
|
if (noprefix)
|
||||||
refsCategories.insert(0, qt_("<No prefix>"));
|
refsCategories.insert(0, qt_("<No prefix>"));
|
||||||
|
|
||||||
QString const sort = sortingCO->isEnabled() ?
|
QString const sort_method = sortingCO->isEnabled() ?
|
||||||
sortingCO->itemData(sortingCO->currentIndex()).toString()
|
sortingCO->itemData(sortingCO->currentIndex()).toString()
|
||||||
: QString();
|
: QString();
|
||||||
if (sort == "nocase")
|
if (sort_method == "nocase")
|
||||||
qSort(refsStrings.begin(), refsStrings.end(),
|
sort(refsStrings.begin(), refsStrings.end(),
|
||||||
caseInsensitiveLessThan /*defined above*/);
|
caseInsensitiveLessThan /*defined above*/);
|
||||||
else if (sort == "case")
|
else if (sort_method == "case")
|
||||||
qSort(refsStrings.begin(), refsStrings.end());
|
sort(refsStrings.begin(), refsStrings.end());
|
||||||
|
|
||||||
if (groupCB->isChecked()) {
|
if (groupCB->isChecked()) {
|
||||||
QList<QTreeWidgetItem *> refsCats;
|
QList<QTreeWidgetItem *> refsCats;
|
||||||
|
Loading…
Reference in New Issue
Block a user