FIXed error when running jkqtmathtext_render copiled with Qt5 (nned to use qSort instead of std::sort)

This commit is contained in:
jkriege2 2024-02-02 15:00:10 +01:00
parent 92b8894a3b
commit 8d01908082

View File

@ -207,7 +207,12 @@ int main(int argc, char* argv[])
fileList<<" <table>\n"; fileList<<" <table>\n";
fileList<<" <tr>\n"; fileList<<" <tr>\n";
i=1; i=1;
std::sort(symbolsAll.begin(), symbolsAll.end(), [](const QString& a, const QString& b) { if (a.contains("harpoon") && !b.contains("harpoon")) return false; #if (QT_VERSION>=QT_VERSION_CHECK(6, 0, 0))
std::sort
#else
qSort
#endif
(symbolsAll.begin(), symbolsAll.end(), [](const QString& a, const QString& b) { if (a.contains("harpoon") && !b.contains("harpoon")) return false;
else if (a.isLower() && b.isUpper()) return true; else if (a.isLower() && b.isUpper()) return true;
else if (a.isUpper() && b.isLower()) return false; else if (a.isUpper() && b.isLower()) return false;
else return a<b; else return a<b;