Exemple #1
0
void ListEngine::connectDownloader()
{
    connect(this, SIGNAL(download(QUrl,QUrl)), m_parent->downloader(), SLOT(download(QUrl,QUrl)));
    connect(m_parent->downloader(), SIGNAL(downloadComplete(QUrl,QUrl)), this, SLOT(downloadComplete(QUrl,QUrl)));
    connect(this, SIGNAL(listDir(QUrl)), m_parent->downloader(), SLOT(listDir(QUrl)));
    connect(m_parent->downloader(), SIGNAL(listingComplete(QUrl)), this, SLOT(listingComplete(QUrl)));
}
Exemple #2
0
void Downloader::listDirComplete(const QUrl &url)
{
    m_dirLister->stop();
    disconnect(m_dirLister,SIGNAL(completed(QUrl)), this, SLOT(listDirComplete(QUrl)));
    emit listingComplete(url);
}
void ListEngine::setSubRequestSignature(const QString& subRequestSignature)
{
    m_subRequestSignature = subRequestSignature;
}

const QString& ListEngine::subRequestSignature() const {
	return m_subRequestSignature;
}

void ListEngine::connectDownloader()
{
    connect(this, SIGNAL(download(const KUrl, const KUrl)), m_parent->downloader(), SLOT(download(const KUrl, const KUrl)));
    connect(m_parent->downloader(), SIGNAL(downloadComplete(const KUrl, const KUrl)), this, SLOT(downloadComplete(const KUrl, const KUrl)));
    connect(this, SIGNAL(listDir(KUrl)), m_parent->downloader(), SLOT(listDir(KUrl)));
    connect(m_parent->downloader(), SIGNAL(listingComplete(KUrl)), this, SLOT(listingComplete(KUrl)));
}

void ListEngine::disconnectDownloader()
{
    disconnect(this, SIGNAL(download(const KUrl, const KUrl)), m_parent->downloader(), SLOT(download(const KUrl, const KUrl)));
    disconnect(m_parent->downloader(), SIGNAL(downloadComplete(const KUrl, const KUrl)), this, SLOT(downloadComplete(const KUrl, const KUrl)));
    disconnect(this, SIGNAL(listDir(KUrl)), m_parent->downloader(), SLOT(listDir(KUrl)));
    disconnect(m_parent->downloader(), SIGNAL(listingComplete(KUrl)), this, SLOT(listingComplete(KUrl)));
}

void ListEngine::stop(unsigned long waitToTerminate, bool quitEventLoop)
{
    m_stop = true;
    if (quitEventLoop) {
        quit();