Commit 1317951c authored by Volker Krause's avatar Volker Krause

Thanks to C++11 we don't need boost::bind here anymore

parent fe8013ae
......@@ -56,12 +56,6 @@ find_package(KF5PimCommon ${PIMCOMMON_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5KdepimDBusInterfaces ${KDEPIM_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5IMAP ${KIMAP_LIB_VERSION} CONFIG REQUIRED)
find_package(Boost MODULE)
set_package_properties(Boost PROPERTIES
TYPE REQUIRED
URL "http://www.boost.org"
)
ecm_setup_version(PROJECT VARIABLE_PREFIX CALENDARSUPPORT
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/calendarsupport_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5CalendarSupportConfigVersion.cmake"
......
......@@ -58,7 +58,7 @@ generate_export_header(KF5CalendarSupport BASE_NAME calendarsupport)
add_library(KF5::CalendarSupport ALIAS KF5CalendarSupport)
target_include_directories(KF5CalendarSupport INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/CalendarSupport/;${KDE_INSTALL_INCLUDEDIR_KF5}/calendarsupport>")
target_include_directories(KF5CalendarSupport PUBLIC "$<BUILD_INTERFACE:${calendarsupport_SOURCE_DIR}/src;${calendarsupport_BINARY_DIR}/src;${Boost_INCLUDE_DIRS}>")
target_include_directories(KF5CalendarSupport PUBLIC "$<BUILD_INTERFACE:${calendarsupport_SOURCE_DIR}/src;${calendarsupport_BINARY_DIR}/src>")
target_link_libraries(
KF5CalendarSupport
......
......@@ -68,7 +68,6 @@
#include <QUrlQuery>
#include <QTimeZone>
#include <boost/bind.hpp>
#include "calendarsupport_debug.h"
using namespace CalendarSupport;
......@@ -293,8 +292,9 @@ Akonadi::Item::List CalendarSupport::applyCalFilter(const Akonadi::Item::List &i
{
Q_ASSERT(filter);
Akonadi::Item::List items(items_);
items.erase(std::remove_if(items.begin(), items.end(),
!bind(itemMatches, _1, filter)), items.end());
items.erase(std::remove_if(items.begin(), items.end(), [filter](const Akonadi::Item &item) {
return !itemMatches(item, filter);
}), items.end());
return items;
}
......@@ -324,8 +324,9 @@ bool CalendarSupport::isValidIncidenceItemUrl(const QUrl &url)
static bool containsValidIncidenceItemUrl(const QList<QUrl> &urls)
{
return
std::find_if(urls.begin(), urls.end(),
bind(CalendarSupport::isValidIncidenceItemUrl, _1)) != urls.constEnd();
std::find_if(urls.begin(), urls.end(), [](const QUrl &url) {
return CalendarSupport::isValidIncidenceItemUrl(url);
}) != urls.constEnd();
}
bool CalendarSupport::canDecode(const QMimeData *md)
......
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