summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Vrátil <[email protected]>2015-08-03 15:52:19 +0200
committerDan Vrátil <[email protected]>2015-08-03 15:52:35 +0200
commit6fd06bc17abbbc7a8381bf44c6e02e3b11046638 (patch)
treea268e25d1a262e597658b9cd7ccc6724bb77296f
parentf42233eadcba9e978e470027f928fa99afbcac58 (diff)
Port remaining boost::shared_ptr usages to QSharedPointer
This makes kdepim-runtime boost-free.
-rw-r--r--CMakeLists.txt6
-rw-r--r--resources/birthdays/CMakeLists.txt3
-rw-r--r--resources/ical/CMakeLists.txt1
-rw-r--r--resources/ical/notes/CMakeLists.txt1
-rw-r--r--resources/imap/autotests/dummyresourcestate.h2
-rw-r--r--resources/imap/resourcestateinterface.h4
-rw-r--r--resources/kalarm/kalarm/CMakeLists.txt1
-rw-r--r--resources/kalarm/kalarmdir/CMakeLists.txt1
-rw-r--r--resources/mixedmaildir/autotests/CMakeLists.txt1
-rw-r--r--resources/mixedmaildir/kmindexreader/autotests/testidxreader.cpp2
-rw-r--r--resources/mixedmaildir/kmindexreader/kmindexreader.cpp2
-rw-r--r--resources/mixedmaildir/kmindexreader/kmindexreader.h8
-rw-r--r--resources/mixedmaildir/mixedmaildirstore.cpp4
-rw-r--r--resources/pop3/autotests/CMakeLists.txt1
-rw-r--r--resources/shared/filestore/autotests/CMakeLists.txt1
15 files changed, 7 insertions, 31 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 213bd50..42a56bf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -128,12 +128,6 @@ find_package(KF5IMAP ${KIMAP_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Syndication ${SYNDICATION_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5AkonadiNotes ${AKONADINOTE_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5AkonadiSocialUtils ${AKONADISOCIALUTIL_LIB_VERSION} CONFIG REQUIRED)
-#Boost
-# Don't use BoostConfig.cmake
-set(Boost_NO_BOOST_CMAKE TRUE)
-find_package(Boost 1.34.0)
-set_package_properties(Boost PROPERTIES DESCRIPTION "Boost C++ Libraries" URL "http://www.boost.org" TYPE REQUIRED PURPOSE "Boost is required by Akonadi")
-
option(KDEPIM_RUN_ISOLATED_TESTS "Run the isolated tests." FALSE)
diff --git a/resources/birthdays/CMakeLists.txt b/resources/birthdays/CMakeLists.txt
index b3005ed..cf41e2d 100644
--- a/resources/birthdays/CMakeLists.txt
+++ b/resources/birthdays/CMakeLists.txt
@@ -1,6 +1,3 @@
-include_directories( ${Boost_INCLUDE_DIR} )
-
-
add_definitions(-DTRANSLATION_DOMAIN=\"akonadi_birthdays_resource\")
set( birthdayresource_srcs
diff --git a/resources/ical/CMakeLists.txt b/resources/ical/CMakeLists.txt
index ad378cd..b77f4ae 100644
--- a/resources/ical/CMakeLists.txt
+++ b/resources/ical/CMakeLists.txt
@@ -1,6 +1,5 @@
include_directories(
${kdepim-runtime_SOURCE_DIR}
- ${Boost_INCLUDE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/shared
)
diff --git a/resources/ical/notes/CMakeLists.txt b/resources/ical/notes/CMakeLists.txt
index 907831e..c70f491 100644
--- a/resources/ical/notes/CMakeLists.txt
+++ b/resources/ical/notes/CMakeLists.txt
@@ -1,7 +1,6 @@
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/../shared
${kdepim-runtime_SOURCE_DIR}
- ${Boost_INCLUDE_DIR}
)
diff --git a/resources/imap/autotests/dummyresourcestate.h b/resources/imap/autotests/dummyresourcestate.h
index 39cb055..91366d0 100644
--- a/resources/imap/autotests/dummyresourcestate.h
+++ b/resources/imap/autotests/dummyresourcestate.h
@@ -32,7 +32,7 @@ typedef QPair<Akonadi::Tag::List, QHash<QString, Akonadi::Item::List> > TagListA
class DummyResourceState : public ResourceStateInterface
{
public:
- typedef boost::shared_ptr<DummyResourceState> Ptr;
+ typedef QSharedPointer<DummyResourceState> Ptr;
explicit DummyResourceState();
~DummyResourceState();
diff --git a/resources/imap/resourcestateinterface.h b/resources/imap/resourcestateinterface.h
index eb34a25..d87ba37 100644
--- a/resources/imap/resourcestateinterface.h
+++ b/resources/imap/resourcestateinterface.h
@@ -23,19 +23,19 @@
#define RESOURCESTATEINTERFACE_H
#include <QtCore/QStringList>
+#include <QtCore/QSharedPointer>
#include <Collection>
#include <Item>
#include <kimap/listjob.h>
-#include <boost/shared_ptr.hpp>
#include "messagehelper.h"
class ResourceStateInterface
{
public:
- typedef boost::shared_ptr<ResourceStateInterface> Ptr;
+ typedef QSharedPointer<ResourceStateInterface> Ptr;
virtual ~ResourceStateInterface();
diff --git a/resources/kalarm/kalarm/CMakeLists.txt b/resources/kalarm/kalarm/CMakeLists.txt
index d624ed7..9ef5638 100644
--- a/resources/kalarm/kalarm/CMakeLists.txt
+++ b/resources/kalarm/kalarm/CMakeLists.txt
@@ -1,5 +1,4 @@
include_directories(
- ${Boost_INCLUDE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../shared
${CMAKE_CURRENT_SOURCE_DIR}/../../ical/shared
diff --git a/resources/kalarm/kalarmdir/CMakeLists.txt b/resources/kalarm/kalarmdir/CMakeLists.txt
index 006688c..5135ba3 100644
--- a/resources/kalarm/kalarmdir/CMakeLists.txt
+++ b/resources/kalarm/kalarmdir/CMakeLists.txt
@@ -1,5 +1,4 @@
include_directories(
- ${Boost_INCLUDE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../shared
)
diff --git a/resources/mixedmaildir/autotests/CMakeLists.txt b/resources/mixedmaildir/autotests/CMakeLists.txt
index 94283e9..da05a16 100644
--- a/resources/mixedmaildir/autotests/CMakeLists.txt
+++ b/resources/mixedmaildir/autotests/CMakeLists.txt
@@ -12,7 +12,6 @@ set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
kde_enable_exceptions()
include_directories(
- ${Boost_INCLUDE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../
${CMAKE_CURRENT_BINARY_DIR}/../
${CMAKE_CURRENT_SOURCE_DIR}
diff --git a/resources/mixedmaildir/kmindexreader/autotests/testidxreader.cpp b/resources/mixedmaildir/kmindexreader/autotests/testidxreader.cpp
index 3825a1a..2873c38 100644
--- a/resources/mixedmaildir/kmindexreader/autotests/testidxreader.cpp
+++ b/resources/mixedmaildir/kmindexreader/autotests/testidxreader.cpp
@@ -32,8 +32,6 @@ using Akonadi::MessageStatus;
#include <QtTest/QTest>
#include <QDebug>
-#include <boost/shared_ptr.hpp>
-
QTEST_MAIN(TestIdxReader)
TestIdxReader::TestIdxReader()
diff --git a/resources/mixedmaildir/kmindexreader/kmindexreader.cpp b/resources/mixedmaildir/kmindexreader/kmindexreader.cpp
index 5ee24e0..e06bb2e 100644
--- a/resources/mixedmaildir/kmindexreader/kmindexreader.cpp
+++ b/resources/mixedmaildir/kmindexreader/kmindexreader.cpp
@@ -31,8 +31,6 @@
using Akonadi::MessageStatus;
#include <QFile>
-#include <boost/shared_ptr.hpp>
-
//BEGIN: Magic definitions from old kmail code
#ifdef HAVE_BYTESWAP_H
#include <byteswap.h>
diff --git a/resources/mixedmaildir/kmindexreader/kmindexreader.h b/resources/mixedmaildir/kmindexreader/kmindexreader.h
index 7f6d537..d2dfb50 100644
--- a/resources/mixedmaildir/kmindexreader/kmindexreader.h
+++ b/resources/mixedmaildir/kmindexreader/kmindexreader.h
@@ -30,16 +30,12 @@ using Akonadi::MessageStatus;
#include <QStringList>
#include <QFile>
#include <QList>
+#include <QSharedPointer>
#include <ctype.h>
#include <stdlib.h>
#include <unistd.h>
-namespace boost
-{
-template <typename T> class shared_ptr;
-}
-
class KMINDEXREADER_EXPORT KMIndexData
{
Q_DISABLE_COPY(KMIndexData)
@@ -61,7 +57,7 @@ private:
friend class TestIdxReader;
};
-typedef boost::shared_ptr<KMIndexData> KMIndexDataPtr;
+typedef QSharedPointer<KMIndexData> KMIndexDataPtr;
/**
* @short A class to read legacy kmail (< 4.5) index files
diff --git a/resources/mixedmaildir/mixedmaildirstore.cpp b/resources/mixedmaildir/mixedmaildirstore.cpp
index 88f0513..20710b9 100644
--- a/resources/mixedmaildir/mixedmaildirstore.cpp
+++ b/resources/mixedmaildir/mixedmaildirstore.cpp
@@ -270,7 +270,7 @@ private:
bool mHasIndexData;
};
-typedef boost::shared_ptr<MBoxContext> MBoxPtr;
+typedef QSharedPointer<MBoxContext> MBoxPtr;
void MBoxContext::readIndexData()
{
@@ -498,7 +498,7 @@ void MaildirContext::readIndexData()
<< indexFileInfo.absoluteFilePath();
}
-typedef boost::shared_ptr<MaildirContext> MaildirPtr;
+typedef QSharedPointer<MaildirContext> MaildirPtr;
class MixedMaildirStore::Private : public FileStore::Job::Visitor
{
diff --git a/resources/pop3/autotests/CMakeLists.txt b/resources/pop3/autotests/CMakeLists.txt
index 95f3856..9b3644f 100644
--- a/resources/pop3/autotests/CMakeLists.txt
+++ b/resources/pop3/autotests/CMakeLists.txt
@@ -3,7 +3,6 @@ set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
- ${Boost_INCLUDE_DIR}
${AKONADI_INCLUDE_DIR}
)
diff --git a/resources/shared/filestore/autotests/CMakeLists.txt b/resources/shared/filestore/autotests/CMakeLists.txt
index 9c2ab43..2be3e5e 100644
--- a/resources/shared/filestore/autotests/CMakeLists.txt
+++ b/resources/shared/filestore/autotests/CMakeLists.txt
@@ -13,7 +13,6 @@ set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
include_directories(
${AKONADI_INCLUDE_DIR}
- ${Boost_INCLUDE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../
${CMAKE_CURRENT_BINARY_DIR}/../
${CMAKE_CURRENT_SOURCE_DIR}