#include "settings.h"
#include <algorithm>
-#include <boost/bind.hpp>
+#include <functional>
#include <KDebug>
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(), std::bind(&Job::stop, std::placeholders::_1));
}
}
}
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(), std::bind(&JobQueue::setStatus, std::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(), std::bind(&JobQueue::setStatus, std::placeholders::_1, JobQueue::Stopped));
}
void Scheduler::updateQueue( JobQueue * queue )
#include <qgpgme/dataprovider.h>
#include <QtCore/QFile>
+
+#include <memory> // for std::shared_ptr
#endif
#ifdef HAVE_QGPGME
return result;
}
- boost::shared_ptr<QFile> qFile(new QFile(dest.pathOrUrl()));
+ std::shared_ptr<QFile> qFile(new QFile(dest.pathOrUrl()));
qFile->open(QIODevice::ReadOnly);
QGpgME::QIODeviceDataProvider *file = new QGpgME::QIODeviceDataProvider(qFile);
GpgME::Data dFile(file);
#include "settings.h"
#include <algorithm>
-#include <boost/bind.hpp>
+#include <functional>
#include <QtCore/QFileInfo>
#include <QtGui/QCheckBox>
{
std::sort(urls.begin(), urls.end(), lessThan());//sort the urls, to find duplicates fast
urls.erase(std::unique(urls.begin(), urls.end(),
- boost::bind(&KUrl::equals, _1, _2, KUrl::CompareWithoutTrailingSlash | KUrl::AllowEmptyPath)), urls.end());
+ std::bind(&KUrl::equals, std::placeholders::_1, std::placeholders::_2,
+ KUrl::CompareWithoutTrailingSlash | KUrl::AllowEmptyPath)), urls.end());
}
UrlChecker::UrlError UrlChecker::checkUrl(const KUrl &url, const UrlChecker::UrlType type, bool showNotification)
qsrand(time(0));
bt::SetClientInfo("ktcli",bt::MAJOR,bt::MINOR,bt::RELEASE,bt::NORMAL,"KT");
bt::InitLog("ktcli.log",false,true,false);
- connect(tc.get(),SIGNAL(finished(bt::TorrentInterface*)),this,SLOT(finished(bt::TorrentInterface*)));
+ connect(tc,SIGNAL(finished(bt::TorrentInterface*)),this,SLOT(finished(bt::TorrentInterface*)));
connect(this,SIGNAL(aboutToQuit()),this,SLOT(shutdown()));
}
KTCLI::~KTCLI()
{
+ delete tc;
}
bool KTCLI::start()
#include <QTimer>
#include <KApplication>
-#include <boost/scoped_ptr.hpp>
#include <torrent/torrentcontrol.h>
#include <interfaces/queuemanagerinterface.h>
class KUrl;
-typedef boost::scoped_ptr<bt::TorrentControl> TorrentControlPtr;
-
class KTCLI : public KApplication,public bt::QueueManagerInterface
{
Q_OBJECT
private:
QTimer timer;
- TorrentControlPtr tc;
+ bt::TorrentControl* tc;
int updates;
};
#include <datachecker/singledatachecker.h>
#include <datachecker/multidatachecker.h>
#include <testlib/dummytorrentcreator.h>
-#include <boost/concept_check.hpp>
using namespace bt;
#include "rpcserver.h"
#include <QHostAddress>
#include <QThread>
+#include <QScopedPointer>
#include <unistd.h>
#include <string.h>
-#include <boost/scoped_ptr.hpp>
#include <net/portlist.h>
#include <util/log.h>
#include <util/error.h>
{
// read and decode the packet
BDecoder bdec(ptr->get(), ptr->size(), false);
- boost::scoped_ptr<BNode> n(bdec.decode());
+ QScopedPointer<BNode> n(bdec.decode());
- if (!n || n->getType() != BNode::DICT)
+ if (!n || n.data()->getType() != BNode::DICT)
return;
// try to make a RPCMsg of it
- RPCMsg::Ptr msg = factory.build((BDictNode*)n.get(), this);
+ RPCMsg::Ptr msg = factory.build((BDictNode*)n.data(), this);
if (msg)
{
if (addr.ipVersion() == 6 && addr.isIPv4Mapped())
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include "chunkselectorinterface.h"
-#include <boost/concept_check.hpp>
-#include <boost/concept_check.hpp>
namespace bt
{
#include "bcodec/bdecoder.h"
#include "bcodec/bnode.h"
#include "util/error.h"
-#include <boost/concept_check.hpp>
namespace bt
{
#include <util/circularbuffer.h>
#include <util/timer.h>
#include <utp/remotewindow.h>
-#include <boost/concept_check.hpp>
-
-
namespace utp
#include <utp/utpserver.h>
#include <utp/utpsocket.h>
#include <torrent/globals.h>
-#include <boost/concept_check.hpp>
using namespace utp;