mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-24 02:42:52 +00:00
kget: remove unused Transfer constructor argument
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
476eb884d7
commit
ea9977cf4b
18 changed files with 25 additions and 44 deletions
|
@ -858,7 +858,7 @@ QList<TransferHandler*> KGet::createTransfers(const QList<TransferData> &dataIte
|
|||
Transfer *newTransfer = 0;
|
||||
foreach (TransferFactory *factory, m_transferFactories) {
|
||||
kDebug(5001) << "Trying plugin n.plugins=" << m_transferFactories.size();
|
||||
if ((newTransfer = factory->createTransfer(data.src, data.dest, group, m_scheduler, data.e))) {
|
||||
if ((newTransfer = factory->createTransfer(data.src, data.dest, group, m_scheduler))) {
|
||||
// kDebug(5001) << "KGet::createTransfer -> CREATING NEW TRANSFER ON GROUP: _" << group->name() << "_";
|
||||
newTransfer->create();
|
||||
newTransfer->load(data.e);
|
||||
|
|
|
@ -25,14 +25,12 @@ TransferFactory::TransferFactory(QObject *parent, const QVariantList &args)
|
|||
|
||||
Transfer * TransferFactory::createTransfer(const KUrl &srcUrl, const KUrl &destUrl,
|
||||
TransferGroup * parent,
|
||||
Scheduler * scheduler,
|
||||
const QDomElement * n)
|
||||
Scheduler * scheduler)
|
||||
{
|
||||
Q_UNUSED(srcUrl)
|
||||
Q_UNUSED(destUrl)
|
||||
Q_UNUSED(parent)
|
||||
Q_UNUSED(scheduler)
|
||||
Q_UNUSED(n)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -57,8 +57,7 @@ class KGET_EXPORT TransferFactory : public KGetPlugin
|
|||
|
||||
virtual Transfer * createTransfer( const KUrl &srcUrl, const KUrl &destUrl,
|
||||
TransferGroup * parent,
|
||||
Scheduler * scheduler,
|
||||
const QDomElement * n = 0 );
|
||||
Scheduler * scheduler);
|
||||
|
||||
virtual TransferHandler * createTransferHandler(Transfer * transfer,
|
||||
Scheduler * scheduler);
|
||||
|
|
|
@ -42,8 +42,7 @@ const StatusStrings STATUSTEXTS[] = {
|
|||
const QStringList STATUSICONS = QStringList() << "media-playback-start" << "view-history" << "process-stop" << "dialog-error" << "dialog-ok" << "media-playback-start" << "media-playback-pause";
|
||||
|
||||
Transfer::Transfer(TransferGroup * parent, TransferFactory * factory,
|
||||
Scheduler * scheduler, const KUrl & source, const KUrl & dest,
|
||||
const QDomElement * e)
|
||||
Scheduler * scheduler, const KUrl & source, const KUrl & dest)
|
||||
: Job(scheduler, parent),
|
||||
m_source(source), m_dest(dest),
|
||||
m_totalSize(0), m_downloadedSize(0), m_uploadedSize(0),
|
||||
|
@ -52,7 +51,6 @@ Transfer::Transfer(TransferGroup * parent, TransferFactory * factory,
|
|||
m_capabilities(0), m_visibleUploadLimit(0), m_visibleDownloadLimit(0),
|
||||
m_ratio(0), m_handler(0), m_factory(factory)
|
||||
{
|
||||
Q_UNUSED(e)
|
||||
}
|
||||
|
||||
Transfer::~Transfer()
|
||||
|
|
|
@ -97,8 +97,7 @@ class KGET_EXPORT Transfer : public Job
|
|||
Q_DECLARE_FLAGS(DeleteOptions, DeleteOption)
|
||||
|
||||
Transfer(TransferGroup * parent, TransferFactory * factory,
|
||||
Scheduler * scheduler, const KUrl & src, const KUrl & dest,
|
||||
const QDomElement * e = 0);
|
||||
Scheduler * scheduler, const KUrl & src, const KUrl & dest);
|
||||
|
||||
virtual ~Transfer();
|
||||
|
||||
|
|
|
@ -106,8 +106,7 @@ void XmlStore::DeleteThread::run()
|
|||
|
||||
if(QString::compare(element.attribute("Source"), m_item.source()) == 0) {
|
||||
root.removeChild(element);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
TransferHistoryItem item;
|
||||
item.setDest(element.attribute("Dest"));
|
||||
item.setSource(element.attribute("Source"));
|
||||
|
|
|
@ -24,9 +24,8 @@
|
|||
#include <KDebug>
|
||||
|
||||
TransferKio::TransferKio(TransferGroup * parent, TransferFactory * factory,
|
||||
Scheduler * scheduler, const KUrl & source, const KUrl & dest,
|
||||
const QDomElement * e)
|
||||
: Transfer(parent, factory, scheduler, source, dest, e),
|
||||
Scheduler * scheduler, const KUrl & source, const KUrl & dest)
|
||||
: Transfer(parent, factory, scheduler, source, dest),
|
||||
m_copyjob(nullptr),
|
||||
m_verifier(nullptr),
|
||||
m_filemodel(nullptr)
|
||||
|
|
|
@ -28,8 +28,7 @@ class TransferKio : public Transfer
|
|||
Q_OBJECT
|
||||
public:
|
||||
TransferKio(TransferGroup * parent, TransferFactory * factory,
|
||||
Scheduler * scheduler, const KUrl & src, const KUrl & dest,
|
||||
const QDomElement * e = 0);
|
||||
Scheduler * scheduler, const KUrl & src, const KUrl & dest);
|
||||
|
||||
// --- Job virtual functions ---
|
||||
void start() final;
|
||||
|
|
|
@ -30,14 +30,12 @@ TransferKioFactory::~TransferKioFactory()
|
|||
|
||||
Transfer * TransferKioFactory::createTransfer( const KUrl &srcUrl, const KUrl &destUrl,
|
||||
TransferGroup * parent,
|
||||
Scheduler * scheduler,
|
||||
const QDomElement * e )
|
||||
Scheduler * scheduler)
|
||||
{
|
||||
kDebug(5001) << "TransferKioFactory::createTransfer";
|
||||
|
||||
if (isSupported(srcUrl))
|
||||
{
|
||||
return new TransferKio(parent, this, scheduler, srcUrl, destUrl, e);
|
||||
if (isSupported(srcUrl)) {
|
||||
return new TransferKio(parent, this, scheduler, srcUrl, destUrl);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -25,8 +25,7 @@ class TransferKioFactory : public TransferFactory
|
|||
~TransferKioFactory();
|
||||
|
||||
Transfer * createTransfer( const KUrl &srcUrl, const KUrl &destUrl,
|
||||
TransferGroup * parent, Scheduler * scheduler,
|
||||
const QDomElement * e = 0 );
|
||||
TransferGroup * parent, Scheduler * scheduler);
|
||||
|
||||
bool isSupported(const KUrl &url) const;
|
||||
QStringList addsProtocols() const;
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
|
||||
MmsTransfer::MmsTransfer(TransferGroup * parent, TransferFactory * factory,
|
||||
Scheduler * scheduler, const KUrl & source, const
|
||||
KUrl &dest, const QDomElement * e)
|
||||
: Transfer(parent, factory, scheduler, source, dest, e),
|
||||
KUrl &dest)
|
||||
: Transfer(parent, factory, scheduler, source, dest),
|
||||
m_mmsdownload(NULL),
|
||||
m_amountThreads(MmsSettings::threads()),
|
||||
m_retryDownload(false)
|
||||
|
|
|
@ -34,8 +34,7 @@ class MmsTransfer : public Transfer
|
|||
|
||||
public:
|
||||
MmsTransfer(TransferGroup * parent, TransferFactory * factory,
|
||||
Scheduler * scheduler, const KUrl & src, const KUrl & dest,
|
||||
const QDomElement * e = 0);
|
||||
Scheduler * scheduler, const KUrl & src, const KUrl & dest);
|
||||
~MmsTransfer();
|
||||
|
||||
public slots:
|
||||
|
|
|
@ -34,15 +34,14 @@ MmsTransferFactory::~MmsTransferFactory()
|
|||
|
||||
Transfer * MmsTransferFactory::createTransfer( const KUrl &srcUrl, const KUrl &destUrl,
|
||||
TransferGroup * parent,
|
||||
Scheduler * scheduler,
|
||||
const QDomElement * e )
|
||||
Scheduler * scheduler)
|
||||
{
|
||||
kDebug(5001) << "MmsTransferFactory::createTransfer";
|
||||
|
||||
QString prot = srcUrl.protocol();
|
||||
kDebug(5001) << "Protocol = " << prot;
|
||||
if (prot == "mms" || prot == "mmsh") {
|
||||
return new MmsTransfer(parent, this, scheduler, srcUrl, destUrl, e);
|
||||
return new MmsTransfer(parent, this, scheduler, srcUrl, destUrl);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -35,8 +35,7 @@ class MmsTransferFactory : public TransferFactory
|
|||
~MmsTransferFactory();
|
||||
|
||||
Transfer * createTransfer( const KUrl &srcUrl, const KUrl &destUrl,
|
||||
TransferGroup * parent, Scheduler * scheduler,
|
||||
const QDomElement * e = 0 );
|
||||
TransferGroup * parent, Scheduler * scheduler);
|
||||
|
||||
bool isSupported(const KUrl &url) const;
|
||||
};
|
||||
|
|
|
@ -385,9 +385,8 @@ Qt::ItemFlags TorrentFileModel::flags(const QModelIndex &index) const
|
|||
}
|
||||
|
||||
TransferTorrent::TransferTorrent(TransferGroup* parent, TransferFactory* factory,
|
||||
Scheduler* scheduler, const KUrl &source, const KUrl &dest,
|
||||
const QDomElement* e)
|
||||
: Transfer(parent, factory, scheduler, source, dest, e),
|
||||
Scheduler* scheduler, const KUrl &source, const KUrl &dest)
|
||||
: Transfer(parent, factory, scheduler, source, dest),
|
||||
m_startonload(false), m_polltimerid(0), m_resumetimerid(0), m_ltsession(nullptr),
|
||||
m_filemodel(nullptr), m_dirwatch(nullptr)
|
||||
{
|
||||
|
|
|
@ -38,8 +38,7 @@ class TransferTorrent : public Transfer
|
|||
// Transfer reimplementations
|
||||
public:
|
||||
TransferTorrent(TransferGroup* parent, TransferFactory* factory,
|
||||
Scheduler* scheduler, const KUrl &src, const KUrl &dest,
|
||||
const QDomElement* e = 0);
|
||||
Scheduler* scheduler, const KUrl &src, const KUrl &dest);
|
||||
~TransferTorrent();
|
||||
|
||||
public:
|
||||
|
|
|
@ -37,12 +37,11 @@ TransferTorrentFactory::~TransferTorrentFactory()
|
|||
|
||||
Transfer* TransferTorrentFactory::createTransfer(const KUrl &srcUrl, const KUrl &destUrl,
|
||||
TransferGroup* parent,
|
||||
Scheduler* scheduler,
|
||||
const QDomElement* e)
|
||||
Scheduler* scheduler)
|
||||
{
|
||||
kDebug(5001) << "TransferTorrentFactory::createTransfer";
|
||||
if (isSupported(srcUrl)) {
|
||||
return new TransferTorrent(parent, this, scheduler, srcUrl, destUrl, e);
|
||||
return new TransferTorrent(parent, this, scheduler, srcUrl, destUrl);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -34,8 +34,7 @@ public:
|
|||
~TransferTorrentFactory();
|
||||
|
||||
Transfer* createTransfer(const KUrl &srcUrl, const KUrl &destUrl,
|
||||
TransferGroup* parent, Scheduler* scheduler,
|
||||
const QDomElement* e = 0);
|
||||
TransferGroup* parent, Scheduler* scheduler);
|
||||
bool isSupported(const KUrl &url) const;
|
||||
QStringList addsProtocols() const;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue