Commit f82163c5 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Don't use deprecated boost header

parent 0b43c3d4
Pipeline #163138 passed with stage
in 2 minutes and 31 seconds
......@@ -15,7 +15,7 @@
#include "settings.h"
#include <algorithm>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include "kget_debug.h"
#include <QDebug>
......@@ -65,7 +65,7 @@ void Scheduler::setHasNetworkConnection(bool hasConnection)
m_failureCheckTimer = 0;
}
foreach (JobQueue *queue, m_queues) {
std::for_each(queue->begin(), queue->end(), boost::bind(&Job::stop, _1));
std::for_each(queue->begin(), queue->end(), boost::bind(&Job::stop, boost::placeholders::_1));
}
}
}
......@@ -234,12 +234,12 @@ void Scheduler::jobChangedEvent(Job * job, JobFailure failure)
void Scheduler::start()
{
std::for_each(m_queues.begin(), m_queues.end(), boost::bind(&JobQueue::setStatus, _1, JobQueue::Running));
std::for_each(m_queues.begin(), m_queues.end(), boost::bind(&JobQueue::setStatus, boost::placeholders::_1, JobQueue::Running));
}
void Scheduler::stop()
{
std::for_each(m_queues.begin(), m_queues.end(), boost::bind(&JobQueue::setStatus, _1, JobQueue::Stopped));
std::for_each(m_queues.begin(), m_queues.end(), boost::bind(&JobQueue::setStatus, boost::placeholders::_1, JobQueue::Stopped));
}
void Scheduler::updateQueue( JobQueue * queue )
......
......@@ -29,7 +29,7 @@
#include "settings.h"
#include <algorithm>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include "kget_debug.h"
......@@ -116,7 +116,7 @@ void UrlChecker::removeDuplicates(QList<QUrl> &urls)
{
std::sort(urls.begin(), urls.end(), lessThan());//sort the urls, to find duplicates fast
urls.erase(std::unique(urls.begin(), urls.end(),
boost::bind(&QUrl::matches, _1, _2, QUrl::StripTrailingSlash | QUrl::NormalizePathSegments)), urls.end());
boost::bind(&QUrl::matches, boost::placeholders::_1, boost::placeholders::_2, QUrl::StripTrailingSlash | QUrl::NormalizePathSegments)), urls.end());
}
UrlChecker::UrlError UrlChecker::checkUrl(const QUrl &url, const UrlChecker::UrlType type, bool showNotification)
......
Supports Markdown
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