Commit 17ceb9d4 authored by Yuri Chornoivan's avatar Yuri Chornoivan

Get rid of deprecated qSort()

parent e635f60c
Pipeline #6693 passed with stage
in 16 minutes and 59 seconds
......@@ -156,7 +156,7 @@ void CubicBezierSpline::validatePoints()
void CubicBezierSpline::keepSorted()
{
qSort(m_points.begin(), m_points.end(), pointLessThan);
std::sort(m_points.begin(), m_points.end(), pointLessThan);
}
int CubicBezierSpline::indexOf(const BPoint &p)
......
......@@ -278,7 +278,7 @@ void KisCubicCurve::Data::invalidate()
void KisCubicCurve::Data::keepSorted()
{
qSort(points.begin(), points.end(), pointLessThan);
std::sort(points.begin(), points.end(), pointLessThan);
}
qreal KisCubicCurve::Data::value(qreal x)
......
......@@ -129,7 +129,7 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QMap<QString, QString> mappable_a
// Mime types
QStringList mimes = ClipCreationDialog::getExtensions();
qSort(mimes);
std::sort(mimes.begin(), mimes.end());
m_configEnv.supportedmimes->setPlainText(mimes.join(QLatin1Char(' ')));
m_page2 = addPage(p2, i18n("Environment"));
......@@ -531,7 +531,7 @@ void KdenliveSettingsDialog::setupJogshuttleBtns(const QString &device)
// qCDebug(KDENLIVE_LOG) << "::::::::::::::::";
qSort(action_names);
std::sort(action_names.begin(), action_names.end());
iter = action_names.begin();
while (iter != action_names.end()) {
// qCDebug(KDENLIVE_LOG) << *iter;
......@@ -787,7 +787,7 @@ void KdenliveSettingsDialog::updateWidgets()
// Revert jog shuttle buttons
QList<QString> action_names = m_mappable_actions.keys();
qSort(action_names);
std::sort(action_names.begin(), action_names.end());
QStringList actions_map = JogShuttleConfig::actionMap(KdenliveSettings::shuttlebuttons());
QMap<QString, int> action_pos;
for (const QString &action_id : actions_map) {
......@@ -1030,7 +1030,7 @@ void KdenliveSettingsDialog::updateSettings()
// Update list
KdenliveSettings::setAddedExtensions(m_configEnv.kcfg_addedExtensions->text());
QStringList mimes = ClipCreationDialog::getExtensions();
qSort(mimes);
std::sort(mimes.begin(), mimes.end());
m_configEnv.supportedmimes->setPlainText(mimes.join(QLatin1Char(' ')));
}
......
......@@ -95,7 +95,7 @@ void DvdWizardChapters::slotAddChapter()
for (int i = 0; i < currentChaps.count(); ++i) {
chapterTimes.append(currentChaps.at(i).toInt());
}
qSort(chapterTimes);
std::sort(chapterTimes.begin(), chapterTimes.end());
// rebuild chapters
QStringList chaptersString;
......
......@@ -3553,7 +3553,7 @@ void MainWindow::showTimelineToolbarMenu(const QPoint &pos)
avSizes = theme->querySizes(KIconLoader::Toolbar);
}
qSort(avSizes);
std::sort(avSizes.begin(), avSizes.end());
if (avSizes.count() < 10) {
// Fixed or threshold type icons
......
......@@ -46,7 +46,7 @@ SimpleTimelineWidget::SimpleTimelineWidget(QWidget *parent)
void SimpleTimelineWidget::setKeyframes(const QList<int> &keyframes)
{
m_keyframes = keyframes;
qSort(m_keyframes);
std::sort(m_keyframes.begin(), m_keyframes.end());
m_currentKeyframe = m_currentKeyframeOriginal = -1;
emit atKeyframe(m_keyframes.contains(m_position));
update();
......@@ -68,7 +68,7 @@ void SimpleTimelineWidget::slotAddKeyframe(int pos, int select)
}
m_keyframes.append(pos);
qSort(m_keyframes);
std::sort(m_keyframes.begin(), m_keyframes.end());
if (select != 0) {
m_currentKeyframe = m_currentKeyframeOriginal = pos;
}
......@@ -220,7 +220,7 @@ void SimpleTimelineWidget::mouseReleaseEvent(QMouseEvent *event)
Q_UNUSED(event)
if (m_currentKeyframe >= 0) {
qSort(m_keyframes);
std::sort(m_keyframes.begin(), m_keyframes.end());
emit keyframeMoved(m_currentKeyframeOriginal, m_currentKeyframe);
}
}
......@@ -245,7 +245,7 @@ void SimpleTimelineWidget::mouseDoubleClickEvent(QMouseEvent *event)
// add new keyframe
m_keyframes.append(pos);
qSort(m_keyframes);
std::sort(m_keyframes.begin(), m_keyframes.end());
emit keyframeAdded(pos);
if (pos == m_position) {
emit atKeyframe(true);
......
......@@ -204,7 +204,7 @@ void TracksConfigDialog::slotDelete()
return;
}
m_deletedRows.append(trackToDelete);
qSort(m_deletedRows);
std::sort(m_deletedRows.begin(), m_deletedRows.end());
for (int i = 0; i < table->columnCount(); ++i) {
QTableWidgetItem *item = table->item(row, i);
item->setFlags(Qt::NoItemFlags);
......
......@@ -343,7 +343,7 @@ void PreviewManager::invalidatePreviews(const QVariantList chunks)
}
}
if (!foundChunks.isEmpty()) {
qSort(foundChunks);
std::sort(foundChunks.begin(), foundChunks.end());
m_controller->dirtyChunksChanged();
m_controller->renderedChunksChanged();
reloadChunks(foundChunks);
......@@ -530,7 +530,7 @@ void PreviewManager::receivedStderr()
void PreviewManager::doPreviewRender(const QString &scene)
{
// initialize progress bar
qSort(m_dirtyChunks);
std::sort(m_dirtyChunks.begin(), m_dirtyChunks.end());
if (m_dirtyChunks.isEmpty()) {
return;
}
......@@ -617,7 +617,7 @@ void PreviewManager::invalidatePreview(int startFrame, int endFrame)
int start = startFrame - startFrame % chunkSize;
int end = endFrame - endFrame % chunkSize + chunkSize;
qSort(m_renderedChunks);
std::sort(m_renderedChunks.begin(), m_renderedChunks.end());
m_previewGatherTimer.stop();
abortRendering();
m_tractor->lock();
......@@ -724,7 +724,7 @@ void PreviewManager::corruptedChunk(int frame, const QString &fileName)
m_cacheDir.remove(fileName);
if (!m_dirtyChunks.contains(frame)) {
m_dirtyChunks << frame;
qSort(m_dirtyChunks);
std::sort(m_dirtyChunks.begin(), m_dirtyChunks.end());
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment