fixed some compiler warnings (qSort is deprecated ... using std::sort instead)

This commit is contained in:
jkriege2 2019-11-18 13:08:42 +01:00
parent 61d3108fb8
commit d494407e76
5 changed files with 13 additions and 13 deletions

View File

@ -54,7 +54,7 @@ int main(int argc, char* argv[])
hi.second=hi.second/static_cast<double>(NDATA);
}
// sort random data in order to calculate the statistical properties:
qSort(RANDVAL);
std::sort(RANDVAL.begin(), RANDVAL.end());
const double rndMean=sum/static_cast<double>(NDATA);
const double rndMin=RANDVAL.first();
const double rndMax=RANDVAL.last();

View File

@ -2495,22 +2495,22 @@ bool JKQTPBuildColorPaletteLUTLinSegLessThan(const JKQTPColorPaletteSingleColorL
}
JKQTPImageTools::LUTType JKQTPBuildColorPaletteLUTLinInterpolate(QList<QPair<double, QRgb> > items, int lut_size) {
qSort(items.begin(), items.end(), JKQTPBuildColorPaletteLUTLessThan);
std::sort(items.begin(), items.end(), JKQTPBuildColorPaletteLUTLessThan);
return JKQTPBuildColorPaletteLUTLinInterpolateSorted(items, lut_size);
}
JKQTPImageTools::LUTType JKQTPBuildColorPaletteLUT(QList<QPair<double, QRgb> > items, int lut_size) {
qSort(items.begin(), items.end(), JKQTPBuildColorPaletteLUTLessThan);
std::sort(items.begin(), items.end(), JKQTPBuildColorPaletteLUTLessThan);
return JKQTPBuildColorPaletteLUTSorted(items, lut_size);
}
JKQTPImageTools::LUTType JKQTPBuildColorPaletteLUTLinSegments( QList<JKQTPColorPaletteSingleColorLinSegment> itemsR, QList<JKQTPColorPaletteSingleColorLinSegment> itemsG, QList<JKQTPColorPaletteSingleColorLinSegment> itemsB, int lut_size)
{
qSort(itemsR.begin(), itemsR.end(), JKQTPBuildColorPaletteLUTLinSegLessThan);
qSort(itemsG.begin(), itemsG.end(), JKQTPBuildColorPaletteLUTLinSegLessThan);
qSort(itemsB.begin(), itemsB.end(), JKQTPBuildColorPaletteLUTLinSegLessThan);
std::sort(itemsR.begin(), itemsR.end(), JKQTPBuildColorPaletteLUTLinSegLessThan);
std::sort(itemsG.begin(), itemsG.end(), JKQTPBuildColorPaletteLUTLinSegLessThan);
std::sort(itemsB.begin(), itemsB.end(), JKQTPBuildColorPaletteLUTLinSegLessThan);
return JKQTPBuildColorPaletteLUTLinSegmentsSorted(itemsR, itemsG, itemsB, lut_size);
}

View File

@ -231,7 +231,7 @@ bool JKQTPContourPlot::getRelativeLevels() const
void JKQTPContourPlot::addContourLevel(double level)
{
contourLevels.append(level);
qSort(contourLevels);
std::sort(contourLevels.begin(), contourLevels.end());
clearCachedContours();
}

View File

@ -304,7 +304,7 @@ void JKQTPContourPlot::setContourLevels(const TContainer &levels, const TColorCo
contourOverrideColor[v]=*itc;
++itc;
}
qSort(contourLevels);
std::sort(contourLevels.begin(), contourLevels.end());
clearCachedContours();
}
@ -318,7 +318,7 @@ void JKQTPContourPlot::setContourLevels(const TContainer &levels)
for (auto it=levels.begin(); it!=levels.end(); ++it) {
contourLevels<<jkqtp_todouble(*it);
}
qSort(contourLevels);
std::sort(contourLevels.begin(), contourLevels.end());
clearCachedContours();
}

View File

@ -166,9 +166,9 @@ void JKQTPEnhancedTableView::copySelectionToExcel(int copyrole, bool storeHead)
}
}
QList<int> rowlist=QList<int>::fromSet(rows);
qSort(rowlist.begin(), rowlist.end());
std::sort(rowlist.begin(), rowlist.end());
QList<int> collist=QList<int>::fromSet(cols);
qSort(collist.begin(), collist.end());
std::sort(collist.begin(), collist.end());
int rowcnt=rowlist.size();
int colcnt=collist.size();
QList<QStringList> data;
@ -285,9 +285,9 @@ void JKQTPEnhancedTableView::copySelectionToCSV(int copyrole, bool storeHead, co
}
}
QList<int> rowlist=QList<int>::fromSet(rows);
qSort(rowlist.begin(), rowlist.end());
std::sort(rowlist.begin(), rowlist.end());
QList<int> collist=QList<int>::fromSet(cols);
qSort(collist.begin(), collist.end());
std::sort(collist.begin(), collist.end());
int rowcnt=rowlist.size();
int colcnt=collist.size();
QList<QStringList> data;