Commit 1b747230 authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Replace all usages of the deprecated qBinaryFind

parent 8c9c0789
Pipeline #55592 failed with stage
in 10 minutes and 2 seconds
......@@ -15,7 +15,7 @@ option(DISABLE_KWATCHGNUPG "Don't build the kwatchgnupg tool [default=OFF]" OFF)
# Standalone build. Find / include everything necessary.
set(KF5_MIN_VERSION "5.80.0")
set(KMIME_VERSION "5.17.40")
set(LIBKLEO_VERSION "5.17.40")
set(LIBKLEO_VERSION "5.17.41")
set(QT_REQUIRED_VERSION "5.14.0")
set(GPGME_REQUIRED_VERSION "1.13.1")
......
......@@ -16,6 +16,7 @@
#include "certifycertificatecommand.h"
#include "kleopatra_debug.h"
#include <Libkleo/Algorithm>
#include <Libkleo/KeyList>
#include <Libkleo/KeyListSortFilterProxyModel>
#include <Libkleo/KeyCache>
......@@ -92,9 +93,9 @@ protected:
const QString fpr = index.data(KeyList::FingerprintRole).toString();
// find information:
const std::vector<Import>::const_iterator it
= qBinaryFind(m_importsByFingerprint.begin(), m_importsByFingerprint.end(),
fpr.toLatin1().constData(),
ByImportFingerprint<std::less>());
= Kleo::binary_find(m_importsByFingerprint.begin(), m_importsByFingerprint.end(),
fpr.toLatin1().constData(),
ByImportFingerprint<std::less>());
if (it == m_importsByFingerprint.end()) {
return AbstractKeyListSortFilterProxyModel::data(index, role);
} else {
......
......@@ -14,6 +14,8 @@
#include <utils/kleo_assert.h>
#include <Libkleo/Algorithm>
#include <KGuiItem>
#include <KLocalizedString>
#include <QPushButton>
......@@ -260,7 +262,7 @@ void Wizard::next()
current->onNext();
}
onNext(d->currentId);
std::vector<int>::const_iterator it = qBinaryFind(d->pageOrder.begin(), d->pageOrder.end(), d->currentId);
std::vector<int>::const_iterator it = Kleo::binary_find(d->pageOrder.begin(), d->pageOrder.end(), d->currentId);
Q_ASSERT(it != d->pageOrder.end());
do {
......@@ -281,7 +283,7 @@ int Wizard::Private::previousPage() const
return InvalidPage;
}
std::vector<int>::const_iterator it = qBinaryFind(pageOrder.begin(), pageOrder.end(), currentId);
std::vector<int>::const_iterator it = Kleo::binary_find(pageOrder.begin(), pageOrder.end(), currentId);
if (it == pageOrder.begin() || it == pageOrder.end()) {
return InvalidPage;
}
......
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