mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 21:46:03 +03:00
Sharedialog: Removed Thumbnail retrieval.
It uses an unstable API that the server does not really support. We need to postpone that. Removed for now.
This commit is contained in:
parent
bed34b1ddd
commit
eada70ba44
2 changed files with 0 additions and 44 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue