Update libqmatrixclient && fix image provider crashes.
This commit is contained in:
parent
b5644cb07c
commit
6eb7f21090
|
@ -14,7 +14,7 @@ Item {
|
|||
|
||||
id: image
|
||||
visible: realSource
|
||||
source: realSource
|
||||
source: width < 1 ? "" : realSource
|
||||
sourceSize.width: width
|
||||
sourceSize.height: width
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 23bf0e83aec1adaf81d9c50ce2385a98c20e3c93
|
||||
Subproject commit b467b0816f5f6816778f90b55a9d0b5437310fd5
|
|
@ -6,10 +6,10 @@
|
|||
using QMatrixClient::BaseJob;
|
||||
|
||||
ThumbnailResponse::ThumbnailResponse(QMatrixClient::Connection* c,
|
||||
QString mediaId, const QSize& requestedSize)
|
||||
QString id, const QSize& size)
|
||||
: c(c),
|
||||
mediaId(std::move(mediaId)),
|
||||
requestedSize(requestedSize),
|
||||
mediaId(std::move(id)),
|
||||
requestedSize(size),
|
||||
errorStr("Image request hasn't started") {
|
||||
if (requestedSize.isEmpty()) {
|
||||
errorStr.clear();
|
||||
|
@ -61,10 +61,11 @@ void ThumbnailResponse::prepareResult() {
|
|||
|
||||
void ThumbnailResponse::doCancel() {
|
||||
// Runs in the main thread, not QML thread
|
||||
if (job) {
|
||||
Q_ASSERT(QThread::currentThread() == job->thread());
|
||||
if (job)
|
||||
job->abandon();
|
||||
}
|
||||
}
|
||||
|
||||
QQuickTextureFactory* ThumbnailResponse::textureFactory() const {
|
||||
QReadLocker _(&lock);
|
||||
|
@ -83,6 +84,6 @@ void ThumbnailResponse::cancel() {
|
|||
|
||||
QQuickImageResponse* ImageProvider::requestImageResponse(
|
||||
const QString& id, const QSize& requestedSize) {
|
||||
qDebug() << "ImageProvider: requesting " << id;
|
||||
qDebug() << "ImageProvider: requesting " << id << "of size" << requestedSize;
|
||||
return new ThumbnailResponse(m_connection.load(), id, requestedSize);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue