diff --git a/src/gui/sharedialog.cpp b/src/gui/sharedialog.cpp index d64c2fd25..c1c8e7377 100644 --- a/src/gui/sharedialog.cpp +++ b/src/gui/sharedialog.cpp @@ -208,13 +208,6 @@ void ShareDialog::getShares() OcsShareJob *job = new OcsShareJob("GET", url, _account, this); connect(job, SIGNAL(jobFinished(QString)), this, SLOT(slotSharesFetched(QString))); job->start(); - - if (QFileInfo(_localPath).isFile()) { - QUrl url2 = Account::concatUrlPath(AccountManager::instance()->account()->url(), QString("index.php/apps/files/api/v1/thumbnail/150/150/%1").arg(_sharePath)); - ThumbnailJob *job2 = new ThumbnailJob(url2, AccountManager::instance()->account(), this); - connect(job2, SIGNAL(jobFinished(int, QByteArray)), SLOT(slotThumbnailFetched(int, QByteArray))); - job2->start(); - } } void ShareDialog::slotSharesFetched(const QString &reply) @@ -566,25 +559,4 @@ bool OcsShareJob::finished() return true; } -ThumbnailJob::ThumbnailJob(const QUrl &url, AccountPtr account, QObject* parent) -: AbstractNetworkJob(account, "", parent), - _url(url) -{ - setIgnoreCredentialFailure(true); -} - -void ThumbnailJob::start() -{ - qDebug() << Q_FUNC_INFO; - setReply(getRequest(_url)); - setupConnections(reply()); - AbstractNetworkJob::start(); -} - -bool ThumbnailJob::finished() -{ - emit jobFinished(reply()->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), reply()->readAll()); - return true; -} - } diff --git a/src/gui/sharedialog.h b/src/gui/sharedialog.h index 7bd87c19d..ae19fd22b 100644 --- a/src/gui/sharedialog.h +++ b/src/gui/sharedialog.h @@ -42,22 +42,6 @@ private: }; -class ThumbnailJob : public AbstractNetworkJob { - Q_OBJECT -public: - explicit ThumbnailJob(const QUrl& url, AccountPtr account, QObject* parent = 0); -public slots: - void start() Q_DECL_OVERRIDE; -signals: - void jobFinished(int statusCode, QByteArray reply); -private slots: - virtual bool finished() Q_DECL_OVERRIDE; -private: - QUrl _url; -}; - - - namespace Ui { class ShareDialog; }